Concepts

A scenario is one plant and one or more controllers. Every controller runs on its own copy of the plant, with the same noise, so their results can be compared directly.

Plant

The plant is the simulated filtration system: the ground truth of a run. At every instant it is either filtering or being backwashed, which a single command u decides:

  • u = +1: filtration (production). Permeate is produced and the membrane fouls.
  • u = -1: backwash. The membrane is cleaned, at the cost of some permeate.

A plant exposes three quantities to the app:

QuantityMeaningSeen by the controllers
costwhat the run is judged on, for example the net volume of permeate producedyes, with noise
x1the fouling of the membraneno: it has to be estimated
x2a second output, or simply the elapsed timeyes, with noise

A plant can have many more internal states. They are simulated but never shown.

The app ships with three benchmark plants taken from Filtration.jl (Benyahia, Cogan, Aichouche) and with membrane-bioreactor plants that couple biology and fouling.

Controllers

A controller chooses u at every sampling period, from the measurements only.

ControllerWhat it does
Constantkeeps the same command for the whole run
Periodicrepeats a fixed cycle: a filtration duration, then a backwash duration
Optimalapplies the optimal feedback law of its own internal model
PeriodicOptimalstarts with a few periodic cycles to collect data, fits its internal model, then switches to optimal control

Periodic has an option, use optimal period: after its first cycles it switches to the best fixed filtration/backwash split for the plant. It is the strongest periodic strategy, and so the fair reference for the optimal controllers.

Internal model and refit

An optimal controller does not know the plant. It reasons with a small internal model, one of the benchmark models of Filtration.jl, whose parameters it has to identify. That the internal model differs from the plant is the point of the comparison: it is the situation of a real installation.

A refit re-estimates the parameters of the internal model from the recent measurements. It happens after the warm-up cycles of a PeriodicOptimal controller, then at a regular interval. Each parameter can be left free or held fixed.

Closed loop

At each sampling period Ts:

  1. the plant is measured, with noise, every Ts_measure;
  2. each controller updates its estimate of the state and chooses u;
  3. the plant advances by one period under that command.

The app shows the result as it is computed:

  • Comparison: the command, the cost and the fouling of every controller on shared axes, with the controllers' own estimates.
  • Params: the parameters fitted by each controller, refit after refit.
  • Metrics: by cycle, the filtration/backwash ratio, the net production rate, and the share of refits that succeeded.