Model Predictive Control (MPC) Tools PackageHow does it work?There are three parts to the MPCTools algorithm: the regulator, state estimator, and target calculation. The regulator determines an optimal open-loop control trajectory from the current state estimate (from the state estimator) to the targets (from the target calculation). The state estimator reconstructs the most probable state from input and output data from the plant. The target calculation finds a state and input target to yield the desired output steady states of the model, given integrated disturbance estimates and set point values. A graphical representation of this system is shown below.In the regulator, we use model predictive control (MPC), which uses a mathematical model to forecast and optimize the predicted future behavior of the plant. Stage costs, terminal cost, and hard/soft constraints on states and inputs, can all be specified by the user. The estimator uses moving horizon estimation (MHE). In this approach, the model is used to best reconstruct the state trajectories by solving a nonlinear optimization problem. Stage cost, arrival cost, and system variable bounds can be specified by the user. The computational algorithms options for both the state estimator and regulator are described in CasADi Documentation. MPCTools allows solver selection from the options in CasADi for each part of the MPC problem. The target calculation problem uses CasADi solvers as well. It can have an objective function specified by the user as well as constraints. |