Identify an unknown sampled process
Fit a model, challenge it on held-out data, and tune a controller from evidence.
How much confidence should a controller place in a model fitted from one experiment?
The CSV has time_s, input_u, output_y, and a train or validation split. Inputs are seeded binary commands, held for 0.1 s. Fit a first order ARX model on the training segment, then perform free-run validation. The teaching generator uses y[k+1]=0.85*y[k]+0.3*u[k], but your fitting function must use only the supplied data, not those coefficients.
Build it, step by step
- 01
Plot input and output. Align current input and current output with the next output, excluding transitions whose next sample is outside the training split.
- 02
Fit a,b using lstsq and inspect matrix rank and singular values. Convert to gain and time constant only if the first order assumptions hold.
- 03
Initialise validation from its first measured output, then recursively simulate using validation inputs only. Report RMSE, residual mean, and residual correlation.
- 04
Add reproducible measurement noise to a copy of the record and compare one-step and free-run errors. Repeat with different noise levels to show estimator bias or variance.
- 05
Tune a digital PI from the fitted model. Test it against the known teaching plant under parameter variations, then explain why synthetic validation is insufficient for a field deployment.
Your project checklist
- No validation rows used to choose fitted coefficients.
- Correct one-step alignment and free-run recursion.
- Parameter estimates, residual plots, and errors with units.
- A controller design that states the uncertainty in its model.
Free, open and run by a nonprofit.
This page is part of Control Engineering, a free course of 20 modules and 60 lessons in the engineering.fit( ) Learning Lab. The Learning Lab is built and run by engineering.fit( ), a nonprofit founded by Abdullateef Opeyemi Bakare that helps African engineering students gain research experience. You do not need an account or pay a fee to learn.