Constant current, PWM and total power question. - Page 1
Forum section: electronics / projects

author: lamja
author_rank: Contributor
timestamp: July 18, 2010, 02:11:07 am
content: Hi.I'm designing a stepper motor driver. I have simulated this with LTSpice, using PWM to put current in an inductor (4,7 Ohms, 15mH) with a 56V power supply.The current max about 1.4A in the inductor. When I plot the power consumtion in LTSpice, it will go from 60W to -60W in each pulse. But if I calculate average power, it's only about 8W.Is it 60W or 8W? Will I burn my poor stepper motor?Voltage, ampere and power:Zoomed:LTSpice's average calculation:

author: NiHaoMike
author_rank: Super Contributor
timestamp: July 18, 2010, 02:16:20 am
content: It's average power that counts.

author: scrat
author_rank: Frequent Contributor
timestamp: July 20, 2010, 11:41:59 am
content: Be careful with the sign of your power: it could be that even negative power heats up your motor!How did you calculate it?

author: Zero999
author_rank: Super Contributor
timestamp: July 20, 2010, 02:03:41 pm
content: No, if the motor is consuming negative power, it's acting as a generator

author: jahonen
author_rank: Super Contributor
timestamp: July 20, 2010, 03:24:52 pm
content: It is generator only if theaveragepower is negative. The result seems reasonable, since average power to the motor should be equal to the power dissipated to heat plus converted to mechanical work. If the current is 1.4 A and DC resistance of the coil are 4.7 ohms, then it dissipates 9.2 watts, which is reasonable close what you got from LTspice, considering that I can't say what the current is exactly.Any reactive load (inductive or capacitive) behaves similarly, power is flowing in and out (the reactive power) and the net (average power) is the one which is converted to something useful. If average power is zero, then there is no heating or other work done anywhere.Regards,Janne

author: lamja
author_rank: Contributor
timestamp: July 20, 2010, 06:59:45 pm
content: Quote from: jahonen on July 20, 2010, 03:24:52 pmThanks a lot. I think this makes sense to me. I will give it a try...

author: scrat
author_rank: Frequent Contributor
timestamp: July 20, 2010, 09:12:29 pm
content: Sorry, I was in a hurry while posting my previous reply. I did not see the calculation on the screens you posted.Since you do not simulate back-EMF, the only active power is the amount dissipated on the series resistance.However, your average period is too short, and the one you calculated is only something like an "instantaneous" active power: real average power must be done on a period of your sine wave (as I guess from images).So average active power will be R*Irms^2 = 4.7 * (1.4/sqrt(2))^2 = 4.6 W (you will likely use this for thermal issues)While maximum active power (averaged on a switching period, of course) will be R*Imax^2 = 4.7 * 1.4^2 = 9.2 W (as Jahonen said).I think the best way to calculate these things from simulation data is to make a running average (with a period length equal to a switching period or a fundamental period, depending on your needs) and in your case preferably use R*I^2, since current is naturally a much cleaner (low-pass filtered) signal, even if averaged V*I must give almost the same results.

author: jahonen
author_rank: Super Contributor
timestamp: July 21, 2010, 10:10:52 am
content: For stepper case (I presume two-phase), then you'll have two currents 90° out of phase each other. Then it becomes that the heating power in the motor is constant, sin(x)^2+cos(x)^2=1, for all x, so peak power dissipation is the correct value in this case.Regards,Janne

author: scrat
author_rank: Frequent Contributor
timestamp: July 21, 2010, 12:58:36 pm
content: Quote from: jahonen on July 21, 2010, 10:10:52 amI didn't consider that, but it is fundamental for the application. I agree, of course!The same can be achieved by summing rms power on the two phases (each is 1/2 of the peak power).