Professional Documents
Culture Documents
end
%Control P
figure(5);
set(gcf,'Name','Control P')
Kp = 30;
P = Kp;
subplot(1,2,1)
rlocus(Sistema*P)
subplot(1,2,2)
SP = feedback(Sistema*P, 1);
step(SP)
% Control I
figure(6);
set(gcf,'Name','Control I')
Ki = 0.35;
I = tf(Ki , [1 0]);
subplot(1,2,1)
rlocus(Sistema*I)
subplot(1,2,2)
SI = feedback(Sistema*I, 1);
step(SI)
% Control PD
figure(7);
set(gcf,'Name','Control PD')
Kp = 30;
Kd = 50;
PD = tf([Kd Kp], [1 1]);
subplot(1,2,1)
rlocus(Sistema*PD)
subplot(1,2,2)
SPD = feedback(Sistema*PD, 1);
step(SPD)
% Control PI
figure(8);
set(gcf,'Name','Control PI')
Kp = 20;
Ki = 150;
PI = tf([Kp Ki], [1,0]);
subplot(1,2,1)
rlocus(Sistema*PI)
subplot(1,2,2)
SPI = feedback(Sistema*PI, 1);
step(SPI)
% Control PID
figure(9)
Kp = 350;
Ki = 300;
Kd = 50;
set(gcf,'Name','Control PID')
PID = tf([Kd Kp Ki], [1,0]);
subplot(1,2,1)
rlocus(Sistema*PID)
subplot(1,2,2)
SPID = feedback(Sistema*PID, 1);
step(SPID)
end