function [Kc,KI,par] = tunings(par,tauC,structure,CVtransform,P)
par.p(8) = structure;
if CVtransform
    par.p(9) = 1;
end

switch structure
    case 1
        par.v0 = par.xAF0 * par.F0/par.E0;
        Kc = par.tau/tauC;
        KI = 1/tauC;
        if (nargin == 5)
            if P
                Kc = 0;
            end
        end
    case 2
        par.v0 = 1/(1+par.K) * (par.F0-par.R0)/par.E0;
        Kc = par.tau/tauC;
        KI = 1/tauC;
        if (nargin == 5)
            if P
                Kc = 0;
            end
        end
    case 3
        par.v0 = 1/(1+par.K) * (par.F0-par.R0)/(par.F0-par.R0+par.S0);
        Kc = par.tau/tauC;
        KI = 1/tauC;
        if (nargin == 5)
            if P
                Kc = 0;
            end
        end
    case 4
        par.v0 = 0;
        Kc = 1/tauC;
        KI = 1/(4*tauC^2);
    case 5
        par.v0 = 0;
        Kc = 1/tauC;
        KI = 1/(4*tauC^2);
    case 6
        par.v0 = 0;
        Kc = 1/tauC;
        KI = 1/(4*tauC^2);
    case 7
        par.v0 = par.xAF0 * par.F0/par.ME0;
        Kc = 1/tauC;
        KI = 1/tauC/par.tau;
    case 8
        par.v0 = 1/(1+par.K) * (par.F0-par.R0)/par.ME0; 
        Kc = 1/tauC;
        KI = 1/tauC/par.tau;
    case 9 
        par.v0 = par.xAF0 * par.F0/par.ME0;
        Kc = 1/tauC;
        KI = 1/tauC/par.tau;
    case 10
        par.v0 = 1/(1+par.K) * (par.F0-par.R0)/par.ME0; 
        Kc = 1/tauC;
        KI = 1/tauC/par.tau;
    case 11 
        par.v0 = 1/(1+par.K) * (par.F0-par.R0)/par.ME0; 
        Kc = 1/tauC;
        KI = 1/tauC/par.tau;        
end 
end

