TExcelTAD
Home › Control Systems & Automation › Open Loop and Closed Loop: Why Feedback Works

Open Loop and Closed Loop: Why Feedback Works

The heater block from the introduction reaches 25 K25\ \text{K} above the room with a fixed 6.25 W6.25\ \text{W}, because its thermal resistance is 4 K/W4\ \text{K/W}. Then someone switches on a desk fan beside it. The thermal resistance drops to about 3 K/W3\ \text{K/W} and the block settles 6 K6\ \text{K} lower, and nothing in an open-loop controller notices. An open-loop controller is only as good as the model it was calibrated with. A closed-loop controller measures what actually happened and corrects it. This lesson puts numbers on that difference, and on what feedback costs.

Two ways to command a plant

Open loop: the controller computes uu from the reference alone, u=Col ru = C_\text{ol}\, r, usually an inverse of the plant's DC gain. A toaster timer, a stepper motor driven without an encoder, a washing-machine programme and a fixed-duty PWM fan are open loop. They are cheap, cannot become unstable on their own and need no sensor, but every model error and every disturbance goes straight to the output.

Closed loop: the controller acts on the error e=r−ye = r - y between the reference and the measured output. The figure shows the loop used in the whole course, with a load disturbance dd entering at the plant input and measurement noise nn entering at the sensor.

r + - e C(s) controller u + + d G(s) plant y + + n measured y + n (sensor)

