School/✦ Research Engineer/Week 28
Hypotheses that could be wrong
A hypothesis that every possible result would support tells you nothing. How do you write one that the data could actually knock down?
About 40 min · 3 goals · Checked by automated tests
1.Why should I care?
Hypotheses earn trust by risking failure. 'Integral action changes the steady-state error' cannot really fail. 'Adding Ki = 0.5 reduces steady-state error below 1% within 5 s, where P-only stays above 5%' can. Engineers who write risky hypotheses learn faster, because every experiment teaches them something.
- ◇ Write a hypothesis with a direction, a threshold and a decision rule.
- ◇ Explain falsifiability and the smallest effect size of interest.
- ◇ State in advance which result would count against the hypothesis.
2.Discover
Before touching anything, write: 'With P-only at Kp = 2, steady-state error will be above X%; adding Ki will bring it below Y% within Z s.' Pick X, Y and Z. Then run the lab. Did the data refute your hypothesis or not? Would you have known without writing the numbers down first?
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
The feedback lab shows a controlled system's response to a setpoint. With proportional control alone a steady-state error remains; adding integral action removes it over time. The activity is to write numerical predictions before running and compare them with the measured error.
3.Checkpoint: guided practice
Check what you just discovered before going on. Hints appear after a wrong answer.
Practice 1
Which hypothesis is falsifiable?
4.Predict
'Adding integral action will affect the response.' What is wrong with this hypothesis?
Guess first. Being wrong here is how the surprise works.
5.Understand
Falsifiable means some result would count against it
A hypothesis is falsifiable if you can describe, before the experiment, a result that would show it is wrong. 'The filter helps' is weak; 'the filter cuts RMS tilt error by at least 0.5° against a tuned moving average' is strong, because a measured improvement of 0.1 ± 0.2° would refute it.
Direction, size and decision rule
A complete hypothesis has a direction (reduces), a size (by at least 0.5°) and a decision rule (supported if the lower end of the 95% CI of the improvement exceeds 0.5°; refuted if the upper end is below 0.5°; otherwise inconclusive). Writing the inconclusive case down is honest: many experiments end there.
Null and alternative
Statistics often frames this as a null hypothesis (no difference, or a difference below Δ) and an alternative. You never 'prove' the alternative; you collect evidence that makes the null implausible, or you fail to.
Explain it another way
A weather forecast that says 'some weather tomorrow' is never wrong and never useful. 'Rain after 3 pm' is useful precisely because it might be wrong.
Popper's criterion: a scientific claim must prohibit some observable outcomes. Engineering adds a practical twist: the prohibited outcome should be defined relative to a threshold that matters for the design.
Decision rule with SESOI Δ: supported if est − 1.96·SE > Δ; refuted if est + 1.96·SE < Δ; else inconclusive.
Controller specifications already work this way: 'overshoot under 10%, settling under 2 s'. A research hypothesis is a specification you are not sure the system meets.
Derivation: Why the threshold has to come first
Suppose the true improvement is δ and your experiment estimates it with standard error SE.
With enough trials, SE = σ/√n becomes tiny, so ANY δ ≠ 0, however small, will eventually look 'significant'.
So 'there is a difference' is almost guaranteed to be true for real systems, and therefore almost uninformative.
Fix a smallest effect size of interest (SESOI), Δ, from engineering needs: 'an improvement under 0.5° is not worth the code'.
Now the hypothesis is 'δ ≥ Δ', and a result whose interval lies wholly below Δ refutes it. That is a risk the data can actually take.
Worked example 1
Estimate of improvement = 0.7°, SE = 0.15°, SESOI = 0.5°. Supported, refuted or inconclusive?
Lower bound = 0.7 − 1.96 × 0.15 = 0.406°. Upper = 0.994°. The interval straddles 0.5°, so the result is inconclusive under the pre-stated rule, even though the improvement is clearly above zero.
Common mix-ups
- A good experiment proves the hypothesis.
✓ Experiments can refute a hypothesis or fail to; support is always provisional and depends on the decision rule you set in advance.
6.Watch
→ Notice how the video separates 'is there a difference' from 'how confident are we', and why a p-value alone is not a decision rule.
A careful definition of what a p-value is (and is not), with a worked example of when a small one should still not convince you.
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
Improvement estimate 0.9 s, SE 0.2 s, SESOI 0.4 s. What is the lower 95% bound (1.96 × SE)?
Practice 3
Estimate 0.25 s, 95% CI [0.05, 0.45] s, SESOI 0.5 s. Verdict under a 'supported if lower bound > SESOI' rule?
Practice 4
After seeing the data, a learner lowers the SESOI from 0.5 to 0.2 so that the result is 'supported'. What is this?
Practice 5
What does failing to reject a null hypothesis show?
8.Apply it
Rewrite your capstone hypothesis with a direction, a smallest effect of interest and a three-way decision rule (supported, refuted, inconclusive). Explain where your SESOI comes from (a requirement, a cost, a user need).
9.Reflect
Concepts: Research questions and hypotheses · Experimental design and test protocols