Simulink state space observer output issue
39 次查看(过去 30 天)
显示 更早的评论
Hello everyone. For my simulink state space observer system, I set up two models based on the same system. One model that doesn't use the 'state space block', and another one that uses the 'state space block'. The 'state space block' was configured (with the A, B, C, D matrices) to be the equivalent to my graphical interconnected blocks observer system model.
The output of the graphical interconnected block observer model is mostly satisfactory - except, I notice that the plotted output always spikes or rockets up to large value at the 'end time'. So if I choose a simulation end-time of 0.5 seconds, then the spike occurs at 0.5 seconds. And if I choose the simulation end time to end at 10 seconds, then the spike will occur at 10 seconds, while the general output response is satisfactory for times well below 10 seconds. Same if I were to choose an end time of 20 seconds. The spike would occur at 20 seconds.
However, for the compact 'state space block' model of the observer system. Equivalent system. The output never gets that spiking (which is good).
Woud anyone have any ideas about the reason for spiking seen only at the end-time? And anything we can try - so that the spike at the end time doesn't occur for the blocks-connected observer model? Thanks all!
4 个评论
采纳的回答
Sam Chak
2023-8-2
Hi @Kenny
See my analysis below:
A = [0 1; 0 -32]; % state matrix
B = [0; 8]; % input matrix
C = [1 0]; % output matrix
D = 0; % direct matrix
K = [256 4]; % controller gain matrix
L = [64; -4096]; % observer gain matrix
a1 = A - B*K;
a2 = B*K;
a3 = zeros(2);
a4 = A - L*C;
Aa = [a1 a2; a3 a4] % state matrix of feedback system with a controller-observer.
% Eigenvalues of the closed-loop system with observed-state feedback
eig(Aa)
As you can see, one eigenvalue has the positive real part. This explains why the trajectory is unstable.
5 个评论
Sam Chak
2023-8-2
Thanks for your clarification, @Kenny
If a4 = a1 - L*C, all eigenvalues have negative real parts. However, this theoretical stable result contradicts with the divergent behavior as seen in Simulink.
A = [0 1; 0 -32]; % state matrix
B = [0; 8]; % input matrix
C = [1 0]; % output matrix
D = 0; % direct matrix
K = [256 4]; % controller gain matrix
L = [64; -4096]; % observer gain matrix
a1 = A - B*K;
a2 = B*K;
a3 = zeros(2);
a4 = a1 - L*C; % <--- according to Kenny
Aa = [a1 a2; a3 a4]; % state matrix of feedback system with a controller-observer.
eig(Aa)
Correct me if I'm wrong. I tried substituting , but it got eliminated at the end, leading to the orignal result presented above. I believe there must be something that explains the divergent (unstable) behavior.
When Eq. (3) is subtracted from Eq. (1),
更多回答(0 个)
另请参阅
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!