Power Supply Resevoir Size

Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.
I don't have the spreadsheet.

Take a 200Turn primary and add on a 100Turn secondary.
Apply 120Vac to the primary. The open circuit output voltage will be 120Vac*100T/200T = 60Vac.

Take that same transformer and apply a resistive load to the secondary. Adjust that secondary load until the rated AC current is drawn from the transformer.
The output voltage will now be the "rated output voltage".

That voltage could be 55Vac. If we take that 55Vac as the actual rated output voltage that transformer will be specified as a 120:55Vac The regulation will be [60/55*100] - 100 = 9.090909%, probably specified in the datasheet as either 9% or more accuratly as 9.1%

The turns ratio of that hypothetical transformer is NOT 120/55
The Turns Ratio is 120/60 = 2times.

Find another way to incorporate your 40mA of fictitious output current overhead. The output current is 5Aac when delivering 100W to a 8r0 resistive load.
 
Phew, Tom, with those posts you're making up for being out of the loop for that period! So, hope your health keeps up for you from now on ...

Yes, the VB thing is what the problem would be with Open Office, we have a m/c with Excel so I'll give it a run there.

And don't apologise about the maths thing - these days my head would explode trying to digest what you've been doing ...

Cheers,
Frank
 
This version looks pretty good, finally (attached). And now it runs in about 5 seconds instead of 40, on my machine.

I think that the "# of diodes" functionality works OK, now. I was also finally able to get the equation version of the diode Rdiode(i) model to work.

I changed the optional series resistance and inductance fields to be DELTA R and DELTA L, so that users can also SUBTRACT resistance and inductance, as long as it doesn't make the resistance or inductance that represent the secondary's R and L go below zero.

I have not yet looked at the possible turns-ratio issue that AndrewT brought up.

I changed the names and meanings of the peak output voltage and current fields, to avoid further confusion. They are now named "Peak Rload Voltage" and "Peak Rload Current". The additional current drawn by the amplifier or other active load is entered in a separate field, and adds to the "iload" that is used in the calculations, iload being the power supply's output current, not the active load's resistive load's current.

A screen image of the main screen and an image of the schematic of what is simulated for ndiodes = 2 are also attached. (The schematic is one of the ones included in the spreadsheet.)

Tom
 

Attachments

  • Power Supply and Transformer Analysis v0.95.zip
    542.9 KB · Views: 51
  • v0.95scrn.jpg
    v0.95scrn.jpg
    365.1 KB · Views: 197
  • schema1_for_XLS_2.jpg
    schema1_for_XLS_2.jpg
    83.2 KB · Views: 197
Last edited:
I documented some of the equations behind the transformer-rectifier-capacitor power supply spreadsheet, for anyone who is interested in the analysis of these types of circuits. Review comments would be welcome.

PDF document is attached. Sorry about the low image quality. It was exceeding the maximum allowed size.

Cheers,

Tom

Once more with feeling -PDF removed. Hang on, the other post is dated later - Have I just mucked up causality and physics as we know it? :D
 
I was curious about how the accuracy of the spreadsheet's waveforms would be affected by stretching out the run time. Since that makes the time-steps larger, it should eventually make the results inaccurate to the point where they are unusable. (We could always just increase the number of steps, to keep it accurate for any longer run times. But that would be a little more involved, because then each plot's row-range settings would need to be adjusted, to use the extra rows of data that would result.)

Anyway, it's not nearly as bad as I thought it might be. I was able to increase the run time from .0375 sec to 0.1 sec with no significant change in the waveforms of the results. Although slight oscillations of the peak output voltage start to appear at durations of around 0.2 seconds, with 4000 time steps, the reported peak value is still at 99.8% of the correct value even out to 2.0 seconds.

Below are some screen shots that show the progression, with 100000 uF of capacitance.

Overall, I am amazed at how much this simple little numerical solver can do. It looks like this tool will also be useful for investigating power supply startup behavior, after all, even with relatively-large reservoir capacitance values.
 

