---
title: Modeling physical systems
heading: Differential-equation models of mechanical, electrical, thermal and electromechanical plants, the DC motor's two time constants, and the analogies that let one set of tools handle them all
eyebrow: S9 · Lesson 2 · Modeling physical systems
xp: 50
---

::: hook
Before you can design a controller you need a model of what it controls: an equation that says how the plant's output responds to its input. A model doesn't have to be perfect, since feedback forgives a lot, but it has to capture the time scales that matter. This lesson builds models from physics for the plants that show up again and again in electrical engineering, a DC motor above all, and shows that a mass on a spring, an RLC circuit and a heated block obey equations of the same shape.
:::

::: play
- The speed of a DC motor after 12 V is applied, $\omega(t) = \omega_\infty(1 - e^{-t/\tau_m})$, in rpm.
- The final speed hardly depends on the rotor's inertia J, but the time constant is proportional to it: heavier rotors take longer to spin up.
- A larger winding resistance R slows the response too, because less current, and so less torque, flows for a given back-EMF difference.
:::

```sim plot
view: graph
x: t = 0..0.1 s
y: n = 0..3000 rpm
slider: J = 5e-6..1e-4 = 2e-5 log
slider: R = 0.5..5 = 2 Ω
plot: 12*0.05/(R*1e-5 + 0.0025)*(1 - exp(-t*(R*1e-5 + 0.0025)/(R*J)))*60/(2*pi) | samples: 400 | label: speed
readout: final speed, rpm = 12*0.05/(R*1e-5 + 0.0025)*60/(2*pi) | digits: 4
readout: mechanical time constant, ms = 1000*R*J/(R*1e-5 + 0.0025) | digits: 3
```

::: predict
## A motor with R = 2 Ω, $K_t = K_e$ = 0.05 and rotor inertia 2 × 10⁻⁵ kg·m² is switched onto 12 V. Roughly how long until it's near full speed?

- [ ] About 0.25 ms, the winding's L/R
- [x] About 50 to 80 ms, a few mechanical time constants of 16 ms
- [ ] About 1 s
- [ ] It depends only on the friction

::: reveal
The speed rises with the mechanical time constant $\tau_m = RJ/(Rb + K_tK_e)$ = 15.9 ms, reaching 95% after 3τ ≈ 48 ms and 99% after about 73 ms. The winding's electrical time constant, L/R = 0.25 ms, is sixty times faster and barely shows.
:::
:::

::: nameit
## Lumped elements

| Domain | Effort | Flow | Storage | Storage | Loss |
|---|---|---|---|---|---|
| Electrical | voltage | current | L: $v = L\,di/dt$ | C: $i = C\,dv/dt$ | R: $v = Ri$ |
| Translation | force | velocity | mass: $F = m\,dv/dt$ | spring: $F = kx$ | damper: $F = bv$ |
| Rotation | torque | angular velocity | inertia: $\tau = J\,d\omega/dt$ | torsion: $\tau = k\theta$ | friction: $\tau = b\omega$ |
| Thermal | temperature | heat flow | | heat capacity: $P = C\,dT/dt$ | resistance: $\Delta T = R_\theta P$ |

A mass–spring–damper, $m\ddot{x} + b\dot{x} + kx = F$, has

$$\omega_n = \sqrt{\frac{k}{m}}, \qquad \zeta = \frac{b}{2\sqrt{km}}$$

and a series RLC circuit has $\omega_n = 1/\sqrt{LC}$ and $\zeta = \frac{R}{2}\sqrt{C/L}$. A heated block is first order with $\tau = R_\theta C_\theta$.

## The DC motor

Torque $\tau = K_ti$, back-EMF $e = K_e\omega$ (in SI units $K_t = K_e$), so

$$L\frac{di}{dt} = V - Ri - K_e\omega, \qquad J\frac{d\omega}{dt} = K_ti - b\omega - \tau_\text{load}$$

$$\frac{\Omega(s)}{V(s)} = \frac{K_t}{(Js + b)(Ls + R) + K_tK_e}$$

When L/R is much faster than the mechanics, drop it:

$$\frac{\Omega}{V} \approx \frac{K_t/(Rb + K_tK_e)}{\tau_ms + 1}, \qquad \tau_m = \frac{RJ}{Rb + K_tK_e}$$
:::

::: example
## The motor above has L = 0.5 mH and friction b = 10⁻⁵ N·m·s. Find its no-load speed at 12 V and its exact poles.

::: solution
1. **DC gain.**
   $$\begin{aligned} K &= \frac{K_t}{Rb + K_t^2} \\ &= \frac{0.05}{0.00252} \\ &= 19.84\ \text{rad/s per V} \end{aligned}$$
2. **No-load speed at 12 V.**
   $$\begin{aligned} \omega &= 12 \times 19.84 \\ &= 238\ \text{rad/s} \end{aligned}$$
   or 2,274 rpm.
