State space modelling and controller design
이전 댓글 표시

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
Bilal sadiq
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일
Bilal sadiq
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일
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일
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일
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일
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일
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일
Aquatris
2018년 7월 18일
Sure thing.
Bilal sadiq
2018년 7월 18일
답변 (0개)
카테고리
도움말 센터 및 File Exchange에서 State-Space Control Design에 대해 자세히 알아보기
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!