functionValue

Method of mss.

Evaluate the state equation at a given state and input.

Source: src/model/@mss/functionValue.m

Syntax

f = functionValue(sys, stateVector, inputVector)
f = sys.functionValue(x, u)

Description

functionValue evaluates the multilinear state equation of the model at the point (x,u)(x,u):

f=ΦFm(x,u), f = \Phi_F\, m(x,u),

where mm is the norm-1 monomial vector over the signal vector v=[x;u]v=[x;\,u] and ΦF\Phi_F is the state-equation block of the parameter matrix. What the result means follows the model’s timeStepSize: it is the state derivative ẋ\dot x for a continuous-time model and the next state xk+1x_{k+1} for a discrete-time one. Only the state equation is evaluated — use outputValue for yy.

Only the monomial columns the state block actually uses (columnIndexStateEq) and the rows stateEquationIndex are used, so the cost scales with the state block, not with the whole tensor.

Two evaluation paths exist:

On the CPN path the signal vector is assembled by scattering xx and uu through stateIndex and inputIndex — exactly as stateJacobian and outputJacobian do — so a permuted structure-matrix row layout is evaluated correctly. For the natural [x; u] layout that rmss, ss2mss and the connection routines produce, the scatter reproduces [stateVector; inputVector].

Input arguments

Argument Description
sys The mss model.
stateVector State xx at the evaluation point (sys.nState × 1).
inputVector Input uu at the evaluation point (sys.nInput × 1; [] if the model has no inputs).

Output arguments

Output Description
functionValues sys.nState × 1 vector: ẋ\dot x for a continuous model, xk+1x_{k+1} for a discrete one.

Example

sys = rmss(3,1,1,4);
xdot = sys.functionValue([1; 0; -1], 0.5);

See also

outputValue · stateJacobian · msim · mss


MyToolbox Documentation | Generated automatically by CI/CD pipeline