


%% Step in LT

% Effect in xD

K_LTxD      = 0.05022;
tau_LTxD    = 4.489;
theta_LTxD  = 0.0937;

% Effect in xB

K_LTxB      = -0.6676;
tau_LTxB    = 15.1838;
theta_LTxB  = 1.6754;

%% Step in V

% Effect in xD
K_VxD      = -0.7699;
tau_VxD    = 21.83;
theta_VxD  = 0.3;

% Effect in xB

K_VxB      = 0.1312;
tau_VxB    = 4.62;
theta_VxB  = 0.07;

%% Step in F

% Effect in xD  --- very slight if OL, need closed loop
K_FxD      =  (0.98-0.95) /(-0.1); %  OL: 0.02933;
tau_FxD    = 10.2; %46;
theta_FxD  = 11.3; %15.2;

% Effect in xB 

K_FxB      = -0.467;
tau_FxB    = 18.15;
theta_FxB  = 0.785;

%% Tunings

% Using LT --------------------------

%For xD
tauc_LTxD   = 3.7800; %5*theta_LTxD ;     % ;
Kc_LTxD     = tau_LTxD /(K_LTxD *(tauc_LTxD+theta_LTxD));
tauI_LTxD   = min(tau_LTxD,(4*(tauc_LTxD+theta_LTxD)));
  
KI_LTxD     = Kc_LTxD/tauI_LTxD;

%For xB (For SRC)
tauc_LTxB   = theta_LTxB ;     %
Kc_LTxB     = tau_LTxB /(K_LTxB *(tauc_LTxB+theta_LTxB));
tauI_LTxB   = min(tau_LTxB,(4*(tauc_LTxB+theta_LTxB)));
  
KI_LTxB     = Kc_LTxB/tauI_LTxB;

% Using V -----------------------------------------------

% For xB
tauc_VxB   = 5*theta_VxB; %theta_VxB; % 5*theta_VxB ;   3.500;  %3.7800;
Kc_VxB     = tau_VxB /(K_VxB *(tauc_VxB+theta_VxB));  %0.416633752217732
tauI_VxB   = min(tau_VxB,(4*(tauc_VxB+theta_VxB)));
  
KI_VxB     = Kc_VxB/tauI_VxB; %0.346336697377922

% Using F--------------------------------------------

% For xD
tauc_FxD   = theta_FxD; %0.01; %theta_FxD ;     %
Kc_FxD     = tau_FxD /(K_FxD *(tauc_FxD+theta_FxD));
tauI_FxD   = min(tau_FxD,(4*(tauc_FxD+theta_FxD)));
  
KI_FxD     = Kc_FxD/tauI_FxD;

%%

% %From page 452 of Sigurd's Book (Multivariate control)
% KxD = 0.261;
% TxD = 3.76
% tauIxD = 3.76;
% 
% KxB = -0.375;
% TxB = 3.31;
% tauIxB = 3.31