Continue to Site

Welcome to our site!

Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

  • Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.

how to measure efficiency of a SMPS

Status
Not open for further replies.

GTechee

New Member
I am trying to measure efficiency of a SMPS with a scope using LabVIEW to automate the process over different input voltages and load size. I have isolation an transformer, two current probes, and two voltage probes. The output power is a simple measurement because it is DC, but the input current is non-sinussoidal and this makes the input power measurment very diffulcult. I SEEM to have some success with the input power measurment when I use the scopes math function to multiply the waveforms and then take the area of the resulting waveform. What weirds me out is that the time scale changes how much area is under the curve and I though it would be best to have 1 second of total scope view but my answer is way too large, by a factor of 100.... The only logical answer is when I have a 10ms division or 100ms total scope view but this doesnt make sense to me.

Am I doing this correctly when I have 10ms divisions or am I missing something? If I am doing this right then could someone please explain why a 10ms division is the magic number?
 
Hi,

You only have to average over one cycle even if it is not a sinusoid, as long as the cycles are all the same.
So if you see a pulse for say 2ms and zero for 1ms, you average over that 3ms period.

BTW it is the average of the integral not the area itself. So it is:
P=(1/(T2-T1))*Integral[T1 to T2](p(t)) dt

where p(t) is the instantaneous power e(t)*i(t).

Stated a little more simply:
P=(1/Tp)*Integral[0 to Tp](p(t)) dt

where Tp is the total period. The integral is taken over the whole period, but if part of the period is zero then we can just integrate from t1 to t2 where t1 is the start of the pulsed wave and t2 is the end of the pulsed wave, but we still multiply by 1/Tp as above.


This measurement will be affected by the scopes accuracy of course, but if you use the same scope for both input and output and have it set to the same scales, it should be pretty good.

If you happen to have a ramping pulse we could generalize the formula above into a purely algebraic one knowing the ramp start and end heights and time periods for on and off.
 
Last edited:
Use true RMS meters to measure input output voltage and currents under various loads. The rest is schoolboy maths.
 
Thank you both so much for the replies. Mr AL thank you very much for correcting me about AVG vs AREA. That makes much more sense, people I work with lead me down this path and I've been trying to understand it mathmatically and it just didnt make sense. Thanks for the advice WTP Pepper, I'm using a Tektronix DPO 3034 and it has a measurment function "Cycle RMS" and in the description it says it is a true RMS over one cycle. My test setup is halfway taken down so I can't try it yet but I will as soon as I get done with paper pushing I will see what results I get with these new tricks.

Good day Gents
 
Use true RMS meters to measure input output voltage and currents under various loads. The rest is schoolboy maths.

Hello WTP Pepper,

And how do you intend to do the math to get the power from the RMS values of the input and output currents?
 
Thank you both so much for the replies. Mr AL thank you very much for correcting me about AVG vs AREA. That makes much more sense, people I work with lead me down this path and I've been trying to understand it mathmatically and it just didnt make sense. Thanks for the advice WTP Pepper, I'm using a Tektronix DPO 3034 and it has a measurment function "Cycle RMS" and in the description it says it is a true RMS over one cycle. My test setup is halfway taken down so I can't try it yet but I will as soon as I get done with paper pushing I will see what results I get with these new tricks.

Good day Gents

Hello again GT,

Be careful with the RMS values as that does not always lead to the correct value for the power. I'll go over the maths tomorrow.
 
Hello again GT,

Be careful with the RMS values as that does not always lead to the correct value for the power. I'll go over the maths tomorrow.

Looking forward to see your maths, I thought if you measured both the current and voltage as true RMS then you could just multiply to find power. Problem being that true RMS is difficult to achieve for non-sinusoidal waveforms such as the input current waveform on a SMPS.

I didn't get a chance to finish running my tests today but hopefully I will get back on it tomorrow.
 
Looking forward to see your maths, I thought if you measured both the current and voltage as true RMS then you could just multiply to find power. Problem being that true RMS is difficult to achieve for non-sinusoidal waveforms such as the input current waveform on a SMPS.

.........................
There's a lot of misunderstanding about RMS voltages and currents, some mentioned here. You don't automatically use RMS measurements just because power is involved.

You can't necessarily just multiply true RMS voltage by true RMS current and get true power. You also need to include phase angle. For example if the load were a pure capacitor, the real power would be zero so just multiplying current by voltage obviously won't work.

For your SMPS input power measurement, if the input is a steady DC voltage then you multiply the average (not RMS) input current by the DC voltage to get the power. (RMS current is used when the power is proportional to the current squared, as with a resistive load (I^2*R). In this case the power is directly proportional to the current (V * I), so the average current value is used).
 
Hello again,

As Carl was saying, we can not always take RMS readings of current and voltage and multiply to get the
power. For sine waves this works if we also know the phase angle but if we dont know the phase angle that
wont help.

