A VIRTUAL LABORATORY FOR THE LEARNING OF PROCESS CONTROLLERS DESIGN

A VIRTUAL LABORATORY FOR THE LEARNING OF PROCESS CONTROLLERS DESIGN

A VIRTUAL LABORATORY FOR THE LEARNING OF PROCESS CONTROLLERS DESIGN Antonio Visioli ∗ Fabio Pasini ∗∗ ∗ Dipartimento di Elettronica per l’Automazione...

419KB Sizes 7 Downloads 138 Views

A VIRTUAL LABORATORY FOR THE LEARNING OF PROCESS CONTROLLERS DESIGN Antonio Visioli ∗ Fabio Pasini ∗∗ ∗ Dipartimento

di Elettronica per l’Automazione, University of Brescia (Italy), e-mail: [email protected] ∗∗ former student, University of Brescia (Italy), e-mail: [email protected]

Abstract: In this paper we present a software tool, based on Easy Java Simulations, that helps in the learning of how to design and tune (PID-based) process controllers. The tool is based on the description of different (nonlinear) process models that represent typical (simple) industrial environments and allows to simulate the application of different (PIDbased) process controllers. Their tuning can be evaluated graphically. Remarkably, the tool can be made available through the web and can therefore be employed by students without any particular system requirement. Its use in a Control Systems Technology c 2006 IFAC course has been appreciated by the students. Copyright Keywords: Education, process control, PID controllers, tuning, virtual laboratory.

1. INTRODUCTION In the context of process control, it is often argued that people that end successfully their university studies have a somewhat strong mathematical background but they lack in practical experience and they are not actually capable to manage effectively practical situations in a true industrial context (Ellis (2004); Altmann (2005)). In any case, it is surely true that it is difficult to train students on real plants because it is difficult and expensive to reproduce them in laboratory environments and it is also difficult to reproduce the critical situations that might occur in industrial settings. With the aim of providing a valid, although surely not exhaustive, help in this situation, a virtual laboratory based on Easy Java Simulations has been set up. Easy Java Simulations is an excellent software tool, made by Francisco Esquembre, that provides a program environment that allows to create discrete computer simulations and to set up a nice graphic user interface (Dormido et al. (2004)). It is freely

available at fem.um.es/Ejs, and it allows to eventually make programs written in Java language that can be used through the web by means of a standard browser, which is a relevant characteristic (Sanchez et al. (2002b)). Different process models have been implemented in this framework. They all deal with level control tasks. In particular, a cylindrical tank and a spherical tank have been implemented in order to learn how to tune a Proportional–Integral–Derivative (PID) controller and how to selected those additional functionalities (such as set-point weighting, anti-windup, gain scheduling, and so on (Astr¨om and H¨agglund (1995))) that are often essentials in providing satisfactory performance with a relatively simple controller such as the PID one. It has to be noted that the dynamics of these processes is actually nonlinear and the nonlinearity is most significant for the spherical tank. Thus, the use of a gain scheduling approach can be successfully tested. Further, a coupled double-tank is provided in order to face the problem of designing a ratio controller and a

controller for a multi-input multi-output system. A relevant feature of the designed software package is its interactive mode and its graphical aspect (Sanchez et al. (2002a)). The rationale of the user interface is to make the user fully understand all the design choices and to have an immediate and clear idea of the situation of the process in each instant. Besides, it has to be simple to change the type of controller and its parameter. The paper is organised as follows. In Section 2 the software tool is described in detail. Then, in Section 3 it is explained how it has been employed in a specific university course and how it has been evaluated by the students. Conclusions are drawn in the last section.

2. THE SOFTWARE TOOL 2.1 Processes modelled Three (nonlinear) systems have been implemented in order to provide control tasks with different characteristics and with different levels of difficulty in the design of the control system. They are described hereafter. 2.1.1. Cylindrical tank A cylindrical tank has been implemented. Its dynamics is described by the following differential equation: dh(t) 1 = (Qi (t) − Qo (t)), dt A

(1)

where A is the cross sectional area of the tank (which is equal to πR2 where R denotes the radius of the circular base), h is the fluid level (which is the process variable), Qi is the input flow rate (which is the manipulated variable), and Qo is the output flow rate. The output flow rate can be expressed as: p Qo (t) = α h(t), (2) where α is a proportional constant that depends on the coefficient of discharge, the cross sectional area of the orifice and the gravitational constant. The nonlinear dynamics due to the presence of the square root emerges. 2.1.2. Spherical tank A more significant nonlinear dynamics is obtained if a spherical tank is considered. It can be modelled by the following differential equation (Tan et al. (2002)): Qi (t) − Qo (t) dh(t) = , dt πh(t)(D − h(t))

