FUNCTION REFERENCE

mpcsimopt

Create MPC simulation options as a scalar structure.

Create MPC simulation options as a scalar structure.

Syntax

options = mpcsimopt; options = mpcsimopt(c)

Initial state/signal/Model/MVSignal fields default to []. OpenLoop, RefLookAhead, MDLookAhead and StatusBar default to 'off'; Constraints defaults to 'on'. These switches require 'on' or 'off'. StatusBar is accepted and ignored. Unknown fields raise errors naming the field.

PlantInitialState is an absolute physical state vector, defaulting to the simulation plant nominal X. ControllerInitialState is an mpcstate, defaulting to mpcstate(c). A supplied controller state is copied into a private handle for each run, including its warm-start data, so repeated simulations do not mutate the caller.

UnmeasuredDisturbance has Nud columns in physical UD order (default: simulation nominal UD inputs). InputNoise has Nmv columns and is added to the requested physical MVs at the plant. OutputNoise has Nmo columns in physical measured output order and is added only to controller measurements. All signals must be finite, have at most 65536 rows, and hold the final row.

Model accepts an LTI plant or a scalar struct with Plant and optional Nominal (X,U,Y,DX). It changes only the simulation plant. Input/output channel groups must match c.Model.Plant. U/Y inherit controller nominal offsets; X/DX inherit only between ss models with equal state dimension, otherwise zero. Continuous DX is integrated under ZOH once, using the simulation plant dynamics. Nominal offsets are applied once.

OpenLoop='on' bypasses mpcmove. MVSignal has Nmv columns and includes absolute MV offsets; its empty default means zero MVs. Reference is ignored in open loop. Constraints='off' uses a private controller copy with all MV, MV-rate and output bounds removed; the caller's controller remains intact.

Example

c=mpc(ss(.8,.2,1,0,.1)); o=mpcsimopt(c); o.OpenLoop='on'; o.MVSignal=[1;2]; [y,t,u]=sim(c,4,0,o)

Differences from MATLAB: Plain structure, no GUI status bar; ControllerInitialState is isolated per run. ShowOutputNoise and other unlisted options are unsupported. Signals use physical engineering units; noise is additive and UD is an absolute plant input.

Reference: https://www.mathworks.com/help/mpc/ref/mpcsimopt.html

These are the engine’s help pages. Each page keeps its compatibility notes. File operations are unavailable in the browser.