A PLC-based Self-tuning PI-Fuzzy Controller for Linear and Non-linear Drives Control Muhammad Arrofiq *1, Nordin Saad *2 Universiti Teknologi PETRONAS Tronoh, Perak, Malaysia muhammad_arrofiq@utp.edu.my 2 nordiss@petronas.com.my 1 Abstract This paper presents the design, implementation and of a PLC-based self-tuning PI-fuzzy controller for linear and non-linear drives control. The controller consists of two fuzzy logic blocks, main and gain tuning, respectively. The main fuzzy block acts as a speed controller, while the gain tuning block scales the output of main fuzzy. The output gain tuning has the same inputs as main fuzzy (i.e. speed error and change of error). By introducing output gain tuning, overshoot and settling time can be restrained. The objective of the controller is to provide stability, to reduce overshoot in responds to disturbance and sudden change in reference speed. The performance is compared to PI-fuzzy controller through simulation and experiment. Results of the proposed system show satisfactory performance. I. INTRODUCTION In many applications, conventional control design that is based on mathematical model of the controlled plant or system have been utilized. Usually the mathematical model is quite complex or not easy to be determined [1]. Furthermore, the conventional controls are only effective at a certain operating point. On the other hand, the intelligent control that is based on artificial intelligent can emulate the human thinking process. In the knowledge of expert that is expressed in rule, fuzzy logic present a slightly superior dynamic performance when compare with a more conventional scheme [2-4] and that the controller design does not require explicit knowledge of motor/load dynamic [1]. The performance of PI-fuzzy for linear and non-linear process can be improved by introducing the self-tuning (STPIFLC) [5]. Interestingly, the fuzzy logic controller posses the same characteristic as the traditional PI controller which means it reduces steady-state error but yields penalized rise time and settling time. Programmable Logic Controller (PLC) is a system of microprocessor-based controller that uses a programmable memory to store instructions and to implement functions [6]. There are several advantages of using PLC, one of them is easy to program and reprogram [7]. The PLC has arithmetic and logic instructions. Noncomplex computation can be evaluated using simple arithmetic instructions. PLC has proven its capability in handling fuzzy algorithm [8]. In this study fuzzy logic evaluation will be simulated using similar procedure in PLC. II. FUZZY LOGIC CONTROL The block diagram of the switching self-tuning PI-type fuzzy controller is shown in Fig. 1 [5]. The fuzzy output type is incremental. The influential variable in this configuration is the integrator output. The system should be able to manage the excessive integrator output. Hence anti-windup mechanism should be available and this mechanism is handled by the fuzzy rule. Fig. 1. Block diagram The main fuzzy controller membership function of input and output are depicted in Fig. 2, 3, and 4. The output membership functions are negative big (NB), negative medium (NM), negative small (NS), zero (ZE), positive small (PS), positive medium (PM) and positive big (PB). The main fuzzy rule is shown in Table 1.a. The inference process in self-tuning fuzzy gets the input from fuzzification process of main fuzzy. The self-tuning fuzzy output membership function is illustrated in Fig. 5. Its membership functions are zero (Z), small (S), medium (M), and big (B). In order to have good self-tuning mechanism, the gain tuning rule is adopted from [5] and it is summarized in Table 1.b.. The singleton form in the output membership function is chosen due to its simplicity in solving the crisp output during the defuzzification. Centroid method is used in the defuzzification process for the fact that previous researchers reported that centroid can provide superior control performance [9, 10]. Fig. 2. Error membership function 1-4244-2405-4/08/$20.00 2008 IEEE 701
Fig. 3. Change of error membership function Fig. 4. Main fuzzy output membership function Fig. 5. Fuzzy scaling output membership function TABLE 1 FUZZY LOGIC RULES a. Main fuzzy b. Fuzzy scaling Error Error NB NM NS ZE PS PM PB NB NM NS ZE PS PM PB NB NB NM NM NM NS ZE PS NB B B B B M S S C NS NB NM NS NS ZE PS PM C NS B B B B S S S O ZE NB NM NS ZE PS PM PB O ZE S S M Z M S S E PS NM NS ZE PS PS PM PB E PS S S S B B M B PB NS ZE PS PM PM PM PB PB S S M B B B B Rectifier is a circuit that converts AC to DC. Commonly rectifier is arranged using diodes while silicon controlled rectifier (SCR) is used in controlled rectifier. In controlled rectifier the trigger signal is required to make SCR conducts. The trigger signal is generated after input voltage crossing zero voltage. Delay between trigger signal generated and zero crossing is the firing angle (α). The output voltage of controlled rectifier follows (2). π + α 1 E O = 2. ES sinωt d = π α ( ωt) 0.9 E cosα IV. RESULTS The performance of PLC-based controller is investigated using simulation and experimental work. Simulation and experiment are for the plant of system 1 (a linear plant) and system 2 (a non-linear plant). In order to minimize the cycle time on PLC, the integer number is used in fuzzy operation. Truncating is to all arithmetic operations. Figure 6 shows the operating point of system. The investigation is conducted between two operating points. For system 1, the speed n 1 and n 2 are 600 rpm and 1200 rpm respectively. For system 2, the speed n 1 and n 2 are 500 rpm and 1000 rpm respectively. The load torque (T 1 ) is 500 mnm. S (2) III. THE SYSTEM This section describes the system used. For simplicity, the controlled process is a DC motor and the controlled variable is the speed. In order to provide different characteristics of the process, the DC motor armature voltage will be supplied by either a buck chopper or a controlled rectifier. System 1 is when DC motor armature voltage is supplied by buck converter. This setup is to investigate the performance of a linear system. Hence, the fuzzy controller provides the duty cycle of switching control signal. System 2 is when DC motor armature voltage is supplied by controlled rectifier. In this system, the fuzzy controller provides the firing angle of trigger signal. This setup is to investigate the performance of a non-linear system. Separately excited DC shunt motor is used in the experiment. The DC motor used is LabVolt 175W, 1500 r/min, 240V, 1.1A. Buck chopper converts the DC voltage to a lower level. Chopper uses fast semiconductor switches to convert DC voltages and current. The switching control signal generator provides signal to the IGBT. This signal turns IGBT on or off. The duty cycle (D) is defined as the ratio between on time and period of control signal. The output voltage (V O ) of buck chopper is proportional to duty cycle and input voltage (V I ) and follows equation (1). V O = D. V I (1) Fig. 6. Operating point of the system A. Varying speed at constant load To demonstrate the system performance of STPIFLC, sudden change of reference speed at constant load is introduced. The operating points of non load system are point C, point D, and then point C. For loaded system, the operating points are point A, point B, and then A. The is then compared to PIFLC. The due to sudden change of reference speed is illustrated in Fig. 7 and Fig.8. It is noted for self-tuning that when the actual value is closed to reference the is faster. This is control action by the self-tuning mechanism. Based on the tuning rule, when error is NS or PS and change of error is ZE, the gain is M. Restraining the overshoot is done when error is NS and change of error is NS. The incremental output will be higher then PIFLC output. The STPIFLC maintain steady state error by making the output controller 0. of simulation for step function and sudden change of speed reference are summarized in Table 2, and 3 [11]. of 702
experimental work for step function and sudden change of speed reference are summarized in Table 4 and 5. B. Varying load at constant speed The step is an example of a change in requirement that are significantly higher or lower than the current situation. The disturbance could have originated from a change in motor load requirement. The operating points for this investigation of speed n 1 are point C, point A, and then point C. For speed n 2, the operating points are point D, point B, and then point D. Fig. 9 and Fig. 10 show system when a load is and during a constant speed for system 1 and 2 respectively. When a load is, speed drop for the STPIFLC is lower than PIFLC. This situation is like when the actual speed is closed to reference. of simulation for this situation is summarized in Table 6 and 7 [11]. of experimental work for this situation is summarized in Table 8 and 9. It is noted that when the load is, the actual speed would. Since the speed drop is in the range of PM/PS/ZE and NM/NS/ZE, the self-tuning mechanism operates and controls the main fuzzy output. It can be seen from the, the fast increasing occurred when load and error is small. TABLE 2 PERFORMANCE ANALYSIS OF SIMULATION FOR SUDDEN CHANGE IN SPEED OF No load ed OS (%) 0.15 1.44 0.04 0.14 t r (s) 0.48 0.14 0.88 0.28 t s (s) 0.98 0.41 0.33 0.12 OS (%) - - - - t s (s) 0.77 0.31 0.90 0.25 US (%) 41.38 36.55 0 4.36 t s (s) 1.94 1.70 0.93 0.66 TABLE 3 PERFORMANCE ANALYSIS OF SIMULATION FOR SUDDEN CHANGE IN SPEED OF No load ed OS (%) 19.32 18.93 4.96 5.00 t r (s) 0.41 0.48 0.63 0.61 t s (s) 3.80 3.61 2.74 2.48 OS (%) 9.55 8.32 3.76 3.61 t s (s) 2.04 2.52 3.76 3.00 US (%) 54.86 46.56 31.26 28.64 t s (s) 4.56 4.40 3.11 3.20 TABLE 4 PERFORMANCE ANALYSIS OF EXPERIMENT FOR SUDDEN CHANGE IN SPEED OF Fig. 7. Response of sudden change in speed of system 1 No load ed OS (%) 0.83 0.83 0.83 1.17 t r (s) 0.95 0.41 1.09 0.65 t s (s) 1.31 0.71 1.51 0.96 OS (%) 0.4 0.4 0.42 0.58 t s (s) 1.49 1.17 1.39 1.00 US (%) 1.3 1.3 0.833 1.33 t s (s) 1.72 1.23 1.76 1.35 IAE 1.1 x10 3 786.34 1.14x10 3 730.01 ISE 3.94x10 5 2.78x10 5 4.00x10 5 2.29x10 5 ITAE 1.35x10 4 1.11x10 4 1.33x10 4 9.21x10 3 TABLE 5 PERFORMANCE ANALYSIS OF EXPERIMENT FOR SUDDEN CHANGE IN SPEED OF SYSTEM 2 Fig. 8. Response of sudden change in speed of system 2 No load ed OS (%) 7.60 5.60 3.00 3.60 t r (s) 0.83 0.85 0.97 0.65 t s (s) 2.7 2.16 2.38 1.35 OS (%) 4.9 8.1 2.1 2.9 t s (s) 2.41 1.78 1.61 0.96 US (%) 16.2 19.2 4.8 4.4 t s (s) 3.37 2.72 1.48 1.44 IAE 1.05x10 3 883.16 946.15 704.28 ISE 3.16x10 5 2.52x10 5 3.12x10 5 2.21x10 5 ITAE 1.17x10 4 9.77x10 3 8.78x10 3 7.40x10 3 703
TABLE 8 PERFORMANCE ANALYSIS OF EXPERIMENT FOR SUDDEN CHANGE IN LOAD OF Fig. 9. Response of sudden change in load of system 1 1 2 n drop (%) 9.1 6.67 5.38 4.08 OS (%) 0.83 2.8 0 0 t s (s) 0.46 0.44 0.53 0.32 n rise (%) 9 6.5 5.46 3.77 US (%) 0.83 1.33 0.8 1 t s (s) 0.45 0.23 0.58 0.28 IAE 315.64 162.45 1.53x10 3 1.12x10 3 ISE 8.11x10 4 3.61x10 4 1.02x10 6 6.15x10 5 ITAE 1.01x10 3 988.43 4.05x10 3 3.55x10 3 TABLE 9 PERFORMANCE ANALYSIS OF EXPERIMENT FOR SUDDEN CHANGE IN LOAD OF SYSTEM 2 Fig. 10. Response of sudden change in load of system 2 1 2 n drop (%) 33.2 22.2 19 14.4 OS (%) 4.6 4 3.6 1.6 t s (s) 1.68 1.27 1.42 0.71 n rise (%) 31.8 22 18.2 12.5 US (%) 11.8 5.8 7 3.6 t s (s) 3.01 2.33 3.27 2.36 IAE 627.57 441.91 1.48x10 3 1.29x10 3 ISE 1.41x10 5 8.95x10 4 8.10x10 5 7.11x10 5 ITAE 4.59x10 3 3.07x10 3 6.77x10 3 4.57x10 3 TABLE 6 PERFORMANCE ANALYSIS OF SIMULATION FOR SUDDEN CHANGE IN LOAD OF 1 2 n drop (%) 11.71 11.01 5.81 5.47 OS (%) - - - - t s (s) 0.72 0.45 0.57 0.36 n rise (%) 10.77 10.22 5.53 5.24 US (%) - - - - t s (s) 0.78 0.53 0.64 0.46 TABLE 7 PERFORMANCE ANALYSIS OF SIMULATION FOR SUDDEN CHANGE IN LOAD OF SYSTEM 2 1 2 n drop (%) 32.14 29.77 16.17 14.77 OS (%) 5.65 4.86 2.93 1.64 t s (s) 2.56 2.37 3.05 1.22 n rise (%) 31.61 29.53 15.03 14.34 US (%) 15.62 9.76 4.13 2.85 t s (s) 2.98 2.71 2.42 2.41 C. Varying speed reference and load simultaneously It is assumed that the reference speed and the motor load is changing at the same time when this disturbance is present. In this study two cases will be considered: (a) the disturbance arises due to two requirements, i.e., for an in speed and for an of motor load, and (b) the disturbance that arises due to two requirements, i.e., for an in speed and for a of motor load. of simulation for this investigation is summarized in Table 10 and 11 [11]. The system 1 and system 2 s for (a) for are depicted in Fig. 11 and Fig. 13, respectively. The operating points of this situation are point C, point B, and then point C. of experimental work for this situation is summarized in Table 12 and 13. It is noted that the actual speed experiences a drop at the instance when load is and the reference speed is. The explanation for this is that the controller s action depends on the sampling period which is slower than the respond of the process i.e. motor speed. The system 1 and system 2 s for (b) are depicted in Fig. 12 and Fig. 14 respectively. Operating points for this situation are point A, point D, and then A. It is noted that no speed drop for (b) is observed when the load is while speed reference is. 704
Normally, the actual speed increases when load is. Since the reference speed is, it supports the controller to reach the final value. TABLE 10 PERFORMANCE ANALYSIS OF SIMULATION OF n drop (%) 4.61 4.61 - - OS (%) 0 12.94 - - t s (s) 0.85 0.65 0.35 0.59 n rise (%) 2.36 2.38 - - US (%) 41.28 36.57 - - t s (s) 1.98 1.72 0.57 0.56 TABLE 12 PERFORMANCE ANALYSIS OF EXPERIMENT OF n drop (%) 3 2.5 - - OS (%) 0.42 0.42 0.42 0.42 t s (s) 1.59 0.90 1.33 1.12 n rise (%) 1.25 0.833 - - US (%) 0.83 8.33 0.833 0.833 t s (s) 1.73 1.43 1.62 1.27 IAE 1.20x10 3 700.15 984.86 670.82 ISE 4.43x10 5 2.67x10 5 3.26x10 5 2.18x10 5 ITAE 1.45x10 4 1.05x10 4 1.11x10 4 8.73x10 3 TABLE 11 PERFORMANCE ANALYSIS OF SIMULATION OF SYSTEM 2 n drop (%) 7.57 5.55 - - OS (%) 3.77 3.65 9.54 8.90 t s (s) 3.86 2.95 1.98 2.53 n rise (%) 7.75 6.37 - - US (%) 55.14 46.67 31.62 28.98 t s (s) 4.66 4.46 3.03 3.13 Fig. 13. Response for test (a) of system 2 Fig. 11. Response for test (a) of system 1 Fig. 14. Response for test (b) of system 2 TABLE 13 PERFORMANCE ANALYSIS OF EXPERIMENT OF SYSTEM 2 Fig. 12. Response for test (b) of system 1 n drop (%) 1.8 3.4 - - OS (%) 3.4 7.8 6.8 6.6 t s (s) 1.56 1.52 3.28 1.64 n rise (%) 1.6 0.6 - - US (%) 26.6 28.2 15.8 12.4 t s (s) 3.57 2.57 2.60 1.99 IAE 1.08x10 3 876.91 945.86 747.34 ISE 3.35x10 5 2.58x10 5 2.74x10 5 2.2 x10 5 ITAE 1.25x10 4 9.85x10 3 9.46x10 3 7.67x10 3 705
V. CONCLUSIONS The work presented in this paper has contributed to an improved understanding of the procedure for configuring and implementing a PLC-based self-tuning fuzzy controlled for linear and non-linear drives control. The work presented here offers some promising tools in terms of software handling of a PLC system and provides avenues for other research scope to address different aspects of issues pertaining to linear and non-linear drives control via PLC-based fuzzy controller. REFERENCES [1] G. C. D. Sousa and B. K. Bose, "A Fuzzy Set Theory Based Control fo a Phase-Controller Converter DC Machine Drive," IEEE Transactions On Industry Applications, vol. 30, pp. 34-44, 1994. [2] G. El-Saady, A. M. Shara, A. Makky, M. K. Sherbiny, and G. Mohamed, "A high performance induction motor drive system using fuzzy logic controller," presented at Electrotechnical Conference, 1994. Proceedings., 7th Mediterranean, Antalya, 1994. [3] C. C. Lee, "Fuzzy logic in control systems: fuzzy logic controller. I," Systems, Man and Cybernetics, IEEE Transactions on, vol. 20, pp. 404-418, 1990. [4] C. C. Lee, "Fuzzy logic in control systems: fuzzy logic controller. II," Systems, Man and Cybernetics, IEEE Transactions on, vol. 20, pp. 419-435, 1990. [5] R. K. Mudi and N. R. Pal, "A self-tuning fuzzy PI controller," Fuzzy Sets and Systems, Science Direct, vol. 115, pp. 327-338, 2000. [6] W. Bolton, Programmable Logic Controllers, Fourth ed: Elsevier Newnes, 2006. [7] M. G. Ioannides, "Design and Implementation of PLC-Based Monitoring Control System for Induction Motor," IEEE, vol. 19 no.3, pp. 469-476, 2004. [8] M. Arrofiq and N. Saad, "PLC-based Fuzzy Logic Controller for Induction-motor Drive with Constant V/Hz Ratio," presented at International Conference on Intelligent and Advanced Systems, Kuala Lumpur, Malaysia, 2007. [9] S. Saneifard, N. R. Prasad, H. A. Smolleck, and J. J. Wakileh, "Fuzzy- Logic-Based Control of a Shunt DC Motor," Education, IEEE Transactions on, vol. 41, pp. 159-164, 1998. [10] B. S. Zhang and J. M. Edmunds, "On Fuzzy Logic Controllers," presented at Control 1991. Control '91., International Conference on, edinburgh, 1991. [11] M. Arrofiq and N. Saad, "A Simulation of PLC-based Self-tuning PI - Fuzzy Logic Controller for DC motor," presented at International Symposium on Information Technology 2008, Kuala Lumpur, 2008. 706