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.
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
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.
\frac{1}{Ls+R}: the winding. The voltage that is left (V-V_c) pushes current I (Kirchhoff, coil + resistor).
K_t: current → torque T (torque constant).
\frac{1}{Js+B}: the rotor. Torque minus load T_c accelerates inertia J against friction B (Newton for rotation, like the door in Step 3).
K_e: a spinning motor becomes a generator and gives back a voltage V_c (fuerza contraelectromotriz). This is a natural feedback loop that nobody designed.
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).
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:
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
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)
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).
Plant: G=\frac{10}{0.1s+1}, pole -10.
Loop function: L=DG=\frac{100}{0.1s+1}, so L(0)=100.
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.
closed loop yreference r = 1 (dots)plant alone, u = 1 (dashes)
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:
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)
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)
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
In the Command Window type simulink and press Enter. On the start page: Blank Model → Create Model.
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.)
Place them in a row from the left: Step → Sum → Gain → Transfer Fcn → Scope.
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.
Double-click Gain → Gain: 1 (this is D).
Double-click Transfer Fcn → Numerator: [6], Denominator: [1 6 11 6] (this is (s+1)(s+2)(s+3) expanded).
K = 1 because G_4=1/s brings an integrator into the loop (part 7). The zero at −1 sits right next to the slow pole −0.9 and almost cancels it, which is why the response is faster than 3/0.9 suggests.
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.
The same denominator for both inputs (SS-06 p.11). Minus on T_c because the load brakes. Recipe for any diagram like this: straight path from input to output on top, 1+(loop product) on the bottom.
Z7. Designing Kp. Arm G=\frac{20}{s(s+10)} with a P controller. Which Kp gives ζ = 0.7 (Step 2: the best compromise)?