Attachments

  • 100kuF_1sec_zoomed-53-54v.jpg
    100kuF_1sec_zoomed-53-54v.jpg
    405.4 KB · Views: 60
  • 100kuF_1sec.jpg
    100kuF_1sec.jpg
    369.3 KB · Views: 66
  • 100kuF_.375sec_zoomed-53-54v.jpg
    100kuF_.375sec_zoomed-53-54v.jpg
    413.9 KB · Views: 150
  • 100kuF_.375sec.jpg
    100kuF_.375sec.jpg
    374.2 KB · Views: 159
  • 100kuF_.0375sec.jpg
    100kuF_.0375sec.jpg
    349 KB · Views: 168
  • 100kuF_.025sec_zoomed-53-54v_init2.jpg
    100kuF_.025sec_zoomed-53-54v_init2.jpg
    371.3 KB · Views: 59
  • 100kuF_.05sec_zoomed-53-54v_init2.jpg
    100kuF_.05sec_zoomed-53-54v_init2.jpg
    382 KB · Views: 55
  • 100kuF_0.1sec_zoomed-53-54v_init2.jpg
    100kuF_0.1sec_zoomed-53-54v_init2.jpg
    397 KB · Views: 61
  • 100kuF_2.0sec_zoomed-53-54v_init2.jpg
    100kuF_2.0sec_zoomed-53-54v_init2.jpg
    367.5 KB · Views: 58
  • 100kuF_1.0sec_zoomed-53-54v_init2.jpg
    100kuF_1.0sec_zoomed-53-54v_init2.jpg
    406.8 KB · Views: 54
Added Variable AC Line Phase Angle

I should have thought of this sooner.

There is now a user-entry field for the phase angle of the secondary winding's AC input voltage. It can be varied from -90 degress to +90 degrees.

The secondary's AC input voltage is modeled with cos(wt+p). So with the phase angle p = 0, or missing as it was until now, the AC input voltage was at its maximum, at startup. Now it can be varied to be anywhere from zero to its maximum, on either the up-slope or down-slope side of the sinusoid.

Version 0.96 is attached.

Cheers,

Tom

Document removed at OP's request
 
AC Input's Phase Angle Setting Looks Useful

I was just playing around with the new phase angle setting and it looks like it could be very useful.

The following is just an example, from me just playing with the phase angle setting for the first time, but it might illustrate some of the potential utility of the power supply simulation spreadsheet, and the newly-added phase angle setting for the AC input voltage:

I started out with 10000uF, 100 Watts, 8 Ohms, with a 200VA/44V transformer, with the AC input phase angle at the default zero degrees. (See attached plot.)

I changed the phase angle to 90 degrees, so that the cosine looks like a sine, i.e. it starts at zero. I noticed a much faster rise-time and some overshoot. (See attached plot.)

I wondered if the overshoot would be larger if there was less resistance in the transformer or wiring so I added a "negative 0.1-Ohm" delta-R, to subtract 0.1 Ohm from the series resistance. Wow. The overshoot increased to almost 77 V (versus the nominal 55V or so), i.e. almost to 40%!

I decided to see if adding capacitance could tame the overshoot. I found that by tweaking the C value I could get either overshoot or undershoot. Just for fun, I tuned the C value to 25600 uF, to get no overshoot or undershoot.

For our much-earlier discussion: This looks like it might sometimes be another possible consideration or reason to increase or decrease the C value.

Unfortunately, there is a trade-off, as always, and we can see that in order to eliminate the large voltage overshoot by (in this case) raising C, it would increase the startup current surge by about 50%, in this particular case. Adding 0.1 Ohm to such a circuit might be a better option.

Later,

Tom
 

