linearize

Method of mdss.

Linearize an implicit MTI model around an operating point (not necessarily an equilibrium).

Source: src/model/@mdss/linearize.m

Syntax

lsys              = linearize(sys, xdot_op, x_op, u_op, y_op, z_op)
[A, B, C, D, E]   = linearize(sys, xdot_op, x_op, u_op, y_op, z_op)

Description

linearize forms a first-order Taylor approximation of the implicit system

๐Ÿ(๐ฑฬ‡,๐ฑ,๐ฎ,๐ฒ,๐ณ)=๐ŸŽ \mathbf{f}(\dot{\mathbf{x}}, \mathbf{x}, \mathbf{u}, \mathbf{y}, \mathbf{z}) = \mathbf{0}

around the operating point and returns a linear descriptor state-space model. Writing the deviations ฮ”๐ฑฬ‡,ฮ”๐ฑ,ฮ”๐ฒ,ฮ”๐ฎ\Delta\dot{\mathbf x}, \Delta\mathbf x, \Delta\mathbf y, \Delta\mathbf u, it assembles

E[ฮ”๐ฑฬ‡๐ŸŽ]=A[ฮ”๐ฑฮ”๐ฒ]+Bฮ”๐ฎ,๐ฒout=C[๐ฑ๐ฒ]+D๐ฎ, E\begin{bmatrix}\Delta\dot{\mathbf x}\\ \mathbf 0\end{bmatrix} = A\begin{bmatrix}\Delta\mathbf x\\ \Delta\mathbf y\end{bmatrix} + B\,\Delta\mathbf u, \qquad \mathbf y_\text{out} = C\begin{bmatrix}\mathbf x\\ \mathbf y\end{bmatrix} + D\,\mathbf u,

with E=โˆ’Jxฬ‡E = -J_{\dot x}, A=[JxJy]A = [\,J_x\ \ J_y\,], B=JuB = J_u, all read from the model jacobian at the operating point. Outputs are selected by the modelโ€™s stateIsOutput / algebraicIsOutput index sets; define them before linearizing or C/D are empty and a warning is issued.

With one output argument a sparss descriptor model is returned (its sample time inherited from sys.timeStepSize); with five, the raw A, B, C, D, E matrices are returned.

Note

The operating point need not be an equilibrium. Inequality constraints are ignored during linearization.

Input arguments

Argument Description
sys The mdss model.
xdot_op State-derivative / next-state operating point (sys.nState).
x_op State operating point (sys.nState).
u_op Input operating point (sys.nInput; [] if none).
y_op Algebraic operating point (sys.nAlgebraic; [] if none).
z_op Binary operating point (sys.nBinary; [] if none).

Example

sys = stringParser.symbolicToMdss(["xp1 = -2*x1 + x1*x2"; ...
                                   "xp2 = -x2 + u1"], 0);
sys.stateIsOutput = [1 2];               % both states are outputs

lsys = linearize(sys, [0 0], [1 0], 0, [], []);
% lsys is a sparss descriptor model (E, A, B, C, D)

See also

jacobian ยท mdss ยท msim


MyToolbox Documentation | Generated automatically by CI/CD pipeline