Optimisation in closed loop¶
As the optimisation is a short-term optimisation, where the horizon in most cases is limited by the prediction horizon on the forecast of the inflow to the system, it is impossible to judge from one run of the optimisation whether the optimisation will provide a good control of the system. The closed loop is where we evaluate the effect of MPC's optimisation of the flow set points. We use a simulation model to mimic the real-world response, and emulate the repeated optimisation in the real-time situation by feeding the first part of the control plan back to the simulation model. The backbone of DHI's MPC framework is to use a full hydrological-hydraulic model for the closed-loop evaluation.

The optimisation model (which is configured through the API), is based on the simplified dynamics of the surrogate model. The nature of surrogate models is that they not as accurate as a full hydrological-hydraulic model. This detailed high-fidelity model will henceforth be termed the HiFi model . So, the forecasted future state that the optimisation model uses for finding the optimal flow set points will deviate from the HiFi model's state (but hopefully only slightly) .
We use the closed loop both in the operational system and in offline simulations.
Operational system¶
In the operational system, the main purpose of running a HiFi model is to keep the surrogate model on track by inferring initial conditions for the next optimisation from the HiFi result. The secondary purpose is to monitor that the surrogate model is not deviating too much from the HiFi model.
In principle, the initial state can be inferred from measurements only, but the requires very good measurement coverage. The advantage of the HiFi model is that its results can be used as "virtual gauges", and we will have "virtual measurements" at any position in the water system.
Offline simulations¶
Offline, the closed loop serves a wider range of functionality:
- Modellers use it in the process of formulating the optimisation model and tuning the optimisation's weights. The tuning process is where we adjust the optimisation to perform well over several events, and finally test it on a set of events that were not used for the tuning. Essentially this is a calibration of the optimisation, where we have to set up performance measures for an event horizon (e.g. "the monsoon period" or "a rainfall").
- End users run closed loop simulations
- In the training simulator, to learn about how the optimisation tackles various input
- In retrospective simulations of historical events