Changeset 34 for mso/sample/controllers/CSTR_noniso_pid.mso
- Timestamp:
- Oct 11, 2006, 10:07:29 PM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
mso/sample/controllers/CSTR_noniso_pid.mso
r29 r34 40 40 "Balanço de Massa Global" 41 41 diff(V) = Inlet.F - Outlet.F; 42 42 43 "Balanço de Massa por Componente" 43 44 tau * diff(Ca) = (Inlet.Ca - Ca) - (-rA) * tau; 45 44 46 "Mistura perfeita" 45 47 Outlet.Ca = Ca; 46 48 Outlet.T = T; 49 47 50 "Taxa de reação" 48 51 -rA = k * Ca; 52 49 53 "Equação de Arrhenius" 50 k=ko*exp(-Ea/(R*T)); 54 k = ko * exp(-Ea/(R*T)); 55 51 56 "Tempo de residência médio" 52 57 tau * Inlet.F = V; 58 53 59 "Geometria" 54 60 A * h = V; 61 55 62 "Equação da válvula" 56 63 Outlet.F = Cv * sqrt(h); 64 57 65 "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); 59 67 60 68 end … … 103 111 104 112 "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); 106 114 CSTR.Tw = PIDT.Ports.output*(Tmax-Tmin)+Tmin; 107 115 … … 115 123 116 124 #Parâmetros do PID de nível 117 PIDL.Parameters.bias =0;125 PIDL.Parameters.bias=0; 118 126 PIDL.Parameters.alpha=0.1; 119 PIDL.Options.action= -1;127 PIDL.Options.action=1; 120 128 PIDL.Parameters.gamma=1; 121 129 PIDL.Parameters.beta=1; 122 130 PIDL.Options.clip=1; 123 131 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"; 127 135 PIDL.Ports.setPoint=0.55; 128 136 PIDL.Parameters.tau=1*"s"; … … 131 139 PIDT.Parameters.bias = 0; 132 140 PIDT.Parameters.alpha=0.1; 133 PIDT.Options.action= -1;141 PIDT.Options.action=1; 134 142 PIDT.Parameters.gamma=1; 135 143 PIDT.Parameters.beta=1; 136 144 PIDT.Options.clip=1; 137 145 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"; 141 149 PIDT.Ports.setPoint=0.85; 142 150 PIDT.Parameters.tau=1*"s"; … … 160 168 OPTIONS 161 169 time = [0:0.1:1 1:1:100] * "h"; 170 outputLevel = "high"; 162 171 end
Note: See TracChangeset
for help on using the changeset viewer.