Give the baseline a fair fight
You spent three evenings tuning your new controller and three minutes on the old one. Your comparison is really measuring something else. What?
About 35 min · 2 goals · Checked by automated tests
1.Why should I care?
An unfair baseline is the most common way honest people produce misleading results. Treating the baseline as a real competitor is what makes a win mean something.
- ◇ Give a baseline the same tuning effort, information and conditions as the proposed method.
- ◇ Choose a strong, relevant baseline for a task.
2.Predict
Your new method was tuned with a 50-point grid search; the baseline used default gains. What does a win show?
Guess first. Being wrong here is how the surprise works.
3.Understand
Equal effort
Tune the baseline with the same method and budget as your own: the same number of trials, the same search range, the same metric. If you use an automatic tuner for one, use it for both. Report how each was tuned.
Equal information and conditions
Both methods get the same sensors, the same data, the same seeds and the same limits (actuator saturation, computing time). A method that secretly sees ground truth, or a larger budget, is not comparable.
A strong, relevant baseline
Choose what a competent engineer would actually use: the standard method in the field, or the current system. A 'straw man' baseline nobody would choose makes any method look good. Including a trivial baseline as well is fine, as a sanity check.
Explain it another way
A race where one runner gets new spikes and three weeks of coaching tells you about coaching, not about the runner.
Unequal hyper-parameter tuning is a confound: tuning effort varies with the method. Matching tuning budgets removes it.
Benchmark studies increasingly publish tuning budgets and search spaces for every method, because unequal tuning has repeatedly been found to explain claimed improvements.
Worked example 1
Write one method sentence describing fair tuning for a P vs PI comparison.
'Both controllers were tuned by grid search over the same range (Kp 0.5–10, Ki 0–5 for PI) with 40 evaluations each, minimising mean IAE on seeds 101–110; final comparison used separate seeds 1–10.'
Common mix-ups
- A baseline is just there for comparison, so its settings don't matter much.
✓ The baseline's settings decide what your comparison means. Give it your best honest effort.
4.Discover
Treat P as the baseline and PI as the new method on the first-order plant with noise and a load disturbance. Spend the same number of tries (say eight) tuning each against the same metric, then compare their best results.
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.
- Setpoint r = 1
- Closed-loop output
- Open loop (u = r/K)
- ±2 % band
Gains
Applies the command the model says is right, u = r / K, without ever measuring.
Plant
Like motor speed or an oven: τ·ẏ = −y + K·u. K = 1.
Real-world effects
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, P and PI are each tuned with the same number of attempts on the same noisy, disturbed plant; their best results are then compared under identical settings.
5.Checkpoint: guided practice
Check what you just discovered before going on. Hints appear after a wrong answer.
Practice 1
Which makes a baseline comparison unfair?
6.Watch
→ Notice that automatic tuning methods can be applied to any controller: a fair way to give the baseline equal effort.
Compares hand tuning with automatic methods, a useful reminder that a baseline deserves the same tuning effort as the method you favour.
Length: see YouTube · captions on YouTube · source
Nothing loads from YouTube until you press play.
The video is optional: everything you need is also in the lesson text and the interactive.
7.Practice on your own
Practice, not a test. Wrong answers get a hint and another try.
Practice 2
The new planner uses a perfect map; the baseline uses the noisy lidar map. Fair?
Practice 3
Why tune on seeds 101–110 and compare on seeds 1–10?
Practice 4 · a fresh version every time
A baseline path follower has a mean tracking error of 25 mm. The new method has 18.75 mm under the same conditions. What is the percentage improvement (lower error is better)?
Practice 5 · a fresh version every time
Over 10 seeded trials each, the baseline controller's settling time averaged 40 s and the new controller's 36 s. Both conditions have a standard deviation of 2 s, so the pooled SD is 2 s. What is the effect size d = (difference in means) / pooled SD?
8.Apply it
Repeat your P vs PI comparison with equal tuning budgets and separate tuning and test seeds. Report how much the improvement changed compared with your first, unequal attempt.
9.Reflect
10.Go further
Research mode: limits and open questions
Some studies re-running published comparisons with equally tuned baselines have found the claimed advantages shrink or disappear; the lesson is general, whatever the field.
Concepts: Baselines and ablation studies · Tuning a PID controller · Honest reporting and research integrity