CCS C Software and Maintenance Offers
FAQFAQ   FAQForum Help   FAQOfficial CCS Support   SearchSearch  RegisterRegister 

ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

CCS does not monitor this forum on a regular basis.

Please do not post bug reports on this forum. Send them to CCS Technical Support

PWM power calculation?

 
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion
View previous topic :: View next topic  
Author Message
hmmpic



Joined: 09 Mar 2010
Posts: 314
Location: Denmark

View user's profile Send private message

PWM power calculation?
PostPosted: Thu Mar 18, 2010 9:01 am     Reply with quote

I know this is out of scope but... & the "c" program is working 99%

I have this: a PWM controller with low side FET and connect a coil as load. It was proper build with FET driver and schottky clamp diode... Thats not the problem!

Power = 24V / coil impedance 10ohm This is 2,4A DC

I have problem to understand the power calculation.
Every time the PWH=”H” there are power on the coil!

1)
Every “H” pulse from the PWM will draw 2,4A RMS and the effect is the the duty?

2)
Will that say when using ex. 500hz or 10Khz chopper and 60% duty the max current in clamp diode is still 2,4A? but the totally power or VRMS over the coil is 24*0,6 = 14,4V?

3)
The worst case heat in the FET and the clamp diode will be at 50% duty?
Ttelmah



Joined: 11 Mar 2010
Posts: 19513

View user's profile Send private message

Ttelmah
PostPosted: Thu Mar 18, 2010 9:25 am     Reply with quote

You have an invalid assumption, in '1)'.

A coil is _inductive_, not resistive. If you apply 24v to a coil, then initially _nothing is drawn_. The current then rises with time. Into an inductor, current 'lags' voltage. The current would into a 'perfect' inductor, eventually rise to infinity, but there is effectively a resistor 'in series' with the inductive component (and also a little capacitance in parallel as well.....), and this limits the maximum current drawn to your 2.4A. The rate of change of current depends on the applied voltage, inductance, and as the current rises, the resistance.
This is why you will find circuits driving '1.8v' stepper motors, with voltages like 12v. Basically, the 1.8v specification, is the maximum continuous voltage that can be applied without the coil overheating etc.. But when pulsing the current at thousands of times a second, the current takes so long to rise because of the inductance, that something needs to be done to speed things up. The 'answer' is to use extra voltage...

You can only calculate the current actually drawn, if you know the coil inductance as well.

There are then other factors. When you turn your fet 'off', the stored energy in the inductor, will normally be dumped 'back' into the power rail by the diode. This will result in the rail rising. How much it does so, will depend on what else is drawing current from it, the capacitance present, etc. etc..

There are two separate main losses in the switching FET. The resistive losses, when it is 'on', and the losses as it switches. How long the current takes to reach peak, will change the point a which losses are worst. Normally they will be highest, when the FET is turned on almost all the time, maximising the resistive losses. Obviously the relative drops present in the diode, and the FET, will also alter where the peak occurs...

Best Wishes
Mike Walne



Joined: 19 Feb 2004
Posts: 1785
Location: Boston Spa UK

View user's profile Send private message

Relay basics
PostPosted: Thu Mar 18, 2010 4:05 pm     Reply with quote

1) Are you certain about your relay coil? Most general purpose relay coils handle ~1W. Yours is nearly two orders of magnitude bigger. Coils are not good at dissipating power, yours must be enormous to be getting rid of almost 60W. If your relay really is huge then no further questions on that score. If your relay is smallish (less than say 30mm cube) then either the resistance should be significantly higher than 10R OR it's got an a.c. coil. Relays with a.c. coils rely on their inductance to keep current and power low.

2) What happens when you PWM drive a relay from a d.c. supply is much more complex than Ttelmah indicated (no offence intended, but, he was letting you off lightly). The relay inductance is not constant. In the open (off) state, there is a large gap in the magnetic loop and the coil will have a certain inductance. In the closed (on) state the gap reduces to near zero and the inductance becomes higher.

3) When you first apply power to a relay coil the current starts from zero and rises initially at a rate of V/L, where V is the applied voltage and L the coil's inductance. This current rises exponentially to a value of V/R, where R is the coil's resistance. The time constant for this rise is L/R (don't forget that L changes as the armature pulls in). When you then turn off the drive to the FET the current in the coil continues to flow through the clamp diode. The coil current decays to zero as a result of two voltages a) the voltage across the coil's own resistance and b) a more or less fixed forward voltage drop across the Schottky diode somewhere in the 100 to 400mV region. The decay is significntly slower than the rise as the driving voltage (i.e. the diode drop) is much smaller.

4) The FET resistive losses are essentially as above. The switching losses depend on how well you are driving the FET. When you drive a FET at high frequency you are trying to charge and discharge its inter-electrode capacitances. These capacitances all vary with applied voltage and there is the added problem of Miller effect aroung the gate threshold voltage. Ideally when you operate a FET as a switch it moves in zero time from a state where there is no current passing through it, to one where there is a low voltage across it, then back again. During the switching stage there is a point in your example where there could be 12V across the FET and 1.2A passing through it i.e. 14.4W. If you switch at high frequency this switching loss can be dominant. If you are driving your FET gate directly from a PIC it is likely that you will run into trouble even at low kHz rates.

5) Why are using a PWM drive for your relay?

Mike
Mike Walne



