Spice simulations and reality compared - Page 1
Forum section: electronics / projects

author: IanB
author_rank: Super Contributor
timestamp: February 06, 2012, 08:43:56 am
content: In another thread ([urlhttps://www.eevblog.com/forum/beginners/linear-power-supply-ideas/]Linear power supply ideas) I was doing some simulations with smoothing capacitors on a rectified transformer output. In particular, it was suggested I look at the AC current load on the transformer secondary as the size of the filter capacitor was increased. The spice simulation predicted that increasing the size of the filter capacitor would have no effect on the magnitude of the surge current supplied by the transformer.Here are the two simulations that showed this. First with a small filter capacitor:And then with a filter capacitor ten times larger:The green trace is the ripple voltage at the load and the blue trace is the current in the transformer secondary. Although the larger capacitor reduces the ripple, the current in the transformer does not change.So, I wondered, would this result be borne out in real life? I guess I had to test it. I have a transformer, a bridge rectifier, and some capacitors. A 12 V 1 A bulb approximated a constant current load. So here goes.First, the result with a 3300 uF filter capacitor. The ripple voltage looks like this:And the transformer current like this. The current sense resistor has 2 mV/A:As can be seen there is about 1.6 V of ripple, and the peak transformer current is 3 A.Next, I increased the filter capacitance to 9900 uF. I had to make do with what I have to hand here, and a 3:1 ratio seems sufficient to show a trend. Here is the ripple voltage:As can be seen it is reduced by a factor of three. Finally, the transformer current with the larger capacitance:As near as I can tell it hasn't changed, which bears out what spice was predicting.Of course, I would expect it to change if I made the capacitor smaller. What I suspect happens is that the current waveform reaches a limit asymptotically as you increase the filter capacitance. Once it has reached this limit, increasing the capacitance further makes no difference.Conclusion: experiments are fun, and some results are hard to guess without actually doing the experiments.

author: w2aew
author_rank: Super Contributor
timestamp: February 06, 2012, 03:34:45 pm
content: The current supplied by the transformer is, in the end, replacing the charge lost off of the cap due to the load. Since your load is a constant current, the amount of charge taken from the cap is the same between cycles, regardless of the capacitor value - it's just that the voltage change for the charge change is different for larger/smaller caps.BIG Kudos to you for backing up your simulation results with breadboarding reality! Simulation is no substitute for reality. For example, Spice has no problem putting 10,000 amps through a 1N914A diode - it doesn't know you'll let the smoke out of it! So, it's always a good idea to apply a pile of common sense (and some hands on reality) to any simulation endeavor whenever you can!

author: IanB
author_rank: Super Contributor
timestamp: February 06, 2012, 04:17:41 pm
content: Quote from: w2aew on February 06, 2012, 03:34:45 pmThanks--I do understand that explanation. However, there was a suggestion that since the voltage on the larger cap would fall less during the "off" part of the cycle, the voltage of the AC cycle would have to rise closer towards the peak before it exceeded the capacitor voltage and allowed current to flow and replace the lost charge. Therefore with this theory the current pulses would become narrower and taller with larger filter capacitors. Evidently this is not what happens. What happens instead is that the average voltage on the capacitor drops just enough so that the current can start flowing at exactly the same point in the AC cycle as it does with a smaller filter capacitor.The upshot is that you can make the filter capacitors in a power supply very large without adversely affecting the load seen by the transformer and thus heating due to non-ideal current flow. There is however an increasing danger that the surge currents at startup may become excessive if the capacitor is made too large.

author: sorin
author_rank: Frequent Contributor
timestamp: February 09, 2012, 03:56:03 pm
content: for first the transformer don't is a ideal power supply, it have a internal resistance (R+L).and the capacitor, don't is ideal, it have ERS

author: IanB
author_rank: Super Contributor
timestamp: February 09, 2012, 04:21:20 pm
content: Quote from: sorin on February 09, 2012, 03:56:03 pmThat's true. Note the Rser = 0.5 ohms in the spice simulation.QuoteAt such a low frequency in this application I don't think the non-ideality of the capacitor will measurably affect the result. The capacitor mostly has DC across it.

author: mstevens
author_rank: Regular Contributor
timestamp: February 10, 2012, 03:13:26 am
content: Quote from: IanB on February 06, 2012, 08:43:56 amThis is just an observation and not intened as an answer to any question that you may have. But I would not expect the current to change at all in the simulation or in real life. In the simulation, the load is modelled as a constant current load. I would no more expect it to change than I would expect a voltage source (simulation) to change its voltage. Subsequently if the model is an equivalent of the real world load then it too would be a constant current load/sink. I don't know maybe my thinking is out of whack; and perhaps my statement does not pertain to your experiment at all as I neglected to thoroughly read it.Melvin

author: IanB
author_rank: Super Contributor
timestamp: February 10, 2012, 03:21:27 am
content: Quote from: mstevens on February 10, 2012, 03:13:26 amThe current delivered to the load is constant. However, the current delivered from the rectifier to the capacitor is delivered in pulses with gaps in between. To deliver the same amount of charge to the capacitor in each pulse, the pulse could be short and high, or long and low (since the charge is the integrated area under the curve). The question asked is: does the shape of the current pulses actually change, or does it remain the same?Incidentally, the reason for the constant current load is that a presumed voltage regulator placed after the capacitors, such as an LM317, will maintain a constant voltage at the load. If the load voltage is constant, the load current will be constant (with a simple passive load). And with a linear regulator the load current is equal to the supply current.

author: mstevens
author_rank: Regular Contributor
timestamp: February 10, 2012, 03:55:42 pm
content: Quote from: IanB on February 10, 2012, 03:21:27 amNot sure how to do this image thing but I have attached it. The image is a simplified version of the PS you initially posted. From my image it seems that only a change voltage with respect to time would change the current from the supply to the capacitor (shape) ...hmmmm changing the cap should change the magnitude but not the shape of the supply current. Does this make sense or am I still in the wrong ball park?

author: IanB
author_rank: Super Contributor
timestamp: February 10, 2012, 09:22:44 pm
content: Quote from: mstevens on February 10, 2012, 03:55:42 pmYes. Here is a plot of V(t) -- voltage with respect to time -- with the small capacitor:And here is a plot of V(t) with the larger capacitor (same scale):As you can see from the pictures, the voltage-time profile is quite different in each case. In in the first case dV/dt is much larger than in the second case.QuoteYes, it might be imagined that changing the capacitor would change the magnitude of the supply current. However, here are the plots of the supply current in the first and second cases (same scale each time):As you can see, the magnitude, shape, and near enough every detail of the supply current is the same in both cases.There is an explanation for this, which I can post a picture to illustrate, but I don't have time to draw it and upload it now. I will do it a little later.