Of course here we need to talk about pulsed waves not sine waves anyway. That's because in power
converter circuits we always see pulsed waveforms, and often pulsed waveforms with ramping tops or just
ramping waveforms. Pulsed waveforms with ramping tops in power converters are really the result of an
exponential function, but because they are so short relative to the time constants of the circuit they
look like true ramping top pulse waves so we can almost always get away with approximating them as ramped tops rather than exponential tops. At the very least however, we can delve into the theory assuming
ramping tops which greatly simplifies the math yet still allows us to investigate this behavior when we
want to understand average power and RMS.

We dont have sine waves here, so we start by going back to the definition of the average power and the
true RMS values of ramping top pulsed waves.

First, the ramping top pulsed wave looks like a pulse but instead of a square flat top it ramps either up
or down. So the main body of the pulse is just a pulse, but it has on top a slant that goes either up or
down. Because we only have to deal with one cycle, we can simplify the mathematical definition of this
pulse to a large extent with:
i(t)=(i2-i1)*t/t1+i1

for the current pulse, and:
v(t)=(v2-v1)*t/t1+v1

for the voltage pulse. The valid time t for both of these is 0<=t<=t1 where t1 is the period where the
pulse turns off (goes to zero) and it is assumed to start at t=0. v1 is the amplitude of the voltage
pulse at the start of the pulse (t=0) and v2 is the amplitude at the end of the pulse (t=t1). Similarly,
i1 is the amplitude of the current pulse at t=0 and i2 the amplitude at the end of the pulse at t=t1.

Next we need a few definitions. We'll first look at RMS vs Power and see what we find. We can also look
at average values and see what turns up.

Definition for RMS:
RMS(f)=sqrt(1/Tp*integrate(f^2,t,0,t1))
[LATEX]\[RMS(f)=\sqrt{\frac{1}{Tp}\,\int_{0}^{t1}{f}^{2}dt}\][/LATEX]

Definition for Power:
Power(i,v)=1/Tp*integrate(i*v,t,0,t1)
[LATEX]Power(i,v)=\frac{1}{Tp}\,\int_{0}^{t1}i\,v\,dt[/LATEX]

In these, f, i, and v are all functions of time. f will be either current or voltage here, and i is
current and v is voltage. The pulses always start at t=0 and end at t=t1, and the total period is Tp. It
is also assumed that the pulses are both 'on' for the same time (0 to t1) and off for the same time (t1 to
Tp). This is the common scenario in a power converter. If one pulse happens to be longer than the other,
simply limit it's pulse length to the shorter one's time because there is no power there.

What we'd like to do is compare the attempt to calculate power using RMS values to the actual calculation
of power using the definition of power. We have some assumed waveforms which are the ramping pulsed waves above. Using those waves we have in short:

P1=RMS(i(t))*RMS(v(t))
P2=Power(i(t),v(t))

and we want to set P1=P2 so we can compare the two calculations.

Doing the calculations, we come up with the two powers:
P1=(sqrt(i2^2+i1*i2+i1^2)*t1*sqrt(v2^2+v1*v2+v1^2))/(3*Tp)
P2=((2*i2+i1)*t1*v2+(i2+2*i1)*t1*v1)/(6*Tp)

Just to note, the second one is correct and can be used for these calculations using a scope to measure
the pulse start amplitudes and end amplitudes.

Now we set them equal to each other:
P1=P2

or:
(sqrt(i2^2+i1*i2+i1^2)*t1*sqrt(v2^2+v1*v2+v1^2))/(3*Tp)=((2*i2+i1)*t1*v2+(i2+2*i1)*t1*v1)/(6*Tp)

To simplify this, we just multiply both sides by 6*Tp and then square both sides, etc., until we end up
with this:
4*(i2^2+i1*i2+i1^2)*(v2^2+v1*v2+v1^2)=(2*i2*v2+i1*v2+i2*v1+2*i1*v1)^2

Now we want to compare so we can subtract the left side from both sides and we get:
3*i1^2*v2^2-6*i1*i2*v1*v2+3*i2^2*v1^2=0

and then we factor that to get:
3*(i1*v2-i2*v1)^2=0

then divide both sides by 3 to get:
(i1*v2-i2*v1)^2=0

So the solution is:
i1*v2=i2*v1

This last result is the condition that has to be met in order for the RMS(current) times RMS(voltage) to
equal the true average power calculation. In words this is:
"The current starting amplitude times the voltage ending amplitude has to be equal to the ending current
amplitude times the starting voltage amplitude".

If this condition is not met then it will not do any good to measure the RMS values. But keep in mind
this is for ramping pulsed waves or just ramping waves. If the pulses are just regular rectangular pulses
then there are less stringent conditions. In general though it is not hard to use the algebraic
simplification of the power in pulsed ramping current and voltage waves from above:
P=P2=((2*i2+i1)*t1*v2+(i2+2*i1)*t1*v1)/(6*Tp)

