← Index PL

Step 4, block diagrams: diagram elements, three reductions, moving summing points, the closed loop, moving poles with a P controller, steady-state error, four applications compared, traps, MATLAB and Simulink, and exercises.

CDSSC · Step 4 · builds on Step 1 (K = G(0), integrator 1/s), Step 2 (poles → shape) and Step 3 (ζ, ωn, Mp, ts)
Block diagrams → closed loop (diagramas de bloques → lazo cerrado)

Spanish key terms in brackets, as on the slides. Goal: go from a drawing with blocks to one transfer function Y/R, then see the most important idea of the course: closing the loop moves the poles. This answers the Step 2 question: how do you repair a broken system?

1 Block alphabet · 2 Three reductions · 3 Step-by-step reduction · 4 Moving summing points · 5 Closed loop · 6 The loop moves the poles · 7 Steady-state error · 8 Four applications · 9 Traps · 10 MATLAB and Simulink · 11 Check yourself
Step 4 on one card
Three reductions (SS-06 p.4)
\text{series: } G_1G_2\qquad\text{parallel: } G_1+G_2
\text{feedback }(-)\!:\ \ \frac{G}{1+GH}
\text{feedback }(+)\!:\ \ \frac{G}{1-GH}
Closed loop (SS-06 p.11, FR-01 p.11–12)
L=D\,G\,H\qquad \frac{Y}{R}=\frac{DG}{1+L}
\underbrace{1+L(s)=0}_{\text{new poles}}\qquad e_{ss}=\frac{1}{1+L(0)}
Multiply, add, close the loop. The denominator 1+L is the same for every input, so it sets the new poles. The final value is Step 1 applied to Y/R: K_{cl}=T(0).

1 · Block alphabet

A block diagram (diagrama de bloques) is a drawing of a system where each piece of physics is a block and signals flow along arrows. Four symbols are enough for everything (SS-05 p.5, SS-06 p.2).

Block (bloque) = a machine that transforms a signal: Y(s)=G(s)\,U(s). Like a gearbox: output = ratio × input.
Arrow (señal) = a pipe carrying one signal, flowing only towards the arrowhead. An arrow changes nothing, it only carries.
Summing point (sumador) = a mixing tap: it adds and subtracts its inputs. Each input has its own sign: X=\pm X_1\pm X_2 (SS-06 p.2).
Branch point (bifurcación) = a copy of the signal, like glancing at a thermometer. Both branches carry the same signal, nothing is used up.
Why do blocks multiply? In the time domain a block is a differential equation. Laplace turns a derivative into multiplication by s (Step 3, SS-04 p.13), so the whole equation becomes a plain multiplication Y=G\cdot U (SS-05 p.5). That is why the signals on a diagram are U(s),\ Y(s) and not u(t): only in the s world can you multiply and divide blocks like numbers.

A real diagram: DC motor (SS-06 p.3)

The same motor as in "1.- Modelado motor DC", just drawn. Every arrow is a physical quantity, every block is one law of physics.

2 · Three basic reductions (álgebra de bloques)

Reduction = replacing several blocks with one that does exactly the same to the input (SS-06 p.4).

