1. Measurements to parameters
A signal has fallen to half its initial value
Section titled “A signal has fallen to half its initial value”You observe a signal one second after starting an experiment. Its initial value was 1 and its new value is 0.5. How fast is it decaying?
A forward problem starts with a rate and predicts the signal. An inverse problem starts with the signal and asks about the rate. Both need the same physical model. Here we assume the rate is constant, the signal is proportional to the state, and the instrument has no unknown offset.
The model says that the loss per unit time is proportional to the amount present:
The state is dimensionless, time is in seconds, and is in inverse seconds. Dividing by and integrating gives
We have derived the forward answer before touching a solver. The ODE lesson explores the evolution equation in more detail.
Turn the equation around
Section titled “Turn the equation around”For one observation at a known positive time , with known ,
Our observation gives . The formula requires . Under the assumed decay model, would produce a negative fitted rate and therefore contradict the assumption of decay.
This is an unusually simple inverse problem: the answer is explicit. It is still worth stating the components separately.
| Role | This experiment |
|---|---|
| Unknown parameter | |
| State | |
| Observation rule | Read at |
| Data | |
| Objective |
An observation rule can instead average a region, sample several times, or convert a physical quantity to instrument units. Keeping that rule explicit prevents fitting a model output that the instrument never measured. For the linear algebra of observations and data fitting, see Boyd and Vandenberghe, Introduction to Applied Linear Algebra, chapters 7 and 13, in the authors’ edition.
Run the forward prediction
Section titled “Run the forward prediction”Use the shared Get started files and environment. Their model is:
// A minimal implicit ODE: x decays at the rate supplied by the user.model decay() { // `x` is dimensionless and starts at 1. `rate` has inverse-time units. state x: 1; initial { x = 1; } parameter rate: 1 / s = 1;
// Eqiora writes the evolution law as a residual equal to zero. relation flow { derivative(x) + rate * x = 0; }}Change rate to 0.6931471805599453 and run the script:
uv run --no-project --python .venv/bin/python python run.pyPredict the printed values first: about at seconds,
at seconds, and at one second. The
shared run script
handles compilation, time integration, and sampling; the equation remains in
.eqi.
The final sample was used to choose . The earlier samples are additional predictions. If independently measured values disagree with them, changing to match one observation more closely will not necessarily repair the model. An unknown initial condition, an instrument offset, or a changing rate may matter.
What if the initial value is unknown?
Section titled “What if the initial value is unknown?”One observation now obeys . For every chosen there is an producing exactly that observation. A good fit cannot select between them. Two positive measurements at distinct times allow the ratio
This removes , after which either observation determines it. The result assumes the two samples share one initial condition and one constant rate.
Exercises
Section titled “Exercises”- Recover when and . Give its units.
- Fit from and predict . Would a new measurement of 0.4 agree with this model? Name one additional experiment that could help explain it.
- With unknown , use at one second and at three seconds to recover both parameters.
- Differentiate the one-observation estimate with respect to . Explain why a small absolute measurement error becomes troublesome near zero.
Check your reasoning: exercise 1 gives ; exercise 3 gives and .
Reading
Section titled “Reading”Stephen Boyd and Lieven Vandenberghe, Introduction to Applied Linear Algebra: Vectors, Matrices, and Least Squares, Cambridge University Press, 2018, chapters 7 and 13. Book and author resources.