Anda di halaman 1dari 5

#  PI-Controller : Pengaruh Ti

## %Program : Pengendalian PO4 dgn PI-Controller

%Tujuan : Evaluasi pada kondisi ultimate (Kcu dan Tu)
clear all;
clc
%Program PI-Controller
Kc=[0.01];Ti=[2 3 4 5 6 7 8];

## %Parameter Proses Order 4

Kp=4; T=10;
s=tf('s');
Gp4=Kp/(T*s+1)^4;

%Perubahan Setpoint
SP=3;
fSP=@(t) SP;
for i=Ti
Gc=Kc*(1+1/i/s);
GT=Gc*Gp4/(1+Gc*Gp4);
step(SP*GT,800);
hold on
end
plot(0:0.1:1000,fSP(0:0.1: 1000),'-'); grid on
legend(4,'Ti=2','Ti=3','Ti=4','Ti=5','Ti=6','Ti=7','Ti=8');
title('Close Loop Response With PI-Controller')
 PID-Controller : Pengaruh Td

## %Program : Pengendalian PO4 dgn PID-Controller

%Tujuan : Evaluasi pengaruh Td (Kcu dan Tu)
clear all;
clc
%Program PID-Controller
Kc=[0.18];Ti=[30];Td=[10 20 30 40]

## %Parameter Proses Order 4

Kp=4; T=10;
s=tf('s');
Gp4=Kp/(T*s+1)^4;

%Perubahan Setpoint
SP=3; fSP=@(t) SP;
for i=Td
Gc=Kc*(1+1/Ti/s+s*i);
GT=Gc*Gp4/(1+Gc*Gp4);
step(SP*GT,400);
hold on
end
plot(0:0.1:800,fSP(0:0.1:400),'-'); grid on
legend (4,'Td=10','Td=20','Td=30','Td=40','Setpoint SP=3')
title('Close Loop Response With PID-Controller')
text('Kp=4 dan T=10');
 Metode Ziegler Nichols 2

## %Tujuan : Optimasi pengendali metode Ziegler Nichols II

clear all; clc
%Program PID-Controller
%
Km=5; t0=29; Tm=16.3;

## %Parameter Proses Order 4

Kp=4; T=10;
s=tf('s');
Gp4=Kp/(T*s+1)^4;

%Perubahan Setpoinnt
SP=3;
fSP=@(t) SP;

Waktu=1000;
%Parameter Ziegler Nichols 2
Kc=[Tm/Km/t0 0.9*Tm/Km/t0 1.2*Tm/Km/t0]
Ti=[3.33*t0 2*t0];
Td=[1/2*t0];

Gcp=Kc(1);
Gcpi=Kc(2)*(1+1/Ti(1)/s);
Gcpid=Kc(3)*(1+1/Ti(2)/s+Td*s);

GTp=Gcp*Gp4/(1+Gcp*Gp4);
GTpi=Gcpi*Gp4/(1+Gcpi*Gp4);
GTpid=Gcpid*Gp4/(1+Gcpid*Gp4);

