Observer gain matrix calculations give warning when replicated with Matlab
44 次查看(过去 30 天)
显示 更早的评论
Hi,
I am trying to replicate on Matlab an exercise on the book Modern Control Engineering of Ogata Chapter 10.7.
When using the state space values of the book I can calculate the observer gain matrix Ke. When calculating the state space values on Matlab using the tf2ss, I am getting a warning for the observer gain matrix Ke.
The transfer function, desired closed loop poles and desired observer poles are below.
Gp=tf(1, [1 0 1 0])
s1=-1+i; %Desired closed loop poles
s2=-1-i; %Desired closed loop poles
s3=-8; %Desired closed loop poles
s4=-4; %Desired observer poles
s5=-4; %Desired observer poles
J=[s1 s2 s3];
L=[s4 s5];
On the book, the state space matrix A, B, C, D is given as below. The same values I find when I manually calculate the state space matrix.
A=[0 1 0; 0 0 1; 0 -1 0]
B=[0; 0; 1]
C=[1 0 0]
Aaa=[0]
Aab=[1 0]
Aba=[0; 0]
Abb=[0 1; -1 0]
Ba=[0]
Bb=[0; 1];
K=acker(A,B,J)
Ke=acker(Abb',Aab',L')'
When calculating the state space values using the tf2ss, I get for observer gain matrix Ke a wanring “Warning: Matrix is singular to working precision” and the ouput is Ke=[Nan; Inf].
[num den] = tfdata(Gp, 'v');
[A B C D]=tf2ss(num,den)
Aaa=[0]
Aab=[-1 0]
Aba=[1; 0]
Abb=[0 0; 1 0]
Ba=[1]
Bb=[0; 0];
K=acker(A,B,J)
Ke=acker(Abb',Aab',L')'
The difference on two methods are the state space values A, B, C , D which also make different values Aaa, Aab, Aba Abb.
Any idea why I get warning when trying to calculate the observer gain matrix Ke.
0 个评论
回答(1 个)
Paul
2023-11-26
Hi NGiannis,
Here's the plant model and desired pole locations
Gp=tf(1, [1 0 1 0]);
s1=-1+i; %Desired closed loop poles
s2=-1-i; %Desired closed loop poles
s3=-8; %Desired closed loop poles
s4=-4; %Desired observer poles
s5=-4; %Desired observer poles
J=[s1 s2 s3];
L=[s4 s5];
State space realization via tf2ss
[num den] = tfdata(Gp, 'v');
[A B C D]=tf2ss(num,den);
Parttion for reduced order observer:
Aaa = A(1,1);
Aab = A(1,2:3);
Aba = A(2:3,1);
Abb = A(2:3,2:3);
Ke=acker(Abb',Aab',L')'
The problem arises because Abb and Aab are not an observable pair; the observability matrix is clearly not full rank because the second column is all zeros.
obsv(Abb,Aab)
I believe that this approach assumes that the first state is available for feedback via the output, but in this realization it's the third state that is the output
C
Compare to the C matrix in your original formulation where C(1) = 1.
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!