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

figure (1)
clf
subplot(2,1,1);
plot (t,P_set,'r','LineWidth',2);
hold on
xlim ([0 2500])
ylim([130 155])
plot (t,P_meard,'k','LineWidth',2);
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.75);
xlim ([0 2500])
grid on
xlabel ('time [sec]');
ylabel('Z');
title ('Valve position (Manipulated variable)');