Energy in a PWM

  • Topic Is Locked
  • 563 Views
  • Last Post 22 December 2022
Jagau posted this 06 December 2022

Discussion on how to calculate the energy of a square wave or PWM waveform

Not to be confused with an AC square wave which changes polarity.
We are very often confronted with having to take measures that are reliable, this open discussion will surely be able to enlighten us in order to be sure to take the right measures.

 

First of all I would like to say that to take measurements on a PWM, the oscilloscope is the ideal instrument for this purpose, but it must be well programmed and certain functions are not accessible for all models.

For those who don't know, a DDM will never get the correct measurement from PWM, either for voltage or current. Even if you used a  True RMS meter, your reading will not be good, same for a standard DDM.

Some DDMs have the ability to do this but they are rare, this one if found it does not remove the DC offset  but most DDM have false measurement.  Even my 2 expensive fluke DDMs should not be used for PWM reading. With square waves AC it is correct the measurement will be good.

 There are nowadays ways to check with a good scientific calculator, so you can be sure of your measurements, everything is calculated manually too.

Let's start if you want by calculating the energy of a PWM input average power

Jagau

Order By: Standard | Newest | Votes
Jagau posted this 06 December 2022

Discussion on how to calculate the energy of a square wave or PWM waveform

Not to be confused with an AC square wave which changes polarity.
We are very often confronted with having to take measures that are reliable, this open discussion will surely be able to enlighten us in order to be sure to take the right measures.

 

First of all I would like to say that to take measurements on a PWM, the oscilloscope is the ideal instrument for this purpose, but it must be well programmed and certain functions are not accessible for all models.

For those who don't know, a DDM will never get the correct measurement from PWM, either for voltage or current. Even if you used a  True RMS meter, your reading will not be good, same for a standard DDM.

Some DDMs have the ability to do this but they are rare, this one if found it does not remove the DC offset  but most DDM have false measurement.  Even my 2 expensive fluke DDMs should not be used for PWM reading. With square waves AC it is correct the measurement will be good.

 There are nowadays ways to check with a good scientific calculator, so you can be sure of your measurements, everything is calculated manually too.

Let's start if you want by calculating the energy of a PWM input average power

Jagau

Jagau posted this 06 December 2022

An inductor increases in current linearly as a ramp as a function of time when the voltage across it is constant (steady state). Thus, as the longer the pulse time the higher the instantaneous current will reach.


In our case we have a triangle current waveform, and is powered in discontinuous mode (DCM), i.e. the current is completely discharged on each cycle .For each case Boundary or continuous conduction we use different formula.
The one with interest here is the more used discontinuous conduction mode or DCM, this is calculation for input power only, forget the output measurement at this timr.


Continuing with same values at input
24volts, 0.19amp at 1khz and 10% DTC
It we want calculate the power input of our PWM waveform in DCM use this formula.

V  is for DC max voltage used
 I   is for saturation current your power supply sees.

 sqrt(3) is for triangle cuurent waveform produce.


P= I x V x sqrt(Duty_Cycle) / sqrt(3)
P input = 24v x 0.19a x sqrt(0.10) / sqrt(3)


We have a power input for our PWM wave for of 0.833 watt


Your instantaneous pulse power is 4.56 watts, your power supply sees 4.56 W but it is only for Ton of 0.0001 second. For 1 second we have power input of 0.833 watt


  What your Power supply sees is for information only, it does not know what frequency we are using, it does not know at what DTC and it does not know the type of waveform used.


This is formula are integration derivatives and it is important that we are in DCM mode.

Jagau

Itsu posted this 07 December 2022

 

Hi Jagau,

nice topic, thanks for starting it.

I remember we touched upon this subject during your Melnichenko thread.

I agree the DMM (Digital Multi Meter) is no good for measuring pulsed DC, as it also is no good for frequencies above 10 or 20kHz (check your DMM specifications).

I tried to follow your calculations, but i wonder about the mentioned input: 

Continuing with same values at input

24volts, 0.49amp at 1khz and 10% DTC

as later on you continue your calculations with 0.19A, is this a typo?

 

I also remember you got these formulas from this website:  https://masteringelectronicsdesign.com/how-to-derive-the-rms-value-of-a-triangle-waveform/  which contains valuable information about all kind of pulsed signals.