(3)

where D is the diameter of the tank. Note that the output flow can be expressed as before by equation (2).

2.1.3. Coupled double-tank Two cylindrical tanks that interact between them have been also implemented. In particular, a flow rate between the tanks is allowed at their base. Denoting the level of the two tanks as h1 and h2 respectively, the model of the overall system can be expressed by means of the following system of differential equations: 1 dh1 (t) = A1 dt p p Q1i (t) − α1 h1 (t) − kα3 |h1 (t) − h2 (t)|

(4)

1 dh2 (t) = A2 dt p p Q2i (t) − α2 h2 (t) + kα3 |h1 (t) − h2 (t)|

(5)

where the meaning of the parameters is the same of subsection 2.1.1, by taking into account that the subscripts 1 and 2 refer to the first and second tank respectively, and   1 if h1 > h2 k = sign(h1 − h2 ) = 0 if h1 = h2 (6)  −1 if h1 < h2 determines the direction of the fluid exchanged between the tanks (which is proportional to α3 ).

2.2 Design of the controller For the systems described above, different types of feedback controllers can be selected, starting from a simple On-Off controller. In particular, various PIDbased control strategies are implemented. Starting from the basic control law, where the effects of a different tuning of the parameters can be understood, additional functionalities can then be employed in order to test their effectiveness and to learn how to tune the related parameters. In particular, the derivative action can be applied to the control error or to the process output and can be suitably filtered, a set-point weight can be selected to reduce the overshoot when a setpoint change is applied, and an anti-windup strategy, based on the back-calculation technique can be used as well. For the spherical tank, a gain scheduling approach can be also employed, by defining different operating regions and by selecting the most appropriate tuning in each zone, in order to limit the performance degradation due to the nonlinear dynamics. Finally, for the coupled-tank system, if the two-inputstwo-outputs system is considered, a decentralised PID controller can be designed or, alternatively, a decoupling technique can be used. In this case, both a simplified and an inverted decoupling (Wade (1997); Gagnon et al. (1998)) can be designed. Differently, if a ratio control task is required, the measured level of a tank is employed as the set-point signal of the other tank (after having been multiplied by the required ratio value).

It is worth stressing again that the user can select each of the parameters of any selected control strategy (in addition to the parameters of the process). Thus, the user can learn when it is worth applying a determined control law, how to select the appropriate design parameters, and he/she can compare different solutions. In addition, he/she can be made aware of the difficulties introduced by nonlinear effects and by the physical constraints of the system.

2.3 Graphic user interface One of the essential requirements of a virtual laboratory in order to be effective for the learning of the students is its ease of use. For this reason, a significant attention has been paid in the design of the graphical user interface and its implementation has been a somewhat easy task thanks to the tool provided by Easy Java Simulations. When the user selects one of the available processes to control, a graphical representation of the process appears, together with different menus and a few indicators that provide the status of the process (current process output, current control error, maximum error achieved during the control task). As an example, consider the level control of the cylindrical tank (see Figure 1). By moving the little arrow by the tank the set-point is accordingly modified. The same operation can be performed by changing the number in the small rectangle related to the set-point value. The system parameters (in this case they are the height of the tank, its diameter, the coefficient α and the initial level) can be modified by selecting the related menu (see Figure 2). The type of controller can be selected by using another menu or by selecting the controller block in the shown control system block diagram. In addition to the manual control and to the relay feedback control, a PID controller can be selected. In this latter case, the derivative action can be applied to the control error or to the process output and an anti-windup strategy based on a back-calculation approach can be selected. The set-point weight is always available (its application can be prevented by simply fixing it to one, which is the default value). In all the cases the user can view the related controller block diagram (see Figure 3 for the case of a general PID controller with anti-windup). All the controller parameters can be fixed by using an appropriate menu (see Figure 4) or by clicking on the related block (see Figure 5 as an example of the selection of the proportional gain). The gain scheduling approach can be implemented by selecting different PID parameters for different operating regions. In particular, four regions are available (depending on the current level), as shown in Figure 6. Note again that the use of a gain scheduling functionality is of particular concern in the level control of the spherical tank, since this system exhibits a significant nonlinear dynamics.

Fig. 1. Main window when the level control of the cylindrical tank is selected.

