
Home  Forums  Rules  Articles  diyAudio Store  Blogs  Gallery  Wiki  Register  Donations  FAQ  Calendar  Search  Today's Posts  Mark Forums Read  Search 

Please consider donating to help us continue to serve you.
Ads on/off / Custom Title / More PMs / More album space / Advanced printing & mass image saving 

Thread Tools  Search this Thread 
28th November 2012, 05:46 AM  #1611 
diyAudio Member
Join Date: Nov 2006
Location: Indiana

Here's one with a plot of startup from zero volts with a 10000uF cap drawing a 135 Amp current spike (althought spice gives closer to 150 Amps for this case).
And the second one shows what happened at startup after I inserted a randomlychosen 0.47 Ohm resistor and 1 mH inductor in series in the power rail, before the cap. The last two show what can happen when ESR is increased from 0.2 to 2.0 Ohms. Last edited by gootee; 28th November 2012 at 06:09 AM. 
28th November 2012, 09:19 AM  #1612 
Banned
Join Date: Jun 2012
Location: NSW, Australia

Hi, Tom, looking a bit lonely here  see what happens when you don't hang around for awhile!
I don't use Excel on my m/c, rather Open Office, an older version, and it's having difficulties opening your spreadsheet  I had to kill the program which was just spinning its wheels doing nothing. Not sure what the problem is, see what other people's experiences are ... Frank 
28th November 2012, 11:12 AM  #1613 
diyAudio Member
Join Date: Nov 2005
Location: East Coast of South Africa

Tom it works without hangups I use a 12 year old version of excel and it seems fine. Your spreadsheet looks very interesting and I would like to play with it a little to just get familiar with all the variables and what I see. Thank you very much for all your input so far.
__________________
Kindest regards Nico 
28th November 2012, 04:02 PM  #1614  
diyAudio Member
Join Date: Nov 2006
Location: Indiana

Quote:
Looks like you're past due for a software upgrade, my friend! I would have thought that Open Office would have handled the xls file. But it uses a macro written in Visual Basic so maybe that's a problem? I had Open Office but it's on a PC that will no longer boot. I finally broke down and bought MS Office Home and Student 2007, a couple of years ago. It was a little over $100, I think, at Staples, and is licensed for up to three home PCs. Staples now has 2010 and 2011 versions, for $90 to $149. The Solver is pretty cool, and apparently got a lot better with the 2007 version. (I didn't use it for this spreadsheet. Just plain old "numerical methods".) Sorry I've been gone for so long. I was sick for about two weeks straight, with two different ailments. And a lot of "family stuff" happened. And I was maniacally working on handwritten mathematical analyses of this thing, quite a bit, along with the other spreadsheet I have that is supposed to find the absoluteminimum capacitance (among other things). My math skills and memories were/are so rusty that it took about a hundred times longer than it should have, as I had to try to relearn an awful lot. I am glad that I did that, though. I have relearned quite a lot of calculus, and differential equations, and signal and system theory (not to mention trig identities), and it feels pretty good. Now I think I need Maple, and Matlab, and a few others like that. We have many Matlab licenses at work, and lots of Labview stuff, but no Maple. Anyway, I got a bit disgusted with the other spreadsheet I had been working on, which was basically trying to find the solution without having to actually find the solution. So I decided to write this one, first, so I would at least have the "real" solution, somewhere other than in LTSpice. And it only took about a day to get this one to the point where the numerical solver was working and plotting the results. Then I spent another few days prettying it up and adding the transformer modeling. Now that I know a little more about how the circuit equations should work, I will probably try to go back and take a fresh look at them and see if I can finally succeed at deriving closedform expressions for the few things needed to be able to make a NONiterative spreadsheet that can calculate just the things that I originally wanted, which, I think, are basically just the max and min output voltages vs C and vice versa, given the other parameters. But first there are still a few things in this one that I don't quite have nailed down. (Terry Given could probably do them in his sleep.): 1) For the differential equation, I need to transform the transformer model so that there is nothing on the primary side, such that there is just an ideal transformer and then the equivalent series Rs and equivalent series Ls on the secondary side, if that's possible (or whatever needs to be on the secondary side to make the overall transformer be equivalent, with nothing on the primary side). It should be straightforward. I'm just not quite sure about it, yet. Also, 2) I need to verify that the diodes are being correctly accountedfor. Once (1) is verified, then (2) should be much more straightforward. Right now, I've basically got some "fudge factors" on the total diode resistance, to make the results match LTSpice's results, and it's bothering me. If you can get into the spreadsheet and look at the VBA code, you'll be able to see what I mean. Overall, this has been a very interesting circuit/math problem to try to solve. It basically always comes down to a transcendental equation that has no closedform solution. i.e. After the diodes turn off, it's just a firstorder differential equation for the capacitor voltage decay due to the load current, with a solution like e to the minus something t (or, even better, a straight line, in this case, since the load is constantcurrent). BUT, to then find out when the diodes turn back on (i.e. where the decaying cap voltage intersects the rectified sine), you have to say that something proportional to e to the minus something t equals some sinusoid. And that's a transcendental equation with no closedform solution (except in certain special cases where you can use the LambertW function, which is w times e to the w). But there are a couple of tricks that can be used. One is to use Taylor Series representations of the exp and/or sine functions, so that the equation is basically just a polynomial. It's also possible to approximate a sine with a parabola, pretty well, over a limited range of angles (like 0 to Pi/2, or 0 to Pi). But, as is often the case, the devil is in the details. At any rate, if expressions can be found for the turnon and turnoff times or phase angles, then expressions for the min and max voltage shouldn't be far behind. Conceptually, it all seems easy. My rusty math skills are the main problem. P.S. I can see why a lot of people who tried this problem in the past left out the transformer and its inductance. BUT, without the inductance, you could never see the output voltage go above the input voltage, like it does in the third image in post 1611! So then the discharge downslope wuld start at the wrong level, i.e. too low, and you would obviously get an incorrect minimum voltage, too (also too low). That's another reason that simpler models only work when the ripple voltage is small, or the capacitance is "large enough". (Maybe I should also have the spreadsheet do the "standard approximate calculation" method and plot that for comparison.) Cheers, Tom 

