matlab optimal control plotting

1 visualización (últimos 30 días)
merv sabar
merv sabar el 2 de Dic. de 2020
hi, i did my code
just i need to ( Plot the time history of control gain for 30 sec) can any one help me ?
my code is :
tspan=[0,30];% time span
u=0.175; %maximum it can be 10 degree
%K is control gain
A=[-1.397,1,0,0;-5.47,-3.27,0,0;0,1,0,0;-400,0,400,0];
B=[-0.124;-13.2;0;0];
Q=[1,0,0,0
0,1,0,0
0,0,1,0
0,0,0,1];%Weighting are consider same on the states
R=2;% weighting on inputs
N=[1;1;1;1];
[K,S,e] = lqr(A,B,Q,R,N);
%K is the optimal gain

Respuestas (0)

Community Treasure Hunt

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

Start Hunting!

Translated by