필터 지우기
필터 지우기

LQR regulator doesn't regulate the system

조회 수: 1 (최근 30일)
DoctorCrow
DoctorCrow 2023년 3월 21일
댓글: Sam Chak 2023년 3월 22일
Hello,
I used the function lqr to get a regulator that helps me to regulate my system.
My function is:
r = lqr(A,B,Q,R)
With this function i get a regulator that gives me two conjugate complex poles. Thus the system is not regulated, but continues to oscillate. I don't get any errors or warnings.
How can I fix this problem? .
  댓글 수: 2
Sam Chak
Sam Chak 2023년 3월 22일
Hi, in order to investigate, could you show the matrices for A, B, Q, R?
Also provide the desired settling time if you do not have any specific constraint for the control input u.
If (A, B) is controllable, then the desired settling time is sufficient for the eigenvalue design.
DoctorCrow
DoctorCrow 2023년 3월 22일
Hi,
i got the followingen matrices:
A = [0 1 0 0 ; 0 0 14.72 0 ; 0 0 0 1 ; 0 0 -3.066 0]
B = [0 ; 0.001 ; 0 ; -0.000125]
Q = [1 0 0 0 ; 0 1 0 0 ; 0 0 1 0 ; 0 0 0 1]
R = [1]
I checked, that (A,B) is controllable.

댓글을 달려면 로그인하십시오.

답변 (1개)

Sam Chak
Sam Chak 2023년 3월 22일
Your selection of and results in the closed-loop eigenvalues having negative real parts very close to zero. Consequently, although the system states converge to steady-state, they also oscillate for a much longer period of time.
A = [0 1 0 0; 0 0 14.72 0; 0 0 0 1; 0 0 -3.066 0];
B = [0; 0.001; 0; -0.000125];
Q = [1 0 0 0; 0 1 0 0; 0 0 1 0; 0 0 0 1];
R = 1;
[K1, P, e] = lqr(A, B, Q, R)
K1 = 1×4
1.0000 70.7226 4.6434 333.8955
P = 4×4
1.0e+06 * 0.0001 0.0025 0.0003 0.0120 0.0025 0.1769 0.0116 0.8491 0.0003 0.0116 0.1401 0.0557 0.0120 0.8491 0.0557 4.1219
e =
-0.0004 + 1.7510i -0.0004 - 1.7510i -0.0141 + 0.0141i -0.0141 - 0.0141i
sys1 = ss(A-B*K1, B, eye(4), 0);
step(sys1)
Increasing Q should improve the system response, as shown in the following plot.
Q = 1e7*eye(4);
[K2, P, e] = lqr(A, B, Q, R)
K2 = 1×4
1.0e+03 * 3.1623 4.9643 1.8176 7.6882
P = 4×4
1.0e+08 * 0.1570 0.0732 0.2431 0.3328 0.0732 0.1397 0.0489 0.7207 0.2431 0.0489 5.3231 0.2455 0.3328 0.7207 0.2455 5.1509
e =
-0.2486 + 1.1213i -0.2486 - 1.1213i -1.3865 + 0.0000i -2.1197 + 0.0000i
sys2 = ss(A-B*K2, B, eye(4), 0);
step(sys2)
  댓글 수: 2
DoctorCrow
DoctorCrow 2023년 3월 22일
thank u very much for your help.
Sam Chak
Sam Chak 2023년 3월 22일
You are welcome, @DoctorCrow. If you find the solution helpful, please consider accepting ✔ and voting 👍 on the answer. Thanks a bunch! 🙏

댓글을 달려면 로그인하십시오.

Community Treasure Hunt

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

Start Hunting!

Translated by