28th November 2012, 04:11 PM  #1615 
diyAudio Member
Join Date: Jul 2004
Location: Scottish Borders

Tom,
there's something wrong with the spreadsheet. The formula for max power and related current shows an error of 40mAac. 100W into 8r0 is 5Aac, not 5.04Aac. The turns ratio shows as 2.634. (115.9/44) This is wrong, the rated output voltage does not give the turns ratio. You need the actual input voltage and the actual output voltage, without a load, to give turns ratio.
__________________
regards Andrew T. Sent from my desktop computer using a keyboard Last edited by AndrewT; 28th November 2012 at 04:14 PM. 
28th November 2012, 05:13 PM  #1616  
diyAudio Member
Join Date: Nov 2006
Location: Indiana

Quote:
It should be a pretty good tool. It's just a "what if" analyzer. You can put in your max rated power, load resistance, and the reservoir capacitance, and it will then show you what the power supply output voltage would look like, with a worstcase constantcurrent load. And it also finds and displays the minimum and maximum of the output voltage, and its average and RMS values, and the ripple voltage amplitude, and the peak diode and capacitor currents. It also shows an assumed "dropout" voltage level, which is just the maximum output signal voltage (PLUS 4 volts for the region where the amplifier lives), so you can see whenever the rail voltage (Vout) dips down into that forbidden zone. With all of that, and since it also takes into account the transformer size (VA rating), and the transformer size and the other transformer ratings can also be changed, it should be quite useful. I originally only meant for it to be able to give the steadystate output conditions. But it looks like it does the transient response (i.e. startup from zero volts) perfectly well, too. However, for larger capacitance values, the displayed time duration won't be longenough to see both the transient response and the final result. You could increase the t_stop time, to see more of the response, but unless the number of steps is also increased, the accuracy goes down as t_stop goes up. Changing the number of steps is also possible, but then you would need to rightclick in each plot and use "Select Data" and go in and Edit each plot's data range, to increase the final row number for each yaxis range. So, you can change the Vcap(t_start) initial voltage, on the lower right of the screen, to zero, to see the startup transient behavior, subject to the timeduration and #steps discussion above. But also keep in mind that the Vcap(t_start) voltage might also need to be tweaked even when looking at only the final steadystate response, mainly for cases where the capacitance is very large. I chose an expression to try to determine the initial Vcap voltage so that it would be near the final steadystate output level but if that's not almost exactly right, then for a very large capacitance the output waveform might still be slewing toward another voltage level by the time t_stop is reached and then the displayed max, min, avg, rms, etc, will not be correct, since they are only looking at the last cycle of whatever is displayed. So if the plot hasn't become "flat" (steady) before the last cycle, then simply enter an override value for the Vcap(t_start) voltage, so that it starts closer to the correct final voltage level. At the last minute, I also added the "Series R" and "Series L" entries. Using those, you can add a resistor and/or and inductor, in series with the voltage rail, before the capacitor. A lot of people here have discussed adding a resistor or a choke into a power supply circuit. Now they can see how it would affect the output voltage's characteristics. (If anyone wants to use multiple parallel reservoir caps, with an R and/or L in series between some of them: Use LTSpice!) I also added the "ESR Override" entry field, so that people could adjust the capacitor ESR value. That might be necessary if multiple paralleled caps are used, for example, and when a specific model of capacitor has been selected and its ESR is known, and when comparing specific capacitors with known ESR values, and, of course, just to investigate "what if" scenarios. Last but not least, I added the "# of Diodes" entry field, which can be either 1 or 2. That is meant to enable the equations to be valid for multiple circuit topologies, depending on the #diodes entry. The "1" case should make the results valid for a centertapped transformer with one bridge rectifier supplying two voltage rails, with the center tap as the ground between the rails. The "2" case should work for two transformers (or two nonconnected secondaries of one transformer), each with a rectifier bridge supplying one rail, with the output ground ends of the two bridges both connected to the ground between the rails. Here is what I am not certain about: The circuit equation that is used actually has only one diode resistance, as a function of the diode current. So for #diodes=2 the idea was to just double the diode resistance. But I haven't actually verified, mathematically, that it will work correctly, that way. I just need to draw out the schematic for that case and write down the voltages around the loop and see if the equation being used is still valid, but haven't done it yet. I would guess that it should be OK, as is, but need to verify it. Cheers, Tom Last edited by gootee; 28th November 2012 at 05:17 PM. 