3. **Full denominator.**
   $$\begin{aligned} &JLs^2 + (JR + bL)s \\ &\quad + (Rb + K_t^2) \end{aligned}$$
   which with these values is
   $$\begin{aligned} &10^{-8}s^2 + 4.0005 \times 10^{-5}s \\ &\quad + 0.00252 \end{aligned}$$
4. **Poles.** Its roots, with the time constants they give:
   $$\begin{aligned} s_1 &= -64.0\ \text{s}^{-1}\ (15.6\ \text{ms}) \\ s_2 &= -3936\ \text{s}^{-1}\ (0.254\ \text{ms}) \end{aligned}$$
5. **Compare with one pole.** The one-pole approximation's 15.9 ms is 2% off, good enough for most designs.

**Answer:** 238 rad/s (2,274 rpm) at 12 V, with poles at −64.0 and −3,936 s⁻¹.
:::
:::

::: example
## A 1 kg mass on a 400 N/m spring has a damper of 8 N·s/m. What are its natural frequency and damping ratio?

::: solution
1. **Natural frequency.**
   $$\begin{aligned} \omega_n &= \sqrt{400/1} \\ &= 20\ \text{rad/s} \end{aligned}$$
   which is 3.18 Hz.
2. **Damping ratio.**
   $$\begin{aligned} \zeta &= \frac{8}{2\sqrt{400 \times 1}} \\ &= 0.2 \end{aligned}$$
   Lightly damped, so a tap rings for several cycles.
3. **The electrical twin.** A series RLC circuit with R = 10 Ω, L = 1 mH and C = 1 µF has the same kind of equation, with $\omega_n$ = 31.6 krad/s and ζ = 0.158.

**Answer:** $\omega_n$ = 20 rad/s (3.18 Hz) and ζ = 0.2.
:::
:::

::: example
## A 50 g aluminum block (900 J/kg·K) sits on a heater with 2 K/W of thermal resistance to ambient. Driven with 10 W, how hot does it get, and how soon?

::: solution
1. **Heat capacity.**
   $$\begin{aligned} C &= 0.05 \times 900 \\ &= 45\ \text{J/K} \end{aligned}$$
2. **Time constant.**
   $$\begin{aligned} \tau &= R_\theta C \\ &= 2 \times 45 \\ &= 90\ \text{s} \end{aligned}$$
3. **Final rise.**
   $$\begin{aligned} \Delta T &= R_\theta P \\ &= 20\ \text{K} \end{aligned}$$
   reached to 95% after $3\tau = 270$ s.
4. **Why thermal loops saturate.** A temperature loop around it can be made faster than 90 s only by driving the heater harder than its steady-state power, which is why thermal controllers saturate so often.

**Answer:** it rises 20 K above ambient with a 90 s time constant, reaching 95% of that after 270 s.
:::
:::

::: check
given: V = 6 | 12 | 24; K = 0.02 | 0.05; R = 1 | 4; b = 1e-4 | 5e-4
answer: K*V/(R*b + K^2)
unit: rad/s
tolerance: 0.5%

## A motor with $K_t = K_e$ = {K}, R = {R} Ω and friction b = {b} N·m·s runs on {V} V with no load. What's its steady speed?

::: right
Right. $K_tV/(Rb + K_tK_e)$ = {answer} rad/s.
:::

::: misses
- [V/K] That ignores friction: the speed at which back-EMF equals the supply.
- [any] Not yet. Set $d\omega/dt = 0$ and $di/dt = 0$ and solve.
:::
:::

::: check
given: J = 1e-5 | 5e-5; K = 0.02 | 0.05; R = 1 | 4; b = 1e-4 | 5e-4
answer: 1000*R*J/(R*b + K^2)
unit: ms
tolerance: 0.5%

## A motor has rotor inertia {J} kg·m², $K_t = K_e$ = {K}, R = {R} Ω and b = {b}. What's its mechanical time constant?

::: right
Right. $RJ/(Rb + K_tK_e)$ = {answer} ms.
:::

::: misses
- [1000*J/b] That's the time constant with the motor's terminals open, friction alone.
- [any] Not yet. $\tau_m = RJ/(Rb + K_tK_e)$.
:::
:::

::: check
given: m = 0.5 | 2; k = 200 | 800; b = 4 | 10 | 20
answer: b/(2*sqrt(k*m))
tolerance: 0.5%

## A {m} kg mass on a {k} N/m spring has damping {b} N·s/m. What's its damping ratio?

::: right
Right. $\zeta = b/(2\sqrt{km})$ = {answer}.
:::

::: misses
- [b/sqrt(k*m)] Include the 2 in the denominator.
- [any] Not yet. Compare $m s^2 + bs + k$ with $s^2 + 2\zeta\omega_ns + \omega_n^2$.
:::
:::