Writing the loop equations with L=CGL = CG (the sensor's own dynamics are folded into GG here):

Y=L1+L⏟T R  +  G1+L⏟GS D  −  L1+L⏟T N,E=R−Ymeas=S (R−N)−GS DY = \underbrace{\frac{L}{1 + L}}_{T}\,R \;+\; \underbrace{\frac{G}{1 + L}}_{G S}\,D \;-\; \underbrace{\frac{L}{1 + L}}_{T}\,N, \qquad E = R - Y_\text{meas} = S\,(R - N) - G S\, D

Three facts follow directly.

Effect Open loop Closed loop
output change for a plant change ΔG/G\Delta G/G the full ΔG/G\Delta G/G about S ΔG/GS\,\Delta G/G, with S=11+LS = \frac{1}{1 + L}
disturbance reaching the output G DG\,D GS DG S\,D: divided by 1+L1 + L
sensor noise reaching the output none (no sensor) T NT\,N: passed where ∣L∣\lvert L \rvert is large

The sensitivity SS measures how much the closed loop cares about the plant: differentiate T=L1+LT = \frac{L}{1 + L} to get

dT/TdG/G=11+L=S,S+T=1\frac{dT/T}{dG/G} = \frac{1}{1 + L} = S, \qquad S + T = 1

So where the loop gain ∣L∣\lvert L \rvert is large, the closed loop follows the reference, ignores plant variations and rejects disturbances. The identity S+T=1S + T = 1 is the catch: at frequencies where T≈1T \approx 1 the loop also faithfully reproduces sensor noise as if it were real. A loop cannot reject noise and follow the reference in the same frequency band, so loops are designed with high gain at low frequencies (where references and disturbances live) and low gain at high frequencies (where noise lives). That trade-off returns in loop shaping.

What feedback costs:

  • A sensor, and the closed loop can be no better than it: an offset in the sensor becomes an offset in the output.
  • Stability. Open-loop-stable plants can be made unstable by too much gain, which the Routh–Hurwitz lesson makes precise.
  • Actuator effort. A fast loop asks for large uu at the start of a step; real actuators saturate.

Worked example: the heater and the desk fan

Given: heater block G(s)=Rth300s+1G(s) = \frac{R_\text{th}}{300 s + 1}, nominal Rth=4 K/WR_\text{th} = 4\ \text{K/W}, fan on Rth=3 K/WR_\text{th} = 3\ \text{K/W}; target rise 25 K25\ \text{K}. Open loop: fixed 6.25 W6.25\ \text{W}. Closed loop: proportional, Kp=12.25 W/KK_p = 12.25\ \text{W/K} (the value from the intro's practice question), with the reference scaled so the nominal loop lands on 25 K25\ \text{K}.

Find: the final temperature rise in both cases with the fan on, and the effect of a 2 W2\ \text{W} extra heat loss (a draught) on each.

Solve:

  • Open loop, fan on: 3 K/W×6.25 W=18.75 K3\ \text{K/W} \times 6.25\ \text{W} = 18.75\ \text{K}, a 25 %25\,\% drop, exactly the plant change.
  • Closed loop: T(0)=RthKp1+RthKpT(0) = \frac{R_\text{th} K_p}{1 + R_\text{th} K_p}. Nominal 4950=0.980\frac{49}{50} = 0.980; fan on 36.7537.75=0.9735\frac{36.75}{37.75} = 0.9735. With the reference scaled by 1/0.9801/0.980, the output drops by 0.66 %0.66\,\%, from 25.0025.00 to 24.83 K24.83\ \text{K}. The prediction S ΔG/G=0.02×(−25 %)=−0.5 %S\,\Delta G/G = 0.02 \times (-25\,\%) = -0.5\,\% is close; the difference is because 25 %25\,\% is not a small change.
  • Draught: a 2 W2\ \text{W} loss is a disturbance d=−2 Wd = -2\ \text{W} at the plant input. Open loop it lowers the block by 4×2=8 K4 \times 2 = 8\ \text{K}; closed loop by 8/(1+49)=0.16 K8/(1 + 49) = 0.16\ \text{K}.

Check: the program below repeats the calculation and simulates the draught arriving at t=600 st = 600\ \text{s}.

python · try it yourself
import numpy as np
import control as ct

Kp, tau = 12.25, 300.0
for Rth in (4.0, 3.0):
    G = ct.tf([Rth], [tau, 1])
    T = ct.feedback(Kp * G, 1)
    r_scale = 1 / 0.98                      # calibrated on the nominal plant
    print(f"Rth = {Rth:.0f} K/W: open loop {Rth * 6.25:6.2f} K, closed loop {25 * r_scale * ct.dcgain(T):6.2f} K")

G = ct.tf([4.0], [tau, 1])
GS = ct.feedback(G, Kp)                     # from d (W at the plant input) to y
t = np.linspace(0, 1200, 12001)
d = np.where(t >= 600, -2.0, 0.0)
y_ol = ct.forced_response(G, t, d).outputs
y_cl = ct.forced_response(GS, t, d).outputs
print(f"draught of 2 W: open loop drop {-y_ol[-1]:.2f} K after 600 s (final 8 K), closed loop drop {-y_cl[-1]:.3f} K")
print(f"closed-loop time constant {tau / (1 + 4 * Kp):.1f} s, S(0) = {1 / (1 + 4 * Kp):.3f}")
Rth = 4 K/W: open loop  25.00 K, closed loop  25.00 K
Rth = 3 K/W: open loop  18.75 K, closed loop  24.83 K
draught of 2 W: open loop drop 6.92 K after 600 s (final 8 K), closed loop drop 0.160 K
closed-loop time constant 6.0 s, S(0) = 0.020

The open-loop block has not even finished losing its 8 K8\ \text{K} after ten minutes (it has a 300 s300\ \text{s} time constant), while the closed loop has settled 0.16 K0.16\ \text{K} low within a few of its 6 s6\ \text{s} time constants. Feedback also made the loop 50 times faster, which is the same factor 1+L(0)1 + L(0).

In the lab: a plant whose gain halves

Use the PID lab as a plain proportional loop around a first-order plant: K=1K = 1, τ1=1 s\tau_1 = 1\ \text{s}, Kp=10K_p = 10, Ki=Kd=0K_i = K_d = 0. The readouts give a final value of 0.90910.9091 (=10/11= 10/11), rise time 199.7 ms199.7\ \text{ms} and settling 355.6 ms355.6\ \text{ms}. Now halve the plant gain to K=0.5K = 0.5: the final value only falls to 0.83330.8333 (=5/6= 5/6), 8.3 %8.3\,\% lower, although the plant changed by 50 %50\,\%. Set Kp=1K_p = 1 with K=1K = 1 and the loop is slow (settling 1.956 s1.956\ \text{s}) and the final value is only 0.50.5: feedback with little gain buys little.

r = 1+C(s): Kp 10, Ki 0, Kd 0P(s) = 1/(1s+1)y-T(s) = (10.000) / (1.000 s + 11.000)closed-loop poles: -11.000.00.51.00100 ms200 ms300 ms400 ms500 msty(t)t_s 356 msy(t)setpoint10-90 % rise

Guided lab: open loop against closed loop on a heater

Hand calculation. With the heater block's model, 6.25 W6.25\ \text{W} open loop gives 25 K25\ \text{K}; a fan that lowers RthR_\text{th} to 3 K/W3\ \text{K/W} gives 18.75 K18.75\ \text{K}. A proportional loop with Kp=12.25 W/KK_p = 12.25\ \text{W/K} holds the block within 0.2 K0.2\ \text{K} of the same change, but only within the heater's 14.4 W14.4\ \text{W}, so for large steps it runs at full power at first.

Simulation. Change Rth and Kp in the program and compare open- and closed-loop drops; then in the lab, compare the final value for K=1K = 1 and K=0.5K = 0.5 at several KpK_p.

What you would measure. A 10 Ω10\ \Omega, 25 W25\ \text{W} aluminium-clad resistor bolted to a small aluminium block, an NTC thermistor or a DS18B20-type digital sensor in a drilled hole with thermal paste, a logic-level MOSFET switched by PWM from a microcontroller, a 12 V12\ \text{V} bench supply with its current limit at 1.5 A1.5\ \text{A}. Open loop at 43 %43\,\% PWM duty (6.25/14.46.25/14.4 of full power: with PWM the average power is proportional to the duty) the block should settle about 25 K25\ \text{K} above the room after 20 minutes, but expect ±20 %\pm 20\,\%: the real RthR_\text{th} depends on mounting and air movement. Switch on a fan and log the drop. Repeat with the P loop: the fan should now change the temperature by a few tenths of a kelvin, close to the sensor's resolution. Log at 1 s1\ \text{s} and plot.

Hazards and safe setup. The resistor and block reach 50–60 ∘C50\text{–}60\,^\circ\text{C} and can go higher if the software fails: add a software limit (heater off above 70 ∘C70\,^\circ\text{C}), a 72 ∘C72\,^\circ\text{C} thermal fuse or bimetal cut-out in series, keep the block on a non-flammable surface, never leave it powered unattended. Supply 12 V12\ \text{V} DC, current-limited; the MOSFET needs a heatsink only if it is not fully switched.

Pitfalls

  • Thinking feedback fixes a bad sensor: the loop drives the measured value to the reference.
  • Raising gain to reduce error without checking the actuator: the linear model's uu may be far beyond the hardware.
  • Forgetting S+T=1S + T = 1: high loop gain at high frequency feeds sensor noise to the actuator.
  • Calling a loop "closed" when the measurement is only displayed and a person adjusts the knob occasionally: that is manual control, with a slow and unreliable controller.

Practice

  1. A plant has DC gain 20 with a P controller Kp=4K_p = 4. By how many percent does the closed-loop DC gain change if the plant gain drops by 10 %10\,\%?
  2. A disturbance would move an open-loop output by 5 mm5\ \text{mm}. The loop gain at DC is 99. How far does it move the closed-loop output?
  3. Why is a high loop gain at 10 kHz10\ \text{kHz} undesirable for a temperature loop?
Answer
  1. L0=80L_0 = 80, T0=80/81=0.98765T_0 = 80/81 = 0.98765; with L=72L = 72, T=72/73=0.98630T = 72/73 = 0.98630: a change of −0.137 %-0.137\,\% (the estimate S ΔG/G=−10 %/81=−0.123 %S\,\Delta G/G = -10\,\%/81 = -0.123\,\%).
  2. 5 mm/(1+99)=0.05 mm5\ \text{mm}/(1 + 99) = 0.05\ \text{mm}.
  3. Nothing real happens to the temperature at 10 kHz10\ \text{kHz}; only sensor noise and interference live there, and T≈1T \approx 1 would pass them to the heater command.

Test yourself

With loop gain LL, the sensitivity of the closed-loop transfer function to plant changes is

  1. LL
  2. 11+L\frac{1}{1 + L}
  3. L1+L\frac{L}{1 + L}
  4. 1

A load disturbance dd at the plant input reaches the output of a closed loop through

  1. GG
  2. G1+L\frac{G}{1 + L}
  3. L1+L\frac{L}{1 + L}
  4. it cannot reach the output

Why can a loop not reject sensor noise and track the reference at the same frequency?

  1. because S+T=1S + T = 1
  2. because the sensor is too slow
  3. because of the integrator
  4. because the plant is nonlinear

In the PID lab, a proportional loop with Kp=10K_p = 10 around Ks+1\frac{K}{s + 1} has final value 0.90910.9091 at K=1K = 1. At K=0.5K = 0.5 it is

  1. 0.45450.4545
  2. 0.83330.8333
  3. 0.90910.9091
  4. 0.50.5