Você está na página 1de 31

Desain Kendali Robust dengan Struktur MIMO

+
r1 y1
_
+ K P
r2 y2
_

r1 + y1
_
K P y2
r2

Persamaan MIMO Dinamika Motor-Lengan Platform Yaw-Pitch

𝑞̇ −5.422 0.1107 𝑞1 0.0006853 0.003407 𝜔1𝑟


[ 1] = [ ] [𝑞 ] + [ ] [𝜔 ]
𝑞̇ 2 −0.1336 −5.83 2 0.003944 −0.0007869 2𝑟

𝜔1 327.33 1399.3 𝑞1
[𝜔 ] = [ ][ ]
2 1542.9 −314.49 𝑞2

Persamaan Dinamik Yaw-Pitch dan Pixel Kamera

𝑞̇ 1 −5.422 0.1107 0 0 𝑞1 0.0006853 0.003407


𝑞̇ 0.1107 −5.83 0 0 𝑞2 0.003944 −0.0007869 𝜔1𝑟
[ 2] = [ ][ ] + [ ] [𝜔 ]
𝑢̇ 1542.9𝑓 −314.49𝑓 0 0 𝑢 0 0 2𝑟
𝑣̇ −327.33𝑓 −1399.3𝑓 0 0 𝑣 0 0
𝑞1
𝑢̇ 0 0 1 0 𝑞2
[ ]=[ ][ ]
𝑣̇ 0 0 0 1 𝑢
𝑣
Dengan Weighting Function

W1 z1

W2 z2

W3 z2

+
e u
r K P y
_

Dengan Weighting Function dan Output Multiplicative Uncertainty

W1 z1

W2 z2

W3 z2
Wp D
+
e u +
r K Po y
_ +
H-infinity dengan Mixed Sensitivity

Wp = 0.5;

Delta1 = ultidyn('Delta',[1 1]);


Delta2 = ultidyn('Delta',[1 1]);

Delta_Unc = [(1 + Wp*Delta1) 0; 0 (1 + Wp*Delta2)];

%MIMO Output Multiplicative


P_unc = Delta_Unc*Po;

WeM = We*eye(2);
WuM = Wu*eye(2);
W3M = W3*eye(2);

[K,CL,GAM] = mixsyn(P_unc,We,Wu,W3)

T = feedback(Po*K, eye(2));

%% step response setelah mendapatkan K


figure(2)
step(T)

figure(3)
S = feedback(eye(2), Po*K);
R = K*S;
T = 1-S;

sigma(T,'b',R,'r',S, 'g',1/W3,'b-.',1/Wu,'r-.',1/We,'g-.',{1e-3,1e5})
legend('T','R','S','1/W3','1/W2','1/W1','Location','SouthWest')
Output MATLAB

GAM =

0.245659722144612

K =

a =
x1 x2 x3 x4 x5 x6
x1 -0.004567 -2.165e-19 1.01e-12 -1.641e-17 0 0
x2 -1.159e-20 -0.004567 -8.765e-16 1.01e-12 0 0
x3 -5.5e-14 -2.031e-20 -90.91 -2.996e-16 0 0
x4 -4.081e-21 -5.5e-14 -6.021e-17 -90.91 0 0
x5 0.0649 -0.01463 -6.039e-06 2.284e-05 -148 -0.3796
x6 -0.01442 -0.06979 -7.021e-05 -0.0002074 -0.8004 -142.7
x7 -6.25e-13 -2.308e-19 -9.22e-09 -3.404e-15 6.943e+05 -1.415e+05
x8 -4.638e-20 -6.25e-13 -6.842e-16 -9.22e-09 -1.473e+05 -6.297e+05

x7 x8
x1 -5.001e-07 1.922e-18
x2 9.889e-17 -5.001e-07
x3 8 2.258e-17
x4 4.538e-18 8
x5 -0.009283 0.002092
x6 0.002068 0.009998
x7 7.531e-10 2.566e-16
x8 5.157e-17 7.531e-10

b =
u1 u2
x1 2.117 9.552e-20
x2 -4.245e-21 2.117
x3 -1.287e-10 -4.751e-17
x4 -9.547e-18 -1.287e-10
x5 1.075e-33 -6.505e-34
x6 -7.43e-33 2.057e-33
x7 -1.462e-09 -5.398e-16
x8 -1.085e-16 -1.462e-09

