PWM Duty Cycle: Motor Speed Control Explained

Click For Summary

Discussion Overview

The discussion revolves around the relationship between PWM (Pulse Width Modulation) duty cycle and motor speed control, particularly in the context of driving inductive loads like motors. Participants explore the underlying principles, mathematical modeling, and qualitative explanations for how varying the duty cycle affects motor performance.

Discussion Character

  • Exploratory
  • Technical explanation
  • Mathematical reasoning
  • Debate/contested

Main Points Raised

  • One participant questions why the duty cycle of PWM controls motor speed, noting that the load behaves as if exposed to average voltage despite the rapidly varying input.
  • Another participant suggests that the inductive load may provide a smoothing effect, which could explain the average current through the motor being proportional to its speed.
  • A mathematical model is proposed, treating the system as a series RL circuit with a square wave voltage source, but the participant struggles to derive a clear expression for current over time.
  • Some participants discuss the qualitative analogy of PWM in light dimmers, noting differences in perception between lights and motors due to the inertia of the motor system.
  • One participant introduces the concept of critical frequency, suggesting that above this frequency, motors exhibit smooth motion rather than jerky movements.
  • Another participant emphasizes that in PWM circuits, power remains constant while the time it is applied varies, thus affecting the total energy delivered to the load.
  • There is a mention of the Nyquist theorem as a relevant concept in understanding the behavior of PWM in both motors and lighting.

Areas of Agreement / Disagreement

Participants express a mix of agreement and disagreement on the mathematical modeling and qualitative explanations of PWM effects. While some concepts are accepted, there is no consensus on the precise mathematical relationships or the best way to model the system.

Contextual Notes

Participants note limitations in their mathematical approaches and the dependence on assumptions about the system's behavior, particularly regarding the effects of back EMF and the nature of the load.

Who May Find This Useful

This discussion may be useful for those interested in motor control, PWM applications, electrical engineering, and the mathematical modeling of dynamic systems.

cepheid
Staff Emeritus
Science Advisor
Gold Member
Messages
5,197
Reaction score
38
I recently encountered (not for the first time) a situation in which a PWM output from a microcontroller is sent to a MOSFET bridge that drives a motor (a very high current, inductive load). I started to wonder exactly WHY it is that the duty cycle of the PWM controls the motor speed. I know that the average of the waveform is proportional to the duty cycle, but it seemed strange that the load would behave as though it were being exposed to the average voltage when in fact it was effectively being exposed to a rapidly time-varying one. Then I read something that hinted that the inductive load was somehow providing a smoothing effect. I figured that if I could just solve the system and figure out the current through the motor as a function of time, I'd be set. After all...

...presumably the current through the motor is proportional to its speed (if somebody knows otherwise, please let me know!)...

...so I modeled the system as a series RL circuit with a square wave voltage source v(t) (is this reasonable?)

I set up the typical DE:

v(t) = i(t)R + L\frac{di(t)}{dt}​

After solving using an integrating factor, you get:

i(t) = \frac{e^{-\frac{R}{L}t}}{L}\int_0^t e^{\frac{R}{L}\tau} v(\tau)\, d\tau​

I guess we can define the square wave piecewise, letting it have period T and duty cycle D where D is a number between 0 and 1 telling you for what fraction of the period it's high:

v(t) = V_{max}, \ \ \ \ 0 \leq t \leq DT
v(t) = 0, \ \ \ \ DT \leq t \leq T
v(t+T) = v(t)​

So what's i(t)? if t = T, the integral only goes over one square pulse:

i(T) = \frac{e^{-\frac{R}{L}T}}{L}\int_0^{DT} V_{max} e^{\frac{R}{L}\tau} \, d\tau​

Now it took me a while, but I finally figured that at some *arbitrary* time t, the integral will have gone over n square pulses where:

n = \left \lceil \frac{t}{T} \right\rceil​

That's all well and good, but I don't know how to calculate that to get some sensible result for i(t). The integral works out to:

i(t) = n\frac{e^{-\frac{R}{L}t}}{R}V_{max} e^{\frac{R}{L}DT}​

So...what do I do now? Ideally I'd like to get the result that i(t) is constant and equal to

D\frac{V_{max}}{R}​

That would be *awesome*, because it would mean that the current is a fraction of the max that could be drawn, the fraction being determined by the duty cycle, and everything would make sense. But I don't know how to get there.

