Three Estimators on a Week-Old Count

An epidemic curve of reported cases and hospital census over several months

Open the Epidemic Response Control app

Advanced Control Exercise 9 of 30 in Estimation · All exercises · Time: 15 minutes

A city reports its new cases every day, but the count is late and only a fraction of the truth, and that fraction changes when testing policy changes. Three estimators read the same reports and the hospital census and estimate the reproduction number and the share of cases found. This exercise shows where they agree, and the one change none of them can see from the reports alone.

Learning Outcomes

  • Compare an extended Kalman filter, a particle filter and a moving horizon estimator on one record.
  • Explain observability when a measurement's gain is itself an unknown state.
  • Relate a second, independent measurement to which states an estimator can separate.

Book Chapter

Control of Biological Systems and Human Performance (Volume 19), Chapter 14, Estimating and Steering an Epidemic From Week-Old, Partial Counts. Read the chapter, open the PDF, or watch the lecture slides.

Theory in Brief

An SIR model with a time-varying transmission rate `\beta(t)` describes the epidemic in a city of `N`:

$$\frac{dS}{dt} = -\beta \frac{S I}{N}, \qquad \frac{dI}{dt} = \beta \frac{S I}{N} - \gamma I, \qquad R_t = \frac{\beta S}{\gamma N}$$

The reports are a fraction `\rho`, the ascertainment, of the new infections a delay `\theta` earlier, and the hospital census `H` follows the infections whatever the testing:

$$y_k = \rho_k\, \beta \frac{S I}{N}\Big|_{t_k - \theta} + v_k, \qquad H_{k+1} = H_k + h\, \beta \frac{S I}{N}\Big|_{t_k - \theta_H} - \frac{H_k}{\tau_H}$$

The estimators treat `\beta` and `\rho` as random-walk states. From the reports alone only the product `\rho I` is observable: twice the infections found half as often give the same count, so the linearized observability matrix loses rank. The census measures `I` without `\rho` and restores it. The three methods differ in how they handle the nonlinearity: the EKF linearizes once per step, the particle filter samples the distribution with `N_p` particles, and the MHE solves a bounded least-squares problem over the last `W` days.

Model: Physics-based compartment model with two unknown slowly varying parameters, transmission and ascertainment, estimated as states.
Decision: The estimates of R_t and of the infected count that the policy controller in this app acts on.
Learning: Online estimation of time-varying parameters from two noisy, delayed data streams.

Exercise

Read 2 min · Predict 1 min · Run 7 min · Explain 3 min · Check your AI 2 min.

Predict. On day 70 a testing policy change halves the share of cases found. The epidemic itself does not change. What do the three estimates of R_t do with the census, and what do they do without it?

Run the Epidemic Response Control app. Use the fastest speed, 60 d/s, and press Run again to pause at the times in each step.

  1. Open 4 · Three estimators, steady ascertainment. Set the speed to 60 d/s and run to day 100. Read the R_t within 0.2 (from day 21) and Ascertainment estimate tiles.
  2. Open 5 · The testing cut: the count halves, the census does not and run to day 90. Read the same two tiles.
  3. Set Census to the estimators to Off, press Reset, and run to day 90 again. Read the tiles and watch the estimator status badge.

Explain.

  1. With the census, all three estimators read the testing cut as testing. Why can none of them do that without it?
  2. When the data behave, the three methods agree. When would you pay for a particle filter or an MHE instead of an EKF?

Generative AI Learning

"Daily case reports are a fraction of true infections, and that fraction changes when testing changes. Can a Kalman filter estimate both the true infections and the fraction from the reports alone? Explain with observability."

Check the answer against your run: A good answer says no, because only the product of the fraction and the infections appears in the reports, and that a second measurement independent of testing, such as hospital census, is needed. Your step 3 run is the test. The assistant is your tutor and reviewer; you answer for every claim you turn in.

What to Turn In

A three-row table (steady, testing cut with census, testing cut without census) with both tiles, your written prediction, and three sentences that answer the two questions.

When the data behave, the three agree. In case 4 R_t within 0.2 reads EKF 100 % · PF 100 % · MHE 100 % and Ascertainment estimate EKF 0.28 · PF 0.28 · MHE 0.28 · true 0.29.

Through the testing cut with the census, the tiles read EKF 100 % · PF 100 % · MHE 100 % and EKF 0.15 · PF 0.16 · MHE 0.15 · true 0.12: every estimator lowers its ascertainment and keeps R_t right, because the census says the infections did not halve. Without the census they read EKF 93 % · PF 72 % · MHE 90 % and EKF 0.30 · PF 0.27 · MHE 0.26 · true 0.12. The estimated ascertainment stays near its old value while the true one fell, so the halved count is read as a halved epidemic and the estimates of R_t drift. Nothing in the reports can separate the two: `\rho I` is all they contain. All three are flagged ESTIMATOR DIVERGED, because the app still compares each estimate with the census it no longer feeds them.

The EKF is cheapest and enough when the distribution is close to Gaussian. A particle filter handles strongly non-Gaussian or multimodal uncertainty at the price of many model runs. An MHE adds hard bounds and a window of past data, which helps when a bound reflects real knowledge; a bound can also be wrong.

Measured with the app build of December 3, 2026 by a scripted replay of the steps above. Numbers that no tile shows come from the replay's record; your readings from the trends will be close. A later app release may move the last digit.

COVID-19 poses an SEIR model in GEKKO. Add an ascertainment parameter `\rho` that multiplies the reported cases, fit `\beta` and `\rho` to reported cases only, and then to reported cases and a hospital census. Compare the parameter confidence intervals: the first fit cannot pin `\rho`.

Related

References

  1. Hedengren, J. D. (ed.), Control of Biological Systems and Human Performance, Volume 19 of Interactive Control Engineering, Chapter 14, "Estimating and Steering an Epidemic From Week-Old, Partial Counts", pp. 351–372, Advanced Process Solutions, 2026. PDF (CC BY 4.0).
  2. Arulampalam, M. S., Maskell, S., Gordon, N., Clapp, T., A tutorial on particle filters for online nonlinear/non-Gaussian Bayesian tracking, IEEE Transactions on Signal Processing 50(2), 174–188, 2002.

Course Information

TCLab

Project

Applications

Advanced Control Exercises

Exams

Modeling

Machine Learning

Estimation

Control

Reinforcement Learning

Related Courses

Admin