LQR for nonlinear system is running but not tracking

4 ビュー (過去 30 日間)
Kamal
Kamal 2024 年 2 月 17 日
コメント済み: Kamal 2024 年 2 月 27 日
Hello, please I need advice on what could be the possible solution to this LQR control system attached below. I have designed the LQR to be tracking reference by adding an extra state as shown in the simulink attached. However, i noticed that my system blows up even with small duration of like 10 seconds, the system output runs into more than 500,000x1 double. Also it does not track, no matter how i change the paramters including the weight on the error, or Q the weight on the states or R the weight on the control. I have tried all i could but it does not change. all i kep seeing is figure with input refernec of 1 and output 2 attached and it does not change no matter what I do. An opinoin on how to reoslve this would be appreciated. I have attached the matlab script as well to be run before running the simulink.
thank you

採用された回答

Sam Chak
Sam Chak 2024 年 2 月 17 日
I wanted to bring to your attention that the controllability matrix does not meet the requirement of full row rank. It is crucial to ensure that the controllability matrix has full rank, as this indicates that the system is controllable. It is important to address this issue before proceeding with any controller design.
run ss_LQR.m
if_xe_linear = logical
1
if_xe_linear = logical
0
C = 1x14
1 0 0 0 0 0 0 0 0 0 0 0 0 0
%% Size of Matrix A
szA = size(A)
szA = 1x2
14 14
%% Size of Matrix B
szB = size(B)
szB = 1x2
14 2
%% Rank of the Controllability Matrix
rk = rank(ctrb(A, B))
rk = 2
  3 件のコメント
Sam Chak
Sam Chak 2024 年 2 月 18 日
Applying LQR is a possible approach, but it's worth noting that out of the 14 states, only 2 states are controllable. To achieve controllability, you may need to consider augmenting the system dynamics or introducing additional control inputs, or perhaps a combination of both.
run ss_LQR.m
if_xe_linear = logical
1
if_xe_linear = logical
0
C = 1x14
1 0 0 0 0 0 0 0 0 0 0 0 0 0
%% full rank
frk = length(A)
frk = 14
%% rank of Co
Co = ctrb(A, B);
rk = rank(Co)
rk = 2
%% number of uncontrollable states
unco = frk - rank(Co)
unco = 12
Kamal
Kamal 2024 年 2 月 27 日
@Sam Chak Thank you so much. I really appreciate this.

サインインしてコメントする。

その他の回答 (0 件)

製品


リリース

R2023b

Community Treasure Hunt

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

Start Hunting!

Translated by