clc
clear all
load gain_05;
t = gain_05 (:,1);
P_set = gain_05 (:,2);
P_meard = gain_05 (:,3);
z= gain_05 (:,4);

figure (1)
clf
subplot(2,1,1);
plot (t,P_set,'r','LineWidth',1.5);
hold on
ylim([130 155])
plot (t,P_meard,'k','LineWidth',1.5);
grid on
ylabel('P [Kpa]');
legend('Set-point','Measurement',2);
title ('Inlet Pressure (Controlled variable)');

subplot(2,1,2);
plot (t,z,'k','LineWidth',1.5);
grid on
xlabel ('time [sec]');
ylabel('Z');
title ('Valve position (Manipulated variable)');