Page 319 - Dynamics and Control of Nuclear Reactors
P. 319

322    APPENDIX G Matlab and Simulink: A brief tutorial





                         G.4 Simulation of a closed-loop system
                         with P-I controller

                         The Simulink model for controlling the variable, level, using a proportional-integral
                         (P-I) controller is shown in Fig. G.3. The transfer function of the P-I controller is
                         given by

                                                           K i  K p s + K i
                                                 G c sðÞ ¼ K p +  ¼                     (G.2)
                                                           s     s

                         K p ¼proportional constant, K i ¼integral constant.

                                                         0:01s + 0:0025
                                                   G c sðÞ ¼                            (G.3)
                                                             s


                         The summing block          is available in the +Math library as Sum. Click on


                         this, and drag it to the work space and make connections as shown in Fig. G.3. If the
                         summing block has a positive feedback, convert the feedback signal to a negative
                         value by inserting the gain block with Gain521.
                            Fig. G.4 shows the response of the system to a unit step change in the input
                         (or set point).




                                              num(s)                 1
                                   +             s
                                    +                              s+0.02
                          Step               Transfer fcn        Transfer fcn1        Scope





                                                                                     level
                                                               –1
                                                                                  To Workspace
                                                                Gain
                         FIG. G.3
                         Simulink model with level control using a P-I controller. Enter the values of K p and K i in the first
                         transfer function block [num(s)]. Use K p ¼0.01, K i ¼0.0025.
   314   315   316   317   318   319   320   321   322   323   324