필터 지우기
필터 지우기

simulate the closed loop system response of state space model

조회 수: 13 (최근 30일)
Mahdieh Gerami
Mahdieh Gerami 2017년 9월 4일
답변: Mark Schwab 2017년 9월 6일
Hi all, I am new to matlab and I am trying to write a code to simulate a closed loop system response. The state space model matrices are as below: A= [0 1 0;0 0 1; 24 14 -1]; B=[0;0;1]; C=[2 -1 1]; To stabilize the system poles will be located at −5 ± j5 and −10 and observer poles at −20, −20.1 and −20.1. If x1(0) = x2(0) = x3(0) = 3 , how do I simulate the closed loop signal with matlab code?
I assume I have to plot the estimate of x ?!
x_est=x_est+(A*x_est +B*u+ kob*(y-r-(C*x_est)))*Delta; Delta is the sampling rate and r is the reference signal.
I have done the controller gain as [ 524 164 19 ] and the observer gain as kob=[-48.4230; 188.3611; 344.4071] I just don't know how to plot the estimate now :(
Thanks

답변 (1개)

Mark Schwab
Mark Schwab 2017년 9월 6일
Hey Mahdieh,
There are many ways to plot responses to state space models in MATLAB. Many of these involve creating a system object and plotting the system object with an appropriate function. I believe the following documentation includes examples that are related to your workflow:
https://www.mathworks.com/help/control/examples/plotting-system-responses.html
Also, the "lsim" function is a pretty versatile function for controls in MATLAB that simulates the time response of dynamic systems. I would recommend looking into this function if you plan on continuing to work with controls in MATLAB. I have included the documentation below:
https://www.mathworks.com/help/control/ref/lsim.html
Mark Schwab

카테고리

Help CenterFile Exchange에서 Get Started with Control System Toolbox에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by