lsim closed controlled loop confusion
4 ビュー (過去 30 日間)
古いコメントを表示
Hey, I am a bit confused regarding lsim inputs. I wish to simulate a closed loop feedback full state controller
I am using 'space state' dynamic representation
and calculated K value to ensure Controllability
basically:
x'=Ax+Bu , y=Cx
u=-Kx
when defining the ss model:
sys_cl = ss(A-B*K,B,C,0);
but for the lsim function I need to define an already known input vector u to satisfy:
lsim(sys_cl,u,t,x0);
So on one hand I wish "u" to be defined as -Kx (adjust itself depending on the output).
on the other hand - I define a pre-known u value for the simulation
what am I missing...?
0 件のコメント
採用された回答
Robert U
2018 年 7 月 9 日
Hi Daniel Grebler,
In order to simulate the time response of your controlled system you need to define the system ( sys_cl), a time grid ( t ), and a target value ( u ). You define an initial state of your system by supplying ( x0 ).
See first example in Matlab documentation:
Kind regards,
Robert
2 件のコメント
Robert U
2018 年 7 月 10 日
編集済み: Robert U
2018 年 7 月 10 日
Hi Daniel Grebler,
Documentation is stating that ( u ) is an input of function lsim() and input of your system. Depending on the system you simulate it might be an input of dimension n >= 1 . Depending on the system model it can be any sort of input of your system.
You wrote you would like to simulate the closed-loop system response of your control system. Without having any details of the scope of your simulation I assumed, that you would like to see how system response is estimated on certain target values. Thus, your system should be described in a way that target value becomes the input of your system.
For other scopes it might be the system response on noise in your sensor path.
Kind regards,
Robert
その他の回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!