Problem with ctrbf() and its answer

조회 수: 7 (최근 30일)
naiva saeedia
naiva saeedia 2024년 12월 8일
댓글: Paul 2024년 12월 8일
Hi guys. I have this state-space system and I want to seprate the controllable and uncontrollable parts of this system hence I used ctrbf() my problem is the output doesn't define what is the Ac(Controllable part) and what is the Auc(Uncontrollable part) is..I have tried this code with the k but the problem is Ac and Bc controllablity matrix is not full rank this shows I didn't find Ac and Bc correctly.
%% Staircase controllability form by using ctrbf()
A=[-2 0 0;0 -2 0;0 0 4];
B=[0 0;0 1;1 0];
C = eye(size(A)); %Dummy C matrix :)
[A_bar, B_bar,C_bar,T,k] = ctrbf(A,B,C);
%Extract controllable and uncontrollable subspaces
nc = sum(k);
A_c = A_bar(1:nc, 1:nc); %Controllable part of A
B_c = B_bar(1:nc, :); %Controllable input
A_u = A_bar(nc+1:end, nc+1:end); %Uncontrollable part of A
disp("The controllable part of A is: ")
The controllable part of A is:
disp(A_c)
-2 0 0 -2
disp("The uncontrollable part of A is: ")
The uncontrollable part of A is:
disp(A_u)
4
disp("The controllable B is: ")
The controllable B is:
disp(B_c)
0 0 0 1
Co_staircase = ctrb(A_c, B_c);
if rank(Co_staircase) == rank(A_c)
disp("The controllable sepration was correct")
else
disp("The controllable sepration is not correct")
end
The controllable sepration is not correct
Anyone can help me to correctly find A_c, A_u and B_c??
  댓글 수: 8
naiva saeedia
naiva saeedia 2024년 12월 8일
편집: naiva saeedia 2024년 12월 8일
I have checked your answer but are you sure the controllable part is +4 and the matrix with -2s is uncontrollable part? +4 is an unstable pole in this system how it can be controllable? Also If we use minreal() which is elimanting the uncontrollable modes we will get this answer(with a dummy D which is zero in all elements):
%% Using minimal realization
A=[-2 0 0;0 -2 0;0 0 4];
B=[0 0;0 1;1 0];
C = eye(size(A)); %Dummy C matrix :)
D = zeros(size(C, 1), size(B, 2)); %Dummy D
sys = ss(A,B,C,D);
min_sys = minreal(sys)
1 state removed. min_sys = A = x1 x2 x1 -2 0 x2 0 4 B = u1 u2 x1 0 1 x2 1 0 C = x1 x2 y1 0 0 y2 1 0 y3 0 1 D = u1 u2 y1 0 0 y2 0 0 y3 0 0 Continuous-time state-space model.
so based on this the controllable part for A shouldn't be: A=[-2 0;0 4]?? also Bc should be [0 1;1 0]?? but again +4 is am unstable pole so I don't understand how minreal thinks it's controllable??
Torsten
Torsten 2024년 12월 8일
My answer is based on the documentation of "cbrtf". If you think the answer from "cbrtf" is incorrect, you should contact MATLAB support. I have no background knowledge in control theory to answer this.

댓글을 달려면 로그인하십시오.

답변 (1개)

Paul
Paul 2024년 12월 8일
Check the doc page ctrbf to see how A_bar etc. are arranged in terms of the uncontrollable and controllable portions.
  댓글 수: 2
naiva saeedia
naiva saeedia 2024년 12월 8일
I have checked that but the doc page is not helping. basically from this page I just figured out that Bc should be something like:[0 1;1 0]. The A_bar that I have claculated can have multiple options for Ac,Au and A12 in doc page since it's a 3* 3 matrix
Paul
Paul 2024년 12월 8일
Paste your current code as a comment response in this answer so we can see where things stand after all of your modifications.

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Matrix Computations에 대해 자세히 알아보기

제품


릴리스

R2024b

Community Treasure Hunt

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

Start Hunting!

Translated by