About Pole locations are more than 10% in error

34 次查看(过去 30 天)
I want to make a Luenberger observer , and this is my code :
G = c2d(G2,0.004);
tf = G;
I = eye(11);
pi = 100000;
U = 1;
x0=[0;0;0;0;0;0;0;0;0;0;0];
x=zeros(11,1250);
x(:,1)=x0;
A = [0.1321 -1.287 -0.03492 -0.5931 0.02748 -0.183 0.1432 -0.07204 0.02407 -0.002951 0.0007733;
1 0 0 0 0 0 0 0 0 0 0;
0 1 0 0 0 0 0 0 0 0 0;
0 0 1 0 0 0 0 0 0 0 0;
0 0 0 1 0 0 0 0 0 0 0;
0 0 0 0 0.5 0 0 0 0 0 0;
0 0 0 0 0 0.125 0 0 0 0 0;
0 0 0 0 0 0 0.0625 0 0 0 0;
0 0 0 0 0 0 0 0.03125 0 0 0;
0 0 0 0 0 0 0 0 0.003906 0 0;
0 0 0 0 0 0 0 0 0 0.0004883 0];
B = [2;
0;
0;
0;
0;
0;
0;
0;
0;
0;
0];
C = [0.3156 -0.04226 0.4169 0.009387 0.197 -0.008443 0.4791 -0.3495 0.1721 -0.3119 0.1723];
p = [1.01 0.95 0.94 1.02 0.8 0.8 0.97 0.7 0.99 0.9 1.003 ];
L = acker(A',C',p);
data = textread('Data 0.003-4.3 [y0].txt');
y = data(:, 3);
u = data(:, 4);
k=1:1:1250;
for i=1:1250
x(:,i+1) = A*x(:,i)+B*u(i)+L'*(y(i)-C*x(:,i));
y1(i) = C*x(:,i);
end
figure(1)
plot(k,y)
figure(2)
plot(k,y1)
but i get this Warning: [Pole locations are more than 10% in error.]
could anybody teach me how to solve this problem. Thanks!

回答(1 个)

Vidhi Agarwal
Vidhi Agarwal 2024-9-26
The warning you are encountering, "[Pole locations are more than 10% in error]," suggests that the poles of the observer are not placed where you intended. This is often due to numerical issues or an ill-conditioned system matrix. Here are some resolutions to the issue:
  • Ensure that the poles you are trying to place are appropriate for the system. The poles should be stable (inside the unit circle for a discrete-time system) and sufficiently fast to ensure the observer can track the system states accurately.
  • Check the condition number of your matrices. If the condition number is too high, it indicates that your matrix is ill-conditioned, which can lead to numerical instability.  If the condition number is high, consider scaling your matrices. This can sometimes reduce numerical issues.
cond_A = cond(A);
cond_C = cond(C);
  • Ensure that the “acker function is being used correctly. This function computes the state feedback matrix for continuous systems, so ensure your system matrices are in the correct form. For discrete systems, you might consider using place instead, as it is often more robust.
L = place(A', C', p)';
For better understanding of "cond" and “place” refer to the following documentation:
Hope that Helps!

类别

Help CenterFile Exchange 中查找有关 MATLAB 的更多信息

Community Treasure Hunt

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

Start Hunting!

Translated by