%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%Simulation of a step in F0 (+20%) with control structure L/F

clear all
global tt YY Y type 

%Options
options=odeset;

%Initial values
load results/opt0; %Nominal 
u0=ux0(1:5); x0=ux0(6:51);

%Alternative: L/F
type='L/F'; 

%Setpoints
ys=zeros(5,1); %Mb Md Mr xb2 L/F
ys(1)=275;  %Mb
ys(2)=185;  %Md
ys(3)=2772; %Mr
ys(4)=0.992; %xb2
ys(5)=837.4422/962.0253; %L/F

%Parameters
p=[p0(:);ys]; 

%Step in feed flowrate F0
p(1)=552; 

%simulation
tt=[];YY=[];
[t,X,options1]=ode15s('xprime',[0 100],[x0;0;0],options,u0,p);
TLF=tt; YLF=YY;



