function f=f_cont_circle(z)
%function f=f_cont(z)
%
% State space model for system + equations for
% determination of setpoint and
% determination of direction in Rl,Rv-plane
% and to limit search direction for correction step
% perpendicular to predictor step
%

% Differential equation
global IX IU x_pred n uorg IFIXU data flag


x=z(IX);
u=z(IU);

dxdt=two_fluid_anal(0,x,u(3),u(1:2)',data,flag);
% Setploint deviation


% Fix elements of u-vector
ufix=uorg;
ufixerr=u(IFIXU)-ufix(IFIXU);


% 
%dRl=u(4)-uorg(4);
%dRv=u(5)-uorg(5);

%Vdiff=[];
%Vdiff=uorg(2)-z(IU(2));
%direrr= dRl*sin(phi)-dRv*cos(phi);

corrdirerr=n'*(z-x_pred);


f=[dxdt;ufixerr;corrdirerr];




