How do i use LQR control in state space form?
Show older comments
I am trying to simulate the step response of the quarter car. for this i am using LQR controller. I have built the state space matrix in the form:
Xdot=AX+BU+GW;
Y = CX+DU;
Here, 'W' is the controller force and 'U' is the excitation displacement from the ground. I gave Matrices A, B, C and D matrices, where D is null matrix and C as unity. The problem is where do I put the matrix 'G' which is GAIN matrix from the controller. until now i have the following:
sys = ss(A,B,C,D);
[K,P] = lqr(A,B,Q,R,N); %where N=0
%we will obtain K and P values
sys = ss(A-B*K,B,C,D);
step(sys)
Theoretically, my G matrix is:
G = [U/m1 0; -U/m2 0];
Where must be the 'G' matrix be inputted?
Answers (3)
Azzi Abdelmalek
on 23 Aug 2016
0 votes
You have first to tell us what are the inputs and outputs of your system. Post the parameters representing your system, and post how did you use the lqr function.
1 Comment
aniket jakati
on 23 Aug 2016
Kwin
on 12 Oct 2016
0 votes
Both 'W' and 'U' are inputs to your system, however I assume that you will not be able to influence 'U', so it can be considered a disturbance. So 'G' is actually your 'B' matrix. LQR does not consider this disturbance, so you might want to use LQG instead.
duc nguyentrong
on 5 Jan 2020
0 votes
I am researching about active suspension system using LQR in matlab-simulink software to simulate. I have the code of a quarter-car model but I have a problem running. Hope everyone can point out its faults. thanks
Categories
Find more on State-Space Control Design in Help Center and File Exchange
Products
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!