function [Kc,KI,par] = tunings(par,tauC,theta,structure)
par.p(12) = structure;
par.p(13) = 0;
TC = tauC + theta;

switch structure
    case 0
        par.v0 = par.zinit;
        Kc = 1/(par.B*TC);
        tauI = min(-1/par.As,4*TC);
        KI = Kc/tauI;
    case 1
        par.v0 = (1/par.tau1)*par.Tinit;
        Kc = 1/TC;
        KI = 1/par.tau1/TC;
    case 2
        par.v0 = par.Tinit;
        Kc = par.tau1/TC;
        KI = 1/TC;
    case 3
        par.v0 = (1/par.tau2)*par.Tinit;
        Kc = 1/TC;
        KI = 1/par.tau2/TC;
    case 4
        par.v0 = par.Tinit;
        Kc = par.tau2/TC;
        KI = 1/TC;
    case 5
        par.v0 = -par.As*par.Tinit;
        Kc = 1/TC;
        KI = -par.As/TC;
    case 6
        par.v0 = 0;
        Kc = 1/TC;
        KI = 1/(4*TC^2);
end 
end

