Control System Modeling and Block Diagrams
A feedback loop can be designed only after its parts are described in a form that analysis can use. Modeling turns a motor, an amplifier, or a moving mass into equations. A block diagram arranges those equations to show where each signal comes from, where it goes, and which paths close into loops. A few algebraic rules, or one formula, then give the transfer function from any input to any output.
This article follows that path from physical laws to closed-loop transfer functions, and then to cascaded loops and simulation. It assumes the transform methods of Laplace Transform and ends where Time-Domain Response of Control Systems begins, with the question of how a modeled loop responds.
From Physical Laws to Transfer Functions
A control model answers a design question, such as how fast a loop can be made or how far a load change will disturb it. Dynamics far above the intended loop bandwidth barely affect the loop and can often be dropped; dynamics near or below it cannot. A model of a slow temperature loop can ignore a heater driver's switching, but a model of a motor current loop cannot ignore the armature inductance.
The models in this article are lumped, so they are ordinary differential equations; linear, or linearized about an operating point; and time-invariant.
The Modeling Procedure
- Choose the signals: the input the controller manipulates, the output it controls, and the disturbances that act on the system.
- Write the element laws for each resistor, inductor, capacitor, spring, damper, and inertia.
- Write the interconnection laws: Kirchhoff's laws for circuits, and Newton's second law for each mass or inertia.
- Linearize each nonlinear law about the operating point.
- Transform with zero initial conditions, replacing each derivative d/dt by s.
- Check the units, the DC gain, the high-frequency behavior, and the order.
- Validate the model against a measured step or frequency response.
Transfer Functions from Differential Equations
A lumped, linear, time-invariant system with input u(t) and output y(t) obeys
an dny/dtn + … + a1 dy/dt + a0y = bm dmu/dtm + … + b1 du/dt + b0u
With every initial condition zero, each derivative becomes a power of s, and the ratio of the output transform to the input transform is the transfer function:
G(s) = Y(s)/U(s) = (bmsm + … + b1s + b0) / (ansn + … + a1s + a0)
The response to energy stored at the start is a separate term, which Laplace Transform treats. An inductance L in series with a resistance R, such as the armature of a stalled motor, gives a first example. Kirchhoff's voltage law reads L di/dt + Ri = v, so
I(s)/V(s) = 1/(Ls + R) = (1/R)/(τes + 1), with τe = L/R
The checks pass. The units are amperes per volt. The DC gain is 1/R, as Ohm's law requires. At high frequency the gain approaches 1/(Ls), because the inductance dominates. The order is one, matching the single energy store; a lumped model's order cannot exceed its number of independent energy stores. A pure time delay td, such as a digital controller's computation time, contributes the factor e−std, which is not a ratio of polynomials, so analysis keeps it exactly or replaces it with a rational approximation.
Electrical Systems
With zero initial conditions, a resistor, an inductor, and a capacitor have the impedances R, sL, and 1/(sC). Series and parallel combination, voltage division, and nodal analysis then yield transfer functions directly.
Operational-Amplifier Stages
Analog controllers are often built from inverting operational-amplifier stages, whose ideal transfer function is −Zf(s)/Zin(s) for input impedance Zin and feedback impedance Zf. A resistor R1 at the input, with a resistor R2 in series with a capacitor C in the feedback path, gives
Vout(s)/Vin(s) = −[R2 + 1/(sC)]/R1 = −R2/R1 − 1/(sR1C)
This is a proportional-integral controller with proportional gain R2/R1 and integral gain 1/(R1C), inverted in sign. The sign belongs in the model. In a block diagram it becomes a minus sign in the block or at a summing junction, and losing it turns negative feedback into positive feedback.
Loading
Two blocks in cascade multiply only if the second draws too little current to change the first block's output. Passive networks usually break this rule. Take two RC low-pass sections, each with R = 10 kΩ and C = 10 nF, so that each alone has the transfer function 1/(τs + 1) with τ = RC = 100 µs. Connected directly, the second section loads the first, and nodal analysis gives
Vout(s)/Vin(s) = 1/(τ2s2 + 3τs + 1)
The product of the separate transfer functions would be 1/(τ2s2 + 2τs + 1). The extra τs term is the loading. It splits the double pole at −10,000 s−1 into poles near −3,820 and −26,180 s−1 and lowers the −3 dB frequency from 1,024 Hz to 596 Hz. A unity-gain buffer between the sections restores the product. An operational-amplifier stage has an output impedance near zero wherever its loop gain is high, which is why chains of such stages can be drawn as chains of blocks.
Mechanical Systems
Mechanical models use the same method. Newton's second law supplies one equation for each mass or inertia, and springs and dampers supply the forces between bodies.
| Element | Law | Force-voltage analog | Force-current analog |
|---|---|---|---|
| Mass M | f = M d2x/dt2 | Inductance | Capacitance |
| Spring K | f = Kx | Inverse capacitance | Inverse inductance |
| Damper B | f = B dx/dt | Resistance | Conductance |
| Inertia J | TJ = J d2θ/dt2 | Inductance | Capacitance |
| Torsional spring K | TK = Kθ | Inverse capacitance | Inverse inductance |
| Rotational damper b | Tb = b dθ/dt | Resistance | Conductance |
In the force-voltage analogy, force or torque corresponds to voltage and velocity to current; the force-current analogy swaps those roles and preserves the network's topology. Either analogy lets a circuit simulator solve a mechanical model.
A Mass, Spring, and Damper
A mass M on a spring K with viscous damping B, driven by a force f, obeys M d2x/dt2 + B dx/dt + Kx = f, so
X(s)/F(s) = 1/(Ms2 + Bs + K)
Matching the denominator to M(s2 + 2ζωns + ωn2) gives ωn = √(K/M) and ζ = B/[2√(KM)]. A 2 kg mass on an 800 N/m spring with B = 16 N·s/m has ωn = 20 rad/s, ζ = 0.2, and a DC gain, the static compliance 1/K, of 1.25 mm/N.
Gear Trains and Reflected Inertia
An ideal gear train with ratio n, the motor speed divided by the load speed, divides speed by n and multiplies torque by n. Referred to the motor shaft, a load inertia JL appears as JL/n2, because the load's kinetic energy is ½JL(ωm/n)2, where ωm is the motor speed. Load damping and stiffness also divide by n2, and load torque divides by n. Through a 10:1 reduction, a 2.0 × 10−3 kg·m2 load therefore appears at the motor as 2.0 × 10−5 kg·m2, twice the inertia of a 1.0 × 10−5 kg·m2 rotor.
Compliance and Resonance
No shaft or belt is perfectly stiff. When a motor inertia Jm drives a load inertia JL through a coupling of torsional stiffness Ks, Newton's law for each inertia, with damping ignored, gives the transfer function from motor torque to motor speed:
Ωm(s)/Tm(s) = (JLs2 + Ks) / {s[JmJLs2 + Ks(Jm + JL)]}
The numerator places an antiresonance at ωar = √(Ks/JL), where the load acts as a vibration absorber: in this undamped model, a steady sinusoidal torque at that frequency produces no motor motion. The denominator places a resonance at ωr = √[Ks(Jm + JL)/(JmJL)]. With Jm = 1.0 × 10−4 kg·m2, JL = 3.0 × 10−4 kg·m2, and Ks = 300 N·m/rad, they fall at 1,000 rad/s (159 Hz) and 2,000 rad/s (318 Hz). Well below the antiresonance the inertias move together as Jm + JL, but a speed loop whose bandwidth approaches it needs the compliant model. Servo Drive Systems describes how drives suppress such resonances.
Modeling a DC Motor
A permanent-magnet DC motor joins an electrical circuit to a mechanical load. Its armature, with resistance R and inductance L, develops a back electromotive force eb as it rotates. Its torque is proportional to current. Its rotor and load, with total inertia J, viscous friction coefficient b, and load torque TL, obey Newton's second law, and position is the integral of speed:
v = Ri + L di/dt + eb, with eb = Keω
Tm = Kti
J dω/dt = Tm − bω − TL
dθ/dt = ω
Why the Torque and Back-EMF Constants Are Equal
In SI units the back-EMF constant Ke and the torque constant Kt are the same number. The electrical power absorbed by the back EMF is ebi = Keωi, and the mechanical power the motor develops is Tmω = Ktiω. The coupling itself neither stores nor dissipates energy, because the model assigns losses to R and b and stored energy to L and J. The two powers are therefore equal, and Kt = Ke. The units agree as well: 1 N·m/A = 1 J/A = 1 V·s, and the radian is dimensionless.
Data sheets often hide the equality behind other units. A speed constant in rpm/V is the reciprocal of Ke once rpm is converted to rad/s, and a constant in V/krpm is Ke in V·s/rad multiplied by 1,000 × 2π/60, about 104.7. A torque constant of 0.05 N·m/A therefore corresponds to 5.24 V/krpm, or to a speed constant of 191 rpm/V. The motor maker maxon gives the product of its speed and torque constants as 1 in SI units and as 30,000/π, about 9,549, in rpm/V times mN·m/A.
Block Diagram of the Motor
| Element | Output | Transfer function |
|---|---|---|
| Voltage junction | V(s) − Eb(s) | Signed sum |
| Armature | I(s) | 1/(Ls + R) |
| Torque constant | Tm(s) | Kt |
| Torque junction | Tm(s) − TL(s) | Signed sum |
| Rotor and load | Ω(s) | 1/(Js + b) |
| Integrator | Θ(s) | 1/s |
| Back-EMF path, from a pickoff point at Ω(s) | Eb(s) | Ke |
Down the table, voltage drives current, current makes torque, and torque accelerates the load. The back-EMF path, which returns speed to the voltage junction with a minus sign, is a negative feedback loop built into the physics: as the motor speeds up, the back EMF rises and reduces the current that accelerates it.
Transfer Functions
The forward path from voltage to speed is Kt/[(Ls + R)(Js + b)], and the feedback path is Ke. The feedback rule G/(1 + GH), derived under block-diagram algebra below, gives
Ω(s)/V(s) = Kt / [(Ls + R)(Js + b) + KtKe]
The load torque, subtracted at the torque junction, reaches speed through the forward path −1/(Js + b) and the same loop, so
Ω(s)/TL(s) = −(Ls + R) / [(Ls + R)(Js + b) + KtKe]
The two share a denominator, as all transfer functions of a single loop do, and dividing either by s gives the transfer function to position. At DC with b = 0 they combine into the speed-torque line ω = v/Ke − RTL/(KtKe). The motor in the speed-loop example of Time-Domain Response of Control Systems, with R = 1 Ω and Kt = Ke = 0.05 in SI units, therefore runs at 480 rad/s unloaded from 24 V and loses 20 rad/s for each 0.05 N·m of load.
Electrical and Mechanical Time Constants
With friction neglected, b = 0, the speed transfer function becomes
Ω(s)/V(s) = (1/Ke) / (τeτms2 + τms + 1), with τe = L/R and τm = RJ/(KtKe)
The mechanical time constant τm is really electromechanical: it contains R because the back EMF, acting through the armature resistance, damps the rotor like a viscous damper of coefficient KtKe/R, and any resistance in the driving source adds to R. The τm in maxon's motor data includes only the rotor inertia, as maxon notes, so any load inertia lengthens it.
The denominator splits into two real first-order factors, (τ1s + 1)(τ2s + 1), only if τm ≥ 4τe. Matching coefficients gives τ1 + τ2 = τm and τ1τ2 = τeτm, so
τ1,2 = (τm/2)[1 ± √(1 − 4τe/τm)]
Treating the motor as separate lags τm and τe is therefore an approximation whose error depends only on their ratio.
| τm/τe | Slow time constant | Fast time constant | τm too long by | τe too short by |
|---|---|---|---|---|
| 4 | 0.500τm | 2.000τe | 100 percent | 50 percent |
| 10 | 0.887τm | 1.127τe | 13 percent | 11 percent |
| 20 | 0.947τm | 1.056τe | 6 percent | 5 percent |
| 50 | 0.980τm | 1.021τe | 2 percent | 2 percent |
| 100 | 0.990τm | 1.010τe | 1 percent | 1 percent |
The constants may be treated separately for rough work once τm is about ten times τe. Viscous friction changes the denominator to LJs2 + (Lb + RJ)s + Rb + KtKe, and it is negligible when b is much smaller than KtKe/R.
The motor of the speed-loop example has τm = 50 ms, which implies J = 1.25 × 10−4 kg·m2. Give it an armature inductance of 1 mH, so that τe = 1 ms. The exact poles lie at −20.4 and −979.6 s−1, time constants of 49.0 ms and 1.02 ms, so that example's first-order speed model is accurate to about 2 percent. Remove the flywheel, leaving a rotor inertia of 1.0 × 10−5 kg·m2, and τm falls to 4 ms, exactly four times τe. The poles merge into a double pole at −500 s−1, and no first-order model describes the motor.
Linearization About an Operating Point
Transfer functions require linear equations, but a fan's torque rises with the square of speed, a diode's current rises exponentially with voltage, and gravity acts on a pendulum through the sine of its angle. Linearization replaces each nonlinear law with its tangent at a chosen operating point. The result describes small deviations from that point and nothing else.
- Find the operating point by setting every derivative to zero at the nominal inputs.
- Write each variable as its operating value plus a deviation, x = x0 + Δx.
- Keep the first-order Taylor terms of each nonlinear function, f(x) ≈ f(x0) + f′(x0)Δx, with one partial derivative per variable when there are several.
- Subtract the operating-point equations and transform the linear deviation equations that remain.
- State the range of validity by comparing the largest neglected term with the terms kept.
A Motor Driving a Fan
Let the example motor, with J = 1.25 × 10−4 kg·m2 and with inductance and friction neglected, drive a fan whose torque is TL = kfω2, with kf = 2.22 × 10−6 N·m·s2/rad2.
- Operating point. At ω0 = 300 rad/s the fan needs TL0 = 0.2 N·m. The motor supplies it with i0 = 0.2/0.05 = 4 A, which requires v0 = Ri0 + Keω0 = 4 + 15 = 19 V.
- Linearize the load. Expanding, kf(ω0 + Δω)2 = kfω02 + 2kfω0Δω + kfΔω2. Dropping the last term leaves ΔTL = bfΔω, with bf = 2kfω0 = 1.33 × 10−3 N·m·s/rad. To small deviations, the fan is a viscous damper.
- Write and transform the deviation equations. From Δi = (Δv − KeΔω)/R and J dΔω/dt = KtΔi − bfΔω, ΔΩ(s)/ΔV(s) = (Kt/R)/(Js + KtKe/R + bf), a first-order lag with a gain of 13.0 (rad/s)/V and a time constant of 32.6 ms.
- Check validity. The neglected term kfΔω2 is the fraction Δω/(2ω0) of the linear term, so a 30 rad/s deviation, 10 percent of the operating speed, is modeled to within about 5 percent.
At ω0 = 150 rad/s the same fan gives a gain of 15.8 (rad/s)/V and a time constant of 39.5 ms; without the fan the values are 20 (rad/s)/V and 50 ms. A controller tuned at one speed therefore sees a different plant at another, which is why some controllers schedule their gains against the operating point.
An Unstable Operating Point
A rod of length l balanced upright on a pivot, with its mass concentrated at the free end, obeys d2θ/dt2 = (g/l) sin θ, with θ measured from vertical. About the upright operating point θ0 = 0, sin θ ≈ Δθ, and the linear model has poles at ±√(g/l), or ±4.43 s−1 for l = 0.5 m. The right-half-plane pole is the instability a balancing controller must overcome. The small-angle approximation stays within 1 percent up to about 14 degrees.
Linearization fails where a nonlinearity has no useful tangent at the operating point: saturation at a supply rail, dead zones, gear backlash, static friction, and quantization. Simulation handles those, while the linear model still serves the small-signal design.
Block-Diagram Elements and Algebra
A block diagram is a picture of simultaneous equations, drawn with four elements.
| Element | Drawn as | Function |
|---|---|---|
| Signal line | An arrow | Carries one signal in one direction |
| Block | A rectangle containing a transfer function G(s) | Multiplies its input by G(s) |
| Summing junction | A circle with a plus or minus sign at each input | Outputs the signed sum of its inputs, which must share units |
| Pickoff point | A dot where a line branches | Copies a signal to several destinations without changing it |
The rules below assume that each block is linear and non-loading. Where loading matters, as in the RC sections above, the model must be rewritten first.
Reduction Rules
| Rule | Original arrangement | Equivalent arrangement |
|---|---|---|
| Series | X passes through G1, then G2 | One block, G1G2 |
| Parallel | X feeds G1 and G2, whose outputs meet at a junction with signs ± | One block, G1 ± G2 |
| Negative feedback | Forward block G; the output returns through H and is subtracted at the input | One block, G/(1 + GH) |
| Positive feedback | As above, with the returned signal added | One block, G/(1 − GH) |
| Junction moved ahead of a block | W is added after G: Y = GX + W | W passes through 1/G and is added before G: Y = G(X + W/G) |
| Junction moved past a block | W is added before G: Y = G(X + W) | W passes through a copy of G and is added after it: Y = GX + GW |
| Pickoff point moved ahead of a block | A branch takes the output GX | The branch takes the input X and passes it through a copy of G |
| Pickoff point moved past a block | A branch takes the input X | The branch takes the output GX and passes it through 1/G |
| Unity feedback | Forward block G, feedback block H | Prefilter 1/H, then a unity-feedback loop around GH |
The feedback rule follows from two equations. The junction gives E = X − HY and the block gives Y = GE, so Y = GX − GHY and Y/X = G/(1 + GH). Adjacent summing junctions can be merged or reordered, because addition is commutative. A pickoff point and a summing junction cannot simply trade places: the moved branch would copy a different signal, and it needs a junction of its own to restore the original.
A Reduction Procedure
- Combine blocks in series and in parallel.
- Close each loop that contains no pickoff point or summing junction of another loop, innermost first.
- Where loops interlock, move a pickoff point or summing junction until one loop stands alone, then close it.
- Repeat until one block remains.
- Clear the compound fractions, then check the result: its DC gain, its order, and a limiting case such as a feedback gain set to zero.
A 1/G block, created by moving a pickoff point past a block or a summing junction ahead of one, is an algebraic device rather than hardware, and it may be improper. Reduction can also cancel a factor that remains physically present, such as a lightly damped mode matched by a zero, so a reduced transfer function does not show whether every internal signal stays bounded.
Feedforward and Disturbance Paths
A practical loop has more than one input. In a common arrangement, a controller C(s) drives a plant G(s), a sensor H(s) measures the output Y(s), a disturbance D(s) adds at the plant input, noise N(s) adds to the measurement, and a feedforward block F(s) passes the reference R(s) directly to the plant input. The error is E = R − (HY + N), the controller and feedforward together command U = CE + FR, and the output is Y = G(U + D). Solving these equations for Y gives
Y(s) = [G(C + F)/(1 + CGH)] R(s) + [G/(1 + CGH)] D(s) − [CG/(1 + CGH)] N(s)
- Feedforward does not move the closed-loop poles. Every term shares the denominator 1 + CGH, so a stable F(s) cannot destabilize the loop; it changes only the numerator of the reference response.
- Ideal feedforward inverts the plant. With H = 1 and F = 1/G, the reference term becomes exactly 1, whatever C is. The inverse of a real plant is usually improper and sometimes unstable, so practical feedforward approximates it over the frequencies that matter.
- Where a disturbance enters decides how feedback sees it. A disturbance at the plant input reaches the output through G/(1 + CGH), and Time-Domain Response of Control Systems shows how integral action in the controller removes the steady error it leaves.
A disturbance that can be measured or estimated can also be canceled where it enters. In the DC motor model, the back EMF KeΩ subtracts from the applied voltage at the armature junction. A current controller that adds KestΩ to its voltage command, where Kest is an estimate of Ke, leaves feedback to correct only the residual (Ke − Kest)Ω. Control Algorithms describes this back-EMF feedforward and the velocity and acceleration feedforward of motor drives.
Signal-Flow Graphs
A signal-flow graph carries the same information as a block diagram in sparer form. Each node is a signal. Each directed branch carries the signal at its starting node, multiplied by the branch's transmittance, to its ending node, and a node's value is the sum of the signals arriving on its incoming branches. Summing junctions disappear into the nodes, and a subtraction becomes a negative transmittance. Samuel J. Mason set out the properties of these graphs in “Feedback Theory—Some Properties of Signal Flow Graphs,” Proceedings of the IRE, September 1953.
| Term | Meaning |
|---|---|
| Source node | A node with only outgoing branches; an input |
| Path | A sequence of branches followed in the direction of the arrows, visiting no node more than once |
| Forward path | A path from the input node to the output node |
| Loop | A path that returns to its starting node |
| Path gain, loop gain | The product of the transmittances along a path or loop |
| Non-touching | Describes loops, or a loop and a path, that share no node |
From Block Diagram to Graph
- Create a node for the input, for each summing junction's output, and for each block's output.
- Replace each block with a branch whose transmittance is the block's transfer function.
- Join each input of a summing junction to the junction's node with a branch of transmittance +1 or −1.
- Treat each pickoff point as a node with several outgoing branches.
- If the input node has incoming branches, add a new source node joined to it by a branch of transmittance 1.
Simple graphs reduce by rules that mirror block algebra: branches in series multiply, and branches in parallel add. A self-loop, a branch of gain L that leaves and reenters one node, disappears if every transmittance entering that node is divided by 1 − L. Each node states one linear equation, xj = ∑i tijxi, with tij the transmittance from node i to node j, so reducing a graph solves simultaneous linear equations.
Mason's Gain Formula
Step-by-step reduction grows tedious when loops interlock. Mason's gain formula writes the transfer function from the input node to any other node directly from the graph's paths and loops. Mason published it in “Feedback Theory—Further Properties of Signal Flow Graphs,” Proceedings of the IRE, July 1956, whose abstract, written in rhyme, offers “a way to enhance / writing gain at a glance.”
Y/R = (1/Δ) ∑k PkΔk
Δ = 1 − ∑La + ∑LaLb − ∑LaLbLc + …
- Pk is the gain of the kth forward path.
- ∑La is the sum of every individual loop gain, each with its sign.
- ∑LaLb is the sum of the gain products of every pair of non-touching loops, ∑LaLbLc the same for every set of three mutually non-touching loops, and so on, with alternating signs.
- Δk is Δ computed from only the loops that do not touch the kth forward path. If the path touches every loop, Δk = 1.
The determinant Δ depends only on the loops, not on the chosen input or output, so every transfer function of the system shares it. Setting Δ(s) = 0, after clearing fractions, gives the characteristic equation. For one negative feedback loop, the single loop gain is −GH, Δ = 1 + GH, and the formula returns G/(1 + GH). The formula is Cramer's rule applied to the node equations, with Δ as their determinant, which is why it always agrees with algebraic reduction.
The usual errors are missing a forward path through a feedforward branch, counting one loop twice from different starting nodes, treating loops that share a node as non-touching, dropping a sign, and assuming that every Δk equals 1.
Worked Examples: Direct Reduction and Mason's Formula
Two Interlocking Loops
The first diagram has three blocks in its forward path and two overlapping feedback paths, both subtracted. Its two summing junctions form the errors E1 and E2, and its signals obey the equations in the table.
| Signal | Equation |
|---|---|
| E1 | E1 = R − H1A |
| X | X = G1E1 |
| E2 | E2 = X − H2Y |
| A | A = G2E2 |
| Y | Y = G3A |
The H1 loop contains G1 and G2, and the H2 loop contains G2 and G3. They share G2, but neither lies inside the other, so neither can be closed first as drawn.
Direct reduction.
- Separate the loops. Move the H1 pickoff point from A past G3 to Y. To return the same signal, the branch needs the factor 1/G3, so its transmittance becomes H1/G3.
- Combine in series. Nothing now taps A, so G2 and G3 form one block, G2G3.
- Close the inner loop. G2G3 with feedback H2 becomes G2G3/(1 + G2G3H2).
- Combine in series again. With G1, the forward path becomes G1G2G3/(1 + G2G3H2).
- Close the outer loop with feedback H1/G3. Its loop gain is G1G2H1/(1 + G2G3H2), and multiplying numerator and denominator by 1 + G2G3H2 gives
Y/R = G1G2G3 / (1 + G2G3H2 + G1G2H1)
Mason's formula. The graph has nodes R, E1, X, E2, A, and Y, and branches R→E1 (1), E1→X (G1), X→E2 (1), E2→A (G2), A→Y (G3), A→E1 (−H1), and Y→E2 (−H2).
- Forward paths. There is one, R→E1→X→E2→A→Y, with P1 = G1G2G3.
- Loops. L1 runs E1→X→E2→A→E1, with gain −G1G2H1. L2 runs E2→A→Y→E2, with gain −G2G3H2.
- Non-touching loops. None: both loops pass through E2 and A.
- Determinants. Δ = 1 − (L1 + L2) = 1 + G1G2H1 + G2G3H2. The forward path touches both loops, so Δ1 = 1.
- Result. Y/R = P1Δ1/Δ = G1G2G3/(1 + G1G2H1 + G2G3H2), the same as direct reduction.
A numerical check. With G1 = 10, G2 = 2, G3 = 5, H1 = 0.1, and H2 = 0.2, both results give Y/R = 100/(1 + 2 + 2) = 20. For R = 1 the signals E1 = 0.6, X = 6, E2 = 2, A = 4, and Y = 20 satisfy every equation in the table.
Non-Touching Loops and a Feedforward Path
The second diagram cascades two stages. In the first, a junction drives G1, whose output X returns through H1. In the second, a junction adds X to a feedforward signal from R through G3 and drives G2, whose output Y returns through H2. Both feedback paths are subtracted.
- Forward paths. P1 = G1G2 passes through both stages, and P2 = G3G2 passes through the feedforward branch.
- Loops. L1 = −G1H1 and L2 = −G2H2. They share no node, so they form one non-touching pair.
- Determinant. Δ = 1 − (L1 + L2) + L1L2 = 1 + G1H1 + G2H2 + G1H1G2H2 = (1 + G1H1)(1 + G2H2).
- Cofactors. P1 touches both loops, so Δ1 = 1. P2 bypasses the first stage and does not touch L1, so Δ2 = 1 − L1 = 1 + G1H1.
- Result. Assembling the terms gives
Y/R = [G1G2 + G2G3(1 + G1H1)] / [(1 + G1H1)(1 + G2H2)]
Direct reduction agrees. The first stage closes to G1/(1 + G1H1); adding G3 in parallel gives [G1 + G3(1 + G1H1)]/(1 + G1H1); and the closed second stage multiplies that by G2/(1 + G2H2). With G1 = 10, H1 = 0.4, G3 = 0.5, G2 = 8, and H2 = 0.125, both methods give (80 + 20)/10 = 10. This example exercises the two features the first lacked: a product term for non-touching loops, and a cofactor that is not 1.
Loop Gain, Sensitivity, and Complementary Sensitivity
The loop gain L(s) is the product of the transfer functions around a loop, with the minus sign of negative feedback removed so that the characteristic equation reads 1 + L(s) = 0; for a single loop, Mason's signed loop gain is −L(s). For a loop of controller, plant, and sensor, L = CGH. To measure it, break the loop, inject a test signal on the downstream side of the break, and compare it with the signal returning on the upstream side, which is −L times the injected signal. The break must preserve the loading on both sides, as Negative Feedback Theory notes for the return-ratio measurement.
With several loops, the loop gain depends on where the loop is broken. Broken at the H1 branch of the interlocking example, with the inner loop closed, it is G1G2H1/(1 + G2G3H2), the outer loop gain of the direct reduction, and 1 plus this gain, multiplied by 1 + G2G3H2, reproduces Δ. Each loop of a cascade is designed against the loop gain at its own break point, with the loops inside it closed.
Sensitivity Functions
Two functions of the loop gain summarize what feedback does at each frequency. In a unity-feedback loop, the sensitivity S(s) = 1/[1 + L(s)] maps the reference to the error, and a disturbance added at the plant output to the output. The complementary sensitivity T(s) = L(s)/[1 + L(s)] maps the reference to the output and, with reversed sign, sensor noise to the output. The two always sum to 1. Time-Domain Response of Control Systems develops both, with disturbance rejection, peak sensitivity, and the waterbed effect.
Sensitivity also measures how drift in a component reaches the output. For the closed-loop gain M = G/(1 + GH), the fractional change in M per fractional change in each block is
(dM/M)/(dG/G) = 1/(1 + GH) and (dM/M)/(dH/H) = −GH/(1 + GH)
With G = 100 and H = 0.1, a 1 percent drift in G moves the closed-loop gain by only 0.09 percent, but a 1 percent error in H moves it by 0.91 percent in the opposite direction. Feedback suppresses errors in the forward path and passes errors in the sensor almost unchanged, so a loop can be no more accurate than its measurement.
Cascaded Loops
A motion controller rarely closes a single loop around its motor. It nests three, a current loop inside a speed loop inside a position loop, and each outer controller computes the reference for the loop inside it.
| Loop | Measured signal | Controller output | Plant seen by the loop |
|---|---|---|---|
| Current (inner) | Armature current | Voltage command to the power stage | 1/(Ls + R), with the back EMF as a disturbance |
| Speed (middle) | Speed | Current reference | Kt/(Js + b) times the closed current loop |
| Position (outer) | Position | Speed reference | 1/s times the closed speed loop |
Designing from the Inside Out
Once a loop is closed, the loop around it sees only its closed-loop transfer function, so the loops are designed from the inside out.
- Current loop. Take the power stage and current sensor as unity gains. A PI controller C(s) = KP + KI/s with KI/KP = R/L puts its zero on the armature pole. The loop gain reduces to KP/(Ls), and the closed loop becomes I/Iref = 1/(1 + s/ωci), with ωci = KP/L. In “A Faster Current Loop Pays Off in Servo Motor Control,” a July 2017 Texas Instruments white paper, Brian Fortman writes that many conventional PI current-loop controllers limit the bandwidth to about 10 percent of the PWM carrier frequency, or 1 kHz on a typical 10 kHz carrier. For the example motor, with L = 1 mH, that bandwidth (ωci = 6,283 rad/s) needs KP = 6.28 V/A. The design treats the back EMF as a slow disturbance or cancels it by feedforward, and the pole cancellation is only as good as the estimate of L/R.
- Speed loop. With friction neglected, a proportional gain Kω sets the crossover near KωKt/J. Placing it at one-tenth of the current-loop bandwidth, 628 rad/s, requires Kω = 1.57 A/(rad/s) and leaves a phase margin of about 84 degrees. Integral action, needed to hold speed against a steady load torque, spends part of that margin.
- Position loop. A proportional gain sets the crossover several times below the speed-loop bandwidth.
How Much Separation
Inside-out design works only if each inner loop is fast compared with the loop around it. If the inner closed loop behaves as 1/(1 + s/ωinner), then at the outer loop's crossover frequency ωouter it adds a phase lag of arctan(ωouter/ωinner) and a small loss of gain.
| ωinner/ωouter | Added phase lag | Gain change |
|---|---|---|
| 2 | 26.6° | −0.97 dB |
| 3 | 18.4° | −0.46 dB |
| 5 | 11.3° | −0.17 dB |
| 10 | 5.7° | −0.04 dB |
| 20 | 2.9° | −0.01 dB |
The lag comes out of the outer loop's phase margin. Real inner loops lag more than this first-order picture, because of sampling delay, sensor filtering, and imperfect pole cancellation. The Texas Instruments paper states that in most systems the current-loop bandwidth exceeds that of the speed and position loops “by nearly 10 times or even higher,” and Servo Drive Systems gives the separations used in industrial drives.
Benefits and Costs
- A clamp on the current reference protects the motor and power stage, whatever the outer loops demand.
- The current loop corrects supply-voltage changes and back-EMF variation before they disturb the speed, and it makes the motor act as a torque source.
- Each loop needs its own measurement, and no outer loop can be faster than the loops inside it.
- A clamp that saturates makes the cascade nonlinear, so integrators in the outer controllers need anti-windup protection.
From Block Diagram to Simulation
A block diagram is also a program. Each integrator holds a state, each junction adds, and numerical integration advances the equations through time. Simulation reaches where linear analysis cannot: current limits, PWM, friction, sampling, and large signals.
Tools
Graphical tools such as MathWorks Simulink build models from blocks, summing junctions, and signal lines. Scripting libraries apply block algebra to transfer-function objects. MATLAB's Control System Toolbox provides series, parallel, feedback, and connect, and its feedback assumes negative feedback unless given a sign of +1. The python-control library provides series, parallel, feedback, whose sign argument defaults to −1, and interconnect for larger diagrams. A SPICE simulator can run a controller built from behavioral sources against a transistor-level power stage; Circuit Simulation (SPICE) describes those programs.
Algebraic Loops
A loop built only from blocks with direct feedthrough, whose outputs depend on their inputs at the same instant, contains no state to break the circle, so every time step requires solving a simultaneous equation. MathWorks documents that Simulink solves such algebraic loops with a nonlinear solver at each time step and that models containing them can run more slowly. Two remedies are common: reduce the loop by hand, so that a static G and H become the single gain G/(1 + GH), or restore a dynamic element the model left out, such as a sensor's small lag.
Stiff Models
Widely separated time constants make a model stiff. The explicit forward Euler method is numerically unstable for a mode with time constant τ unless the step is shorter than 2τ, so the fastest mode sets the step long after it has died away. The example motor is only mildly stiff: its 1 ms electrical mode limits the step to about 2 ms, while the speed takes about 200 ms to settle. Solvers designed for stiff equations, such as MATLAB's ode15s, handle wider separations more efficiently, and when the fast mode does not matter, the separate time-constant approximation removes it. Ordinary Differential Equations derives that step limit and compares the implicit methods that remove it.
Checking the Model Against Hardware
- Simulate the linearized and nonlinear models at the same operating point with a small step, and confirm that they agree.
- Measure the real system's small-step response at that point, and compare it with the simulation after adding the operating-point values back to the deviation variables.
- Adjust uncertain parameters, such as inertia and friction, until the two match, and record the values and assumptions.
- Repeat at other operating points and at large amplitude, with the limits active.
Summary
Control design begins with a model: element and interconnection laws, transformed with zero initial conditions into transfer functions and checked for units, DC gain, and order. The DC motor shows the pattern in miniature, with an internal back-EMF loop and time constants that may be treated separately only when they lie well apart. Nonlinear parts are linearized about a stated operating point, and the result holds only for small deviations.
Block algebra reduces any diagram, and Mason's gain formula writes the same answer directly from paths and loops. Loop gain and the sensitivity functions show what feedback can and cannot achieve, cascaded loops divide a motion controller into layers designed from the inside out, and simulation carries the model into the nonlinear regime where hardware operates.