How to remove LQR error ?

조회 수: 4 (최근 30일)
sara
sara 2014년 7월 28일
편집: Walter Roberson 2018년 8월 11일
I am using LQR command in matlab for getting gain of matrix
A=[-1 1;0 2];
B=[1;0];
Q=[1 0;0 1];
R=[1];
k=lqr(A,B,Q,R)
I get error Like this
Error using lqr
The "lqr" command failed to stabilize the plant or find an optimal feedback gain. To remedy
this problem:
  1. Make sure that all unstable poles of A are controllable through B (use MINREAL to check)
  2. Modify the weights Q and R to make [Q N;N' R] positive definite (use EIG to check positivity).
Is there any way to remove that error without using "minreal "command because if I use this then I am left with just 1 state(but I am using 5 states in my problem).I am changing my weights(Q and R by hit and trial method) as well to solve this problem but still fails.I will be very grateful to you if you help me out in this regard. is there any way of calculating Q and R weights for my matrix?
Can anyone help me in this regard.
  댓글 수: 1
Bilal Karaki
Bilal Karaki 2016년 7월 12일
Because your system is not completely controllable.

댓글을 달려면 로그인하십시오.

답변 (2개)

Azzi Abdelmalek
Azzi Abdelmalek 2014년 7월 28일
Your model does not have 5 states (juste 2 states),one of them is not controllable. then you can't calculate the gain k by lqr method. The only way is to use minreal.
  댓글 수: 3
sara
sara 2014년 7월 28일
My problem is that I want to know any other method(means other than minreal command) to calculate gain for my system.
sara
sara 2014년 7월 28일
I have to use other states as well in my coding and for that I want to know the gain(this is must).kindly send me answer on basis of above example so that I can solve my problem.

댓글을 달려면 로그인하십시오.


Muhammad Ali
Muhammad Ali 2014년 11월 2일
"Minreal" command should solve your problem, because any of your state makes the plant uncontrollable.
  댓글 수: 2
Azzi Abdelmalek
Azzi Abdelmalek 2014년 11월 2일
That's what I said in the above answer
Bilal sadiq
Bilal sadiq 2018년 8월 10일
편집: Walter Roberson 2018년 8월 11일
sara is clearly asking that she/he has 5 states out of it only 1 state is controllable and obviously if she/he use minreal command it will return only 1 state then how one can apply lqr ?(or some other method) say for example
x1=translational displacement
x2=translational velocity
x3=angular position
x4=angular velocity
x5=actuator output
and suppose out of all these 5 state (after using minreal) we get only 1 state (say for example x2) then what should we do??? while our main objective was to control x3
hope you get what i am and sara suppose to ask

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Matrix Computations에 대해 자세히 알아보기

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by