how to design LQR controller with time-variable parameters ?

12 vues (au cours des 30 derniers jours)
shayan taherian
shayan taherian le 8 Fév 2016
Commenté : Thinh Do le 4 Juin 2020
hi, i am trying to design LQR controller for a system but one variable for matrix A is changing with time (it is a vector of 10001x1)so the error in matlab is matrix dimension and i heard that interpreted matlab function could be useful but still i have doubts. can anyone help me with this problem?thanks
  1 commentaire
Michael Hubatka
Michael Hubatka le 10 Fév 2016
Please state your question more precisely.
  • Are you looking for a single controller that stabilizes all your plants?
  • Are you familiar with lqr from the control systems toolbox?
  • Are you trying to solve an optimal control problem?

Connectez-vous pour commenter.

Réponse acceptée

Sebastian Castro
Sebastian Castro le 11 Fév 2016
Yes, a MATLAB Function block would indeed do the trick. Suppose you make a function:
function output = myLQR(error,param)
Where param is the the value of that one element of A (let's say, A(5,5)) passed in as a time-varying signal to the MATLAB function. So, in the function, you can say something like:
A(5,5) = param;
Then, the command to design an LQR contoller given A and B matrices, and Q/R/N noise covariance matrices, is as follows (or look at the lqr documentation for other ways to call it).
K = lqr(A,B,Q,R,N)
Finally, you want to multiply the resulting K matrix with your error signal, and that's your control law!
output = K*error;
- Sebastian
  1 commentaire
Thinh Do
Thinh Do le 4 Juin 2020
No it does not, when I use the block, it appears that the function lqr() is not supported in the MATLAB Function block.

Connectez-vous pour commenter.

Plus de réponses (0)

Produits

Community Treasure Hunt

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

Start Hunting!

Translated by