# how to solve the equation: Exdot=AX+Bu; with E is a singular matrix ? thank you

3 views (last 30 days)
khawla mrad on 2 Feb 2023
Edited: Sam Chak on 2 Feb 2023
Exdot=AX+Bu; with E is a singular matrix ?
Walter Roberson on 2 Feb 2023
see mass matrix options in odeset()

Sam Chak on 2 Feb 2023
Edited: Sam Chak on 2 Feb 2023
If your system is linear, then try using dss() command. See example below:
If the system are nonlinear, then you need to specify 'MassSingular' and 'maybe', or 'yes' in the odeset().
A = [0 1; -1 -2]
A = 2×2
0 1 -1 -2
B = [0; 1]
B = 2×1
0 1
C = [1 0]
C = 1×2
1 0
D = 0;
E = [2 4; 4 8]
E = 2×2
2 4 4 8
rank(E) % Rank of matrix E is less than 2
ans = 1
inv(E)
Warning: Matrix is singular to working precision.
ans = 2×2
Inf Inf Inf Inf
% Descriptor state-space system
sys = dss(A, B, C, D, E)
sys = A = x1 x2 x1 0 1 x2 -1 -2 B = u1 x1 0 x2 1 C = x1 x2 y1 1 0 D = u1 y1 0 E = x1 x2 x1 2 4 x2 4 8 Continuous-time state-space model.
% Step Response
step(sys) ##### 2 CommentsShowHide 1 older comment
Sam Chak on 2 Feb 2023