School/✦ Research Engineer/Week 31
Pre-registration: write the plan before the data
If you decide how to analyse your data after seeing it, how would you know you had not just found the analysis that agreed with you?
About 40 min · 3 goals · Checked by automated tests
1.Why should I care?
Pre-registration is a promise to your future self that you will not be fooled by your own flexibility. It does not forbid exploring: it labels exploration honestly so readers know which results were predicted and which were discovered.
- ◇ List what a pre-registration records: hypothesis, design, primary metric, sample size, analysis and exclusion rules.
- ◇ Separate confirmatory tests from exploratory analysis.
- ◇ Report deviations from a pre-registration honestly.
2.Predict
Which belongs in a pre-registration?
Guess first. Being wrong here is how the surprise works.
3.Understand
What to record
Question and hypothesis with direction and SESOI; design (conditions, randomisation, seeds); primary metric and how it is computed; sample size and how it was chosen; exclusion rules; the analysis (test, interval, decision rule); and the date. Store it somewhere time-stamped (a public registry, or a committed file in version control).
Confirmatory versus exploratory
Tests in the pre-registration are confirmatory: their error rates mean what they say. Anything else is exploratory: interesting, worth reporting, but a lead for future work, not a finding. Label them separately in the report.
Deviations happen
A simulator crashes, a metric turns out to be ill-defined. Deviating is allowed; hiding it is not. List each deviation, why it happened and whether it was decided before or after seeing outcome data.
Explain it another way
Calling your shot in pool: sinking a ball you named counts; sinking a random one does not prove skill.
Pre-registration fixes the analysis path, so the nominal α applies. Without it, the effective α is inflated by every unreported choice.
Clinical trials in many countries must be registered before recruitment. Engineering research has no such rule, which makes voluntary pre-registration a strong signal of rigour.
Worked example 1
Halfway through, you realise settling time should use a 2% band, not 5%. What now?
Decide before looking at outcome data if possible. Record the change, its date and reason as a deviation. Report both definitions, label the pre-registered one as primary unless the change was made blind to outcomes, and let readers judge.
Common mix-ups
- Pre-registration stops you exploring your data.
✓ It labels exploration as exploratory. You can still look at everything; you just cannot present a discovery as a prediction.
4.Discover
Write a five-line pre-registration: hypothesis (e.g. Kp = 4 settles faster than Kp = 2 without overshoot above 10%), primary metric, runs per condition, exclusion rule, analysis. Then run the lab and analyse exactly as written. Anything else you notice goes under 'exploratory'.
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 for chosen gains. The activity is to write a short pre-registration (hypothesis, metric, runs, exclusion rule, analysis) before running and then analyse only as written.
5.Checkpoint: guided practice
Check what you just discovered before going on. Hints appear after a wrong answer.
Practice 1
Which is NOT normally pre-registered?
6.Watch
→ List the elements the video says a registration records and compare them with the seven listed here.
From the organisation that runs a public pre-registration registry: what a pre-registration records and how it separates confirmatory from exploratory work.
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
You notice an unexpected pattern not in your plan. How do you report it?
Practice 3
Your simulator version changed mid-study. What is the honest response?
Practice 4 · a fresh version every time
You test m = 20 metrics in one study and want the family-wise error rate (chance of at least one false positive) to stay at or below α = 0.01. What per-test p-value threshold does the Bonferroni correction give?
Practice 5
Why must a pre-registration be time-stamped?
8.Apply it
Draft your capstone pre-registration with all seven elements. Commit it to version control with today's date before you run any confirmatory experiment.
9.Reflect
10.Go further
Research mode: limits and open questions
Registered Reports go further: the journal reviews and accepts the plan before data, so publication cannot depend on the result.
Concepts: Experimental design and test protocols · Honest reporting and research integrity · Multiple comparisons and the garden of forking paths