A, B, C, D, J, K, L, R;
states = {'theta' 'theta_dot' 'i'};
inputs = {'u'};
outputs = {'theta'};
sys_ss = ss(A,B,C,D,'statename',states,'inputname',inputs,'outputname',outputs)
poles=eig(A);
co = ctrb(sys_ss);
controllability = rank (co)
disp('masukkan nilai G, Q dan R')
G=input(' ');
Q=input(' ');
R=input(' ');
[P,s,K]=care(A,B,C'*Q*C,R);
V=[K(1) K(2) K(3)];
[P,s,L]=care(A',C',C'*Q*C,R)
L=L'
disp('Matriks P')
disp(P)
disp('Poles')
disp(s)
disp('Gain feedback')
disp(K)
disp('Gain Observer')
disp(L)
LQR_Motor_DC.zip_DC motor LQR_LQR DC motor_dc motor_lqr_lqr mat
版权申诉
192 浏览量
2022-07-14
22:35:47
上传
评论
收藏 41KB ZIP 举报
weixin_42651887
- 粉丝: 79
- 资源: 1万+