Fig. 2. Menu for the selection of the system parameters. When a simulation is started, different significant variables (process variable, control variable, control error, ad so on) can be plotted in the same window. They can be selected by clicking the related box (see Figure 7). The scale of the plot can be changed accordingly to the amplitude of the plotted signals. Step and impulse load disturbances of different amplitude (and duration) can be applied at arbitrarily selected time instants (see Figure 8). Similarly, measurement noise can be applied. The user can select between random noise and a sinusoidal signal. In the first case only the value of the amplitude can be chosen, while in the second case both the amplitude and the frequency can be selected. For completeness, the main windows of the level control task related to the spherical tank and to the coupled double-tank are reported in Figures 9 and 10 respectively. Basically, the same options described above are implemented.

Fig. 3. Block diagram of a general PID controller. Fig. 7. Example of a simulation.

Fig. 4. Menu for the selection of the controller parameters.

Fig. 5. Example of the selection of a controller parameter.

Fig. 6. Menu for the design of the gain scheduling functionality.

Fig. 8. Selection of a disturbance.

Fig. 9. Main window when the level control of the spherical tank is selected.

Fig. 10. Main window when the level control of the coupled double-tank is selected.

Table 1. Results of the survey among the students. Question 1 2 3 4 5 6

Mean value of the answer 3.82 4.28 3.64 4.01 4.14 3.56

3. EVALUATION

The virtual laboratory has been used in the course of Control Systems Technology at the Faculty of Engineering of the University of Brescia. After an introduction dealing with the role played by sensors and actuators in an industrial control system, a large part of the course is devoted to the learning of the fundamentals of PID controllers, of their additional functionalities and on the tuning of the parameters. Further, the implementation of more advanced PID-based control strategies, such as gain scheduling, cascade control, ratio control, and so on is thoroughly explained. Theoretical lectures are generally supported by a laboratory activity based on the use of Matlab/Simulink. In this context, it is supposed that the implemented software tool is of great help in understanding the theoretical concepts and in providing a idea of the problems that might arise in a real industrial setting. A survey has been proposed to the students of a class in order to evaluate the virtual laboratory with respect to different aspects. In particular, the use of the tool has been proposed to the students for eight hours at the end of the semester. No particular explanations on how to use it have been provided (a manual is not available) in order to evaluate the friendliness of the user interface. Then, the students have been asked to address the following points: (1) the software tool is easy to use; (2) the software tool is useful for the learning of the theoretical concepts; (3) the quality of the graphic user interface is satisfactory; (4) the software tool is to be preferred to other simulation tool such as Simulink or Scicos; (5) the simulated processes are useful to understand different practical issues; (6) the availability of the tool via internet is useful. Each student had to score each point with a number from 1 (totally disagree) to 5 (totally agree). A total number of 48 answers have been collected. The mean values of the answers are reported in Table 1. It appears that the tool has been appreciated by the students especially for the help it provides in understanding the theoretical concepts and for the ease of design of the controller.

4. CONCLUSIONS In this paper it has been shown how a virtual laboratory for the learning of the design of typical industrial process controllers can be effectively created by means of Easy Java Simulations. It presents nice graphical features and it is easy to employ, thus allowing the students to concentrate on the selected control approaches and to better understand their characteristics. The tool has been effectively used in a university course and it appears to be suitable also for the training of industrial operators. It is available at the web site www.ing.unibs.it/∼visioli/didattica/JavaLab.htm.

REFERENCES Altmann, W. (2005). Practical Process Control for Engineers and Technicians. Newnes. The Netherlands. Astr¨om, K. and T. H¨agglund (1995). PID controllers: theory, design and tuning. ISA Press. Research Triangle Park. Dormido, S., C. Martin, R. Pastor, J. Sanchez and F. Esquembre (2004). Magnetic levitation system: a virtual in “easy java simulation”. In: Proceedings American Control Conference. pp. 3215–3220. Ellis, G. (2004). Control System Design Guide. Elsevier. USA. Gagnon, E., A. Pomerleau and A. Desbiens (1998). Simplified, ideal or inverted decoupling?. ISA Transactions 37, 265–276. Sanchez, J., F. Morilla, S. Dormido, J. Aranda and P. Ruiperez (2002a). Virtual and remote control labs using java: a qualitative approach. Control Systems Magazine 22(2), 8–20. Sanchez, J., S. Dormido, R. Pastor and F. Morilla (2002b). A java/matlab-based environment for remote control system laboratories: illustrated with an inverted pendulum. IEEE Transactions on Education 47(3), 321–329. Tan, K. K., S. Huang and R. Ferdous (2002). Robust self-tuning PID controller for nonlinear system. Journal of Process Control 12, 753–761. Wade, H. L. (1997). Inverted decoupling: a neglected technique. ISA Transactions 36(1), 3–10.