Hello everyone,
I have a question about the state space observer, I have programmed a state space space observer using Matlab function block but the result is odd. So if anyone can help I would appreciate it
this is the result of the state estimation.

댓글 수: 2

Sam Chak
Sam Chak 2022년 3월 9일
I think this has nothing to do with the MATLAB function block.
Most likely you have designed a state observer that destabilized the system.
Without showing your work and design, it's very difficult to provide assistance.
Hamidou Youness
Hamidou Youness 2022년 3월 10일
this is what I have done until now.

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

답변 (1개)

Sam Chak
Sam Chak 2022년 3월 11일

0 개 추천

Hi @Hamidou Youness
Thanks for adding more info. However, if you are looking for assistance, it is preferred that you share your work or part of your work, rather than relying people to extract data from the pictures. Anyhow, check this out. Your system is both controllable and observable. Now, the observed-state feedback control system is stable. Hope this answer helps!
% state matrix
A = [0 0 1 0; ...
0 0 0 1; ...
0 1.962 0 0; ...
0 5.886 0 0]
% input matrix
B = [0; 0; 0; 0.1]
% output matrix
C = [1 0 0 0]
% desired poles for computing the controller gain matrix K
pc = [-0.5+i -0.5-i -0.75 -1];
K = place(A, B ,pc)
% desired poles for computing the observer gain matrix L
po = [-5+i -5-i -5.5 -6]
L = place(A', C', po)'
% the observed-state feedback control system
sys = ss([A-B*K B*K; zeros(4, 4) A-L*C], eye(8), eye(8), eye(8));
t = 0:0.01:12;
z = initial(sys, [1; 0; 0.5; 0; 0.5; 0; 0.25; 0], t);
x1 = [1 0 0 0 0 0 0 0]*z'; % system states, x
x2 = [0 1 0 0 0 0 0 0]*z';
x3 = [0 0 1 0 0 0 0 0]*z';
x4 = [0 0 0 1 0 0 0 0]*z';
e1 = [0 0 0 0 1 0 0 0]*z'; % error states, e
e2 = [0 0 0 0 0 1 0 0]*z';
e3 = [0 0 0 0 0 0 1 0]*z';
e4 = [0 0 0 0 0 0 0 1]*z';
plot(t, x1, t, x2, t, x3, t, x4, t, e1, t, e2, t, e3, t, e4)
Results:

카테고리

도움말 센터File Exchange에서 Simulink에 대해 자세히 알아보기

제품

릴리스

R2014a

질문:

2022년 3월 9일

답변:

2022년 3월 11일

Community Treasure Hunt

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

Start Hunting!

Translated by