Need help figuring out dc output and ripple voltage

ci139

Joined Jul 11, 2016
1,898
 
Last edited:

MrAl

Joined Jun 17, 2014
11,480
Or my favorite go to, when
it’s multiple iterations like that excel or simulate it. :)
[EDIT LATER]
It was later found that this formula is still approximate, however it is very very close for reasonable filter values. More work will have to go into this to get a perfect formula.

Hello again,

I could not remember what we did last time so i started over. I got as far as finding the time where the exponential decrease departs from the sine (or cosine) wave and that is step 1. The voltage at that point (i call v2) is easy to calculate once we know the time which i call t2 here and that is step 2, but back to step 1 first:
t2=1/(4*f)-atan((2*pi*f*C1*R1^2)/(4*pi^2*f^2*C1^2*R1^2*R2+R2+R1))/(2*pi*f)

and as you can see this is a straightforward explicit calculation not an iteration. I am starting to remember now that i think the iteration comes in if we use a spice diode model but not if we assume zero or some constant voltage drop like 0.9v or something. It's not hard to do anyway though and comes up with a precisely accurate theoretical result.

Once we have the voltage which i call v2 and the RC time constant is a constant, we can then calculate the voltage which i call v4 because that is the voltage where the exponential intersects the rising wavefront of the next hump in the rectified sine.
so it's not going to be much harder and the formulas will all be explicit for now so no iterations will be required.

It should be noted that many DC wall warts (probably ALL that pass the required tests for a Class A rating) will have some leakage inductance. That changes everything so the formula would be different for those.
 

MrAl

Joined Jun 17, 2014
11,480
Here is an exact method for calculating the ripple with just R and C filter and no Rs series resistor.

[eq1] e^(-td/(C1*R1))/sqrt(1/(w^2*C1^2*R1^2)+1)=-cos(w*(atan(1/(w*C1*R1))/w+td));
[eq2] Vpp(normalized)=cos(w*(atan(1/(w*C1*R1))/w+tdx))+1;

First solve eq1 for td after replacing constants in the circuit, call it tdx.
Then calculate the normalized Vpp using eq2 with that tdx found in eq1.
Multiply the normalized Vpp by the sine peak voltage to get the actual peak to peak ripple voltage.

Assumptions:
1. The diode drop is zero, or alternately the diode drop is a non zero constant voltage and Vpeak becomes equal to the input sine peak minus two diode voltage drops.
2. Zero input line inductance and zero resistance.
 

MrAl

Joined Jun 17, 2014
11,480
Hello again,

Ok i had to recall the way to do this problem so it took a while.

The basic method is to first develop the excitation voltage expression. This must include a phase shift for the sine wave so it's not as straightforward as we would like, but still doable.
Then using that develop the expression for any ripple voltage over all time but only has to be valid for maybe 1/2 cycle as that is all we need anyway, and it is for a half cycle located at a point approaching infinite time, and this expression must include the initial capacitor voltage as well as the phase shift from above.
Then, solve for what i call "t1" which is the time where the ripple voltage first crosses the excitation voltage. That involves also solving for "t2" which is the time where the ripple voltage crosses the excitation voltage for the second time within one half cycle from t1. That also involves solving for "t3" which is the point where the ripple voltage meets the next half cycle of the excitation voltage for the first time, and that part also involves an exponential factor due to the RC time constant.
Then v1 is the voltage at t1, and v2 is the voltage at t2, and v3 is the voltage at t3, although we get away with not having to calculate v3 just t3.
Finally, using what i think we call continuity of states, we find that v3=v1 which occurs when t3=1/2 cycle time, and that allows us to form the final equation which when solved, yields all three times but more important the time "t3" which MUST be 1/2 cycle time. If it does not equal 1/2 cycle time then we subtract the time from the 1/2 cycle time and add that to our initial guess of "t1". After several iterations, we get an exact solution out to whatever number of digits we need assuming of course the number cruncher resolution is good enough.
Once we get "t1" as accurate as we need, we can then go on to solve for the ripple voltage which after that is a breeze.
So really we just have to find roots of various equations which using built in functions like "find_root()" makes it quite easy really. It is probably also possible to make it one big iteration.

As an example, i did the following circuit:
Rs=2 ohms
RL=10 ohms
C=1/20 Farads
freg=1 Hz
Vpeak=1000 volts
Full wave rectification.

I got as results:
t1=0.079209823816 (repeatable regardless of starting guess value)
t2=0.29202234908
t3=0.50000000000002

and you can see that t3 is very nearly equal to 1/2 cycle so the results for t1 should be very accurate.

For the ripple voltage solving another equation i got then:
293.75742

If anyone wants to verify this with a simulator, it should be very close although beware diode drops will mess up the results in a simulator.
 
Last edited:

MrAl

Joined Jun 17, 2014
11,480
Hello again,

Here are some interesting results. A compare of the LT Spice average rectified DC voltage vs that calculated using the software Maxima and the equations and techniques mentioned in my previous post.

LT Spice DC component: 621.36
Maxima Vavg=621.36084749799
Maxima Vpp=293.7574197646716

Note the similarity between the LT Spice DC average and that obtained with the equations using Maxima.

Here are the LT Spice files in zip. Copy both to your required directory and the plot settings will be correct too. Note the special diode is near ideal so we can see the theoretical results more precisely.

This turned out very interesting again but i was surprised by how much i had forgotten since i last did this. Next i might include a little inductance.

