⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 cola.html

📁 国外经典书籍MULTIVARIABLE FEEDBACK CONTROL-多变量反馈控制 的源码
💻 HTML
📖 第 1 页 / 共 3 页
字号:
% First scale the model:% Scaling of the model is generally recommended before you do model reduction% The scaling should make all inputs of about equal importance, and all outputs of about equal importance. % For more details about the scaling; see below Du = diag([1 1 1 1]);                  % max inputs (scalings)Dd = diag([ .2 .1]);                   % max disturbances (scalings)De = diag([0.01 0.01 1 1]);            % max output errors (scalings)Si = daug(Du,Dd); So = minv(De);       % introduce scaling matricesG4 = mmult (So, G4u, Si);              % scaled 82 state model% Now do model reduction[syss,sysu]=sdecomp(G4); [syssb,hsig]=sysbal(syss); sys1=hankmr(syssb,hsig,6,'d');G4_8=madd(sys1,sysu);                   % scaled 8 state  modelG4u_8=mmult( minv(So), G4_8, minv(Si)); % "un"scaled 8 state model</pre>The resulting overall model G4u_8 has 8 states. Note that the model was scaledbefore the model reduction such that all the inputs and outputs areof equal importance (see below for the scalings used).We can compare the reponses of the 82-state and 8-state linear modelsto a feed rate change:<pre>[A8,B8,C8,D8]=unpck(G4u_8); [Y8,X8]=step(A8,B8,C8,D8,5,T); plot(T,Y(:,1),T,Y8(:,1));</pre>As can be seen, there is no significant difference.<p><b> Analysis of linear model</b>. The main advantage with a linearmodel is that it is suitable for analysis (RGA, RHP-zeros,CLDG, etc.) and for controller systhesis. Again, see Skogestadand Postlethwaite (1996) for more details, or see some usefulcommands in <A HREF="cola_commands.m"> <tt> cola_commands.m </tt> </a><p> <b> Linearized models for other configurations.</b>To obtain linear models for other configurations, we can start fromthe ``open-loop'' linear model G4u as shown in<a href="http://www.chembio.ntnu.no/users/skoge/book/matlab_m/Tab12_3.m"> Table 12.3 </a> in the book by Skogestad andPostletwaite (1996). Alternatively, we can linearize the nonlinear model directly,for example,  <p> For the <b> LV-configuration </b> (with 4 inputs and 2 outputs):<pre>Ls=2.706; Vs=3.206, Fs=1.0; zFs=0.5;[A,B,C,D]=cola_linearize(<a href="cola_lv_lin.m"><tt>'cola_lv_lin'</tt></a>,Xinit',[Ls Vs Fs zFs]);Glvu =  pck(A,B,C,D);</pre>For the <b>double ratio </b> (L/D-V/B) configuration (with 4 inputs and 2 outputs):<pre>R1s = 2.70629/0.5; R2s=3.20629/0.5; Fs=1.0; zFs=0.5;[A,B,C,D]=cola_linearize(<a href="cola_rr_lin.m"><tt>'cola_rr_lin'</tt></a>,Xinit',[R1s R2s Fs zFs]);Grru =  pck(A,B,C,D);</pre><hr><h2> <a name="g4"> Scaled linear model G4 </a> </h2>Scaling of the linear model is generally recommended before you do controllability analysis, model reduction, etc.The scaling should make all inputs/disturbances  of about equal importance,and all outputs of about equal importance. Usually, thisis done by dividing each variable by it maximum change, i.e.<pre>     u = U / Umax;   y = Y / Ymax;   d = D / Dmax </pre>where U is the deviation in original units, Umax is the maximumallowed or expected deviation, and u is the scaled variable.For more details see Skogestad and Postlethwaite (1996).NOTE: "Unscaled" linear models are here denoted with "u", e.g. G4u.<p>To get the scaled model G4 referred to in <a href="http://www.chembio.ntnu.no/users/skoge/book/matlab_m/Tab12_3.m"><b>Table 12.3</b></a> on page 491 in thebook of Skogestad and Postethwaite (1996), we need to scale the above linear model G4u as follows: <pre>% The following max. changes are used (for scaling the model):Du = diag([1 1 1 1]);       % max inputs (scalings)Dd = diag([ .2 .1]);        % max disturbances (scalings)De = diag([0.01 0.01 1 1]); % max output errors (scalings)% This implies the folling in terms of the scaled model G4:   % Units for inputs (L,V,D,B):  1 = 1 kmol/min = F (the feed rate)        % Comment: For simplicity we here used the same value for all inputs        % Normally we select the nominal flow as the max input, i.e. Du = diag([2.7 3.2 0.5 0.5])   % Units for disturbance 1 (F): 1 = 0.2 kmol/min (20% change)   % Units for disturbance 2 (z_f): 1 = 0.1 mole fraction units (20% change)   % Units for outputs 1 and 2 (y_d and x_b): 1 = 0.01 mole fraction units   % Units for outputs 3 and 4 (M_d and M_b): 1 = 1 kmol% The scaled model is then G4:Si = daug(Du,Dd); So = minv(De);       % introduce scaling matricesG4 = mmult(So, G4u, Si);</pre>All the command needed to generate this model ``from scratch'' aregiven in <a href="cola_G4.m"><tt>cola_G4.m</tt></a>.<hr><h2> <a name="temp"> Column temperatures </a> </h2>All the tray compositions are x_i available in the state vector, andas a simple expression for the temperature we may assume a linearboiling point curve<center> T_i = x_Li T_bL + x_Hi T_bH </center>where T_i is the temperature on stage i, and x_i is the liquid molefraction.  T_bL and T_bH are the boiling temperatures of the two purecomponents. (this may seem very crude but is actually a good approximationfor many mixtures).For "column A" we use the data<center> T_bL = 341.9 K,   T_bH = 355.4 K </center>This gives a boiling point difference of 13.5 K (interms of linearized variables we have dT_i = - 13.5 dx_i), which isconsistent with a relative volatility of 1.5.<p>See also <a href="refmejdell"> work by Mejdell etal.</a> for use of column temperatures to estimate product compositions.<hr><h2> <a name="simulink"> SIMULINK </a> </h2>All the things we did above can be done with SIMULINK, although thesimulation runs quite a bit slower. On the other hand, it is mucheasier to inteface controllers etc. with SIMULINK. <p>The SIMULINK interface to <tt>colamod.m</tt> is <a href=colas.m> <tt>colas.m</tt> </a>; the latter file simply calls the first file to get derivatives of the states for a given state X and input U. The nominal initial steady-state conditions, Xinitare loaded from the file <a href=cola_init.mat> <tt>cola_init.mat</tt> </a> (you may easilygenerate Xinit by running the file <a href="cola_init.m"> cola_init.m </a>).<p>Some SIMULINK files:<p>   <LI> <A href=colas_nonlin.m> <tt>colas_nonlin.m</tt> </a>         - A nonlinear SIMULINK model/setup with no control loops closed        (so the model has 4 inputs; L, V, D and B, and 3 disturbances:        zF, F, and qF, and 4 outputs).  <br>	Type <tt> colas_nonlin </tt>         in the MATLAB window and the non-linear SIMULINK model of the         distillation column appears. You may run a simulation by pressing        <tt> Simulation </tt> and then <tt> Start </tt> in the SIMULINK        window. The default is an increase in F from 1 to 1.01 to be        simulated for 50 minutes, but this is easily changed.          (NOTE: second should be minutes in the window        which appears during simulation). The outputs are stored in         <tt> y1, y2, y3, y4 </tt> and the entire state vector for        the 41 compositions is stored in <tt> Comp</tt>.         To plot the reboiler composition,        for example, you may write <tt> plot(t,y2) </tt> in the MATLAB        window. To plot the compositon on stage 7 (counted from the bottom),        write <tt> plot(t,Comp(:,7)) </tt>, etc.   <LI> <A href=colas_lv_nonlin.m> <tt>colas_lv_nonlin.m</tt> </A>  	        - A non-linear SIMULINK model/setup  with the	LV-configuration (but with NO composition loops closed).         <br> Type <tt> cola_lv_nonlin        </tt>        in the MATLAB window and the non-linear SIMULINK model of the         distillation column with LV-configuration appears. As levelcontrollers we have used P-controllers with a gain of 10 (so the level control is fast; a value of 1 would probably be more realistic)   <LI> <A href=colas_PI.m> <tt>colas_PI.m</tt> </A>  	        - Same as above (nonlinear LV-configuration), but with also two decentralized PI composition loops closed. A measurement delay of 1 min is used for each ofthe two compositions.   <LI> <A href=colas_lin.m> <tt>colas_lin.m</tt> </A>        - A linearized SIMULINK model with no control loops closed.        Use the following MATLAB commands to get a SIMULINK window with        the linearized model:         <pre>         load cola_init        [A,B,C,D] = linmod('colas',Xinit,Uinit);         colas_lin        </pre> The linear SIMULINK simulation is faster than with the nonlinear         model, but still        slow compared to using MATLAB (see above).   <LI> <A href=colas_test.m> <tt>colas_test.m</tt> </A>        - contains sample commands and further description on use of         the SIMULINK models.</UL><b> Controllers. </b>With SIMULINK it is easy to do modifications to the control structure.If, for example, you want to study the non-linear distillation column in the LV-configuration with two PI-controllers controlling the compositions then you may use <A href=colas_PI.m> <tt>colas_PI.m</tt> </A>.Alternatively, you may make a state space multivariable controllerand connect it up.See the SIMULINK manual for further details.<hr><h2> <a name="new"> Simulating another column </a> </h2>To simulate another column (with different relative voloatility, numberof stages etc.) you first need to find an initial steady-state. This may bedone with the Fortran program  <a href="fenske.f"> fenske.f </a>  (you may then specify compositions)or you may use dynamic simulation in Matlab and run it toa steady-state. <p>In any case you it is recommended to usedynamic simulation and run it to steady-state (e.g. using  a modefified <a href="cola_init.m"> cola_init.m </a>)to obtain steady-state data  which can be used as initialdata for later simulations (saved in <a href="cola_init.mat"> cola_init.mat </a>for use with Matlab simulations or with Simulink simulations).<p>You then need to change the steady-state data in <a href="colamod.m"> colamod.m </a> (most of the changes are needed because of the linearized flow dynamics).For simulations in Matlab you also need to changethe "Inputs and disturbances" for the individual configurations, such as <a href="cola4.m"> cola4.m</a> or <a href="cola_lv.m"> cola_lv.m </a>.  For simulations with Simulink you need to change NT (no. of stages) in<a href="colas.m"> colas.m </a>.<hr><p>Good Luck.<h2> <a name="ref"> References </a> </h2><ol><li><a href="http://www.chembio.ntnu.no/users/skoge/book/matlab_m/matfiles.html#c12">Further information </a> about use of the model is given in the book<a href="http://www.chembio.ntnu.no/users/skoge/book.html">Multivariable feedback control</a> (Wiley, 1996) by S. Skogestad and I. Postlethwaite.<li>S. Skogestad and M. Morari, ``Understanding the Dynamic Behavior ofDistillation Columns'', <i>Ind. & Eng. Chem. Research</i>, <b>27</b>, 10, 1848-1862 (1988). <li> M. Morari and E. Zafiriou, Robust process control, Prentice-Hall (1989) - see their Appendix (but their model has no liquid flowdynamics.)<li> S. Skogestad, ``Dynamics and Control of Distillation Columns - ACritical Survey'', (Invited plenary      lecture). Preprints IFAC-symposium DYCORD+'92, 1-25, Maryland, Apr.27-29, 1992. Reprinted in the  Nowegian research bulletin<i>  Modeling,	  Identification and Control</i>, <b>18</b>, 177-217 (1997). <li> T. Mejdell and S. Skogestad, ``Estimation of DistillationCompositionsfrom Multiple Temperature Measurements using Partial-Least-SquaresRegression'', <i>Ind. Eng. Chem. Res.</i>, <b>30</b>, 12 , 2543-2555 (1991). <li> S. Skogestad, <A HREF="http://www.chembio.ntnu.no/users/skoge/publications/1997/dist_plenary.ps"> Dynamics and control of distillation columns - A tutorial introduction.</A> Presented at <i>Distillation and Absorbtion 97</i>, Maastricht, Netherlands, 8-10 Sept. 1997. Published in <i>Trans. IChemE</i>, Vol. 75, Part A, Sept. 1997.<li> I.J. Halvorsen and S. Skogestad,<ahref="http://www.chembio.ntnu.no/users/skoge/publications/1999/DistillationTheory.pdf">``Distillation Theory'', </a><i> Encyclopedia of Separation Science. </i>Ian D. Wilson (Editor-in-chief), Academic Press, 2000.</ol> </body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -