Motor Control: Speed Loops, Starters and Drives
The roadmap's projects for this course end in a motor: model it, control its speed from a microcontroller, tune the loop. In industry the same ideas run a conveyor drive, a spindle or a pump, only with a mains-powered induction motor, a contactor or a variable-frequency drive (VFD) in a cabinet and a PLC giving the commands. This lesson connects the two worlds: the low-voltage DC speed loop you can build on the bench, and the industrial starting and drive methods you will meet in plants. The machines themselves are the subject of Electrical Machines, and the converters inside drives of Power Electronics and Motor Drives; here they are seen from the control side. Everything at mains voltage in this lesson is calculation only.
The bench DC drive
A small brushed motor is driven by an H-bridge of four transistors switched by PWM at . With sign-magnitude PWM at duty cycle the motor sees an average voltage , and the armature inductance smooths the current (its electrical time constant, for the reference motor, is much longer than a PWM period). The microcontroller closes the loops:
| Loop | Measures | Typical rate | Purpose |
|---|---|---|---|
| current (torque) | shunt or Hall sensor | limits current, rejects supply changes (Cascade Control) | |
| speed | encoder period or counts | PI, the roadmap's speed-control project | |
| position | encoder counts | P or PD on position, speed loop inside (Pole Placement) |
Friction makes a dead zone. With Coulomb friction torque (constant once moving), the steady state , gives
so the motor does not turn below , and the duty-to-speed curve is a straight line that misses the origin. A PI speed loop hides this in steady state but shows it at low speed (stick-slip, Nonlinearities).
Worked example: duty cycle, speed and the speed loop
Given: the reference motor (, , ) on , with a small gearbox adding Coulomb friction .
Find: the breakaway voltage and duty, and the speed at and .
Solve:
- , so .
- : , ().
- : .
Check:
import numpy as np
Ra, k, b, Tc, Vs = 2.0, 0.02, 1e-6, 2e-3, 12.0
V0 = Ra * Tc / k
print(f"breakaway: V0 = {V0:.3f} V, duty {100 * V0 / Vs:.2f} %")
for D in (0.01, 0.10, 0.25, 0.50, 1.00):
V = D * Vs
w = max(0.0, (k * V - Ra * Tc) / (k**2 + Ra * b))
i = (b * w + Tc) / k if w > 0 else V / Ra
print(f"D = {100 * D:5.1f} %: V = {V:5.2f} V, speed {w:6.1f} rad/s ({w * 60 / (2 * np.pi):6.0f} rpm), current {i:.3f} A")breakaway: V0 = 0.200 V, duty 1.67 %
D = 1.0 %: V = 0.12 V, speed 0.0 rad/s ( 0 rpm), current 0.060 A
D = 10.0 %: V = 1.20 V, speed 49.8 rad/s ( 475 rpm), current 0.102 A
D = 25.0 %: V = 3.00 V, speed 139.3 rad/s ( 1330 rpm), current 0.107 A
D = 50.0 %: V = 6.00 V, speed 288.6 rad/s ( 2756 rpm), current 0.114 A
D = 100.0 %: V = 12.00 V, speed 587.1 rad/s ( 5606 rpm), current 0.129 A
The slope of the line, per unit duty, is the plant gain the speed controller sees. With a flywheel the mechanical time constant grows from milliseconds to something you can watch; the lab below uses a normalised plant with and a PI speed controller (, in normalised units). The closed loop is , so and ; the controller's zero raises the overshoot from the of a pure second-order system to the the lab shows, with a rise time of and settling within . Set and the speed ends at only of the setpoint: P control alone leaves a third of the error.
How to code the PI on the microcontroller, with a fixed sample time and anti-windup, is in Discrete PID and Anti-Windup.
Industrial motors: starting methods (calculation only)
Most industrial motors are three-phase induction motors on , (IEC 60038 nominal voltage). Started direct on line (DOL) through a contactor, an induction motor draws roughly 5 to 8 times its rated current for a few seconds (typical figures, check the motor's data sheet), which dips the supply and stresses the mechanics. The classic alternatives:
| Method | Voltage at start | Start current (line) | Start torque | Notes |
|---|---|---|---|---|
| direct on line | full | , about | full locked-rotor torque | simplest; small motors |
| star-delta | per winding | 1/3 | motor must be delta-rated at line voltage; current spike at changeover | |
| soft starter (thyristors) | ramped, e.g. from | proportional to voltage | proportional to voltage squared | smooth; pumps and fans |
| VFD (inverter) | ramped from low frequency | about to | up to rated or more | full speed control; harmonics and EMC to manage |
A VFD keeps the flux constant below rated speed by keeping constant (, so about at , plus a small boost at low frequency for the stator resistance). Modern drives use field-oriented (vector) control: they transform the three phase currents into a flux-producing and a torque-producing component and run two PI current loops, exactly the inner-loop idea of the DC drive. A PLC commands the drive with start/stop and a speed reference over a fieldbus, and reads back speed, current and fault codes.
import math
Pn, Vn, In = 7.5e3, 400.0, 15.0 # rated power (W), line voltage (V), rated current (A): typical 7.5 kW motor
k_dol = 7.0 # locked-rotor current ratio (typical; from the data sheet in practice)
I_dol = k_dol * In
print(f"DOL start current : {I_dol:6.1f} A ({k_dol:.0f} x In), torque 100 % of locked-rotor torque")
print(f"star-delta start : {I_dol / 3:6.1f} A, torque {100 / 3:.0f} %")
for frac in (0.5, 0.6):
print(f"soft start at {100 * frac:.0f} % voltage: {frac * I_dol:6.1f} A, torque {100 * frac**2:.0f} %")
vf = Vn / 50.0
for f in (10, 25, 50):
print(f"VFD V/f at {f:2d} Hz: {vf * f:5.0f} V (before low-speed boost)")
print(f"apparent power at DOL start: {math.sqrt(3) * Vn * I_dol / 1e3:.1f} kVA")DOL start current : 105.0 A (7 x In), torque 100 % of locked-rotor torque
star-delta start : 35.0 A, torque 33 %
soft start at 50 % voltage: 52.5 A, torque 25 %
soft start at 60 % voltage: 63.0 A, torque 36 %
VFD V/f at 10 Hz: 80 V (before low-speed boost)
VFD V/f at 25 Hz: 200 V (before low-speed boost)
VFD V/f at 50 Hz: 400 V (before low-speed boost)
apparent power at DOL start: 72.7 kVA
The last line explains why supply companies limit DOL starting of large motors: about for a few seconds from a machine.
Protection and the control circuit
An industrial motor circuit has a short-circuit protective device (fuses or a circuit breaker), a contactor, and an overload relay with a trip class (class 10 trips within 10 s at 7.2 times the setting, class 20 within 20 s: a class-20 relay lets a heavy-inertia load finish starting). The contactor's coil is driven by the PLC or by a start/stop seal-in circuit with the overload contact in series (PLCs and the Scan Cycle); emergency stops act through a safety relay or safety PLC (Interlocks and Safety PLCs). These are mains circuits and are designed, built and inspected by qualified electricians; in this course they are diagrams and calculations.
Guided lab: the roadmap's speed-control project
Hand calculation. Measure your motor's (ohmmeter, rotor held, several positions), (spin it with another motor or by hand and measure the open-circuit voltage against speed, or from the no-load speed and current) and the mechanical time constant (from a step, State-Space Models). Predict the duty-to-speed line and the breakaway duty.
Simulation. Fit your numbers into the first program; then build the speed PI in Discrete PID for your and check the step in the lab above with your normalised and .
What you would measure. Motor (with a small flywheel or a fan for a longer time constant), H-bridge module, encoder or optical slot sensor, USB microcontroller, supply with the current limit at . Sweep the duty cycle in 5 % steps and record the speed: expect a straight line within above a breakaway duty of a few percent. Then close the speed loop and record steps of of the setpoint: overshoot and settling time should be close to your design (within about , limited by friction and encoder resolution).
Hazards and safe setup. Clamp the motor and guard the flywheel or fan; nothing that can fly off; set the supply current limit; keep the PWM drive's ground and the microcontroller ground common but keep motor currents out of the sensor ground wiring; stall the motor only briefly. No mains motors, contactors or VFDs on the bench.
Pitfalls
- Expecting a straight duty-to-speed line through the origin: friction makes a dead zone.
- Measuring speed from encoder counts over a window that is too short at low speed: one count more or less is a big speed step.
- Ignoring the start current of induction motors when sizing supplies and protection.
- Running a VFD-fed standard motor at low speed and full torque for long: its own fan cools poorly.
Practice
- With , what are the breakaway voltage and the speed at for the reference motor?
- A motor has and a DOL start current of . What line current does star-delta starting draw?
Answer
- ; .
- .
Test yourself
With sign-magnitude PWM at duty cycle from supply , the motor's average voltage is
- regardless of
Why does a motor not turn at very small duty cycles?
- the PWM frequency is too high
- the torque from the current is below the static friction until the voltage exceeds
- the back-EMF is too large
- the inductance blocks DC
Star-delta starting reduces the line current and the torque to about
- 1/2 and 1/2
- and
- 1/3 and 1/3
- 1/3 and 1/9
A VFD keeps constant below rated speed in order to
- keep the motor flux (and so the available torque) constant
- reduce harmonics
- keep the speed constant
- raise the power factor to 1