28th November 2012, 05:42 PM  #1617  
diyAudio Member
Join Date: Nov 2006
Location: Indiana

Quote:
The 40 mA is added purposely, to account for amplifier overhead. It is in the formula for the Peak Load Current cell and could be easily removed if desired. I added it as an estimate, to make the results "more correct", but had meant to add a userentry field for it, and just forgot, until now. The only load parameter that is used by the circuit equation that makes the output data and plots is a (constant) load current. Rload is not in the equation, anywhere (except in the sense that it is used to calculate the load current, initially). And nothing else about the assumed amplifier (or other active load) is in the equation, either, except for its contribution to the load current. It is assumed that the amplifier varies the voltage across itself in order to keep the load resistor's current and voltage constant, as the rail voltage varies. That should be like what would actually occur, for this admittedly ratherpathological case, in terms of PSRR. The main idea was just to use a constantcurrent load with a current level equal to the peak current that a sine would have, as implied by the rated max power and the load resistance, in order to get a trulyworstcase ripple amplitude. I will check into the turns ratio issue. But I think it is correct asis. If you have the actual spreadsheet, look on the Transformer sheet (click the "Transformer" tab at the bottom). The whole derivation is there, starting from the measurements. But remember that the transformer parameters that get used in the "PSU Analysis" sheet are all "SCALED", according to the perunitization method's equations. So the turns ratio changes, due to that, and is then only mathematically relatable to the original measured values. (The transformer being used is yours, by the way, with the measurements you sokindly supplied.) On a related note: I thought that a transformer's rated output voltage WAS supposed to be its noload output voltage. Is that NOT correct? (I am no transfomer expert, unfortunately.) Thanks, Tom 

28th November 2012, 06:56 PM  #1618 
diyAudio Member
Join Date: Nov 2005
Location: East Coast of South Africa

Tom I think there are deviations. To us transformer manufacturers the rated current is at the rated voltage, both are rms values into a non iductive load the VA rating should be a direct derivitive of V x A which include both copper and iron losses. I have not paid attention to your early transformer measurements and having a little difficulty to establish the numbers. I will get to it because I am currently developing a new commercial amplifier power supply and would like to see the predictions tally with actual, it would also give insight where to skimp and were not to. It should be done by end December and I will provide the real side of the simulation if tweaking is necessary.
__________________
Kindest regards Nico 
29th November 2012, 04:19 AM  #1619  
diyAudio Member
Join Date: Jan 2003

Quote:
However, transformers used in electric power distribution seem to use noload voltages and an impedance rating most of times instead. 

29th November 2012, 05:00 AM  #1620 
diyAudio Member
Join Date: Nov 2006
Location: Indiana

New spreadsheet version attached.

Thread Tools  Search this Thread 


Similar Threads  
Thread  Thread Starter  Forum  Replies  Last Post 
How do you calculate choke size in a power supply?  Burnedfingers  Power Supplies  28  19th July 2017 08:03 AM 
Valve power supply  How to size transformer?  SanderW  Power Supplies  25  4th January 2013 04:12 PM 
power supply bypass cap size  BigE  Power Supplies  11  5th July 2011 02:59 PM 
Power Supply Case Size  diymixer  Power Supplies  1  10th October 2010 05:47 AM 
What size power supply should I get for repair work?  spooney  Car Audio  3  6th December 2007 11:50 PM 
New To Site?  Need Help? 