step(SP*GTp,SP*GTpi,SP*GTpid,Waktu); hold on
plot(0:0.1:Waktu,fSP(0:0.1:Waktu),'-r','LineWidth',2);
grid on
Legend(4,'P-controller','PI-Controller','PID-Controller')
title('Close Loop Response Optimized by Ziegler Nichols
II')
text(3568,4.75,'Proses Order 4')
text(3568,4.25,'Kp=4 dan T=10s')
 Metode MEI-Criteria

## %Program : Optimasi Parameter PO4 dengan PI-Controller dan PID-Controller

%metode IAE dan ITAE
clear all
clc
%Parameter Order 4
Kp=4; T=10;
s=tf('s')
Gp4=Kp/(T*s+1)^4 %Proses order 4 --> 4 PO1 seri
%Data Parameter Karakterisasi Proses Order 4
to=29; Tm=16.3; Km=2;
%Parameter Perubahan Setpoint
SP=3;
fSP=@(t) SP;
%Parameter P-Controller IAE method
a1=0.758; b1=-0.861;
a2=1.020; b2=-0.323;
%Parameter PI-Controller metode IAE
a3=1.086; b3=-0.869;
a4=0.740; b4=-0.130;
a5=0.348; b5=0.914;
%Parameter P-Controller metode ITAE
a6=0.586; b6=-0.916;
a7=1.030; b7=-0.165;
%Parameter PI-Controller metode ITAE
a8=0.965; b8=-0.855;
a9=0.796; b9=-0.147;
a10=0.308; b10=0.9292;

KcIAE=[a1/Km*(to/Tm)^b1 a3/Km*(to/Tm)^b3];
TiIAE=[Tm/(a2+b2*(to/Tm)) Tm/(a4+b4*(to/Tm))];
TdIAE=[a5*Tm*(to/Tm)^b5];

KcITAE=[a6/Km*(to/Tm)^b6 a8/Km*(to/Tm)^b8];
TiITAE=[Tm/(a7+b7*(to/Tm)) Tm/(a9+b9*(to/Tm))];
TdITAE=[a10*Tm*(to/Tm)^b10];

GcIAE=[KcIAE(1)*(1+1/TiIAE(1)/s+TdIAE*s) KcIAE(2)*(1+1/TiIAE(2)/s+TdIAE*s)];
GTIAE=[GcIAE(1)*Gp4/(1+GcIAE(1)*Gp4) GcIAE(2)*Gp4/(1+GcIAE(2)*Gp4)];

GcITAE=[KcITAE(1)*(1+1/TiITAE(1)/s+TdITAE*s)
KcITAE(2)*(1+1/TiITAE(2)/s+TdITAE*s)];
GTITAE=[GcITAE(1)*Gp4/(1+GcITAE(1)*Gp4) GcITAE(2)*Gp4/(1+GcITAE(2)*Gp4)];
step(SP*GTIAE(1),GTIAE(2),GTITAE(1),GTITAE(2)); hold on

## %plot(0: 0.1:Waktu,fSP(0:0.1:Waktu-600:Waktu),'-'); grid on

grid,legend(4,'PI-Controller metode IAE','PI-Cotroller metode ITAE','PID-
Controller metode IAE','PID-Controller metode ITAE');
text(100,1.8,'SP=3 dan to=29 dan Tm=16.3 dan Km=2 dan Kp=4 dan T=10')
title('Optimasi Parameter PI-Controller')
 Metode Ziegler Nichols 1

## %Program : Pengendalian PO4 dgn P-Controller

%Tujuan : Optimasi pengendali metode Ziegler Nichols
clear all; clc
%Program P-Controller
Kcu=[0.8];Tu=110;

## %Parameter Proses Order 4

Kp=4; T=10;
s=tf('s');
Gp4=Kp/(T*s+1)^4;

%Perubahan Setpoinnt
SP=3;
fSP=@(t) SP;

Waktu=900;
%Parameter Ziegler Nichols 1
Kc=[Kcu/2 Kcu/2.2 Kcu/1.7];
Ti=[Tu/1.2 Tu/2];
Td=[Tu/8];

Gcp=Kc(1);
Gcpi=Kc(2)*(1+1/Ti(1)/s);
Gcpid=Kc(3)*(1+1/Ti(2)/s+Td*s);

GTp=Gcp*Gp4/(1+Gcp*Gp4);
GTpi=Gcpi*Gp4/(1+Gcpi*Gp4);
GTpid=Gcpid*Gp4/(1+Gcpid*Gp4);

step(SP*GTp,SP*GTpi,SP*GTpid,Waktu); hold on
plot(0:0.1:Waktu,fSP(0:0.1:Waktu),'-r','LineWidth',2);
grid on
Legend(4,'P-controller','PI-Controller','PID-Controller')
title('Close Loop Response Optimized by Ziegler Nichols')
text(3568,4.75,'Proses Order 4')
text(3568,4.25,'Kp=4 dan T=10s')