::: check
given: m = 0.5 | 2 | 10; k = 200 | 800 | 5000
answer: sqrt(k/m)/(2*pi)
unit: Hz
tolerance: 0.5%

## What's the undamped natural frequency of a {m} kg mass on a {k} N/m spring?

::: right
Right. $\sqrt{k/m}/2\pi$ = {answer} Hz.
:::

::: misses
- [sqrt(k/m)] That's in radians per second.
- [any] Not yet. $\omega_n = \sqrt{k/m}$.
:::
:::

::: check
given: P = 5 | 20; R = 2 | 5; C = 50 | 200
answer: R*C
unit: s
tolerance: 0.5%

## A heated block has thermal resistance {R} K/W to ambient and heat capacity {C} J/K, and is driven with {P} W. What's its time constant?

::: right
Right. $R_\theta C_\theta$ = {answer} s; it settles {P} × {R} K above ambient.
:::

::: misses
- [P*R] That's its final temperature rise in kelvin.
- [any] Not yet. $\tau = R_\theta C_\theta$.
:::
:::

::: check
given: R = 5 | 20 | 50; L = 1 | 10; C = 0.1 | 1
answer: R/2*sqrt(C*1e-6/(L*1e-3))
tolerance: 0.5%

## A series RLC circuit has R = {R} Ω, L = {L} mH and C = {C} µF. What's its damping ratio?

::: right
Right. $\zeta = \frac{R}{2}\sqrt{C/L}$ = {answer}.
:::

::: misses
- [R/2*sqrt(L*1e-3/(C*1e-6))] The ratio is C over L.
- [any] Not yet. Compare $LCs^2 + RCs + 1$ with the standard form.
:::
:::

::: check
kind: parts
given: J = 1e-5 | 4e-5; L = 2e-4 | 1e-3 | 8e-3; N = 2 | 5 | 20

## A motor of inertia {J} kg·m² drives a load of {L} kg·m² through a {N}:1 gearbox.

::: part
answer: J + L/N^2
unit: kg*m^2
tolerance: 0.5%

### What total inertia does the motor see?

::: misses
- [J + L/N] The load's inertia is divided by the ratio squared.
- [any] $J_m + J_L/N^2$.
:::
:::

::: part
answer: sqrt(L/J)
tolerance: 0.5%

### What ratio would give the load its fastest acceleration for a given motor torque?

::: misses
- [any] Inertia matching: $N = \sqrt{J_L/J_m}$.
:::
:::
:::

::: check
kind: derivation
vars: m = 0.1..10, k = 10..1000, b = 0.01..1

## A mass m on a spring k with damping b.

::: step
answer: sqrt(k/m)

### What is $\omega_n$?
:::

::: step
answer: b/(2*sqrt(k*m))

### What is ζ?
:::

::: step
answer: sqrt(k/m)*sqrt(1 - b^2/(4*k*m))

### What is the damped frequency $\omega_d$?
:::

::: right
Right. Light damping barely moves the ringing frequency: $\omega_d$ falls only as $\sqrt{1 - \zeta^2}$.
:::
:::

::: explain
## Why does a DC motor's speed rise with a time constant set by its inertia and its winding resistance together?

::: model
When the motor is moving, its back-EMF opposes the supply, so the current, and the torque, depends on the difference between the supply and $K_e\omega$, divided by R. As the speed rises the back-EMF eats into that difference and the accelerating torque falls in proportion, which is exactly the behavior of a first-order system. The back-EMF acts like a damper of strength $K_tK_e/R$: a large R makes that electrical damping weak, so the motor approaches its final speed slowly, and a large inertia J takes more torque to accelerate. Their ratio, $RJ/K_tK_e$ plus the effect of friction, sets the time constant.
:::
:::

::: practice

::: check
given: V = 9 | 48; K = 0.03 | 0.1; R = 0.5 | 3; b = 2e-4 | 1e-3
answer: K*V/(R*b + K^2)
unit: rad/s
tolerance: 0.5%

## No-load speed: {V} V, K = {K}, R = {R} Ω, b = {b}?

::: misses
- [any] $K_tV/(Rb + K_tK_e)$.
:::
:::

::: check
given: m = 0.2 | 5; k = 100 | 2000; b = 2 | 30
answer: b/(2*sqrt(k*m))
tolerance: 0.5%

## Damping ratio: m = {m} kg, k = {k} N/m, b = {b} N·s/m?

::: misses
- [any] $b/(2\sqrt{km})$.
:::
:::

::: check
given: R = 10 | 100; L = 2 | 50; C = 0.05 | 2
answer: R/2*sqrt(C*1e-6/(L*1e-3))
tolerance: 0.5%

## Series RLC damping ratio: R = {R} Ω, L = {L} mH, C = {C} µF?

::: misses
- [any] $\frac{R}{2}\sqrt{C/L}$.
:::
:::
:::
