How to apply the reference target for LQR or LQG controller
Mostrar comentarios más antiguos
Hello,
I designed the LQG regulator for the system I want.
The LQG I designed leads to a state that converges to 0.
I would like to change the result so that the controller converges to a separate reference target, but this is where the problem arises.
It is very complicated to explain my system, so in the question I would like to learn how to do it through a simple example.
I wonder how to reflect the reference target through the example provided by the MATLAB site.
The code below is the initialization & setting code of the above UFO controller example.
The system is designed to converge the states with radian and rad/s information to 0, respectively.
I want to change this system so that it finally converges to a non-zero reference state.
How can I design the controller with reference state in this example?
close all
% Initial Conditions
x0 = [3; % 3 radians
0]; % 0 rad/s
% System Dynamics
A = [0 1;
0.01 0];
B = [0;
1];
C = [1 0];
D = 0;
% Control Law
Q = [1 0; % Penalize angular error
0 1]; % Penalize angular rate
R = 1; % Penalize thruster effort
K = lqr(A,B,Q,R);
% Closed loop system
sys = ss((A - B*K), B, C, D);
% Run response to initial condition
t = 0:0.005:30;
[y,t,x] = initial(sys, x0, t);
Respuesta aceptada
Más respuestas (0)
Categorías
Más información sobre State-Space Control Design en Centro de ayuda y File Exchange.
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
