FUNCTION REFERENCE
mpc.sim
Simulate a closed-loop mpc controller over a sequence of reference samples.
Simulate a closed-loop mpc controller over a sequence of reference samples.
Syntax
[y, t, u] = sim(mpcobj, T, r)Runs T steps of closed-loop MPC simulation with reference trajectory r and returns plant outputs y, time vector t and manipulated variables u.
Example
p = ss(0.8, 1, 1, 0, 1); c = mpc(p, 1); [y, t, u] = sim(c, 5, ones(5, 1)); numel(t) % 5Differences from MATLAB: Linear time-invariant MPC simulation; Simulink-only options are not supported.
These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.