現在この質問をフォロー中です
- フォローしているコンテンツ フィードに更新が表示されます。
- コミュニケーション基本設定に応じて電子メールを受け取ることができます。
State space modelling and controller design
1 回表示 (過去 30 日間)
古いコメントを表示
can some one help me writing its state space model for implementing lqr,,,,,,,,,since we have to have xdot=Ax+Bu form but how can i get this form? A=(s+1)/(S^2+3*s+1); P=1/(s^2-10); H1=K1*(S+a)/(s+b); H2=K2*(s+c)/(s+d); H3=K3*(s+e)/(s+f); H4=K4*(s+g)/(s+h); H5=K5*(s+m)/(s+n);
19 件のコメント
Aquatris
2018 年 7 月 17 日
編集済み: Aquatris
2018 年 7 月 17 日
First forget about state-space and try to come up with the transfer function from r to theta. Than you can use tf2ss() function of Matlab to obtain state-space matrices. You also need to learn about observers in order to experimentally implement the controller, since state information is not available for most systems.
Bilal sadiq
2018 年 7 月 17 日
Thanks a lot Aquatris ,.....can you please send me some examples for this type of examples in matlab.(Actually i have confusion doing this in matlab).... hope you get what i am trying to ask
Bilal sadiq
2018 年 7 月 17 日
Aquatris..by hand i can get a single transfer function but actually my prime focus is how to do this in matlab so that i can have a state space model because my ultimate goal is to apply lqr .....
Aquatris
2018 年 7 月 17 日
編集済み: Aquatris
2018 年 7 月 17 日
Just noticed but is the C in the block diagram the lqr controller you are trying to find? I assume the block diagram is your open loop.
As for the matlab code, the feedback loop that consist of C, A and H1 can be replaced with a new block M, where the Matlab code would be;
M = feedback(series(C,A),H1,-1)
Then you can get the state-space matrices using following command;
Mss = ss(M);
A = Mss.a;
B = Mss.B;
C = Mss.c;
D = Mss.D;
or if you are using older version (and M is SISO);
[A,B,C,D] = tf2ss(cell2mat(M.num),cell2mat(M.den))
These two functions, series() and feedback() are enough to derive the transfer function from r to theta in the block diagram.
Bilal sadiq
2018 年 7 月 17 日
Aquatris,,,,,,,,,,,,,,,,"Just noticed but is the C in the block diagram the lqr controller you are trying to find" yes you are absolutely right.....but how can you say that system is open loop?Thanks for your answer...if i assume C to be unity and then transform all the transfer function given above by your method which you have just used,,,will it be justified to have my state space data A,B,C,D? hope you get what i am trying to ask?
Aquatris
2018 年 7 月 18 日
編集済み: Aquatris
2018 年 7 月 18 日
No, it won't.
To create LQR you need the open loop transfer function, meaning transfer function from the input of your system to output of your system, without any controller. As an example, if I want to control the position of a mass and have a force actuator, my open loop system would be from the force applied to the mass to position of the mass.
If C is your controller, what does H1 represent? Similarly what does A, P, H2, H3,H4, and H5 represent? I do not think your block diagram is right assuming your system is a mechanical system.
Bilal sadiq
2018 年 7 月 18 日
Dear Aquatris except P,(which is my single link inverted pendulum) all other transfer functions are the sensors feedback dynamics as already given by symbolic representation in question ........ i got your point, you are right that to design lqr we need open loop and there is no doubt that open loop dynamics will from the actuator (which is A in my block diagram) to plant (P) but now my question is I HAVE TO INTRODUCE THE SENSORS TRANSFER FUNCTION (in state space model) and then apply lqr to see how much SENSOR dynamics/parameter will effect my controlled (lqr based control system) affect the overall dynamics....... thanks in advance please send me an email i have a serious thing to ask from you hope you will surely help me with kind regards (email id: bilalsadiq670@hotmail.com)
Aquatris
2018 年 7 月 18 日
If those are sensor dynamics then why are you summing velocity measurements with acceleration measurements? You might wanna review how to derive a block diagram.
Bilal sadiq
2018 年 7 月 18 日
Please see this paper block diagram then you must know why i have use multisensors
Aquatris
2018 年 7 月 18 日
Be careful though. In the paper, the h2,h3,... are not sensor dynamics but models of muscles (simple spring/damper).
Bilal sadiq
2018 年 7 月 18 日
yes Aquatris ,..........they are the sensor dynamics with analogy of mechanical system (spring/damper) in the paper he used just spindle dynamics (sensors of human body)as gain (not the transfer function based) since muscle spindles are the position (as well velocity) sensor....but i have to modify by including semicircular canal and otolith canal which are acceleration sensor of human body whose transfer function are given above
Aquatris
2018 年 7 月 18 日
Your open loop transfer function is;
H1*A + (H4 + H5*γ)*P*A + H3*(1/s)*P*A + H2*(1/s)*(1/s)*P*A
Once you obtain this, use tf2ss() function to get state-space matrices. I hope you it is clear how I obtained the open loop transfer function.
Bilal sadiq
2018 年 7 月 18 日
Thanks but if i want to do the same thing in MATLAB,,,then how can i do it? matlab code please?
Aquatris
2018 年 7 月 18 日
Create your things as transfer functions; such as;
s = tf('s');
A = (s+1)/(s^2+3*s+1);
...
Then do;
CL = H1*A + (H4 + H5*γ)*P*A + H3*(1/s)*P*A + H2*(1/s)*(1/s)*P*A;
Bilal sadiq
2018 年 7 月 18 日
Thanks i will do this and do let you know whether it is fine or not,,,by the way thanks a lot for your such a nice and extremely awesome teaching method ,,,,there is one more question but not relevant to this topic ,,,can i ask that here too?
回答 (0 件)
参考
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!エラーが発生しました
ページに変更が加えられたため、アクションを完了できません。ページを再度読み込み、更新された状態を確認してください。
Web サイトの選択
Web サイトを選択すると、翻訳されたコンテンツにアクセスし、地域のイベントやサービスを確認できます。現在の位置情報に基づき、次のサイトの選択を推奨します:
また、以下のリストから Web サイトを選択することもできます。
最適なサイトパフォーマンスの取得方法
中国のサイト (中国語または英語) を選択することで、最適なサイトパフォーマンスが得られます。その他の国の MathWorks のサイトは、お客様の地域からのアクセスが最適化されていません。
南北アメリカ
- América Latina (Español)
- Canada (English)
- United States (English)
ヨーロッパ
- Belgium (English)
- Denmark (English)
- Deutschland (Deutsch)
- España (Español)
- Finland (English)
- France (Français)
- Ireland (English)
- Italia (Italiano)
- Luxembourg (English)
- Netherlands (English)
- Norway (English)
- Österreich (Deutsch)
- Portugal (English)
- Sweden (English)
- Switzerland
- United Kingdom(English)
アジア太平洋地域
- Australia (English)
- India (English)
- New Zealand (English)
- 中国
- 日本Japanese (日本語)
- 한국Korean (한국어)