Skip to content
Tactiverge

School/□ Systems Engineer/Week 16

Feedback makes it faster

The heater is slow: τ = 10 minutes. A P controller makes the room reach its (slightly low) target in 1 minute. Where did the speed come from?

About 30 min · 3 goals · Checked by automated tests

1.Why should I care?

Feedback doesn't only correct errors; it changes the system's dynamics. Knowing that τcl = τ/(1 + KKp) lets you choose a gain for a speed target in one line, and warns you how hard the actuator will have to work.

  • ◇ Derive the closed-loop time constant τcl = τ/(1 + K·Kp).
  • ◇ Measure τcl in simulation and compare with the formula.
  • ◇ Explain why the speed-up costs actuator effort, and when saturation breaks the formula.

2.Discover

In the feedback lab choose a first-order plant (note τ and K) and P control. For three gains, read the time to reach 63 % of the final value and compare with τ/(1 + KKp). Then add an actuator limit and repeat with the highest gain: does the formula still hold?

Explorer 02 — Feedback control

Measure, compare, correct

A controller compares the setpoint with what the sensor reports and pushes the plant to close the gap. Tune the gains and watch speed, overshoot and accuracy trade against each other.

OUTPUT y vs SETPOINT r0.00.51.0Ts 1.30sCONTROL EFFORT u0.02.0012345678910TIME (s)
  • Setpoint r = 1
  • Closed-loop output
  • Open loop (u = r/K)
  • ±2 % band
Controller

Gains

2.0
1.5
0.20

Applies the command the model says is right, u = r / K, without ever measuring.

Plant

Plant model

Like motor speed or an oven: τ·ẏ = −y + K·u. K = 1.

1.0 s

Real-world effects

0.000

Noise only affects the closed loop: the derivative term amplifies it.

Rise 10–90 %
0.72 s
Overshoot
0.0 %
Settling 2 %
1.30 s
Steady-state err
0.333
theory r/(1+Kp·K) = 0.333

State

P control, Kp 2.0 on a first-order plant with τ 1.0 s. Rise time 0.72 s, overshoot 0.0 %, 2 % settling 1.30 s, steady-state error 0.333 (theory for P: 0.333). Peak control effort 2.00. Open loop: steady-state error 0.000.

P control, Kp 2.0 on a first-order plant with τ 1.0 s. Rise time 0.72 s, overshoot 0.0 %, 2 % settling 1.30 s, steady-state error 0.333 (theory for P: 0.333). Peak control effort 2.00. Open loop: steady-state error 0.000.

How to read this

The top panel shows the setpoint (dashed line at 1) and the plant's true output after a step command at t = 0. The solid line is the controlled system; the dotted line is open loop. The bottom panel shows the control effort u the actuator is asked to deliver.

Rise time is how long the output takes to go from 10 % to 90 % of where it ends up. Overshoot is how far it passes that value. Settling time is when it stays inside ±2 % for good. Steady-state error is the gap left at the end: P control always leaves one on these plants; integral action removes it.

Assumptions & limitations
  • Linear plant models with known, constant parameters (K = 1). Real motors and heaters have friction, dead zones and parameters that drift with temperature and wear.
  • Controller runs every 10 ms and holds its output between samples; the plant is integrated with 4th-order Runge–Kutta at the same step. There is no transport delay, which real systems almost always have.
  • The derivative acts on the measurement (not the error) through a 50 ms low-pass filter, a common practical choice that avoids a spike when the setpoint jumps.
  • Sensor noise is white Gaussian and seeded for repeatability; it is added only to the measurement, never to the true output.
  • Metrics are computed on the true output up to the disturbance time (or 10 s); a response still moving at the end of the window is reported as not settled.
  • Open loop uses the exact plant gain to pick its command. That flatters it: any modelling error would show up as steady-state error.
Can't use the interactive? Read a description instead

In the feedback lab with a first-order plant, raising the P gain makes the output reach 63 % of its final value sooner, matching τ divided by one plus the loop gain. With an actuator limit and high gain, the command is clipped at the start and the early rise is slower than the formula predicts.

3.Checkpoint: guided practice

Check what you just discovered before going on. Hints appear after a wrong answer.

Practice 1

τ = 6 s, K = 0.5, Kp = 10. What is τcl in seconds?

s

4.Predict

τ = 6 s, K = 0.5. Which Kp gives a closed-loop time constant of 1 s?

Guess first. Being wrong here is how the surprise works.

5.Understand

Same shape, faster clock

A P loop around a first-order plant is first-order again, but with τcl = τ/(1 + KKp). Loop gain 9 makes it ten times faster. The shape is the same exponential; only the timescale and the final value change.

Speed is bought with effort

At the instant of a step, the error is the whole step, so u(0) = Kp·r. Making the loop ten times faster means asking for roughly ten times the steady effort at the start. Real heaters, motors and valves have limits.

When the actuator saturates

If Kp·r exceeds the actuator's limit, the command is clipped and the plant just runs flat out: the response is set by the limit, not by τcl. The formula only applies while the loop stays linear. Check u(0) against the limit before trusting it.

Explain it another way

A slow bath fills faster if you open the tap wider whenever it's further from full. Feedback is the hand on the tap.

Derivation: Closed-loop time constant with P control
  1. Plant τ·dy/dt + y = K·u with u = Kp·(r − y).

  2. Substitute: τ·dy/dt + y = K·Kp·r − K·Kp·y.

  3. Collect y: τ·dy/dt + (1 + K·Kp)·y = K·Kp·r.

  4. Divide by (1 + K·Kp): (τ/(1 + KKp))·dy/dt + y = (KKp/(1 + KKp))·r.

  5. This is first-order again, with τcl = τ/(1 + K·Kp) and gain KKp/(1 + KKp) (giving the steady error from the last lesson).

  6. Effort at t = 0: u(0) = Kp·r. Ten times faster with KKp = 9 needs an initial command Kp·r, roughly ten times the final effort. If the actuator saturates, the formula no longer holds.

Worked example 1

τ = 20 s, K = 2. Required τcl = 2 s. What Kp, and what initial command for a step of r = 5 if the actuator limit is ±40?

1 + 2Kp = 10 → Kp = 4.5. u(0) = 4.5 × 5 = 22.5, within ±40, so the formula holds.

Common mix-ups

  • Feedback can make any plant arbitrarily fast.
    ✓ Only up to the actuator's limits, the sensor's noise and the loop's delays. Past those, the formula fails.

6.Practice on your own

Practice, not a test. Wrong answers get a hint and another try.

Practice 2 · a fresh version every time

A plant τ·dy/dt + y = K·u has τ = 1 s and K = 4. It is put under proportional control u = Kp·(r − y) with Kp = 1. What is the closed-loop time constant in seconds?

s

Practice 3

τ = 12 s, K = 1. What Kp gives τcl = 1.5 s?

Practice 4

Kp·r is three times the actuator limit. What does the early response look like?

Practice 5 · a fresh version every time

A first-order plant with static gain K = 4 is under proportional control with gain Kp = 3. The set point steps to r = 1. What steady-state error r − y∞ remains?

7.Apply it

Pick a speed target for the Smart Greenhouse air temperature (for example τcl = 2 min). Compute the Kp needed from your week-12 model, check the initial heater command against its maximum power, and test in the build.

Open BUILD 007: Design a Smart Greenhouse →

8.Reflect

Concepts: Proportional control · First-order systems and the time constant · Saturation and integrator windup