Simulink PID Tuner can't find good solution
1 回表示 (過去 30 日間)
古いコメントを表示
I have a 6DOF Aircraft dynamics model and am trying to control it with a few PID controllers for each aspect as shown in the image 

I am trying to use the PID Tuner to find some good values for my gains, but everytime the solution just blows up as you can see. I have been able to manually tune the gains to control certain maneuovers, but am wondering why the PID Tuner App can't find some good values?

2 件のコメント
Sam Chak
2023 年 8 月 2 日
I don't think it's possible to tune all 5 PID controller blocks simultaneously. If each subsystem is fully decoupled, then I believe you can tune the corresponding PID controller one at a time.
I remember that the 6-DOF Aircraft dynamics are highly nonlinear, and the states are strongly coupled. If the 6-DOF Aircraft dynamics are linearized, could you please show the model?
採用された回答
Sam Chak
2023 年 8 月 19 日
This is a very high 16th-order coupled system. I'm not sure if it can be stablized by the PID controller. So I tried the LQR approach, and the closed-loop feedback appears to be stable.
A1 = [3.922e-06 -4.374e-06 -1.362e-05 2.882e-05 0 0 0 0; ...
6.998e-06 -7.805e-06 1.215e-05 -1.362e-05 0 0 0 0; ...
-2.247e-06 -3.395e-05 7.805e-06 4.374e-06 0 0 0 0; ...
-3.444e-05 -2.247e-06 -6.998e-06 -3.922e-06 0 0 0 0; ...
0 0 0 0 0 0 0 1; ...
0 0 0 0 0 0 0 0; ...
0 0 0 0 0 0 0 0; ...
36.66 -23.95 15.67 4.609 2.626e-06 -2.518e-05 1.362e-05 -0.07975; ...
-85.19 -79.31 -22.86 42.48 1.493e-05 -9.18e-05 4.881e-05 0.04115; ...
72.41 -5.426 26.81 -7.521 6.389e-06 -3.864e-05 1.935e-05 -0.103; ...
2.498 -14.11 2.514 4.886 6.064e-06 -3.658e-05 1.98e-05 -0.04206; ...
1.146 0.6344 0.3719 -0.4382 8.646e-07 -5.229e-06 2.827e-06 -0.0002576; ...
-2.667 4.153 -1.422 -1.213 -2.684e-06 1.623e-05 -8.777e-06 0.01655; ...
0 0 0 0 -0.0004318 0.002611 -0.001412 0; ...
0 0 0 0 -0.002879 0.01741 -0.009414 0; ...
0.03005 0.02694 -0.05243 0.09356 -5.77e-09 -3.997e-09 -5.628e-09 0];
A2 = [0 0 0.1311 0.4082 0.2288 0 0 0; ...
0 0 0.1176 0.2288 -0.4082 0 0 0; ...
0 0 -0.2288 0.1176 0.1311 0 0 0; ...
0 0 0.4082 -0.1311 0.1176 0 0 0; ...
0 0 0 0 0 0 0 0; ...
1 0 0 0 0 0 0 0; ...
0 1 0 0 0 0 0 0; ...
0.02421 -0.1031 -0.07382 0.9576 0.3644 0 0 -0.0009028; ...
-0.4573 0.1663 -0.05092 -6.056 0.2514 0 0 -0.0006227; ...
0.1807 -0.1861 -0.07159 3.32 0.3534 0 0 -0.0008755; ...
-0.05897 -0.03856 -1.856 0 0.1926 0 0 0.02236; ...
0.006346 -0.00436 0 -0.4747 0 0 0 0; ...
0.01162 0.01981 0.004665 0 -0.2395 0 0 0.001105; ...
0 0 0 0 0 0 0 0; ...
0 0 0 0 0 0 -0.01 0; ...
0 0 0 0 0 0 0 -0.1];
A = [A1 A2];
B = [0;
0;
0;
0;
0;
0;
0;
0.01426;
-0.08832;
0.04811;
0;
-0.05363;
0;
0;
0;
0];
C = [-93.56 -52.43 -26.94 30.05 -0.004312 0.02611 -0.01413 0 0 0 0 0 0 1 -0.01 0];
% LQR design
Q = 1e4*eye(length(A));
R = 1;
K = lqr(A, B, Q, R)
sys = ss(A-B*K, B, C, 0);
isstable(sys)
N = 1/dcgain(sys)
% closed-loop system
sys2 = ss(A-B*K, B*N, C, 0)
dcgain(sys2)
stepinfo(sys2)
step(sys2, 1e6), grid on
0 件のコメント
その他の回答 (0 件)
参考
カテゴリ
Help Center および File Exchange で PID Controller Tuning についてさらに検索
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!
