Method of mss.
Compute the Jacobian of the state equations at an operating point.
Source: src/model/@mss/stateJacobian.m
J = stateJacobian(sys, stateVector, inputVector)
J = sys.stateJacobian(x, u)stateJacobian returns the first-order derivatives of the
state equation
with respect to the states and the inputs, evaluated at :
The two blocks are the
and
matrices of a local linearization; splitting J at column
nState is exactly what linearize does. The
operating point need not be an equilibrium.
The method assembles the full signal vector by scattering
and
through stateIndex and inputIndex, and
reorders the resulting columns into the same signal
order — column
is the derivative with respect to state
,
followed by the inputs. Both are needed for a model whose
structure-matrix rows are not in the natural [x; u] order:
the tensor returns one column per structure-matrix row, in row order, so
without the reorder splitting J at column
nState (which linearize does)
would mix states and inputs. For a natural layout both steps are the
identity.
The evaluation then dispatches on the tensor:
CPNTensor — the
consolidated jacobian
entry point with equationIndex = stateEquationIndex and
columnIndex = columnIndexStateEq, so only the state block’s
rows and monomial columns are differentiated.mtiTensor, e.g. TTTensor — the tensor’s
own computeStateJacobianMatrixMss.| Argument | Description |
|---|---|
sys |
The mss model. |
stateVector |
State operating point
(sys.nState × 1). |
inputVector |
Input operating point
(sys.nInput × 1; [] if the model has no
inputs). |
| Output | Description |
|---|---|
jacobianMatrix |
nState × (nState + nInput)
Jacobian
at
. |
sys = rmss(3,1,1,4);
J = sys.stateJacobian([1; 0; -1], 0.5);
A = J(:, 1:sys.nState); % state matrix
B = J(:, sys.nState+1:end); % input matrixoutputJacobian
· linearize · functionValue ·
jacobian ·
mss
MyToolbox Documentation | Generated automatically by CI/CD pipeline