Series (en serie) → multiply
\begin{aligned}X&=G_1U\\Y&=G_2X=G_2G_1U\end{aligned}
Two gearboxes in a row: 3:1 then 2:1 gives 6:1. Gains multiply.
Parallel (en paralelo) → add
Y=G_1U+G_2U=(G_1+G_2)\,U
Two hoses filling one tank: the flows add. Watch the signs at the summing point: with a minus it would be G_1-G_2.
Feedback loop (lazo de realimentación) → G/(1+GH)
Metaphor: a shower. You turn the tap (G), your hand feels the water (sensor H), your brain compares it with what you want (summing point) and corrects. The output signal comes back to the input. Problem: y sits on both sides of the equation, so you have to solve for it.
Why does the minus at the summing point become a plus in the denominator? The minus says "subtract what you measured". The output y then appears on the right-hand side with a minus: y=Gr-GHy. To collect y in one place you move -GHy to the left, and moving a term across the "=" flips its sign: y+GHy=Gr. The plus in the denominator is not a new physical addition, it is the trace of that move. With positive feedback (summing point +, +) you get the opposite: G/(1-GH), a microphone next to a speaker that squeals louder and louder.
Sanity check with numbers. G=10,\ H=1: \frac{10}{1+10}=0.909. G=1000: \frac{1000}{1001}=0.999. The bigger G, the closer to 1/H. Conclusion: with high gain the sensor decides the result, not the plant (Black's amplifier, FR-03 p.4). A bad sensor = a wrong output the loop will not notice (FR-01 p.8).

3 · Step-by-step reduction (signals flow)

A typical exam diagram: a loop inside a loop plus two blocks in parallel. Rule: collapse from the inside out. First whatever is pure series or parallel, then the innermost loop, the outer loop last. Amber = the part we collapse in the next step.

The diagram and the order are mine. Each step uses only the rules from SS-06 p.4. Numbers to check in exercise Z5.

4 · Moving summing points and branch points (SS-06 p.5–9)

Sometimes loops cross and you cannot collapse from the inside. Then you move a summing point or a branch point. One rule guards everything: every signal leaving the diagram must receive exactly what it received before. Like moving a filter in a water installation: move it past a junction and every branch needs its own filter.

Several inputs at once: superposition (superposición, SS-06 p.10–12). A transfer function has one input and one output. With more inputs (reference X and disturbance Z) you compute each one separately with the others set to zero, then add:
Y=\underbrace{\frac{RG}{1+RGH}}_{Z=0}X+\underbrace{\frac{G}{1+RGH}}_{X=0}Z
The numerators differ, the denominator is the same. Poles belong to the loop, not to the input: the disturbance and the reference produce motion of the same shape. (SS-06 p.11 calls the controller R(s) and the reference X(s); in FR-01 the controller is D and the reference is R. See the traps.)

5 · The closed loop: heart of the course (lazo cerrado)

Every control system in this course has the same skeleton (FR-01 p.3). Click an element to see what it is. Background example: cruise control (FR-01 p.4–5).

Deriving Y/R with controller D, plant G and sensor H

\begin{aligned}e&=r-H\,y&&\text{summing point}\\ u&=D\,e&&\text{controller}\\ y&=G\,u+G\,w&&\text{plant + disturbance}\\ y&=GD(r-Hy)+Gw\\ y\,(1+DGH)&=DG\,r+G\,w\\ y&=\frac{DG}{1+L}\,r+\frac{G}{1+L}\,w\end{aligned}
  • Loop function (función de lazo) L=DGH = the product of everything a signal passes through going once around the loop. You compute it from the open blocks, but it describes the closed loop.
  • Y/R=DG/(1+L): numerator = the "straight-through" path from input to output, denominator = 1+L.
  • Y/W=G/(1+L): the disturbance (perturbación) has a shorter straight path (just G) but the same denominator.
The four sensitivity functions with H = 1 (FR-01 p.12). All have denominator 1 + L.
S=\frac{1}{1+L}\ \ \text{(sensibilidad)}
T=\frac{L}{1+L}\ \ \text{(s. complementaria)}
S_i=\frac{G}{1+L}\ \ \text{(s. de entrada)}
S_u=\frac{D}{1+L}\ \ \text{(s. de control)}
T tells how much output you get from the reference. S tells how much error: E=S\,R, and S+T=1 (FR-04 p.3). S_i is the effect of the disturbance, S_u is the actuator effort. In the STUDY_MAP this is "the one idea everything hangs on": tracking, disturbances, robustness, margins, PID tuning are all questions about L,\ S,\ T.

Cruise control with the numbers from the slides (FR-01 p.5, p.10, p.15)

  1. The sensor gives 0.1 V per km/h (H_y=0.1). To compare like with like, the reference also goes through H_r=0.1 (selector de referencia). When H_r=H_y you can move them past the summing point and get a loop with H=1 and D=H_rD_{cl}=0.1\cdot100=10 (FR-01 p.10).
  2. Plant: G=\frac{10}{0.1s+1}, pole -10.
  3. Loop function: L=DG=\frac{100}{0.1s+1}, so L(0)=100.
\begin{aligned}T&=\frac{L}{1+L}=\frac{100}{0.1s+1+100}=\frac{1000}{s+1010} &\Rightarrow&\ \text{pole } -1010,\ \ T(0)=0.990\\ S_i&=\frac{G}{1+L}=\frac{10}{0.1s+101}=\frac{100}{s+1010} &\Rightarrow&\ S_i(0)=0.099\ \text{ instead of } G(0)=10\end{aligned}

All three results match the boxes on FR-01 p.15 (S, T, S_i, S_u).

6 · The key idea: closing the loop moves the poles

The poles of Y/R are the roots of its denominator, and the denominator is 1+L. So the new characteristic equation (ecuación característica) is:
1+L(s)=0\quad\Longleftrightarrow\quad \text{den}_L(s)+\text{num}_L(s)=0
Robot arm from Step 3: G=\frac{20}{s(s+10)}, P controller: D=K_p. Then s(s+10)+20K_p=0, i.e. s^2+10s+20K_p=0. K_p sits in the constant term, so turning it moves the poles, and with them ζ, ωn, Mp, ts from Step 3. This is how you repair a broken system: you don't replace the motor, you add a loop.
The Step 3 metaphor still holds: K_p is the door-closer spring pulling towards \theta_{ref}. A stiffer spring = faster, but more swinging. For an unstable system (FR-03 p.8) it is a broom balanced on your hand: on its own it falls (pole on the right), but eye + hand (the loop) catch it.

Lab: pick a system and turn Kp

s-plane: ✕ plant poles, ● closed-loop poles, dots = path as Kp changes
Response to a reference step r = 1
closed loop yreference r = 1 (dots)plant alone, u = 1 (dashes)
Step response

The dots on the s-plane preview the root locus (lugar de las raíces, DC-01): the path the poles travel as Kp grows. Numbers are measured from simulation, ts with the 5 % band (SS-08 p.6).

7 · Final value of the loop and steady-state error (error en régimen permanente)

Step 1: final value = G(0), because in steady state the derivatives are 0, i.e. s=0. Same for the loop:

\begin{aligned}K_{cl}&=T(0)=\frac{L(0)}{1+L(0)}\\ e_{ss}&=1-T(0)=S(0)=\frac{1}{1+L(0)}\end{aligned}

FR-04 p.11 (type 0, step): e_p=\frac{1}{1+K_p} with the position error constant K_p=\lim_{s\to0}L(s)=L(0). Careful: this K_p is not the P controller gain, it is L(0). Same letter, different thing.

A P controller leaves an error
P is a worker paid per unit of error: it pushes the pedal only while the speed is wrong (u=K_pe). If the error dropped to zero, it would stop pushing and the car would slow down. So the car settles where "a bit of error × Kp" gives exactly the throttle needed. Bigger Kp = smaller error, but never zero, because L(0) is finite.
An integrator 1/s removes the error
The integrator is the tank from Step 2: water level = accumulated error. While the error ≠ 0 water keeps flowing and the pedal keeps changing. It only stops at error = 0, and the level (throttle) stays wherever it is needed. Mathematically: 1/s in L gives L(0)=\infty, so e_{ss}=1/(1+\infty)=0.
That is why the robot arm in Step 3 (Z1) had K=1 with P alone: the motor already integrates (speed → angle), there is a 1/s inside G=\frac{20}{s(s+10)}. System type (tipo) = number of integrators in L (FR-04 p.7, p.11): cruise control type 0, arm type 1.

Cruise control: P vs PI

Speed after a reference step: G = 2/(5s+1), r = 1
P only (dashes)PI: Kp + Ki/sr = 1 (dots)
P vs PI

The cruise-control plant 2/(5s+1) is mine (car: T = 5 s). PI is the topic of DC-03, here only a preview. The PI zero (-K_i/K_p) can cause overshoot even with real poles.

Preview of DC-06 (architectures): the final-value error can also be removed without an integrator. A prefilter (prefiltro) F=1/T(0) before the loop scales the reference (DC-06 p.3, p.5), and feedforward (prealimentación) 1/G(0) applies a "precomputed" throttle (DC-06 p.8–9). Both only work if the model is exact. The integrator always works, because it looks at the real error.

8 · Four applications side by side: open loop vs closed loop

The same P controller, four different plants, four Kp values each. Pick an application. The "open loop" row is the plant alone with u=1.

Step responses (click to show or hide)
Responses for four Kp
Pole map (colour = Kp, ✕ = plant)

The cruise-control, arm and drone plants are mine. The oven is the plant from FR-03 p.7 (time in minutes: heater, air, sensor = three lags). ts with the 5 % band.

Quiz on the four applications

9 · Traps

Sign at the summing point. Always check the sign on the feedback input. G/(1+GH) holds only for a minus. With (+,+) you get G/(1-GH). If the minus sits on the reference instead of the feedback, derive from scratch (SS-06 p.4: "saber deducirlos").
H ≠ 1 (sensor units). The sensor gives volts, not km/h. With large L the output tends to R/H, so the reference must be given in sensor units (H_r=H_y, FR-01 p.5, p.10). The S,\ T formulas on FR-01 p.12 already assume H=1.
Open loop ≠ closed loop. L=DGH is the loop function (open). Its poles are the poles of the blocks, not of the system. The system poles are the roots of 1+L=0. A stable plant can give an unstable loop (FR-03 p.7), and an unstable plant a stable loop (FR-03 p.8).
Two letters R. SS-06 p.11 calls the controller R(s) and the reference X(s). FR-01 calls the controller D and the reference R. Check which is which before substituting. Likewise the controller K_p ≠ K_p=L(0) from FR-04 p.11.
Cancelling poles and zeros. Typing L/(1+L) by hand in MATLAB gives too high an order (the same factors on top and bottom), so use feedback or minreal. But never cancel an unstable pole with a controller zero: on paper it disappears, inside the loop the signal keeps growing.
Time units. The oven counts in minutes, the arm in seconds. ts = 3 in the oven means 3 minutes. In MATLAB step(T,20) means 20 time units of the model.
A bug in my old cheat sheet. The STUDY_MAP had G = 1/((s+1)(s+2)(s+3)) with D = 12 as the instability example. With a 1 in the numerator the loop is stable up to K=60. Slide FR-03 p.7 has a 6 in the numerator: then the limit is D=10, and D=12 gives poles 0.12\pm3.53j. I fixed the STUDY_MAP.

10 · MATLAB and Simulink

Script step4.m in your project folder, run sections with Ctrl+Enter
%% Step 4 - block diagrams -> closed loop
s = tf('s');

%% 1. Three reductions (SS-06 p.4)
G1 = 2/(s+1);  G2 = 3/(s+4);
Gs = series(G1,G2)       % = G1*G2 -> 6/(s^2+5s+4)
Gp = parallel(G1,G2)     % = G1+G2 -> (5s+11)/(s^2+5s+4)
G = 10/(s+1);  H = 0.5;
T1 = feedback(G,H)       % G/(1+GH) -> 10/(s+6)   (minus by default)
T2 = feedback(G,H,+1)    % positive feedback -> 10/(s-4): unstable

%% 2. Cruise control, FR-01 p.15
D = 10;  G = 10/(0.1*s+1);
L = D*G;                 % loop function, H = 1
T  = feedback(L,1)       % shows 100/(0.1s+101) = 1000/(s+1010)
S  = feedback(1,L)       % 1/(1+L) = (s+10)/(s+1010)
Si = feedback(G,D)       % G/(1+DG) = 100/(s+1010)
pole(T), dcgain(T)       % -1010, 0.9901

%% 3. Stable plant, unstable loop (FR-03 p.7)
G = 6/((s+1)*(s+2)*(s+3));
T1  = feedback(1*G,1);   T12 = feedback(12*G,1);
pole(T1), pole(T12)      % second one: 0.12 +/- 3.53i -> unstable
step(T1, T12, 20); legend('D = 1','D = 12')

%% 4. Robot arm with P (Step 3, Z1)
G = 20/(s*(s+10));
T = feedback(5*G,1)      % 100/(s^2+10s+100)
damp(T)                  % zeta 0.5, wn 10
stepinfo(T,'SettlingTimeThreshold',0.05)   % Overshoot 16.3, SettlingTime ~0.53

%% 5. Why minreal
L = 5*G;
Tbad  = L/(1+L)          % order 4: same factors on top and bottom
Tgood = minreal(Tbad)    % order 2 again, same as feedback(L,1)

Simulink, first contact: the loop from FR-03 p.7

  1. In the Command Window type simulink and press Enter. On the start page: Blank Model → Create Model.
  2. Double-click an empty spot on the canvas and type a block name (quick insert). Add in turn: Step, Sum, Gain, Transfer Fcn, Scope. (Alternative: SIMULATION tab → Library Browser: Sources, Math Operations, Continuous, Sinks.)
  3. Place them in a row from the left: Step → Sum → Gain → Transfer Fcn → Scope.
  4. Double-click Sum → List of signs: |+- → OK. You get a + input on the left and a − input at the bottom. That is the summing point with the minus for the feedback.
  5. Double-click Gain → Gain: 1 (this is D).
  6. Double-click Transfer Fcn → Numerator: [6], Denominator: [1 6 11 6] (this is (s+1)(s+2)(s+3) expanded).
  7. Double-click Step → Step time: 0 (default 1), Final value: 1.
  8. Connect: drag from the output arrowhead (>) of one block to the input of the next: Step → + of Sum, Sum → Gain → Transfer Fcn → Scope.
  9. Feedback: hold Ctrl and drag from the line between Transfer Fcn and Scope down and left to the − input of Sum. That is the branch point.
  10. In the top toolbar set Stop Time: 20. Click the green Run, then double-click Scope.
  11. Change Gain to 10 (endless oscillation) and to 12 (grows, unstable). Compare with the lab in part 6.
  12. Save as step4_loop.slx in your project folder.

Expected: with Gain = 1 the output settles at 0.5 (T(0)=6/(6+6)), with 12 it grows while oscillating.

11 · Check yourself

Z1. Series and parallel. G_1=\frac{2}{s+1},\ G_2=\frac{3}{s+4}. Give the static gain K of the series and of the parallel connection.
K series K parallel
Z2. Loop with H = 1. G=\frac{10}{s+1}, negative feedback, H=1. Give the closed-loop pole and K.
pole K
Z3. Sensor H = 0.5. Same plant, but the sensor gives half a unit per unit of output.
pole K
Z4. Sign trap. G=\frac{10}{s+1}, H=0.5, but the summing point has a plus on the feedback. What happens?
Z5. The part 3 diagram with numbers. G_1=10,\ G_2=\frac1s,\ H_2=2,\ G_3=1,\ G_4=\frac1s,\ H_1=1. Give the poles of Y/R (slow and fast) and K.
slow p fast p K
Z6. Modelling: the DC motor from SS-06 p.3. L=0.5 H, R=1 Ω, J=0.01 kg·m², B=0.1 N·m·s, K_t=K_e=0.01. First T_c=0: find \Omega/V, its K and its poles. Then superposition: K of \Omega/T_c with V=0.
K Ω/V slow p fast p K Ω/Tc
Z7. Designing Kp. Arm G=\frac{20}{s(s+10)} with a P controller. Which Kp gives ζ = 0.7 (Step 2: the best compromise)?
Kp
Z8. Steady-state error. Cruise control G=\frac{2}{5s+1}, P controller with K_p=4, H=1. Give the final value and the error in %.
T(0) e_ss (%)
Z9. The FR-03 p.7 plant is stable (poles −1, −2, −3). Why is the loop unstable at D = 12?
Z10. Repairing a broken system (FR-03 p.8). Plant \frac{1}{s-1} (pole +1). From which D is the loop stable? Where is the pole at D = 2?
D min pole at D = 2

12 · Next

Sources: SS-04 p.13 (derivative → s) · SS-05 p.2 (ODE → G), p.3 (poles = denominator roots), p.5 (block Y = GU) · SS-06 Diagramas de bloques p.2 (sumador ±X1 ± X2), p.3 (DC motor), p.4 (series, parallel, loop G/(1+GH), "saber deducirlos"), p.5 (swapping summing points), p.6–7 (block across a summing point), p.8–9 (block across a branch point), p.10–12 (superposition, common denominator) · FR-01 Realimentación p.3 (loop elements), p.4–5 (cruise control), p.7–8 (advantages, drawbacks), p.10 (H_r = H_y), p.11–12 (Y, U, E; S, T, S_i, S_u), p.15 (cruise control: results) · FR-03 p.4 (Black), p.7 (D = 1 stable, D = 12 unstable), p.8 (unstable plant, D = 2) · FR-04 p.3 (S + T = 1, E = SR), p.7 (type), p.11 (e_p = 1/(1+K_p)) · DC-06 p.3–5 (prefilter), p.8–9 (feedforward) · SS-08 p.6 (5 % band). The cruise-control plant 2/(5s+1), the arm, the drone, the part 3 diagram and the motor numbers in Z6 are mine.