D13 · Lesson 8 · Motor controller
Driving a DC motor in both directions from one supply with an H-bridge, pulse-width modulation as an adjustable average voltage, the winding's inductance smoothing the current, ripple against switching frequency and inductance, braking, dead time and the losses in the switches
A motor controller has to deliver any voltage from full reverse to full forward, efficiently, from a single battery. Four transistors arranged as an H-bridge can connect each end of the motor to either supply rail, and switching them thousands of times a second with a chosen duty cycle produces any average voltage in between, the same trick as the buck converter (D2). The motor's own winding inductance smooths the current, so the motor sees a steady push while the transistors are only ever fully on or fully off, wasting little power.
- One side of an H-bridge switching a motor winding (1 Ω, inductance L) between 0 and 24 V at 50% duty, against the motor's back-EMF E: a 12 V average.
- The current settles at (12 − E)/1 Ω on average, rising while the switch is on and falling while it's off. That sawtooth is the ripple, largest at 50% duty.
- Raise the switching frequency or the inductance and the ripple shrinks in proportion. Turn E up toward 12 V (the motor speeding up) and the average current falls toward zero.
Predict
A 24 V bridge switches a 1 mH winding at 20 kHz and 50% duty. How big is the current's peak-to-peak ripple?
During the on-time of 25 µs the winding sees 24 − 12 = 12 V (the 12 V average being what the back-EMF and resistance take), so the current rises by 12 V × 25 µs/1 mH = 0.3 A, then falls by the same amount during the off-time. In general the ripple is , largest at D = 0.5.
Name it
The H-bridge
Four switches, two per side. Turning on the top left and bottom right drives current one way through the motor; the other diagonal drives it the other way. Turning on both bottom switches shorts the motor's terminals, which brakes it with its own back-EMF. Turning on both switches on one side shorts the supply: shoot-through, which a few hundred nanoseconds of dead time between one switch turning off and the other turning on prevents. The top switches need a gate voltage above the supply, usually from a bootstrap capacitor.
PWM as an average
Switching one side at duty D between 0 and V, with the other side held low, gives an average , so the motor behaves as if driven by an adjustable DC supply. Switching above about 20 kHz keeps the whine out of the audible range.
Ripple
The winding's inductance limits how fast the current can change. With the average voltage across the winding near zero in the steady state,
At most , at D = 0.5. Ripple heats the winding and the switches without making torque, so it sets the minimum switching frequency for a given motor.
Losses
Each conducting switch dissipates , and two conduct at a time; each transition costs roughly in switching loss (S11). Higher switching frequency means less ripple but more switching loss.
Worked example
What average current does the bridge above drive into a motor whose back-EMF is 10 V, and what do the switches dissipate if each has 20 mΩ on-resistance?
Show the solution
- Average voltage across the winding.
- Current.
- Switch loss. Two switches conduct at a time: plus switching losses.
- At full load, say 8 A. which needs some copper or a small heat sink.
Answer 2 A, and the switches dissipate 0.16 W plus switching losses (2.6 W at 8 A).
Worked example
A motor has only 100 µH of winding inductance. What switching frequency keeps the ripple below 1 A peak to peak at 24 V?
Show the solution
- Worst-case ripple. It is , which must stay at or below 1 A:
- Low-inductance motors. Low-inductance motors, such as small coreless ones, need high switching frequencies or extra series inductance.
Answer at least 60 kHz.
Check
A 24 V bridge switches a 2 mH winding at 40 kHz and duty 0.25. What's the peak-to-peak current ripple?
Write units the way you normally would: 1.5 A, 1500 mA and 0.0015 kA are the same answer.
Check
A 24 V bridge drives a motor at duty 0.75. The motor's back-EMF is 6 V and its winding resistance 2 Ω. What's the average current?
Write units the way you normally would: 1.5 A, 1500 mA and 0.0015 kA are the same answer.
Check
A 24 V bridge drives a 0.1 mH winding. What's the lowest switching frequency that keeps the worst-case ripple within 2 A peak to peak?
Write units the way you normally would: 1.5 kHz, 1500 Hz and 0.0015 MHz are the same answer.
Check
An H-bridge switches 24 V at 40 kHz with duty 0.2 into a motor winding of 4 mH.
(a)
What is the peak-to-peak ripple current?
Write units the way you normally would: 1.5 A, 1500 mA and 0.0015 kA are the same answer.
(b)
What is the largest ripple at any duty?
Check
An H-bridge carries 5 A through two MOSFETs in series, each with 10 mΩ on-resistance. What conduction loss does that cause?
Write units the way you normally would: 1.5 W, 1500 mW and 0.0015 kW are the same answer.
Check
An H-bridge leg has 200 ns of dead time at each of its two transitions per period, at 10 kHz. During dead time the output follows the load current's diode instead of the command. Up to what percentage of the period is the duty in error?
Explain why
Why can a motor be driven by a voltage that's switching fully on and off, without jerking with every pulse?
The motor's winding has inductance, which resists changes in current, so when the bridge switches between the supply and zero the current only rises and falls slightly during each short pulse instead of following the voltage. Switching thousands of times a second makes the pulses far shorter than the winding's L/R time constant, so the current stays close to the value set by the average voltage, with a small ripple. The rotor responds to the torque from that current, and its inertia smooths it further, so it turns as if driven by a steady DC voltage equal to the duty cycle times the supply.
Practice
Keep practicing
8 kinds of problem on this topic, dealt one at a time with new numbers every time, for as long as you like.