1. Does anybody know how to solve this math problem?

2. Am I thinking about this in the right way? Because I can't think of any other way that "PWM duty cycle controls motor speed" remotely makes any sort of sense.
 
Last edited:
Engineering news on Phys.org
Something just struck me when I was considering a simpler example (a PWM light dimmer)

https://www.physicsforums.com/showthread.php?t=268283

Does this work as a good qualitative explanation for the *motor* as well? Still, it doesn't quite cut it. In the lightbulb, it doesn't matter that the current drops to zero during the off portion of the cycle, because we can't perceive it. Or maybe it doesn't drop to zero, due to back emf...in which case we're back to where we started...trying to solve for i(t) to figure out exactly what happens! Can somebody help me do the math?
 
...so I modeled the system as a series RL circuit with a square wave voltage source v(t) (is this reasonable?)
I'm no expert but I think you will need to model using a Fourier integral. Since a pulse v(t) is the sum of all frequencies each having their own phase.
 
cepheid said:
Something just struck me when I was considering a simpler example (a PWM light dimmer)

https://www.physicsforums.com/showthread.php?t=268283

Does this work as a good qualitative explanation for the *motor* as well? Still, it doesn't quite cut it. In the lightbulb, it doesn't matter that the current drops to zero during the off portion of the cycle, because we can't perceive it. Or maybe it doesn't drop to zero, due to back emf...in which case we're back to where we started...trying to solve for i(t) to figure out exactly what happens! Can somebody help me do the math?

I won't address the mathematical points of this discussion, but as for the qualitative hand-wavy arguments, well...

In the case of a motor driver driving a motor, the motor (and wheel, and robot / car, etc.) all have a certain (rotational) inertia. If the motor driver frequency were low enough, you would see the motor stop and go in jerky motions. But go above this critical frequency, and only smooth motion results.

In the case of an (incandescent) light, if you assume that the number of photons emitted might be high or zero (in reality, you receive a portion of the sine waveform), but you receive some total number of photons at your eyes every 1/30 of a second or so--roughly the upper limit of your eyes' 'sampling frequency'. As a result, you see the average of the intensity. For all of us, 50/60 Hz AC driven incandescent lights look continuous, despite a zero crossing 120 times a second--this might be due to the incandescent lights' inductance--but someone else would have to confirm that. Fluorescent lights are able to respond fast enough that they do flicker at 100/120 Hz. For most of us, this is imperceptible, but I know people who are driven crazy by fluorescents because they're able to see this constant flickering--or some beat frequency, at least.

If you're familiar with communications and the Nyquist theorem, these are both sort of physical manifestations of that.
 
MATLABdude said:
In the case of a motor driver driving a motor, the motor (and wheel, and robot / car, etc.) all have a certain (rotational) inertia. If the motor driver frequency were low enough, you would see the motor stop and go in jerky motions. But go above this critical frequency, and only smooth motion results.

Yeah, that's a really good point, and I can't believe I didn't think of it. For this reason, the steadiness of i(t) doesn't matter quite as much, and so I've abandoned the mathematical analysis (I have other things to do).


MATLABdude said:
If you're familiar with communications and the Nyquist theorem, these are both sort of physical manifestations of that.

Yes I am, and we have since discussed this further in the other thread as well. Thank you very much for your remarks!
 
Energy=power X time In a pulse width modulation circuit, you are not varying the power put into a load, that stays the same, but you are varying the time it is applied to it, thus varying the total energy delivered.
 
famousken said:
Energy=power X time In a pulse width modulation circuit, you are not varying the power put into a load, that stays the same, but you are varying the time it is applied to it, thus varying the total energy delivered.

You can't really change one without changing the other in this case. Average the power and it certainly changes with duty cycle.
 
average, yes, which is factors time into the equation.
 

Similar threads

  • · Replies 1 ·
Replies
1
Views
1K
Replies
18
Views
3K
Replies
3
Views
1K
  • · Replies 13 ·
Replies
13
Views
2K
Replies
3
Views
2K
  • · Replies 11 ·
Replies
11
Views
2K
  • · Replies 23 ·
Replies
23
Views
6K
  • · Replies 1 ·
Replies
1
Views
2K
  • · Replies 14 ·
Replies
14
Views
4K
  • · Replies 1 ·
Replies
1
Views
2K