function [Kc,KI,Kci,KIi,par] = cascade_tunings(par,tauC,theta,structure)
par.p(12) = structure;
par.p(13) = structure-1;
TC = tauC + theta;

Kci = 0;
KIi = 0;
if structure == 2 %wd
    KIi = 1/(par.k*(par.pd0init-1))*20/tauC;
elseif structure == 3 %Td
    KIi = (1+par.k2)/par.k3*20/tauC;
end
% KIi = 1;


switch structure
    case 1 %% best caseish
        par.v0 = -par.As*par.Tinit;
        Kc = 1/TC;
        KI = -par.As/TC;
    case 2 %% best caseish2
        par.v0 = par.Tinit/par.tau1;
        Kc = 1/TC;
        KI = 1/(par.tau1*TC);
    case 3 %% best caseish2
        par.v0 = par.Tinit/par.tau2;
        Kc = 1/TC;
        KI = 1/(par.tau2*TC);
end 
end

