how to choose LQR?

Illustration
Declan - 2020-11-23T11:44:52+00:00
Question: how to choose LQR?

i am trying to use LQR controller i simulate my system and have my A and B matrix ,, used theme in m-file and use the lqr function to control this system,,, is there any way to know what is the right value for Q and R ?? i try a lot of values for them but the results give me 2 positive values and that is wrong, all values must be negative depending on the choice of the Q and R. so is there any way make me know what is the right values for them instead of try and error ?

Expert Answer

Profile picture of Kshitij Singh Kshitij Singh answered . 2025-11-20

There is no systematic method to choose Q and R. You can start with
 
 
Q=eye(n)     % n: number of states 
R=eye(m)     % m: number of inputs
Simulate your system in closed loop, then try to adjust your weighting coefficient Q and R. You have just to know, that more the weighting parameter is great, more the weighted signal is minimized.
 
You have to know, also, that you will need to insert integrators, if you want to correctly control your system


Not satisfied with the answer ?? ASK NOW

Get a Free Consultation or a Sample Assignment Review!