Modelling Electromechanical Systems: The DC Motor
The model at the heart of every motion system. Learn the permanent-magnet DC motor equations (electrical circuit, back-EMF, torque constant, mechanical dynamics), the torque–speed curve, stall torque and no-load speed, electrical and mechanical time constants, the transfer function from voltage to speed and position, power and efficiency, load torque and friction, and simulation by numerical integration — with a Python simulation of a 12 V step response.
Almost every motion-control design starts with a model of the motor and load. The brushed DC motor is the simplest and most instructive: an armature circuit with resistance and inductance, a back-EMF proportional to speed, and a torque proportional to current. Brushless DC and PMSM motors under field-oriented control behave almost identically.
From these few equations follow the motor's torque–speed curve, how fast it responds, how much current it draws, and the transfer function a controller must be designed for.
An analogy
A DC motor is like a water wheel driven by a pump: voltage is the pump pressure, current is the flow, and the faster the wheel spins the more it pushes back (back-EMF), until pressure and push-back balance at a steady speed.
How a DC motor works
Current in the armature windings in a magnetic field produces torque (Lorentz force); the commutator (brushed) or electronic switching (brushless) keeps torque in one direction. As the rotor spins, it also acts as a generator, producing back-EMF that opposes the supply — so current and torque fall as speed rises.
Torque–speed characteristics
For fixed voltage, torque falls linearly with speed from stall torque to zero at no-load speed. Output power peaks at half speed; efficiency peaks at higher speed and low torque. The continuous operating region is limited by heating (RMS current), the intermittent region by demagnetisation and commutation limits.
Transfer functions and time constants
Laplace-transforming the two equations gives a second-order transfer function from voltage to speed, which usually splits into a fast electrical pole (L/R) and a slower mechanical pole (JR/K_tK_e). Adding an integrator gives position. Load inertia increases τ_m; gears reflect load inertia by 1/N².
Beyond the ideal model
Real systems add Coulomb and stiction friction, cogging torque, compliance and resonance in couplings and belts (two-mass models), backlash, magnetic saturation and temperature effects (R rises ~0.4%/°C in copper, K_t falls as magnets warm). BLDC/PMSM motors with FOC are modelled in the rotating dq frame. Parameters are identified from datasheets and step/frequency-response tests.
Formulas
- Electrical:
V = R·i + L·di/dt + K_e·ω - Mechanical:
J·dω/dt = K_t·i − b·ω − T_load - Torque–speed line:
T = (K_t/R)(V − K_e·ω); T_stall = K_t·V/R; ω_0 = V/K_e - Transfer function (V → ω):
ω/V = K_t / [(Js + b)(Ls + R) + K_t K_e] - Mechanical time constant:
τ_m ≈ J·R/(K_t·K_e) (L small, b small) - Electrical time constant:
τ_e = L/R - Maximum output power:
P_max = T_stall·ω_0/4 at half speed
Worked example: Stall and no-load
Given: V 12 V, R 1.2 Ω, K = 0.05
Find: Stall torque, no-load speed.
- T = 0.05 × 12/1.2
- ω₀ = 12/0.05 = 240 rad/s
Answer: 0.50 N·m, 2292 rpm
Worked example: Maximum power
Given: T_stall 0.5 N·m, ω₀ 240 rad/s
Find: P_max.
- 0.5 × 240/4
Answer: 30 W at 1146 rpm
Worked example: Effect of load inertia
Given: Load inertia 3× rotor, same motor
Find: New τ_m.
- J ×4 → τ_m ×4
Answer: ≈ 38 ms
Simulating a DC motor step response
# DC motor model: electrical + mechanical equations, Euler simulation of a 12 V step
R, L, Kt, Ke = 1.2, 0.0015, 0.05, 0.05 # ohm, H, N*m/A, V*s/rad
J, b = 2e-5, 1e-5 # kg*m^2, N*m*s/rad
V, TL = 12.0, 0.0
i = w = 0.0
dt = 1e-5
t63 = None
w_ss = Kt * V / (b * R + Kt * Ke)
for n in range(int(0.3 / dt)):
di = (V - R * i - Ke * w) / L
dw = (Kt * i - b * w - TL) / J
i += di * dt; w += dw * dt
if t63 is None and w >= 0.632 * w_ss:
t63 = n * dt
print(f"steady speed {w*60/(2*3.14159265):.0f} rpm (theory {w_ss*60/(2*3.14159265):.0f}), current {i:.2f} A")
print(f"mechanical time constant ~ {t63*1000:.1f} ms (theory J*R/(Kt*Ke) = {J*R/(Kt*Ke)*1000:.1f} ms)")
print(f"stall torque {Kt*V/R:.2f} N*m, no-load speed {V/Ke*60/(2*3.14159265):.0f} rpm")
# steady speed 2281 rpm (theory 2281), current 0.05 A
# mechanical time constant ~ 9.7 ms (theory J*R/(Kt*Ke) = 9.6 ms)
# stall torque 0.50 N*m, no-load speed 2292 rpmThe simulation matches the analytical steady speed and time constant. At start-up the current spikes towards V/R = 10 A (stall current) before back-EMF builds up — which is why drivers limit current. The small electrical time constant (1.25 ms) is often neglected, giving a first-order speed model.
Common mistakes
- Wrong: Ignoring start-up current. — Right: Current can reach V/R — limit it in the driver.
- Wrong: Using no-load speed as operating speed. — Right: Speed drops with load torque.
- Wrong: Ignoring temperature effects. — Right: R and K_t change with temperature.
Applications
- Servo drives: Plant models for tuning current, speed and position loops.
- Robotics: Joint actuator models for control and simulation.
- Automotive: Window lifts, seat motors, electric power steering.
- Consumer devices: Drones, gimbals, pumps, fans.
Key takeaways
- V = Ri + L di/dt + K_eω; J dω/dt = K_t i − bω − T_L.
- Linear torque–speed curve; P_max at half speed.
- τ_m = JR/(K_tK_e); τ_e = L/R.
- Models drive controller design and sizing.
Going further
- dq-frame PMSM model: Field-oriented control and decoupled torque/flux.
- Two-mass resonance: Motor–load compliance limits bandwidth.
- System identification: Estimating J, b, friction from test data.