Clear Filters
Clear Filters

Seeking Help to Find Kalman Decomposition Matrices

22 views (last 30 days)
I need to find the matrix for a Kalman decomposition of the following problem. It would be even better if I could obtain the symbolic matrix as well.
Specifically, I am looking for the matrices At, Bt, and Ct.
Please help me as I'm having trouble finding the correct matrices, and my thesis is incomplete without solving this issue.
Thanks!!
  2 Comments
Sam Chak
Sam Chak on 4 Oct 2023
@Edoardo Moroni, I'm not entirely clear on your approach to solving the problem and determining the Kalman Decomposition Matrices. Could you please provide a description of the system and explain why you introduce τ at ?
Edoardo Moroni
Edoardo Moroni on 4 Oct 2023
hi thanks to try to help me.
so the system is in the form
X_dot = A(x) + B
y = C(x)
just dont consider the [tau], it is there only because i screen the general problem
i need to find the At Bt Ct matrix of the decomposition of Kalman.
like :
At = T * A * T ^-1
Bt = T^-1 * B
Ct = C * T
better if i can find it in symbolic value

Sign in to comment.

Answers (1)

Sam Chak
Sam Chak on 5 Oct 2023
A Kalman decomposition of the system can be obtained by using the minreal() function as follows:
% Parameters
m1 = 1;
m2 = 1;
m3 = 1;
k0 = 1;
% State-space system
A21 = [-k0/m1 k0/m1 0;
k0/m2 -2*k0/m2 k0/m2;
0 k0/m3 -k0/m3];
A = [zeros(3) eye(3);
A21 zeros(3)];
B = [1/m1 zeros(1,5)]';
C = [1 zeros(1,5)];
D = 0;
sys = ss(A, B, C, D)
sys = A = x1 x2 x3 x4 x5 x6 x1 0 0 0 1 0 0 x2 0 0 0 0 1 0 x3 0 0 0 0 0 1 x4 -1 1 0 0 0 0 x5 1 -2 1 0 0 0 x6 0 1 -1 0 0 0 B = u1 x1 1 x2 0 x3 0 x4 0 x5 0 x6 0 C = x1 x2 x3 x4 x5 x6 y1 1 0 0 0 0 0 D = u1 y1 0 Continuous-time state-space model.
% Kalman decomposition, where T is the transformation matrix
[sysr, T] = minreal(sys)
1 state removed. sysr = A = x1 x2 x3 x4 x5 x1 0.1925 -1 0.7698 5.551e-17 -0.7698 x2 0.3333 2.996e-65 -0.6667 1.245e-64 -0.3333 x3 -0.9623 2 -0.3849 -1 0.3849 x4 0.3333 2.996e-65 0.3333 1.245e-64 0.6667 x5 0.3849 1 -0.1925 -1 0.1925 B = u1 x1 0.5774 x2 5.19e-65 x3 0.5774 x4 2.157e-64 x5 -0.5774 C = x1 x2 x3 x4 x5 y1 0.5774 5.19e-65 0.5774 2.157e-64 -0.5774 D = u1 y1 0 Continuous-time state-space model.
T = 6×6
0.5774 -0.0000 -0.0000 -0.6667 0.3333 0.3333 0.0000 1.0000 -0.0000 0.0000 0.0000 0.0000 0.5774 -0.0000 -0.0000 0.3333 -0.6667 0.3333 0.0000 -0.0000 1.0000 0.0000 0.0000 0.0000 -0.5774 0.0000 0.0000 -0.3333 -0.3333 0.6667 0 0.0000 0.0000 -0.5774 -0.5774 -0.5774
% Check by manually transforming the original matrices
At = T*A*T';
Bt = T*B;
Ct = C*T';
Dt = D;
Ksys = ss(At, Bt, Ct, Dt)
Ksys = A = x1 x2 x3 x4 x5 x6 x1 0.1925 -1 0.7698 5.551e-17 -0.7698 -0.3333 x2 0.3333 2.996e-65 -0.6667 1.245e-64 -0.3333 -0.5774 x3 -0.9623 2 -0.3849 -1 0.3849 -0.3333 x4 0.3333 2.996e-65 0.3333 1.245e-64 0.6667 -0.5774 x5 0.3849 1 -0.1925 -1 0.1925 0.3333 x6 8.919e-65 1.11e-16 3.729e-65 -1.11e-16 1.265e-64 -1.545e-64 B = u1 x1 0.5774 x2 5.19e-65 x3 0.5774 x4 2.157e-64 x5 -0.5774 x6 0 C = x1 x2 x3 x4 x5 x6 y1 0.5774 5.19e-65 0.5774 2.157e-64 -0.5774 0 D = u1 y1 0 Continuous-time state-space model.
  4 Comments
Edoardo Moroni
Edoardo Moroni on 2 Nov 2023
thanks for helping me!
i only changed the C in the Matlab code that u sent me.
but i'm thinking that maybe my system is wrong, can u check if my matrix (A,B,C,D) are correct?
m1 = 1
m2 = 1
m3 = 1
k0 = 1
i have to find the matrix of the space rappresentation of this sistem
Sam Chak
Sam Chak on 2 Nov 2023
Can you include matrices in MATLAB code? This will allow me to compare it line by line with the code in my Answer and identify any mistakes you may have made.

Sign in to comment.

Products


Release

R2023a

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!