DENGAN METODE
TUNING PID ZIEGLER
4
4.1 Tujuan Praktikum
NICHOLS
1. Mahasiswa mampu mengontrol kestabilan respon motor pada mobile robot
menggunakan metode Tuning PID Ziegler Nichols.
2. Mahasiswa mampu menetapkan parameter PID dengan metode Tuning
Ziegler Nichols.
(Sumber : slideshare.net)
Setelah mendapatka nilai parameter Kcr dan Pcr, nilai-nilai Kp, Ti, dan Td
dapat dihitung dengan rumus mencari parameter PID untuk ZN tipe 2. Tabel 4.2
menunjukan tabel parameter PID untuk ZN tipe 2. (Fauziansyah, 2015)
Tabel 4.2 Parameter PID Untuk ZN Tipe 2
Type Of
Kp Ti Td
Controller
P 0.5Kcr ∞ 0
PI 0.45Kcr (1/1.2)Pcr 0
PID 0.6Kcr 0.5Pcr 0.125Pcr
Chart Title
250
200
150
100
50
0
21
31
46
56
61
71
76
86
91
1
6
11
16
26
36
41
51
66
81
96
101
106
111
-50
200
100
0
1
6
16
21
31
36
46
51
66
71
86
91
96
101
106
111
116
121
11
26
41
56
61
76
81
Kp 3.1 Target 100
Chart Title
150
100
50
0
16
21
31
36
61
66
81
91
1
6
11
26
41
46
51
56
71
76
86
96
101
106
111
116
-50
Kp 3.3 Target 100
#define PIN_INPUT 3
#define PIN_OUTPUT 0
//===========rotary========//
long last = 0;
int stat = 0;
int stat2;
int kunci = 0;
int stat3 = 0;
int stat4;
int stat5 = 0;
int stat6;
int stat7 = 0;
int stat8;
int contar1 = 0;
int contar2 = 0;
int contar3 = 0;
int contar4 = 0;
int nPalas = 8; // the number of blades of the
propeller
int milisegundos = 500; // the time it takes each
void loop()
{
maju (100, 100);
//sisir_kanan();
//Buzzer();
Rotary();
//Suhu();
Input = kalibrasi1;
myPID.Compute();
maju(Output, Output);
Serial.println(Output);
}
void Rotary () {
maju(100, 100);
stat = digitalRead(19);
if (stat2 != stat) { //counts when the state change,
thats from (dark to light) or
//from (light to dark), remmember that IR light is
invisible for us.
contar1++;
stat2 = stat;
}
{
stat3 = digitalRead(18);
if (stat4 != stat3) { //counts when the state
change, thats from (dark to light) or
//from (light to dark), remmember that IR light is
invisible for us.
contar2++;
stat4 = stat3;
}
{ stat5 = digitalRead(2);
if (stat6 != stat5) { //counts when the state
change, thats from (dark to light) or
//from (light to dark), remmember that IR light is
invisible for us.
contar3++;
stat6 = stat5;
}
{ stat7 = digitalRead(3);
if (stat8 != stat7) { //counts when the
state change, thats from (dark to light) or
//from (light to dark), remmember that IR light
is invisible for us.
255 86
250
200
150
100
50
0
1 6 11 16 21 26 31 36 41 46 51 56 61 66 71 76 81 86 91 96 101 106
200
150
100
50
0
1 5 9 13 17 21 25 29 33 37 41 45 49 53 57 61 65 69 73 77 81 85 89 93 97 101105
2 Pengambilan
Data
3 Asistensi
4 Post-Test