[LATER]
Doing a few calculations i found that using a 500uf cap and 2 ohm series resistor i get a Vpp to Vavg ratio of about 0.47, and the Vavg to Vpeak ratio is 0.62
Now dropping that 2 ohm to 0.002 ohms, i get a Vpp to Vavg ratio of about 0.47 also, but Vavg to Vpeak is 0.82 and all it takes is raising that 500uf cap to 680uf.
So you be the judge. Do you want to loose 38 percent voltage or 18 percent. Remember that 2 ohms will eat up a lot of power too at high currents.
If you are really stingy with the cap value then maybe a slightly higher cap value and smaller series resistor as a tradeoff.
I did these calculations at 100Hz line frequency.
 

Attachments

Last edited:

MrAl

Joined Jun 17, 2014
11,480
Hello again,

Ok it came down to these two equations:
[1] Vpk*sin(t2*w+t1*w)=Vpk*sin(t1*w)*e^((1/(2*f)-t2)/(C1*R1))
[2] (((Vpk*w^2*sin(t1*w)*C1^3*R1^3+Vpk*sin(t1*w)*C1*R1)*R2^3+(Vpk*w*cos(t1*w)*C1^2*R1^3+Vpk*sin(t1*w)*C1*R1^2)*R2^2)*e^(-(t2*(R2+R1))/(C1*R1*R2)))/(C1*R1*R2*((w^2*C1^2*R1^2+1)*R2^2+2*R1*R2+R1^2))+(sin(t2*w)*((Vpk*w^2*sin(t1*w)*C1*R1^2+Vpk*w*cos(t1*w)*R1)*R2+Vpk*w*cos(t1*w)*R1^2))/(w*((w^2*C1^2*R1^2+1)*R2^2+2*R1*R2+R1^2))-(cos(t2*w)*((Vpk*w*cos(t1*w)*C1*R1^2-Vpk*sin(t1*w)*R1)*R2-Vpk*sin(t1*w)*R1^2))/((w^2*C1^2*R1^2+1)*R2^2+2*R1*R2+R1^2)=Vpk*sin(t1*w)*e^((1/(2*f)-t2)/(C1*R1))

The second one is long because it came in part from the output equation with a phase shifted half cycle sine wave which complicates things a lot.

Every variable there is a constant from the circuit itself except for t1 and t2.
Those two are the two variables to be solved for, so these are two nonlinear equations in two unknowns. Once t1 and and t2 are known, we can then calculate Vpp and Vavg from the actual output equation (not shown yet). The output equation is simpler.
There is most likely some simplifications after we lump some constants and combine some sinusoidal terms.
The nice thing is this would work for every circuit of the type being discussed here (one load resistor R1 and one series resistor R2).
 

ci139

Joined Jul 11, 2016
1,898
. . . takes a time to get up to track with it . . .
other than that -- each transformer has a unique correspondence of I/O power to non-rectified pure resistive load
↑↑ the point of which is that the usual case is where rE=RL most efficient transfer the voltage will be half of that the unloaded OUTP.
(not sure if i have a graph of it left ...)
 

SamR

Joined Mar 19, 2019
5,040
The equation I have for ripple uses the dielectric constant of the capacitor in it.

Vrp = Vo(pk) * (1 - (ε ^(-1/RlC))

Rl being the load
 

The Electrician

Joined Oct 9, 2007
2,970
Secondary is 36V rms
So it’s about 50.9 peak
Diode drops of 1.4V rectified so about 49.5V into the filter

R surge = 10
C= 100 u
RL = 3.3k

I’m using Vr(pp) =[1/(f x RL x C)] x Vpk

I calculate 1.25V ripple and my LTSpice gives me over 8v. I have a feeling it has to do with the RC filter and Rsurge but not sure what I’m missing in my calculation or is it spice?

View attachment 185317
You could always use this method :): https://www.powerelectronics.com/power-management/analyzing-full-wave-rectifiers-capacitor-filters
 

MrAl

Joined Jun 17, 2014
11,480
Hello again,

yes Wu has done lots of work in this area. He also recommends using the two variable approach although there is yet another single variable method if i can find it again :)

I checked his example and it agrees with my results for that set of parameters within reason (t1 being 1.744 vs 1.743).
He did not mention the peak to peak voltage or the average voltage however so i cant compare with that i can just assume it comes out the same since the turn on and conduction times agree very closely and those two calculations are fairly easy to do once those two times (i call simply t1 and t2) are known.

He also mentions in the past what has not been accounted for were the phase shift and the exponential part. Once included these yield an exact method, within the limits of the accepted paradigm.
 

MrAl

Joined Jun 17, 2014
11,480
Hello again,

[Note i found he was not giving the actual peak voltage he was giving the voltage where the diodes first turn on. For that case we get the same results.]
Note variable t1 in my calculations and measurements are the same as his t1, and my t2 is his ton (on time of diodes), although the calculated values are slightly different.
So the results actually match.
Also note turn on and on duration times (t1 and t2) are very difficult to measure in simulation so those measurements are left out for now.

my measurements:
168.12 Vpeak (highest point over the entire wave)
103.67 Vvalley (lowest point over the entire wave)
64.45 Vpp (the above 103.67 subtracted from 168.12)
137.6 Vavg (the average over the entire wave)

----------------------------------------------------------
my calculations:
64.47 Vpp
137.86 Vavg,
168.11 Vpk
103.64 Vvalley
0.00174413 t1
0.00312804 t2

--------------------------------------------------------
his paper:
163.719 (this is really the voltage where the diodes turn on not Vpeak) i get 163.73
103.637 (this is the voltage where they turn off) i get 103.71

0.001743 t1
0.003131 t2 (ton)
 
Last edited:
Top