Ignore:
Timestamp:
Oct 11, 2006, 10:07:29 PM (16 years ago)
Author:
Argimiro Resende Secchi
Message:

corrected PIDL output variable.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • mso/sample/controllers/CSTR_noniso_pid.mso

    r29 r34  
    4040        "Balanço de Massa Global"
    4141        diff(V) = Inlet.F - Outlet.F;
     42       
    4243        "Balanço de Massa por Componente"
    4344        tau * diff(Ca) = (Inlet.Ca - Ca) - (-rA) * tau;
     45       
    4446        "Mistura perfeita"
    4547        Outlet.Ca = Ca;
    4648        Outlet.T  = T;
     49       
    4750        "Taxa de reação"
    4851        -rA = k * Ca;
     52       
    4953        "Equação de Arrhenius"
    50         k=ko*exp(-Ea/(R*T));
     54        k = ko * exp(-Ea/(R*T));
     55       
    5156        "Tempo de residência médio"
    5257        tau * Inlet.F = V;
     58       
    5359        "Geometria"
    5460        A * h = V;
     61       
    5562        "Equação da válvula"
    5663        Outlet.F = Cv * sqrt(h);
     64       
    5765        "Balanço de energia"
    58         tau * diff(T)=(Inlet.T - T) - U*At*(T-Tw)/(ro*V*Cp)*tau + (-Hr)*(-rA)*tau/(ro*Cp);
     66        tau * diff(T) = (Inlet.T - T) - U*At*(T-Tw)/(ro*V*Cp)*tau + (-Hr)*(-rA)*tau/(ro*Cp);
    5967
    6068end
     
    103111       
    104112        "Variáveis manipulada"
    105         CSTR.Cv  = 2.2136 * "m^2.5/h" * (1 + PIDL.Ports.output);
     113        CSTR.Cv  = 2.2136 * "m^2.5/h" * (1 - PIDL.Ports.output);
    106114        CSTR.Tw  = PIDT.Ports.output*(Tmax-Tmin)+Tmin;
    107115       
     
    115123
    116124        #Parâmetros do PID de nível
    117         PIDL.Parameters.bias = 0;
     125        PIDL.Parameters.bias=0;
    118126        PIDL.Parameters.alpha=0.1;
    119         PIDL.Options.action=-1;
     127        PIDL.Options.action=1;
    120128        PIDL.Parameters.gamma=1;
    121129        PIDL.Parameters.beta=1;
    122130        PIDL.Options.clip=1;
    123131        PIDL.Options.autoMan=0;
    124         PIDL.Parameters.gain=0.15;
    125         PIDL.Parameters.intTime=100*"s";
    126         PIDL.Parameters.derivTime=1*"s";
     132        PIDL.Parameters.gain=20;
     133        PIDL.Parameters.intTime=5*"h";
     134        PIDL.Parameters.derivTime=0*"s";
    127135        PIDL.Ports.setPoint=0.55;
    128136        PIDL.Parameters.tau=1*"s";
     
    131139        PIDT.Parameters.bias = 0;
    132140        PIDT.Parameters.alpha=0.1;
    133         PIDT.Options.action=-1;
     141        PIDT.Options.action=1;
    134142        PIDT.Parameters.gamma=1;
    135143        PIDT.Parameters.beta=1;
    136144        PIDT.Options.clip=1;
    137145        PIDT.Options.autoMan=0;
    138         PIDT.Parameters.gain=0.85;
    139         PIDT.Parameters.intTime=100*"s";
    140         PIDT.Parameters.derivTime=1*"s";
     146        PIDT.Parameters.gain=40;
     147        PIDT.Parameters.intTime=5*"h";
     148        PIDT.Parameters.derivTime=1*"h";
    141149        PIDT.Ports.setPoint=0.85;
    142150        PIDT.Parameters.tau=1*"s";
     
    160168        OPTIONS
    161169        time = [0:0.1:1 1:1:100] * "h";
     170        outputLevel = "high";
    162171end
Note: See TracChangeset for help on using the changeset viewer.