In MPT2, definition of the MPC problem was split into a
sysStruct structure, which described the prediction model, and a
probStruct structure, which defined parameters of the MPC problem.
MPT3 contains a completely redesigned user interface for control synthesis, which combines these two structure into a single object. To migrate your MPC setup, use the
The command above will migrate your MPC problem setup into an MPT3 object, which represents the prediction model, along with constraints and penalties on the model's states, inputs, and outputs.
To synthesize an on-line MPC controller using the MPT3 prediction model, use the
N represents the prediction horizon.
To synthesize an explicit MPC controller, use the
toExplicit() method of
MPCController objects, i.e.
The table below shows what are the equivalents of important MPT2 functions in MPT3:
|MPT2 function||Equivalent in MPT3|