Joined: 19 Feb 2004
Posts: 1785
Location: Boston Spa UK

View user's profile Send private message

Switching Losses
PostPosted: Fri Mar 19, 2010 2:22 am     Reply with quote

Item 4) assumes resistive load for the switching loss calculation. With an inductive load the instanteneous power loss could be four times that.

In your initial post you calculate mean coil voltage to be (duty-ratio) x (line voltage). This is a fairly reasonable at all frequencies. However the inductance modifies the current so that you can no longer invoke Ohm's law in your power calculation.

A simplified summing up:-

FET resistive loss is worst at high duty ratio.
FET switching loss increases linearly with frequency.
Diode loss is greatest at low duty ratio.

Mike
Ttelmah



Joined: 11 Mar 2010
Posts: 19513

View user's profile Send private message

PostPosted: Fri Mar 19, 2010 3:20 am     Reply with quote

I agreee, I was simplifying enormously...
Unfortunately I have been caught here before by oversimplifying, but one has to start somewhere!. Smile

2.4A, at 24v, is not 'silly' for a large contactor, but generally you wouldn't want to actually adjust the power fed to a solenoid, just turn it on/off. In most cases the only power adjustment needed, would be to cut the power to a lower level, once it has switched (this is why you will often see simple circuits like a series capacitor, with a resistor in parallel used to feed such).

I must admit Mike's question '5', is the critical one to me....

Best Wishes
SherpaDoug



Joined: 07 Sep 2003
Posts: 1640
Location: Cape Cod Mass USA

View user's profile Send private message

PostPosted: Fri Mar 19, 2010 7:25 am     Reply with quote

He says he has a "coil" as a load. It would be odd to use PWM for a relay. More likely it is a motor or force solenoid. If it is a solenoid the inductance will vary as a function of stroke.

He needs to tell us more about this load.
_________________
The search for better is endless. Instead simply find very good and get the job done.
hmmpic



Joined: 09 Mar 2010
Posts: 314
Location: Denmark

View user's profile Send private message

PostPosted: Fri Mar 19, 2010 8:56 am     Reply with quote

Thanks for all the nice help.

The load is a big rotary solenoid about 600g.
My question is:
worst case heat in the fly back diode is it at 50% duty?

Because this is where it most hot?
SherpaDoug



Joined: 07 Sep 2003
Posts: 1640
Location: Cape Cod Mass USA

View user's profile Send private message

PostPosted: Fri Mar 19, 2010 10:15 am     Reply with quote

Max heat at 50% is reasonable. At low duty cycles the inductance will keep the current down. At high duty cycles the slug will be in and the gap small so the inductance will be high, also keeping the current down.

But it might be higher at 30% or 70%. It is hard to know from the information available.
_________________
The search for better is endless. Instead simply find very good and get the job done.
John P



Joined: 17 Sep 2003
Posts: 331

View user's profile Send private message

PostPosted: Fri Mar 19, 2010 10:16 am     Reply with quote

All right, this looked interesting enough that I did an Excel spreadsheet for a quick-and-dirty calculation. The columns I used were (a) the duty cycle, (b) the current at that duty cycle, assuming that the current is constant because of the inductance, and (c) the power dissipation in the diode. That last quantity is calculated as the voltage across the diode multiplied by the current through the diode at that particular duty cycle, multiplied by the proportion of time that the current actually flows. For the diode, the "duty cycle" is 1 minus the duty cycle for the drive--when current is in the FET, it's not in the diode and vice versa.

Then I plotted the power loss in the diode versus duty cycle. And you were right--it peaks at 50%. With an assumed voltage drop of 0.5V, the diode dissipates 0.3W max. You don't need a very big diode to achieve that.

Edited to say, under static conditions the current will always be the same, regardless of the position of the slug, as long as the inductance is "a lot", and I bet it would be. I assume transient states, where the slug is moving, aren't long enough in duration to affect power calculations.
hmmpic



Joined: 09 Mar 2010
Posts: 314
Location: Denmark

View user's profile Send private message

PostPosted: Fri Mar 19, 2010 10:31 am     Reply with quote

Just if any is interested, I think the components is good choice.

Code:
The diode I use is:
ES3 -> Fast Rectifiers
The FET is:
FDS8840NZ_FET -> Fairchild
The gate driver is:
FAN3100T -> Faitchild



@John P
Maybe you will release your calculation?


To all thanks for the help.
John P



Joined: 17 Sep 2003
Posts: 331

View user's profile Send private message

PostPosted: Fri Mar 19, 2010 11:59 am     Reply with quote

Oh sure. It's here (because I don't know how to do attachments):

http://files.myopera.com/John98wbr/files/coil_pwm.xls
SherpaDoug



Joined: 07 Sep 2003
Posts: 1640
Location: Cape Cod Mass USA

View user's profile Send private message

PostPosted: Fri Mar 19, 2010 12:41 pm     Reply with quote

As long as the inductance is large enough that the current is fairly continuous these numbers look good.
John P wrote:
Oh sure. It's here (because I don't know how to do attachments):

http://files.myopera.com/John98wbr/files/coil_pwm.xls

_________________
The search for better is endless. Instead simply find very good and get the job done.
Display posts from previous:   
Post new topic   Reply to topic    CCS Forum Index -> General CCS C Discussion All times are GMT - 6 Hours
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2005 phpBB Group