Attachments

  • Phase_0_10kuF.jpg
    Phase_0_10kuF.jpg
    376.4 KB · Views: 69
  • Phase_90_10kuF.jpg
    Phase_90_10kuF.jpg
    378.7 KB · Views: 69
  • Phase_90_10kuF_70oshoot.jpg
    Phase_90_10kuF_70oshoot.jpg
    395.8 KB · Views: 59
  • Phase_90_25.6kuF_noshoot.jpg
    Phase_90_25.6kuF_noshoot.jpg
    398 KB · Views: 60
  • Phase_90_25.6kuF_noshoot_but300A.jpg
    Phase_90_25.6kuF_noshoot_but300A.jpg
    391.2 KB · Views: 67
Last edited:
I documented some of the equations behind the transformer-rectifier-capacitor power supply spreadsheet, for anyone who is interested in the analysis of these types of circuits. Review comments would be welcome.

PDF document is attached. Sorry about the low image quality. It was exceeding the maximum allowed size.

Cheers,

Tom

I should know better than to make changes at the last minute. Also, I added and corrected some things.

A new version of the transformer-rectifier-capacitor power supply analysis document is attached, as a PDF file.

Please, delete any copies of the older version that you may have downloaded. Thanks.

Cheers,

Tom
 

Attachments

  • Analysis of an Uncontrolled Single-Phase Power Supply Rectifier Circuit - Gootee - dV6.pdf
    945 KB · Views: 75
I should have thought of this sooner.

There is now a user-entry field for the phase angle of the secondary winding's AC input voltage. It can be varied from -90 degress to +90 degrees.

The secondary's AC input voltage is modeled with cos(wt+p). So with the phase angle p = 0, or missing as it was until now, the AC input voltage was at its maximum, at startup. Now it can be varied to be anywhere from zero to its maximum, on either the up-slope or down-slope side of the sinusoid.

Version 0.96 is attached.

Cheers,

Tom

Document removed at OP's request

Oops. I guess I asked the mods to remove the wrong document. I was trying to get them to remove the older version of the PDF file, not the spreadsheet.

I have attached the latest version of the spreadsheet to this post.

Tom
 

Attachments

  • Power Supply and Transformer Analysis v0.96_2.zip
    551.9 KB · Views: 54
I've spent the better part of the day reading through this thread and I must say. Excellent looking work you have compiled Tom!

Thank you. It has been enjoyable, for me. But I am only an egg.

This planet is strange.

But almost anyone can accomplish almost anything, if they spend enough time trying. I am probably just too stupid to know when to stop, sometimes.

I guess the latest spreadsheet effort wasn't bad, for my first Excel macro, and my first VBA programming.

It turns out that you can learn how to do almost anything if you add the word "tutorial" to your google search string.

