TExcelTAD
Home › Control Systems & Automation › Motor Control: Speed Loops, Starters and Drives

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 10–30 kHz10\text{–}30\ \text{kHz}. With sign-magnitude PWM at duty cycle DD the motor sees an average voltage DVsD V_s, and the armature inductance smooths the current (its electrical time constant, 0.5 ms0.5\ \text{ms} for the reference motor, is much longer than a 50 μs50\ \mu\text{s} PWM period). The microcontroller closes the loops:

Loop Measures Typical rate Purpose
current (torque) shunt or Hall sensor 10–20 kHz10\text{–}20\ \text{kHz} limits current, rejects supply changes (Cascade Control)
speed encoder period or counts 0.5–2 kHz0.5\text{–}2\ \text{kHz} PI, the roadmap's speed-control project
position encoder counts 0.5–2 kHz0.5\text{–}2\ \text{kHz} P or PD on position, speed loop inside (Pole Placement)

Friction makes a dead zone. With Coulomb friction torque TcT_c (constant once moving), the steady state V=Rai+kωV = R_a i + k\omega, ki=bω+Tck i = b\omega + T_c gives

ω=kV−RaTck2+Rabfor V>V0=RaTck\omega = \frac{k V - R_a T_c}{k^2 + R_a b} \quad \text{for } V > V_0 = \frac{R_a T_c}{k}

so the motor does not turn below V0V_0, 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 (Ra=2 ΩR_a = 2\ \Omega, k=0.02 V⋅s/radk = 0.02\ \text{V} \cdot \text{s/rad}, b=10−6 N⋅m⋅sb = 10^{-6}\ \text{N} \cdot \text{m} \cdot \text{s}) on Vs=12 VV_s = 12\ \text{V}, with a small gearbox adding Coulomb friction Tc=2 mN⋅mT_c = 2\ \text{mN} \cdot \text{m}.

Find: the breakaway voltage and duty, and the speed at D=25 %D = 25\,\% and 50 %50\,\%.

Solve:

  • V0=2×0.002/0.02=0.2 VV_0 = 2 \times 0.002/0.02 = 0.2\ \text{V}, so D0=0.2/12=1.7 %D_0 = 0.2/12 = 1.7\,\%.
  • D=25 %D = 25\,\%: V=3 VV = 3\ \text{V}, ω=0.02×3−2×0.0020.0004+0.000002=0.0560.000402=139.3 rad/s\omega = \frac{0.02 \times 3 - 2 \times 0.002}{0.0004 + 0.000002} = \frac{0.056}{0.000402} = 139.3\ \text{rad/s} (1330 rpm1330\ \text{rpm}).
  • D=50 %D = 50\,\%: ω=0.12−0.0040.000402=288.6 rad/s\omega = \frac{0.12 - 0.004}{0.000402} = 288.6\ \text{rad/s}.

Check:

python · try it yourself
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, kVsk2+Rab≈597 rad/s\frac{k V_s}{k^2 + R_a b} \approx 597\ \text{rad/s} 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 τm=0.5 s\tau_m = 0.5\ \text{s} and a PI speed controller (Kp=2K_p = 2, Ki=8 s−1K_i = 8\ \text{s}^{-1} in normalised units). The closed loop is 2s+80.5s2+3s+8\frac{2s + 8}{0.5 s^2 + 3 s + 8}, so ωn=4 rad/s\omega_n = 4\ \text{rad/s} and ζ=0.75\zeta = 0.75; the controller's zero raises the overshoot from the 2.8 %2.8\,\% of a pure second-order system to the 7.91 %7.91\,\% the lab shows, with a rise time of 0.328 s0.328\ \text{s} and settling within 1.268 s1.268\ \text{s}. Set Ki=0K_i = 0 and the speed ends at only 0.6670.667 of the setpoint: P control alone leaves a third of the error.

r = 1+C(s): Kp 2, Ki 8, Kd 0P(s) = 1/(0.5s+1)y-T(s) = (2.000 s + 8.000) / (0.500 s^2 + 3.000 s + 8.000)closed-loop poles: -3.00+j2.65, -3.00-j2.650.00.51.000.5 s1.0 s1.5 sty(t)t_s 1.27 s+7.9 %y(t)setpoint10-90 % rise

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 400 V400\ \text{V}, 50 Hz50\ \text{Hz} (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 IDOLI_\text{DOL}, about 5–8 In5\text{–}8\,I_n full locked-rotor torque simplest; small motors
star-delta 1/31/\sqrt{3} per winding IDOL/3I_\text{DOL}/3 1/3 motor must be delta-rated at line voltage; current spike at changeover
soft starter (thyristors) ramped, e.g. from 40–60 %40\text{–}60\,\% proportional to voltage proportional to voltage squared smooth; pumps and fans
VFD (inverter) V/fV/f ramped from low frequency about InI_n to 1.5 In1.5\,I_n up to rated or more full speed control; harmonics and EMC to manage

A VFD keeps the flux constant below rated speed by keeping V/fV/f constant (400 V/50 Hz=8 V/Hz400\ \text{V}/50\ \text{Hz} = 8\ \text{V/Hz}, so about 200 V200\ \text{V} at 25 Hz25\ \text{Hz}, 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.

python · try it yourself
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 73 kVA73\ \text{kVA} for a few seconds from a 7.5 kW7.5\ \text{kW} 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 RaR_a (ohmmeter, rotor held, several positions), kk (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 τm\tau_m and check the step in the lab above with your normalised KK and τ1\tau_1.

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, 12 V12\ \text{V} supply with the current limit at 1–2 A1\text{–}2\ \text{A}. Sweep the duty cycle in 5 % steps and record the speed: expect a straight line within ±5 %\pm 5\,\% above a breakaway duty of a few percent. Then close the speed loop and record steps of ±20 %\pm 20\,\% of the setpoint: overshoot and settling time should be close to your design (within about ±20 %\pm 20\,\%, 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

  1. With Tc=4 mN⋅mT_c = 4\ \text{mN} \cdot \text{m}, what are the breakaway voltage and the speed at 6 V6\ \text{V} for the reference motor?
  2. A motor has In=30 AI_n = 30\ \text{A} and a DOL start current of 6 In6\,I_n. What line current does star-delta starting draw?
Answer
  1. V0=2×0.004/0.02=0.4 VV_0 = 2 \times 0.004/0.02 = 0.4\ \text{V}; ω=(0.12−0.008)/0.000402=278.6 rad/s\omega = (0.12 - 0.008)/0.000402 = 278.6\ \text{rad/s}.
  2. 6×30/3=60 A6 \times 30/3 = 60\ \text{A}.

Test yourself

With sign-magnitude PWM at duty cycle DD from supply VsV_s, the motor's average voltage is

  1. Vs/DV_s/D
  2. DVsD V_s
  3. (1−D)Vs(1 - D)V_s
  4. VsV_s regardless of DD

Why does a motor not turn at very small duty cycles?

  1. the PWM frequency is too high
  2. the torque from the current is below the static friction until the voltage exceeds RaTc/kR_a T_c/k
  3. the back-EMF is too large
  4. the inductance blocks DC

Star-delta starting reduces the line current and the torque to about

  1. 1/2 and 1/2
  2. 1/31/\sqrt{3} and 1/31/\sqrt{3}
  3. 1/3 and 1/3
  4. 1/3 and 1/9

A VFD keeps V/fV/f constant below rated speed in order to

  1. keep the motor flux (and so the available torque) constant
  2. reduce harmonics
  3. keep the speed constant
  4. raise the power factor to 1