Finding out optimum Q,R matrices and an Epsilon number of a given system.

4 views (last 30 days)
Hello everyone.
I have a discrete system, a sampling interval is 0.1 sec, including a sliding mode control with A, B, C, D matrices and I want to get a gain matrics, but I cannot figure out how to calculate optimum Q,R matrices and an Epsilon number.
I would be really thankful if anybody could check out my code and tell me how to find Q,R matrices and an Epsilon number and get a desired response.
Thank you.
A=[0.4658 -0.5236 0
0.5000 0 0
0 0.5000 0];
B=[0.2500
0
0];
C=[0.0093 0.2214 -0.1554];
D=0.4152;
[n,m] = size(B);
[p,n] = size(C);
Q=[? ? ? ?];
R=?;
Epsilon=?;
Ao = [zeros(p) -C;zeros(n,p) A];
Bo = [zeros(p,m);B];
Eo = [eye(p);zeros(n,p)];
AEo = Ao+Epsilon*eye(n+p);
Qo = diag(Q);
Ro = R*eye(m);
S = dlqr(AEo,Bo,Qo,Ro); % S: gain matrics
SA = S*Ao;
SE = S*Eo;
INVSB = inv(S*Bo);
:
:

Answers (0)

Community Treasure Hunt

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

Start Hunting!