Lite / Engineering Complex Systems / Week 18
A fair fight between controllers
A report says 'PID beat PI by 40 %'. Before you believe it, what three questions should you ask?
Why should I care?
Engineering decisions are made from comparisons. A comparison where one option got an easier test is worse than none, because it looks like evidence. This lesson builds the habits that make your term project trustworthy.
- Write a specification and test protocol before running any comparison.
- Compare controllers under matched conditions (same plant, load, noise seed, actuator limits).
- Recognise an unfair comparison and explain how it biases the result.
Predict
One controller is tested without the load disturbance the others faced. Its results will probably look…
- Worse
- The same
- Better, for reasons unrelated to the controller
- Impossible to say
Guess first, then reveal
Better: it never had to reject the load. The difference reflects the test, not the controller. Matched conditions remove that confound.
Discover
Investigation: with 'Matched' conditions, record which controllers pass and why each failure happens. Then switch to 'Unfair' and record how PID's row changes. Write one sentence on what a reader of the unfair table would wrongly conclude.
What the interactive shows (text version)
The scoreboard table lists overshoot, settling time, final error, peak effort and pass or fail for P, PI and PID on the same plant. Under matched conditions P fails on final error, PI fails on settling time and PID passes. Under the unfair setting, PID is tested with no load or noise and its row looks better for reasons unrelated to the controller.
Understand
Decide before you test
Write the specification (metrics, limits, conventions) and the protocol (set point, loads, noise, number of runs, duration) before the first run. Otherwise it is too easy to pick the metric that makes your favourite look good.
Match everything except the controller
Same plant parameters, same actuator limits, same disturbance at the same time, same noise seed or the same set of seeds, same simulation step. P is the natural baseline: it shows how much I and D actually add.
Tune each fairly, too
Comparing a carefully tuned PID with a carelessly tuned PI tests your effort, not the controller. Give each the same tuning method and budget, and report how you tuned. The scoreboard's gains came from one coarse grid search per controller, stated in its note.
Explain it another way
Intuitive
A race where one runner starts ten metres ahead tells you nothing about who's faster.
Technical
Controlled comparison: one independent variable (controller structure), all others held fixed or randomised identically. Report all pre-registered metrics, including those where the preferred option loses.
Applied
Industrial controller upgrades are often justified by before-and-after data. If the 'after' period had milder weather or lighter loads, the improvement may be illusory.
Worked example 1
Three runs of PI give settling times 2.1, 2.4, 2.7 s; three of PID give 1.9, 2.0, 2.4 s, with different noise seeds per run. Is PID faster?
Means: PI 2.4 s, PID 2.1 s. The ranges overlap, and with only three runs each the evidence is weak. Use the same three seeds for both (paired comparison) and more runs before claiming a difference.
Common mix-ups
The controller with the best single number is the best controller.
✓ Judge against the whole pre-written spec under matched conditions. A controller can win one metric and fail the spec.
Practice
Practice, not a test. Answers are checked on our server; a wrong answer gets a hint and another try. Nothing is saved.
Apply it
Write the specification and test protocol for your term project: metrics with conventions, limits, loads (0, 300 and 600 kg), number of runs and how you will tune each controller. Submit it before you run any tests.
Reflect
Have you ever seen a comparison (an advert, a review) that wasn't fair? What was mismatched?
Write your answer on paper or in your own notes. Lite never stores what you write.