Linearization of explicit and implicit MTI models

This demo shows the linearization of explicit and multilinear models. The computation of the Jacobian is showcased as part of linearization process. The outlined demo are based on [1,2].
Open Live Script in Matlab
Table of Contents

Computation of the Jacobian

The Jacobian of a multilinear models stored as a CPN1 object is computed in the following where the system parameters are
n=2e4; % number of states
r=1e1; % rank
m=0; % Number of inputs
p=1; % number of outputs
which is used to create a randomized sparse MTI model
msys=rmss(n,m,p,r); % creates a random multilinear model of class mss
We generate a random operating point
x_op=rand(n,1); % operating point x
u_op=rand(m,1); % operating point u
xop=[x_op(:);u_op(:)]; % operating point of state and input variables
and compute the Jacobian
obj=CPN1(msys.F.U,msys.F.phi); % creating a multilinear model as CPN1 class object
J=jacobian(obj,xop);

Lineariztaion of a explicit MTI models

Small-scale example

The example is an explicit continuous-time MTI model with two states and one input.
U=[0.5 -0.5; 1 0; 0 1]; % structural matrix
phi=[2 0; 4 6;]; % parameter matrix
obj=CPN1(U,phi) % Norm-1 CPN decomposed tensor
obj =
CPN1 with properties: equationCount: 2 inputCount: 1 U: [3×2 double] phi: [2×2 double]
msys=mss(obj)
msys =
mss with properties: F: [1×1 CPN1] G: [0×0 mtiTens] n: 2 m: 1 p: 0 ntype: '1' ts: 0
If the Symbolic Math Toolbox by Matlab is installed, you can uncomment the following command to show the symbolic equations of your continuous-time explicit MTI model.
%expand(symbolicEquations(msys))
Then we can linearize the eMTI model
op=struct('x',[-1;1],'u',3); % operating point
lsys=linearize(msys,op) % Linearization
Warning: No Outputs defined, assuming states as outputs.
lsys = A = x1 x2 x1 1 0 x2 -7 0 B = u1 x1 0 x2 6 C = x1 x2 y1 1 0 y2 0 1 D = u1 y1 0 y2 0 Continuous-time state-space model. Model Properties

Large-scale Example

We can generate a large random continuous sparse MTI model
n=1e5; % number of states
m=5; % Number of inputs
p=2; % number of outputs
r=1e2; % rank of the model
 
msys=rmss(n,m,p,r); % random continuous-time sparse MTI model
Then we linearize at
op=struct('x',rand(n,1),'u',rand(m,1)); % operating point
lsys=linearize(msys,op) % linearization
Sparse continuous-time state-space model with 2 outputs, 5 inputs, and 100000 states. Model Properties Use "spy" and "showStateInfo" to inspect model structure. Type "help sparssOptions" for available solver options for this model.

Linearization of implicit MTI models

For the implicit MTI model
the dmss object is created
eqs = {'0==xp1-x1*x2*y1+4';
'0==xp2-x2+2'
'0==x2-y1';};
dsys = sym2dmss(eqs, 0);
Reduced by 2 column(s) and 0 equation(s) with trivial Reduction due to duplications.
 
The operating point point, where xp=0, is:
xpop = [0; 0];
xop = [1; 2];
yop = 2;
which is stored as a |op| struct
op = struct('xp', xpop, 'x', xop,'y',yop);
Then the |dmss| is linearized at the operating point as follows:
dss = linearize(dsys, op)
Sparse continuous-time state-space model with 3 outputs, 0 inputs, and 3 states. Model Properties Use "spy" and "showStateInfo" to inspect model structure. Type "help sparssOptions" for available solver options for this model.
The result is a linear descriptor state-space model, which is a |ss| object. From the linear descriptor state-space model, the generalized eigenvalues can be computed:
if isMATLABReleaseOlderThan('R2025a') % eig did not support sparss-models in previous releases
generalizedEigenvalues=eig(full(dss))
else
generalizedEigenvalues=eig(dss)
end
generalizedEigenvalues = 2×1
4 1

References

[1] Christoph Kaufmann, Diego Crespí de Valldaura Garcia, Gerwald Lichtenberg, Georg Pangalos, and Carlos Cateriano Yáñez, "Efficient Linearization of Explicit Multilinear Systems using Normalized Decomposed Tensors," IFAC World Congress 2023, DOI: 10.1016/j.ifacol.2023.10.344
[2] C. Kaufmann, G. Pangalos, G. Lichtenberg, O. Gomis-Bellmunt, "Small-Signal Stability Analysis of Power Systems by Implicit Multilinear Models," preprint available on arXiv, 2025.