simulate the closed loop system response of state space model
18 次查看(过去 30 天)
显示 更早的评论
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
0 个评论
回答(1 个)
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
0 个评论
另请参阅
类别
在 Help Center 和 File 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!