Regards Itsu

Jagau posted this 07 December 2022

hey
yes it's a typo error, my fault, thank you for mentioning it, corrected

 the reference of Dr Nastase (RMS voltage for square wave) is good and that of the following calculator also and other engineering resources (RMS voltage for inductor)

https://www.daycounter.com/Calculators/Inductor-Current-Power-Calculator.phtml

and this one RMS voltage thru resistor

https://www.vishay.com/en/resistors/pulse-energy-calculator/

 Jagau

Jagau posted this 08 December 2022

@Itsu, your oscilloscope and mine measure instantaneous power, understand that you must use above fromula, not over a single period or one window frame of your scope, but for a second of time  New scope have yhis function over 1 second but they are dispendious.

This calculation is for the average input power, do not mix it with the output power.

it is not the same calculation.

Jagau

Itsu posted this 08 December 2022

Jagau,

i tried to follow your reasoning, but did not use a scope nor real life circuit, but an LTSpice simulation.

Here a screenshot of both the circuit i use and the resulting screenshot over 1 second.
We have a pulsed DC signal of 24V @ 1kHz with 10% duty cycle with as load a 1000uH coil (1 Ohm series resistance and 10pF parallel capacitance).
The 11.75 Ohm series resistor is to get the same input current as your example 1.9A.

We see the average values of input power and input current mentioned over 1s taken from the PS being 1.99W and 190mA (your 0.19A).


Here a zoomed in screenshot showing the 24V pulse (green), the input current (blue) and the input power (red):

 

Finally i zoomed in to 1 single pulse and measured the average power and current of this pulse being 19.56W and 823mA.

Is this also what you would expect?

LTSpice file attached, but had to zip it as no .ASC files are allowed.


Regards Itsu

Attached Files

Jagau posted this 09 December 2022

It's not my reasoning, I'm giving you a simpler example than yours so that you can understand.
Vishay is a well known international component company that has made an online calculator to calculate through a simple resistor. Here is the calculation:  Khz, 24 V,  0.19 amp, 126.32 ohms resistors


Very simple and easy to understand.

Your power supply will see 4.56 watts but that's the power for 0.0001 seconds to know the average power you have to go for a second at 1khz which gives 0.456 watts of input power.  

The different methods are on this thread so think about using them andfor reactive non linear componenents.
An oscilloscope as you have, takes the instantaneous measurement to know the average power you must use the formulas of this thread with adjustment on a nonlinear component either in DCM, BCM or CCM mode, all with different formula.
Jagau

Itsu posted this 09 December 2022

Jagau,

thanks, i can see in this "square wave pulse" calculator what power is in this pulse, no problem.

A PS will show 24V (of course if its set at 24V it will show that) and 0.19A, pointing to 4.56W, but of course you can not calculate that using these figures as the device works at 10% duty cycle, so the real power is 0.456W.
No need for a calculator there IMO.

But you started this thread with a triangle wave pulse (current through an inductor):

An inductor increases in current linearly as a ramp as a function of time when the voltage across it is constant (steady state). 
Thus, as the longer the pulse time the higher the instantaneous current will reach.

In our case we have a triangle current waveform, and is powered in discontinuous mode (DCM), i.e. the current is completely discharged on each cycle....


So i thought you wanted to calculate this triangle wave pulse energy which is somewhat different then the square wave pulse, therefor i put together an LTspice sim to show.

But of course even with a triangle wave pulse at 10% duty cycle we cannot use the PS voltmeter showing 24V for input calculations, that must be obvious.

Itsu

Jagau posted this 09 December 2022

Take the time to carefully study my post everything you say is written in it, it may seem simple but in each case we must use the right formula for the right situation.

What you write in your post I explained it. But again, I want to be polite but I don't want to waste any more time on these explanations.
jagau

Fighter posted this 22 December 2022

Hello friends,

Jagau asked me to lock his threads until he returns.

He needs to take care of some personal things, he will give more details when he returns.

Regards,

Fighter

"If you want to find the secrets of the universe, think in terms of energy, frequency and vibration."
Nikola Tesla

Topic Is Locked

Close