and if one of them is just a flat top pulse then i2=i1 (or v2=v1).

The required measurements are:
i1: the amplitude at the start of the current wave,
i2: the amplitude at the end of the current wave,
v1: the amplitude at the start of the voltage wave,
v2: the amplitude at the end of the voltage wave,
t1: the time of the end of the shortest pulse,
Tp: the total period,
and the start of both pulses are assumed to be at t=0. If this is not the case, make the start equal to the pulse start time that comes last and shorten the other pulse by the same amount that is the difference between the start and t=0. Of course the pulses must overlap at some place or else there would be zero power.

and this has to be done twice, once for input and once for output. The efficiency can then be calculated
by dividing output power over input power as usual.

Just to note again, if one or both of them is a flat top pulse (ratther than ramping) then we just set the
second variable to be equal to the first variable and that takes away the ramping time part. So for
example if we had a 1.5v voltage pulse that was constant then we set v1=1.5 and v2=1.5 so they are both
the same. This is also true if the voltage (or current) is not a wave but is constant. Sometimes the
input and/or output voltage of the converter is quite constant but this formula still covers that.


What else we could do...

We could look for a simple ratio to see if there is a quick way to convert from RMS1*RMS2 into Power.
We could compare multiplying the average values of the waves to the true average power calculation.

This second one might be interesting because a common way used to estimate power is to multiply the
average values of the two waves together. I'll see if i can get to that next, but it's almost the same
idea except we use the definition of average value:
AVG(f)=1/Tp*integrate(f,t,0,t1)

and see what happens when we multiply the average of the current and the average of the voltage.

Simple example:
i1=1, i2=2, v1=2, v2=1, t1=2, Tp=3. This is for a ramping current pulse that ramps up from 1 amp to 2 amps, and the voltage ramps down from 2 amps to 1 amp, the two pulses are 'on' for 2 seconds and off for 1 second so the total period is 3 seconds, and this wave repeats indefinitely. The result is:
P=1.4444 watts


Comments welcome.
 
Last edited:
NIL

LTSpice was optimized for simulating SMPS by **broken link removed**. He put some functions into it to make measuring power input to a simulated SMPS easy. Here is an example:

After a time-domain simulation run, by default, LTSpice has saved all node voltages and branch currents as a function of time. To compute power into the SMPS, it is as simple as displaying a waveform which is the instantaneous product of V(in) and -I(V1). Note the expression -V(in)*I(V1) in the plot pane which is plotted as the light blue trace in Watts. (LTSpice knows that the product of Voltage and Current is Power, automatically.)

Since V1 has an internal resistance of 20mΩ, the voltage at node V(in) [Green trace] is not pure 20Vdc. The current into the SMPS is the complex Red waveform -I(V1).

Placing the cursor over an expression (heading) in the LTSpice plot pane, and left mouse clicking while holding down the Ctrl key causes LTSpice to integrate the selected waveform over the X-axis of the plot, which effectively computes the average power of the power waveform over the interval shown on the X-axis at the bottom of the plot. It pops up the window shown, which lists the start/end of the interval, the average power and the integral of power (J). If you did this to a voltage or current waveform, the function would compute the average and rms.

Note that to get an accurate measure of the power, the waveform must accurately span an integral number of cycles. Since the waveform into an SMPS is usually aperiodic, even if you tweak the simulation run length to show an integral number of full cycles, the numbers change slightly from sim run to sim run. This is why it is not good to just display a single cycle. I get better results if I average 20 or more full cycles.

For this particular example, using the LTSpice integrating function, I display the Power In, the Power Out, the power lost in the chip, the power lost in the diode, and the overall efficiency.
 

Attachments

  • SMPS.jpg
    SMPS.jpg
    405.4 KB · Views: 201
To measure the efficiency of a power supply accurately, you need to turn the input current into DC. This can be achieved by putting a large capacitor at the drain of the top MOSFET so it provides a local low impedance source for the FET current. Then put a large inductor upstream of the dc/dc converter. This smoothes the current going into the capacitor. Some experimentation may be needed to get the values right. Then insert a current sense resistor in the input line of the power supply (before the inductor) and measure the voltage across it with a 'scope. When the inductor and capacitor are large enough, the voltage across the current sense resistor should be flat dc. You can then measure this with a DVM to 2 decimal places. You can then measure the input current, input voltage, output current and output voltage using the DVM to 2 decimal places and get an extremely accurate figure for the efficiency
 
Hello again,


Sometimes the input is clean enough already so there appears to be a constant voltage. The output is also a constant voltage too sometimes. However, sometimes the output is a pulse only and it's not always possible to 'filter' that pulse as that contributes to the losses. So it really depends on the situation at hand.
 
Status
Not open for further replies.

Latest threads

New Articles From Microcontroller Tips

Back
Top