c =
x1 x2 x3 x4 x5 x6
x7
y1 0.03304 -4.214 -0.004123 -0.01164 -1934 -7890 -
0.004386
y2 4.494 -0.1673 0.0004106 0.003925 -9495 1553 -
0.6428

x8
y1 0.6036
y2 0.02364

d =
u1 u2
y1 0 0
y2 0 0

Continuous-time state-space model.

Weighting Function Design

E_s = 1e-2; %Minimum Value 10e-4 (10e-1, error ss besar


M_s = 3; %Maximum Peak Gain 4 (semakin kecil respon lambat, semakin besar
respon cepat) kalo 3 ada osilasi
wb_s = 0.5; %Bandwidth 0.5, semakin besar respon cepat

We = tf([1/M_s wb_s],[1 wb_s*E_s]);%(((s/M_s)+wb_s)/(s+wb_s*E_s));

% limit control signal/energy


Wu = 1*tf(1,1); %1e-2 (ketika 1 dapat lumayan baik), makin besar maka sinyal
terkendali kurang dari 1/nilaigain, respon lambar

E_c = 1.1; % Minimum Value 10e-4 (10e-1, error ss besar


M_c = 5; % Maximum Peak Gain 4 (semakin kecil respon lambat, semakin besar
respon cepat) kalo 3 ada osilasi
wb_c = 100; % Bandwidth 0.5, semakin besar respon cepat

W3 = tf([1 wb_c/M_c],[E_c wb_c]);%(((s/M_s)+wb_s)/(s+wb_s*E_s));

Tahapan Desain Kendali

1. Pemodelan
2. Identifikasi Sistem
3. Desain Kendali Robust
4. Order reduksi
5. Diskrititsasi
H-infinity dengan Mixed Sensitivity

Hasil Simulasi dengan Perbedaan Weighting Function

M=3
K_mimo_dis =

a=
x1 x2 x3 x4
x1 -0.007093 -0.0001077 -0.01619 0.0002263
x2 0.0001101 -0.008682 0.0004321 0.0166
x3 0.01619 0.0001252 0.03696 -0.0002859
x4 -6.338e-05 -0.0166 0.0002008 0.03174

b=
u1 u2
x1 0.002889 -0.0009558
x2 -0.001078 -0.003144
x3 -0.00802 0.002581
x4 -0.00252 -0.007869

c=
x1 x2 x3 x4
y1 -1.84 -5.204 0.001841 0.07155
y2 -5.941 1.611 -0.07418 -0.01903

d=
u1 u2
y1 -6.248e-05 -0.02209
y2 0.02278 -0.0005973

M=4

K_mimo_dis =

a=
x1 x2 x3 x4
x1 -0.05076 0.0005206 0.0721 0.00145
x2 -0.0005437 -0.05856 0.002014 -0.07607
x3 -0.07212 -0.0001859 0.09808 0.0009316
x4 -0.0005701 0.07608 -0.000783 0.09134

b=
u1 u2
x1 0.006073 -0.002025
x2 0.002116 0.006193
x3 0.01388 -0.004401
x4 -0.004326 -0.01369

c=
x1 x2 x3 x4
y1 -1.18 3.557 0.01285 0.09214
y2 -3.796 -1.105 0.09042 -0.02274

d=
u1 u2
y1 -9.783e-05 -0.03209
y2 0.0331 -0.0008652

Sample time: 0.035 seconds

M=5
K_mimo_dis =

a=
x1 x2 x3 x4
x1 -0.1356 0.001619 -0.1944 0.005163
x2 -0.001668 -0.1422 -0.006373 -0.2007
x3 0.1944 0.001798 0.2166 -0.002265
x4 -0.002559 0.2008 0.00225 0.2131

b=
u1 u2
x1 0.00781 -0.002638
x2 0.002662 0.007657
x3 -0.02029 0.006322
x4 -0.006186 -0.0199

c=
x1 x2 x3 x4
y1 -0.9365 2.883 -0.01944 0.1154
y2 -3 -0.8994 -0.112 -0.02701

d=
u1 u2
y1 -7.747e-05 -0.041
y2 0.04242 -0.001144

Sample time: 0.035 seconds


Discrete-time state-space model.
Desain Kendali dengan Mu Synthesis

W1 z1

W2 z2

W3 z2
Wp D
+
e u +
r K Po y
_ +

Uncertainty pada Plant

Weighting Function

E_s = 1e-2; %Minimum Value 10e-4 (10e-1, error ss besar


M_s = 2; %Maximum Peak Gain 4 (semakin kecil respon lambat, semakin besar respon
cepat) kalo 3 ada osilasi
wb_s = 0.5; %Bandwidth 0.5, semakin besar respon cepat

We = tf([1/M_s wb_s],[1 wb_s*E_s]);%(((s/M_s)+wb_s)/(s+wb_s*E_s));


% limit control signal/energy
Wu = 1*tf(1,1); %1e-2 (ketika 1 dapat lumayan baik), makin besar maka sinyal
terkendali kurang dari 1/nilaigain, respon lambar

E_c = 1.1; % Minimum Value 10e-4 (10e-1, error ss besar


M_c = 5; % Maximum Peak Gain 4 (semakin kecil respon lambat, semakin besar
respon cepat) kalo 3 ada osilasi
wb_c = 100; % Bandwidth 0.5, semakin besar respon cepat

W3 = tf([1 wb_c/M_c],[E_c wb_c]);%(((s/M_s)+wb_s)/(s+wb_s*E_s));

MATLAB

Wp = 0.5;
Delta = ultidyn('Delta',[1 1]);

Delta1 = ultidyn('Delta',[1 1]);


Delta2 = ultidyn('Delta',[1 1]);

Delta_Unc = [(1 + Wp*Delta1) 0; 0 (1 + Wp*Delta2)];


% P_unc = (eye(2) + Wp*Delta)*Po;

% MIMO Output Multiplicative


P_unc = Delta_Unc*Po;

WeM = We*eye(2);
WuM = Wu*eye(2);
W3M = W3*eye(2);

systemnames = 'P_unc WeM WuM W3M';


inputvar = '[ ref(2) ; control(2)]';
outputvar = '[ WeM; WuM; W3M; ref - P_unc]';
input_to_P_unc = '[ control ]';
input_to_WeM = '[ ref - P_unc]';
input_to_WuM = '[ control ]';
input_to_W3M = '[ P_unc ]';
sysoutname = 'P';
cleanupsysic = 'yes';
sysic

%% Mu Synthesis

nmeas = 2;
ncont = 2;

fv = logspace(-2,4,100);

opt = dkitopt('FrequencyVector',fv, ...


'DisplayWhileAutoIter','on', ...
'NumberOfAutoIterations',4);

[K_mu,CL_mu,bnd_mu,dkinfo] = dksyn(P,nmeas,ncont,opt);
K = K_mu;

Output MATLAB

Iteration Summary
-----------------------------------------------------------
Iteration # 1 2 3 4
Controller Order 8 8 12 12
Total D-Scale Order 0 0 4 4
Gamma Acheived 1.204 1.472 0.794 0.675
Peak mu-Value 0.799 1.091 0.726 0.674

Next MU iteration number: 5

K =

a =
x1 x2 x3 x4 x5 x6
x1 -2.002e+04 -0.01109 4.509e-12 1.43e-11 -0.002237 4163
x2 -0.01463 -1.873e+04 1.706e-11 -5.62e-12 -3770 0.003045
x3 -0.008982 -0.04557 -219.2 0.9557 -0.02748 0.005854
x4 -0.05102 0.01236 0.9991 -220.2 0.006879 0.03078
x5 0.07253 223.5 6.943e+05 -1.415e+05 44.99 -0.0151
x6 -224.8 -0.05321 -1.473e+05 -6.297e+05 -0.01073 46.73
x7 2.503e-15 1.371e-12 -8.686e-25 2.424e-25 2.761e-13 -5.205e-16
x8 2.927e-13 -1.437e-15 -6.837e-26 1.377e-26 -2.894e-16 -6.084e-14
x9 0.009537 11.14 -1.359e-12 7.281e-13 9.988 -0.002106
x10 -11.12 -0.00884 7.55e-14 -3.818e-12 -0.001905 10.05
x11 38.07 -0.02032 -9.32e-12 -1.334e-11 -0.004703 -8.987
x12 -0.01519 36.28 -2.348e-11 7.105e-12 8.316 0.003735

x7 x8 x9 x10 x11 x12


x1 1.078e-16 -2.247e-16 -3.264e-06 -0.03516 -0.0107 -5.545e-07
x2 2.831e-13 -6.752e-18 0.03387 2.125e-06 -8.268e-07 -0.01073
x3 0.0748 -0.01612 0.005516 -0.001237 0.008298 0.03948
x4 -0.01783 -0.08101 -0.001347 -0.006367 0.04203 -0.009481
x5 -1.406e-12 3.354e-17 -0.1683 -1.055e-05 4.107e-06 0.05332
x6 5.184e-16 -1.063e-15 -1.57e-05 -0.1691 -0.05147 -2.667e-06
x7 -0.005 1.466e-27 -1.142e-15 1.369e-18 4.508e-19 2.22e-16
x8 8.576e-21 -0.005 9.331e-19 -7.393e-18 2.22e-16 -2.639e-19
x9 -7.016e-14 1.764e-18 -92.65 -0.0009886 -0.0002882 -19.22
x10 6.473e-17 -7.528e-17 -0.0009508 -92.71 18.6 0.000302
x11 9.748e-17 -6.023e-16 -0.00492 -12.62 -10.01 -0.004989
x12 -2.286e-13 5.587e-18 11.76 0.004901 -0.003973 -9.847

b =
u1 u2
x1 -7.384e-06 -0.4332
x2 0.4191 -5.427e-06
x3 -2.039e-23 -3.481e-23
x4 2.968e-23 1.397e-23
x5 -2.082 2.696e-05
x6 -3.552e-05 -2.084
x7 25.73 1.76e-17
x8 1.111e-17 25.73
x9 -23.29 -0.01203
x10 -0.0119 -24
x11 -0.06009 -128.3
x12 120.2 0.05821

c =
x1 x2 x3 x4 x5 x6
y1 -0.2515 0.008671 -228.5 -1015 0.002525 0.1522
y2 -0.0006523 -0.2617 -1173 208.9 -0.1572 0.00278

x7 x8 x9 x10 x11 x12


y1 -0.002615 -0.4014 -0.0003454 -0.03151 0.2082 -0.001726
y2 0.4272 -0.01121 0.03153 -0.0007184 0.00546 0.2255

d =
u1 u2
y1 0 0
y2 0 0

Continuous-time state-space model.


Reduksi Orde 8
Reduksi Orde 4

Kred =

a =
x1 x2 x3 x4
x1 -224.5 120.1 7.47 -2.312
x2 -120.3 -0.9415 15.39 6.68
x3 -6.041 13.49 -225.3 -120.6
x4 -1.483 -6.683 120.7 -0.03659

b =
u1 u2
x1 -5.706 2.26
x2 -0.1924 -0.3406
x3 2.232 5.592
x4 -0.06696 -0.03459

c =
x1 x2 x3 x4
y1 -2.163 0.3804 -5.626 -0.07023
y2 -5.743 -0.09105 2.144 -0.02735

d =
u1 u2
y1 0 0
y2 0 0

Continuous-time state-space model.


Diskritisasi

K_mimo_dis =

a =
x1 x2 x3 x4
x1 -0.04969 0.0542 0.002575 -0.001537
x2 -0.05419 0.0511 0.006352 0.002876
x3 -0.003343 0.006419 -0.0486 -0.054
x4 -0.0002443 -0.003169 0.05399 0.05225

b =
u1 u2
x1 -0.003103 0.0008104
x2 0.0441 -0.01755
x3 0.003951 0.001829
x4 0.01693 0.04326

c =
x1 x2 x3 x4
y1 -2.163 0.3804 -5.626 -0.07023
y2 -5.743 -0.09105 2.144 -0.02735

d =
u1 u2
y1 0 0
y2 0 0

Sample time: 0.035 seconds


Discrete-time state-space model.
Model Uncertainty
1. Modelling Sistem
2. Identifikasi Sistem dengan struktur MIMO
3. Membangun Uncertainty Model
4. Desain Spesifikasi (Weighting Function)
5. Desain Kendali : H-Infinity Mixed Sensitivity
6. Analisa Stabilitas dan Performance 1
7. Desain Kendali : Mu Synthesis
8. Analisa Stabilitas dan Performance 2
9. Diskritisasi
10. Implementasi

Building Model Uncertainty

1. Time delay antara sinyal kendali ke sistem (T berkisar 0 - 0.1 detik) : Additive Perturbation
2. Noise pada bagian Input (Low Pass) : Input Multiplicative Perturbation
3. Noise pada bagian output (High Pass) : Output Multiplicative Perturbation

Pertubration at Pertubration at
low frequency high frequency

e-sq P
Time delay
uncertainty

WI D Wo D
+ + +

+ +
+

WI D
+
Po +
Wo D
+

+ +
+

Wa D

Wa D
Model dengan Uncertainty Time Delay

Designing Time Delay, dengan T = [0, 0.1] detik

Wp_add =

From input 1 to output...


3.456e-08 s^2 + 0.003342 s + 197.9
1: ----------------------------------
s^2 + 20.7 s + 242.1

5.608e-07 s^2 + 0.06782 s + 6736


2: --------------------------------
s^2 + 24.94 s + 120.4

From input 2 to output...


5.608e-07 s^2 + 0.06782 s + 6736
1: --------------------------------
s^2 + 24.94 s + 120.4

2.386e-11 s^2 + 8.082e-05 s + 13.37


2: -----------------------------------
s^2 + 18.14 s + 61.76
Time Delay Uncertainty [0, 0.1] s
S. Skogestad and I. Postlethwaite, Multivariable feedback control: analysis and design, 2. ed.,
reprint. Chichester: Wiley, 2009.
Input-Output Multiplicative Uncertainty
ro = 0.2; %relative uncertainty at steady state
tau = 0.1; %(1/tau) (approx) the freq where the relative unc. reach 100%
ro_inf = 0.05; %the magnitude of the weight at higher freq
wI = tf([tau ro],[tau/ro_inf 1]);

ro = 0.05; %relative uncertainty at steady state


tau = 0.01; %(1/tau) (approx) the freq where the relative unc. reach 100%
ro_inf = 1; %the magnitude of the weight at higher freq
wO = tf([tau ro],[tau/ro_inf 1]);

Bobot pada Input Bobot pada Output

wI = wO =

0.1 s + 0.2 0.01 s + 0.05


----------- -------------
2 s + 1 0.01 s + 1

.
Input Multiplicative

Output Multiplicative

Input Multiplicative + Output Multiplicative


Additive dan Input-Output Uncertainty

Input Multiplicative : 𝑃1 = 𝑃𝑜 (𝐼 + 𝚫𝑊𝐼 )

Additive Uncertainty : 𝑃2 = 𝑃1 + 𝚫𝑊𝑎

Output Multiplicative : 𝑃𝑢𝑛𝑐 = (𝐼 + 𝚫𝑊𝑂 )𝑃𝑜

WI D Wo D
+ + +

+ +
+

WI D
+
Po +
Wo D
+

+ +
+

Wa D

Wa D

Delta = ultidyn('Delta',[1 1]);

DeltaO_1 = ultidyn('Delta',[1 1]);


DeltaO_2 = ultidyn('Delta',[1 1]);

DeltaI_1 = ultidyn('Delta',[1 1]);


DeltaI_2 = ultidyn('Delta',[1 1]);

Delta_Unc_out = blkdiag(1 + Wp_out*DeltaO_1,1 + Wp_out*DeltaO_2);


Delta_Unc_in = blkdiag(1 + Wp_in*DeltaI_1,1 + Wp_in*DeltaI_2);

% Input multiplicative perturbation


P_unc0 = Po*Delta_Unc_in;

% Additive Uncertainty
P_unc1 = P_unc0 + Wp_add*Delta;

% Output multiplicative perturbation


P_unc = Delta_Unc_out*P_unc1;
Desain Kendali

Kendali dengan H (Mixed Sensitivity)


 -Synthesis
Implementasi

Reduksi Orde Kendali

Order 28 -> Orde 10

Kendali H-Infinity : Orde 4 (dari orde 8)

BLA::Matrix<4, 4> A = { -0.10748218,0.00382015,0.37977277,-0.00551364,-


0.00381388,-0.10556845,0.00986897,0.38642600,-
0.37982532,0.00142215,0.55350720,-0.00434439,0.00275291,-
0.38646961,0.00438263,0.55375351 };

BLA::Matrix<4, 2> B = { 0.00065326,-


0.00023542,0.00027030,0.00051710,0.01065701,-0.00337455,0.00329936,0.01043080
};

BLA::Matrix<2, 4> C = { -0.99981023,3.12323612,-0.00643023,-0.06589062,-


3.23388584,-0.96512190,0.06885063,0.01364324 };

BLA::Matrix<2, 2> D = { -0.00003523,-0.02481185,0.02586520,-0.00079041 };


Kendali Mu Synthesis : Orde 10 (dari orde 28)

BLA::Matrix<10, 10> A = { -0.01641520,-0.18990571,0.00525058,-0.00351175,-


0.00205195,0.00014852,0.04141640,0.00271217,0.04596658,0.00017271,0.17905119,0.88488131,-
0.00217029,-0.00358147,-
0.00126822,0.00010192,0.02683125,0.00167801,0.05272933,0.00013434,0.00124466,-
0.00408997,0.75786483,-0.14200758,-0.00065267,0.00038252,0.00456442,-0.03016381,-
0.00349689,0.00015611,-0.00795803,0.00634817,0.13983132,0.97876097,-0.00013416,-
0.00021735,0.00223856,-0.01453715,0.00127836,0.00007037,-0.00418468,0.00287931,0.00017242,-
0.00032965,0.99984406,-0.00000540,0.00144652,-0.00018111,0.00209529,0.00005035,0.00009014,-
0.00009793,-0.00345450,0.00140070,0.00001288,0.99994946,-0.00017317,0.00051678,-
0.00022300,0.00000441,0.04186870,-0.02620548,-0.00146805,0.00334625,0.00224467,-
0.00002179,0.96961299,-0.00101594,-0.11124019,-0.00034234,0.00034266,-0.00026910,-
0.03025152,0.01448453,0.00007075,-0.00116116,-0.00046958,0.98636060,-0.01339471,0.00007849,-
0.04498488,0.05163021,-0.01224761,-0.00142524,-0.00534905,-0.00020918,0.10875956,-
0.00880072,0.31193246,-0.00045258,0.00016903,0.00004626,0.00016411,-0.00006181,-
0.00000407,0.00000429,-0.00005266,0.00008824,-0.00294892,0.99998629 };

BLA::Matrix<10, 2> B = { -0.00008265,0.00082088,-0.00042671,0.00356566,-0.00278075,-


0.00028589,-0.00002475,-0.00006345,0.00000192,-0.00003349,-0.00001385,-0.00000078,-
0.00002336,0.00032066,-0.00015074,-0.00001485,0.00003190,-0.00052738,0.00000086,0.00000030 };

BLA::Matrix<2, 10> C = { -2.20720590,-0.05007187,0.01119469,-0.00540539,-


0.00254198,0.00022747,0.04085359,0.00479602,0.14813350,0.00028063,-0.01030695,-0.01414550,-
0.36012283,-0.05041105,-0.00052656,-0.00057409,0.00480594,-0.02691062,-0.00026962,0.00013793
};

BLA::Matrix<2, 2> D = { 0.00085358,-0.00945061,0.00059599,0.00000086 };

Kode Program Pengendali dengan C++

BLA::Matrix<6, 1> x, x_1;

BLA::Matrix<2, 1> u, y;

while(1) {

Struck_Tracker.get_estimated_state(tracked_x, tracked_y,
tracked_width, tracked_height);

u(0) = tracked_x - 270.0;


u(1) = tracked_y - 270.0;

x = A*x_1 + B*u;
y = C*x + D*u; //y : Control signal

x_1 = x;
}
Kendali dengan H Infintiy

Perbandingan Weighting Function (Gain Margin)


Tc = 0.035 s
400

350

300

250

200

150

100

50

0
0 0.5 1 1.5 2 2.5 3

Series1 Series2 Series3

Perbandingan Weighting Function (Gain Margin)


Tc = 0.01 s
450

400

350

300

250

200

150

100

50

0
0 0.5 1 1.5 2 2.5 3

Series1 Series2 Series3


Mu Synthesis

Hasil  Synthesis
400

350

300

250

200

150

100

50

0
0 0.5 1 1.5 2 2.5 3
Series1 Series2 Series3

Você também pode gostar