(Being a former C programmer didn't hurt. And I did a little Fortran back in the 70s, and a smidgen of Apple II Basic in the early 80s.)

I really am amazed that those tiny little differential equations and the small amount of code used to generate their numerical solution can produce such a powerful and generalized tool. You can enter "crazy" values and the solver dutifully churns out the resulting plots, some of which are pretty interesting.

Anyway, thanks again. And I'm very happy to hear that you have studied this thread. It has a lot of good stuff in it. Unfortunately, it seems to have almost died. Maybe there's no use in beating a dead horse (except, of course, for the sheer joy of it <grin>). Or maybe everyone is just busy playing with the spreadsheet. (Yeah, right.)

I did forget to mention that all of the (latest) spreadsheet's plots and calculated values that I have checked have been within a few percent (at most) of the results of my LT-Spice simulations of identical circuits (even the huge, odd-looking inrush currents). So it looks like the implemented math must be mostly correct.

Maybe sometime soon I can actually go back to working on the calculations for decoupling capacitors.

Cheers,

Tom
 
Tom,
Don't think that this thread is not being read and watched. I have read all of it from the beginning to the end. Now I just have to learn how to use what you have created. Since I am utterly stupid when it comes to what you have done here that might take awhile...... But as you say if you try hard enough you can learn something new. I will have to try and figure out what goes where in your spread sheet. I originally thought that all we would end up with was a spread sheet with recommended values of power supply rating and capacitor values that we could use to fulfill or requirements for different power amp outputs and impedance loading. You did way more than that but us dummy's will have to learn how to use what you created.

Thanks for all the hard work,
Steven
 
Anyway, thanks again. And I'm very happy to hear that you have studied this thread. It has a lot of good stuff in it. Unfortunately, it seems to have almost died. Maybe there's no use in beating a dead horse (except, of course, for the sheer joy of it <grin>). Or maybe everyone is just busy playing with the spreadsheet. (Yeah, right.)

I did forget to mention that all of the (latest) spreadsheet's plots and calculated values that I have checked have been within a few percent (at most) of the results of my LT-Spice simulations of identical circuits (even the huge, odd-looking inrush currents). So it looks like the implemented math must be mostly correct.

Maybe sometime soon I can actually go back to working on the calculations for decoupling capacitors.

Cheers,

Tom
I'll just echo other's comments, Tom, congrats on putting in the effort. I've been at other stuff, and have yet to look at the sheet, sorry!! But, I will give it a major go, shortly, I promise(!), and see if I can think of anything further to add, that may be of value ...

Frank
 
Tom,
Don't think that this thread is not being read and watched. I have read all of it from the beginning to the end. Now I just have to learn how to use what you have created. Since I am utterly stupid when it comes to what you have done here that might take awhile...... But as you say if you try hard enough you can learn something new. I will have to try and figure out what goes where in your spread sheet. I originally thought that all we would end up with was a spread sheet with recommended values of power supply rating and capacitor values that we could use to fulfill or requirements for different power amp outputs and impedance loading. You did way more than that but us dummy's will have to learn how to use what you created.

Thanks for all the hard work,
Steven

Steven,

Thanks. It is still my intent to try to create what you mentioned. The spreadsheet I posted recently just takes what is in the system and gives how the system will perform. I still want to try to create a "backwards version", where we can give it the performance desired and it gives us the options for what to put in the system, to make it have the characteristics we would like.

Cheers,

Tom
 
I'll just echo other's comments, Tom, congrats on putting in the effort. I've been at other stuff, and have yet to look at the sheet, sorry!! But, I will give it a major go, shortly, I promise(!), and see if I can think of anything further to add, that may be of value ...

Frank

Thanks, Frank. I would definitely appreciate any suggestions.

I did already add a field for a user-override of the dV/dt at t=0 initial condition, since the automatic entry currently assumes that the diodes are not conducting.

I don't know how useful it might be but one other possibility that comes readily to mind is adding a delay time for the load current startup, so that the effects of the step input could be evaluated. That could be pretty-easily extended to allow a pulsed load current, with settable duty cycle. Other types of load signals might require some serious amount of work. But I guess the load current amplitude could also have a user override, if that would be useful.

If that was added, then it would also be handy to be able to specify how many cycles from the end of the simulation run the software should look at (instead of the current default of just the last cycle), when it comes up with the values it displays, i.e. the min, max, average, rms, and P-P ripple of the PSU output voltage, and the "dropout" safety margin, and the peak diode and cap currents. That way, people could manually set it to catch transients caused by the changing load current.

There are other things that could be done, to make it easier to use, like some way of automatically handling the number of steps used and the automated plot setup that would then be needed.

It would also be nice to have some easier way to zoom and unzoom the plots. Right now, you have to click on an axis label and manually set the minimum and/or maximum extent, for that axis, if you want to change it. I don't know if there's a way to make the axis-format fields obey values from elsewhere in the spreadsheet. But maybe there's a better plot object available. I'll have to check on that.

But really, if people need much more functionality, then they should be using LT-Spice, anyway.

I'll look forward to any suggestions you have. An image of the latest (unreleased) version's user interface screen is attached.

Cheers,

Tom
 

Attachments

  • v0.97scrn.jpg
    v0.97scrn.jpg
    387 KB · Views: 167
Last edited:
I didn't want to post new versions so often. But the new scalable plot axes in this one are very nice (or maybe I'm just amazed that I got them working). And I probably won't be adding anything else, extremely soon.

