Skip to content
Tactiverge

School/□ Systems Engineer/Week 10

Inputs, outputs, states and parameters

A greenhouse model has a heater, a thermometer, a temperature and a wall thickness. Which of those is the model's memory?

About 30 min · 3 goals · Checked by automated tests

1.Why should I care?

Before you can simulate or control anything you need to agree what is a knob you turn (input), what you measure (output), what the system remembers (state), what is fixed by its design (parameter) and what the world does to it (disturbance). Mixing these up is the most common source of broken models.

  • ◇ Sort the quantities in a model into inputs, outputs, states, parameters and disturbances.
  • ◇ Explain why parameters are held fixed during a run while states evolve.
  • ◇ Draw a block diagram of a dynamic model with its signals labelled.

2.Predict

In a model of a lift, which quantity is a parameter rather than a state?

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

3.Discover

Open the feedback lab with a first-order plant. Write down every slider and label each one input, parameter or controller setting. Then change only the plant time constant and see which curves change.

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

The feedback lab has sliders for the set point (input), the plant gain and time constant (parameters), the controller gains (design choices) and an optional disturbance. Changing only the time constant changes how fast the output curve rises, without changing where it ends up.

4.Checkpoint: guided practice

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

Practice 1

A drone hovering in wind: which is a disturbance?

5.Understand

Five kinds of quantity

Inputs are what you choose (heater power, motor voltage). Disturbances are inputs you don't choose (wind, a passenger stepping in). States are what the system remembers (temperature, speed). Outputs are what you measure, often a state seen through a sensor. Parameters are fixed numbers in the equations (mass, time constant, gain).

Parameters stay put, states move

In a single run the parameters are constants; the states change from step to step. Changing a parameter means simulating a different system. That is why a fair test changes one parameter at a time across runs.

Block diagrams

Engineers draw a model as boxes joined by arrows. Each arrow is a signal (a quantity that varies in time) and each box transforms signals. Parameters live inside the boxes. A feedback loop is an arrow that carries the output back to the input side.

Explain it another way

Think of a recipe: ingredients are inputs, the oven temperature dial is an input too, the cake's doneness is the state, the oven's size is a parameter, and opening the door is a disturbance.

Worked example 1

A model of a phone battery: dQ/dt = −I(t), V = V₀(Q) − I·R. Label Q, I, V, R and V₀.

Q (stored charge) is the state. I (current drawn) is the input, or a disturbance if the user decides it. V (terminal voltage) is the output. R (internal resistance) is a parameter, and V₀(Q) is a parameterised curve. The battery remembers Q; everything else follows from it.

Common mix-ups

  • Anything with a number in the model is a parameter.
    ✓ Numbers that evolve during a run are states; only numbers fixed for the run are parameters.

6.Practice on your own

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

Practice 2

You change the time constant in the feedback lab between two runs. What have you done?

Practice 3

Why is the measured temperature an output and not simply the state?

Practice 4

In a block diagram, what does an arrow represent?

Practice 5 · a fresh version every time

A first-order system starts at 0 and settles towards a final value y∞ = 3.3. At t = 1.35 s the reading is y = 0.8553. What is the time constant τ in seconds?

s

7.Apply it

Draw a labelled block diagram of the Smart Greenhouse: heater command in, air temperature state, thermometer output, outside temperature disturbance, wall insulation and air volume as parameters. Mark which arrow would carry feedback.

Open BUILD 007: Design a Smart Greenhouse →

8.Reflect

Concepts: States and state-space models · Open-loop and closed-loop control