TactivergeLite

Lite / Engineering Complex Systems / Week 9

Your modelling investigation

Question, model, solve, fit, validate, report. Nine weeks of calculus in one investigation, run on a system you choose.

About 50 min · 3 goals · Checked by automated tests · Full interactive version

Why should I care?

This is the term project in miniature: model and validate a cooling or falling system. The plan you write today is what makes the result trustworthy, because decisions made before seeing the data cannot be bent to fit it.

Safety: Only warm (not boiling) water for cooling experiments, and drops of light paper objects from standing height. Ask an adult before using anything hot.

Predict

Which should you decide before you look at the validation data?

  1. Nothing: decide everything at the end
  2. How you will split fit and test data and what error you will report
  3. Only the colours of your plots
Guess first, then reveal

Deciding the split and the metric first stops you, even unintentionally, choosing whichever split makes the model look best. It is the same discipline as a pre-registered experiment.

Discover

Open the Code Lab. Write three functions: exact(t) for your chosen model (cooling or linear-drag fall), euler(h, T) that steps the equation, and rms(model, data). Run Euler with h, h/2 and h/4 and print the error against exact(T): it should halve each time. Use the lab's synthetic data if you have none of your own.

What the interactive shows (text version)

This lesson's activity is in the Code Lab: writing an exact solution, an Euler stepper and an RMS function, then printing a convergence table in which Euler's error halves each time the step halves. No diagram is needed to follow it.

You can also open the interactive on the full site when you have a faster connection.

Understand

The plan

Write it before collecting or opening data. Question: what will the model predict? Equation and every assumption. Parameter to fit (k or b) and its units. Data: what, how often, how accurate. Split: which readings fit, which test. Metric: RMS error in stated units. Success: what error would be good enough for the question.

The solution checks

Exact solution where it exists; Euler always; a convergence table (h, h/2, h/4) showing the Euler error halving. Agreement verifies your code. Then fit the parameter on the fit set with a log-linear fit, and predict the test set without changing anything.

The report

One page: the question; the model with assumptions; the fitted parameter with units and method; a validation plot with labelled axes; the held-out error; the residual pattern; limits, each with the direction of its effect. Say clearly whether the data are yours or synthetic. Keep code and parameters so anyone can regenerate every figure.

Explain it another way

Intuitive

A good investigation is a story told in an order that cannot cheat: what I expected, how I checked, what happened, what I still do not know.

Technical

Pipeline: model → verification (exact vs numerical, convergence) → calibration (fit parameter on fit set) → validation (predict held-out set, report error) → limitations.

Mathematical

For Euler's first-order error, two runs give an error estimate without the exact solution: error(h/2) ≈ y(h/2) − y(h) (Richardson). Use it when no formula exists.

Applied

Engineering simulation reports follow this structure because reviewers, regulators and future colleagues need to know exactly how far the model can be trusted, and where it has never been tested.

Worked example 1

Euler gives T(20) = 40.0 °C with h = 1 and 40.5 °C with h = 0.5. Estimate the error of the h = 0.5 result without the exact solution.

For a first-order method error(h) ≈ 2·error(h/2), so the change between the runs, |40.5 − 40.0| = 0.5 °C, is about the size of the error left in the h = 0.5 run. Both runs are moving upwards, so the exact value is probably near 41.0 °C.

Common mix-ups

Practice

Practice, not a test. Answers are checked on our server; a wrong answer gets a hint and another try. Nothing is saved.

Practice 1. Which order is right for a modelling investigation?

Practice 3. You had no time to collect data and used the lab's synthetic cooling set. What must your report say?

mg/L

m/s

Apply it

Write your one-page project plan now (question, equation, assumptions with expected effects, parameter, data source, split, metric, success threshold). Then carry out the term project: model and validate a cooling or falling system.

Reflect

Which of your assumptions do you expect to be the first to fail, and what would you see in the residuals if it did?

Write your answer on paper or in your own notes. Lite never stores what you write.

← Validating a model and stating its limitsSystems with memory →