function xprime=input_rectifier(t,X) 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%% Program written by Stathis skouras, April 2002 %%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
% input_rectifier - Subroutine for simulation of the rectifier column
% It calls the model rectifier and includes one P-controller for the control of the reflux out of the condenser 

% Number of stages in the rectifying section: 
Nr = 50;
% Total number of 'stages'  
NT = Nr + 2;                           % We include condenser and reboiler 

% Inputs
VB=5;                                  % Boilup (kmol/hr)
L0=VB;                                 % Nominal liquid flows in the column (kmol/hr)

% P-Controllers gains and setpoints 
Kc1=0.365;                             % Proportional controller gain at the top section (Kmol/(hr*C))
Tsp1=71.45;                            % Temperature setpoint in the top section (C)

% Precaution so as condenser does not run empty
Hmin=0.035;                            % Minimum liquid holdup in condenser   

% Store all inputs and disturbances
U(1)=VB; U(2)=L0; U(3)=Kc1; U(4)=Tsp1; U(5)=Hmin;
xprime=rectifier(t,X,U);
t