Before we can design a controller, we need an equation that describes how the plant behaves. The crucial insight is that vastly different physical systems have nearly identical mathematical descriptions. A car's velocity dynamics, an RC charging circuit, and a thermal mass cooling toward room temperature are all governed by the same first-order linear differential equation. This is why control theory generalizes so well.
We will model four kinds of systems (mechanical, electrical, electromechanical, thermal, hydraulic), then derive their transfer functions, then build up to block diagrams and signal flow graphs.
2.1 Mechanical systems: Newton tells you the equation
Mechanical systems obey Newton's second law: . Three primitive elements show up:
- Mass stores kinetic energy. Force-velocity relation: .
- Damper (also called "dashpot") dissipates energy to friction. where is the damping coefficient.
- Spring stores elastic potential energy. where is the spring constant.
The canonical example is the mass-spring-damper, which appears literally everywhere mechanical things move:
F(t) → ┌────┐ ┌─/\/\/\─┐ ┌──┐
│ │ │ k │ │ b│
│ m │ ───┤ ├───┤ │
│ │ └────────┘ └──┘
└────┘
── x(t) →Newton's law for the mass: sum of forces equals .
Rearrange:
This is a second-order linear ordinary differential equation. It describes a car's suspension, a cell-phone speaker's diaphragm, a vibration-isolated optical table, a humanoid robot's arm joint with elasticity. Even your steering wheel, when you let go, oscillates back to center (mass: the wheel; spring: the rack-and-pinion centering force; damper: friction). Same equation.
Take the Laplace transform with zero initial conditions:
So the transfer function from force (input) to position (output) is:
This is the "mother" of all transfer functions in this chapter. Every textbook example traces back to a system that looks like this.
Car suspension intuition. When your car hits a pothole, the wheel mass + tire spring + shock absorber make a mass-spring-damper. The shock absorber's damper is exactly tuned so that after a pothole, the car settles back to level in a few damped oscillations and not too many. Too little damping (worn-out shocks) and the car bounces all the way down the highway. Too much damping (overly stiff shocks) and the ride is brutally rough. The "feel" of a luxury car is largely about , the damping ratio, which we will define in Section 3.
2.2 Electrical systems: KVL, KCL, and the same math
For electrical circuits we already know the elements (Chapter 2). Resistor, inductor, capacitor:
Apply KVL to a series RLC circuit driven by a voltage source :
Where is the charge on the capacitor, and current is .
Compare to the mechanical equation:
Same equation. Mass plays the role of inductance, damper plays the role of resistance, spring plays the role of inverse capacitance, force plays the role of voltage, position plays the role of charge.
2.3 The force-voltage and force-current analogies
Two complementary analogies between mechanical and electrical systems exist. The force-voltage analogy maps:
| Mechanical | Electrical (force-voltage) |
|---|---|
| Force | Voltage |
| Velocity | Current |
| Mass | Inductance |
| Damper | Resistance |
| Spring | Inverse capacitance |
| Position | Charge |
The force-current analogy swaps voltage and current:
| Mechanical | Electrical (force-current) |
|---|---|
| Force | Current |
| Velocity | Voltage |
| Mass | Capacitance |
| Damper | Conductance |
| Spring | Inverse inductance |
| Position | Magnetic flux linkage |
Why two? Because mechanical systems have two natural ways to describe the topology: by which masses share a common point (which suggests the force-current view, because nodes share a common voltage, like masses share a common position), or by the chain of force transmissions (which suggests force-voltage, because elements in series share a common current, like a force passing through a chain of mechanical elements).
In practice, when you encounter a mechanical system, you write down the equations of motion using Newton's laws directly and turn them into a transfer function. The analogies are useful mostly for two reasons. First, they let you build mechanical analogs of electrical filters (and vice versa). Second, they let you use the well-developed circuit-analysis machinery (mesh, nodal) on mechanical problems. If you have software that does circuit analysis, you can analyze a mechanical system by drawing its electrical analog.
2.4 Electromechanical: the DC motor
Most real plants are electromechanical: an electrical actuator drives a mechanical load. The DC motor is the canonical example, and showing up in every robot, every drone, every electric car, every disk drive.
The motor has both a mechanical equation (torque accelerates the rotor) and an electrical equation (voltage drives current through the armature):
Where is rotor inertia, is mechanical damping, is the torque constant (, current produces torque), is the back-EMF constant (a spinning motor generates a voltage opposing the input). After Laplace and some algebra, the transfer function from voltage input to angular velocity output is:
This is a second-order system. Many DC motors have small enough to ignore, in which case the system simplifies to first order. Either way, it is one of the most-encountered plants in robotic and embedded systems.
2.5 Thermal systems
A heated body cooling toward ambient is a first-order system:
Where is thermal capacitance (joules per kelvin), is thermal resistance (kelvin per watt), and is the heat input. Same form as an RC circuit. The time constant is , which can be milliseconds (a small transistor junction) up to hours (a large oven) up to centuries (a planet).
Thermal control is everywhere. Your 3D printer hotend, your laptop CPU's thermal-throttling logic, your cryogenic dilution refrigerator, your refrigerator at home, all run thermal control loops.
2.6 Hydraulic and pneumatic systems
Fluid systems with compressible (pneumatic) or incompressible (hydraulic) fluids are governed by analogous equations. Pressure plays the role of voltage; flow rate plays the role of current; tank capacity plays the role of capacitance; flow restrictions (valves, orifices) play the role of resistance; long pipes have inertance (analogous to inductance, important at high frequencies and for water-hammer effects).
Hydraulic actuators dominate large-force applications: aircraft control surfaces, construction equipment, presses. Pneumatic actuators dominate factory automation in dusty, wet, or explosive environments where electrical sparks are unsafe.
2.7 Block diagrams and reduction rules
Real systems, with all their loops and signals, are messy. Block diagrams are the tool we use to keep track of the structure. A block is a transfer function. An arrow is a signal. Summing junctions add or subtract signals.
┌───┐ ┌───┐
──→[+]┤ G1├──→[+]┤ G2├──→
↑ └───┘ ↑ └───┘
│ │
└─────────┴── feedback signalsThe three reduction rules let you collapse any block diagram to a single transfer function.
Series (cascade): two blocks in series multiply.
X ──[G1]──[G2]── Y ⇔ X ──[G1·G2]── YParallel: two blocks fed the same input, outputs summed, add.
┌──[G1]──┐
X ───┤ ├[+]── Y ⇔ X ──[G1+G2]── Y
└──[G2]──┘Negative feedback (the most important rule). Block in the forward path, block in the feedback path. The closed-loop transfer function is:
┌───┐
X ──→[+]───┤ G ├───→ Y
↑ - └───┘ │
│ │
└───[H]──────┘
Memorize this. It is the single most important formula in control theory. It tells you that the closed-loop transfer function is the open-loop forward path divided by one plus the loop gain .
The denominator is the characteristic equation; setting it to zero gives the closed-loop poles. The roots of govern stability.
Why the formula is what it is. Let be the error at the summing junction, the output. From the diagram, and . Substitute: . Solve for : , so . That is the entire derivation.
If the feedback is positive (uncommon in control, common in oscillators) replace minus with plus and the formula becomes . The in the denominator is the Barkhausen criterion that triggers oscillation in feedback amplifiers (Chapter 5).
With practice, you can collapse arbitrarily complex diagrams. Move pickup points, swap the order of summing junctions, and apply the three rules until one block remains.
2.8 Signal flow graphs and Mason's gain formula
A signal flow graph is an alternative representation. Variables are nodes; transfer functions are directed arrows ("branches") with gains as labels. Signal flow graphs are nicer for systems with many feedback loops because the algebra is mechanical.
Mason's gain formula computes any source-to-sink transfer function in one step:
Where:
- is the gain of the -th forward path from source to sink.
- is the graph determinant. The sums are over individual loops, pairs of non-touching loops, triples of non-touching loops, etc.
- is what becomes when you remove all loops touching path .
Two loops "touch" if they share a node or an edge. Two paths "touch" similarly. Mason's formula is just the algebra of the closed-loop calculation, generalized to many loops.
When to use Mason's. For simple single-loop systems, block-diagram reduction is faster. Mason's shines for multi-loop systems (cross-coupled aircraft control, multi-cavity laser locks, networked controllers). It also shines when you need to derive the transfer function symbolically rather than numerically.
Worked example: derive the closed-loop transfer function with one feedback loop.
A graph has source , sink , one forward path with gain , and one feedback loop with loop gain .
- Forward path .
- Loops: . So .
- Loop touches path , so .
Mason's gives , which is exactly the negative-feedback formula we already derived. Mason's just generalizes that derivation to systems with arbitrary loop structure.
2.9 The miracles of feedback
We saw most of these in Chapter 5 (feedback amplifiers). Here is the master list.
- Reduces sensitivity to plant variations. Sensitivity of closed-loop gain to changes in is . So if loop gain is 100, a 10% change in produces only a 0.1% change in closed-loop behavior.
- Improves disturbance rejection. Disturbances entering the plant are attenuated by the same factor .
- Increases bandwidth. A first-order plant with bandwidth has, when wrapped in feedback with loop gain , a closed-loop bandwidth approximately . (Gain-bandwidth product is preserved.)
- Linearizes nonlinear plants. If the loop gain is large, the closed-loop behavior is dominated by the feedback path, not the plant's nonlinearity. This is why op-amp circuits work even though the op-amp itself has all kinds of nonlinearities.
- Can cause instability if not designed carefully. The danger we will spend most of the chapter analyzing.
The first four are gifts. The fifth is the catch.