I was able to figure out how to add a "slider" control for the minimum and maximum value for each axis. So now you can zoom in on any part of a plot, very easily and quickly.

As I already mentioned, I have also added a "user override" for the initial value of the rate of change of the capacitor voltage.

I have also attached in inage of the main screen.

Enjoy.

Tom
 

Attachments

  • v0.97scalable_scrn.jpg
    v0.97scalable_scrn.jpg
    396.3 KB · Views: 155
  • Power Supply and Transformer Analysis v0.97_scalable.zip
    554.5 KB · Views: 49
It won't let me change mains from 60Hz to 50Hz:-
"Document opened in read only mode"

Is this a default setting on my PC, or is this a setting included in the XLS file?

As far as I know, I didn't do anything that would have made the file read-only. The only "protection" I tried to use was to select "Protect Sheet", for the Transformer tab only. But anyone can Unprotect it. I did that, for that sheet only, because that sheet has a lot of things that could be changed that shouldn't be changed unless someone has new measurements to enter.

I just tried it and was able to change 60 Hz to 50 Hz and then run it. But my Excel setup is no longer the factory default.

First try going to the Review tab or menu and selecting "Unprotect Sheet".

It seems like read-only mode should only affect things if you tried to save it with the same name when it was read-only. No idea why that would afect behavior at the cell-edit level. But I don't know a lot about Excel.

You didn't say what version of Excel you have but try saving the file to a different name, and as your version of Excel's native file-type (mabe as xlsx instead of xls?). Then open that new file and see if it's better.

Another possibility is that my "Home" version of Excel is limiting my ability to share files, since it's "for non-commercial use only". I guess not too badly because Nico said he got it to work OK. But maybe he didn't try changing anything on the transformer sheet...

I selected Help and it went on line and there are quite a few complaints involving Read-Only mode. One possible solution was to install the latest Service Pack for your version of Excel. But naturally there were some who said that didn't help.

What version of Excel are you using?

[EDIT:] I have been saving the file as an Excel 97-2003 Workbook (.xls file), because I thought that would give the most widely-compatible file type. But maybe that is not the case. So I just tried saving it as an xlsx file but those can't have macros with VBA projects. So I tried the recommended xlsm "macro-enabled workbook" type and I have a bunch of cell names that conflict with built-in names in Excel (e.g. LP1, LP2, LS1, LS2, RP1, RS1, RS2, and XS2 - transformer parasitics). It automatically prepended an underscore to each of them but now I have to go track down any references in the code. After that's done, I will save it as an xlsm file and post that.
 
Last edited:
XLSM version attached.

The xlsm file-type version is attached, created with Excel 2007 from Office Home and Student 2007.

Same functionality as the .xls file type, v0.97, that was previously posted.

Attached screen image shows the two "axis max" sliders used to zoom in near the origin of the plot.

I made it so that the maximum and minimum axis values are printed right next to the sliders, which makes them fairly easy to use. Maybe someday I'll figure out how to do the same thing by dragging a rectangle arond the area you want to zoom to. That would be excellent. And apparently the code I already have for the sliders would work almost directly, since it uses the four "corner values". I just don't know how to get the plot coordinates for the corners of the rectangle from a mouse click-and-drag on a plot. I did see something online that looked like it told how to do that, though.

Cheers,

Tom
 

Attachments

  • Power Supply and Transformer Analysis v0.97_scalable_xlsm.zip
    951.9 KB · Views: 53
  • v0.97scalable_scrn2.jpg
    v0.97scalable_scrn2.jpg
    382.5 KB · Views: 135
Status
This old topic is closed. If you want to reopen this topic, contact a moderator using the "Report Post" button.