35 CHAPTER 4 SPEED CONTROL OF SEPARATELY EXCITED DC MOTOR This chapter presents the different methods for speed control of separately excited DC motor. Four types of controllers, namely fuzzy logic controller, fuzzy PI controller, Particle Swarm Optimization (PSO) based tuning of Fuzzy PI controller and new hybrid PSODE based tuning of Fuzzy PI controller have been proposed to control the speed of DC motor. The main objectives are to provide stability and to reduce overshoot in response, due to disturbance and sudden change in reference speed of the separately excited DC motor. The performances of all the controllers are analyzed and compared on the basis of their applicability, adaptability, and controllability under various operating conditions such as varying speed at no load, varying speed at constant load, varying load at constant speed and varying speed and load simultaneously. The developed controllers are also compared with the conventional PI controller. The system is simulated using Matlab/ Simulink GUI environment. In addition, an FPGA based hardware setup is also developed to implement the above controllers for the speed control of DC motor, shown in Figure A 1.25. The results of the simulation and experimental setup are discussed. Dynamic characteristics and stability of the controllers are also discussed. 4.1 INTRODUCTION In recent years, the power electronics devices play an important role in the control of electrical engineering. Due to the invention of power 36 electronics switches, the control of electrical machines became very easy. It is interdisciplinary in nature and used in wide variety of industries from small scale to large scale industries. The importance of power electronics control has grown over the years due to the invention of smart power devices with no environmental pollution. Some of the applications of power electronics are DC and AC servo drives, high efficiency industrial drives, electrical traction and flexible AC transmission. DC motors are preferred over AC motors because of their lower manufacturing costs, ease of controller implementations, and simpler mathematical model. Separately excited DC motors are frequently utilized as actuators in industrial applications. The following features of DC motors make them most suited for actuators: Small Size Low friction High speed Low construction cost No gear backlash Safe operation without the use of limit switches and Moderate torque generation at a high torque to weight ratio. In earlier days, DC motors were used as the primary means for electric traction. But recently, brushless DC motors, induction motors, and synchronous motors have gained widespread use in electric traction. However, there is a persistent effort towards making them behave like dc motors through innovative design and control strategies. Hence DC motors have always proved to be the best for advanced control algorithms, since the theory of DC motors is extendable to other types of motors. The speed torque 37 characteristics of DC motors can be varied in different ranges to achieve higher efficiency, and it has rapid acceleration and de-acceleration. DC motors are conveniently portable and are most suitable for remote area applications. DC motors are used in automobiles, robots, rolling mills, electrical vehicles and movie camera due to precise, wide, simple and continuous control characteristics (Ong 1998; Ahmed 2005). 4.2 CONSTRUCTION AND OPERATION OF DC MOTOR A DC motor is comprised of three main parts, a current carrying conductor called armature, a circuit for magnetic field provided by magnets of poles called field system and a commutator that switches the direction of current in the armature as it passes a fixed point in space. DC motor has two important parts, one is armature winding and the other is field system. Both windings are excited by DC source. With help of excitation, armature flux and field flux are created. Torque is developed on the rotor due to magnetic interaction between the armature flux and field flux. 4.3 MATHEMATICAL MODEL OF SEPARATELY EXCITED DC MOTOR In this section, the basic equations of DC motor and relationship between the parameters are discussed. Applied voltage of the field winding (Vf) is given by, Vf if R f Lf dif dt Vf = Voltage applied to the field winding in volts. (4.1) 38 i f = Field current in amps R f = Field resistance in ohms Lf = Inductance of field winding in hendry di f = Rate of change of field current with respect to time dt Field current is given by if Vf Rf (4.2) Armature voltage equation can be written as, Va ia R a La di a dt Eb (4.3) Va = Applied voltage to the armature winding in volts i a = Armature current in amps R a = Armature resistance in ohms La =Inductance of armature winding in hendry di a = Rate of change of armature current with respect time dt E b = Generated Back emf in volts Armature voltage under steady state condition is Va=iaRa+Eb (4.4) Back emf can be calculated by Eb=K r (4.5) 39 K= Back emf constant and its value depends on the armature winding. = Flux in webers r = speed of motor in rad/sec From the equation (4.5), internally generated emf is directly proportional to velocity of the motor. The output motor torque can be calculated by, (4.6) Te K vi a Te= Torque developed by the armature in N-m Kv=Torque constant Developed torque can be divided into three components as follows Te J d r dt B (4.7) TL r J= moment of inertia in Kg-m2 B = damping or friction co-efficient in Nm-sec/rad TL= Load torque in N-m Power developed by the armature is given by Pa=EbIa (4.8) Replacing E b K Pa K i If is constant, Pa K r ia r a r power developed by armature is given by, (4.9) (4.10) 40 4.4 BLOCK DIAGRAM FOR SPEED CONTROL OF SEPARATELY EXCITED DC MOTOR The output speed of the separately excited DC motor is compared with given reference speed. From the comparison, the speed error and change in speed error are calculated and given as input to the controllers. Output of the controller is given to the current controller as reference current. The current controller performs the comparison between reference current and actual armature current of DC motor. Based on the comparison, it generates the gate signal for chopper drive which is turn controls the input voltage given to the motor. PSO/ PSODE r Fuzzy /Fuzzy PI Controller Hysteresis Current Controller Chopper Drive DC Motor Ia Figure 4.1 Block Diagram for Speed Control of Separately Excited DC Motor 4.5 WORK CARRIED OUT ON DC MOTOR Speed control of separately excited DC motor is achieved by four controllers, namely fuzzy logic controller, fuzzy PI controller, PSO based tuning of Fuzzy PI controller and the new hybrid algorithm of PSODE based tuning of Fuzzy PI. The speed control of separately excited DC motor is achieved using Chopper fed drive with single switch which in turn used to vary the armature voltage. The gate pulse of the chopper fed drive is adjusted by the controllers based on the difference between the reference speed and the 41 actual speed. Insulated Gate Bipolar Transistor (IGBT) is used as switch in chopper fed drive. Initially, a FLC has been developed and implemented for the speed control of the motor in Matlab/Simulink environment. The inputs to the FLC are speed error and change in speed. Speed error is defined as the difference between the actual speed and reference speed of the motor. Seven membership functions are created for each input and output. The FLC has been built with two inputs and one output. The membership functions are Negative Small, Negative Medium, Negative Big, Zero, Positive Small, Positive Medium, and Positive Big. Based on the values of error and change in error of speed, the output of the FLC is in terms of current. This is the reference value for the current controller. The difference between the reference current from the fuzzy controller and actual armature current is given as an input to the current controller. Based on the current limit, the current controller generates the gate current to the chopper drive. The armature voltage of the separately excited DC motor is varied when variation occurs in the gate pulse of the chopper. Thus, the speed of the motor is controlled. In fuzzy PI controller, the gain value is added with speed error and change in speed error. Gain value is used as P and I value of PI controller. In PSO tuned the fuzzy PI controller, the range of membership functions are tuned to achieve better speed control than fuzzy and fuzzy PI controllers. Each membership function of the inputs and output is considered as a particle. So, the number of particles for the controller is 21. Mean Square Error (MSE) is considered as the fitness function for the PSO algorithm. The minimum of MSE is obtained by using PSO algorithm. The range of membership functions are tuned by PSO, and based on the result of PSO tuning, the range of input and output membership functions are changed to obtain minimum value for the fitness function. MSE is given by, 42 MSE (y(k) y(k)) 2 (4.11) y(k) is crisp value of actual range of membership function y(k) is the calculated output value of membership function by evaluating the Fuzzy Inference System (FIS) function. After attaining the minimum value of MSE, the corresponding crisp value y(k) gives the new range of values for inputs and output membership functions. The mutation function of DE is implemented in PSO, when the velocity of the PSO is out of the specified range. If the calculated velocity is out of boundary or closely to zero [Velocity < rand(0,1)], a mutation operator of the DE is activated, and the velocity of this particle is recalculated by using mutation operator as, Vi(t+1) = F x ((xk(t)- xi(t))- (xq(t)- xi(t))) (4.12) After calculating the velocity using DE mutation operator, the same PSO procedure is carried out for tuning fuzzy membership functions with same objective function. 4.6 ANALYZING THE PERFORMANCE OF CONTROLLERS UNDER THE VARIOUS CONSTRAINTS 4.6.1 Varying Speed at No Load Conditions To demonstrate the system performance of controllers, a sudden change of reference speed at no load is introduced. The response due to sudden change of reference speed is illustrated in the graphs depicted in Figures 4.2 and 4.3 for various controllers. The performance analysis of the controllers due to sudden change of speed reference is summarized in Table 4.1, from the graphs. Speed (rads/sec) 43 Fuzzy Fuzzy PI Time (sec) Figure 4.2 Change in Speed under No-Load Condition for Fuzzy and Speed (rads/sec) Fuzzy PI Controllers PSODE Fuzzy PI PSO Fuzzy PI Time (sec) Figure 4.3 Change in Speed under No-Load Condition for PSO Fuzzy PI and PSODE Fuzzy PI Controllers 44 Table 4.1 Performance Analysis of DC Motor for Sudden Change in Speed at No Load Condition No load condition Fuzzy Fuzzy PI PSO Fuzzy PI PSO DE Fuzzy PI At ref speed OS( %) - - - - 120 rads/sec ts (sec) 0.1 0.07 0.05 0.04 Speed OS( %) - - - - increased to ts (sec) 0.1 0.06 0.04 0.03 200 rads/sec Initially, this research focuses on the performance of the all the controllers with no load condition at reference speed 120 rads/sec. From the verification, the settling time of fuzzy logic controller is 0.1 seconds, the fuzzy PI controller is 0.07 seconds, PSO based fuzzy PI controller is 0.05 seconds and PSODE based fuzzy PI controller is 0.04 seconds. When the speed is increased to 200 rads/sec, the settling time of fuzzy logic controller is 0.1 seconds, the fuzzy PI controller is 0.06 seconds, PSO based fuzzy PI controller is 0.04 seconds and PSODE based fuzzy PI controller is 0.03 seconds. From the above comparison, it is proved that the proposed hybrid PSODE based fuzzy PI controller performs far better when compared to the other controllers. 4.6.2 Varying Speed at Constant Load To demonstrate the system performance of controllers, a sudden change in the reference speed, at constant load is introduced. From the response, the performances of the controllers are summarized in Table 4.2 from the graphs plotted in Figures 4.4 and 4.5, based on speed response parameters. Speed (rads/sec) 45 Fuzzy Fuzzy PI Time (sec) Figure 4.4 Change in Speed with Constant Load for Fuzzy and Fuzzy Speed (rads/sec) PI Controllers PSODE Fuzzy PI PSO Fuzzy PI Figure 4.5 Time (sec) Change in Speed with Constant Load for PSO Fuzzy PI and PSODE Fuzzy PI Controllers 46 Table 4.2 Performance Analysis of DC Motor for Sudden Change in Speed at Load Condition At load condition Fuzzy Fuzzy PI PSO Fuzzy PI PSO DE Fuzzy PI At ref speed OS( %) - - - - 120 rads/sec ts (sec) 0.15 0.06 0.05 0.04 Speed increased OS( %) - - - - to 200 rads/sec ts (sec) 0.18 0.05 0.04 0.03 From the investigation, the settling time of fuzzy logic controller is 0.15 seconds, the fuzzy PI controller is 0.06 seconds, PSO based fuzzy PI controller is 0.05 seconds and PSODE based fuzzy PI controller is 0.04 seconds. When the speed is increased to 200 rads/sec, the settling time of fuzzy logic controller is 0.18 seconds, the fuzzy PI controller is 0.05 seconds, PSO based fuzzy PI controller is 0.04 seconds and PSODE based fuzzy PI controller is 0.03 seconds. From the above verification and comparison, it is proved that the proposed PSODE based optimized Fuzzy PI controller gives the better performance in settling when compared to the other controllers. 4.6.3 Varying Load at Constant Speed The speed of the motor is maintained constant at this condition and the load is varied. Speed of the separately excited DC motor is decreased, when the load is changed from no load to loaded condition and returned to reference speed when load is released. Based on the speed response from the Figures 4.6 and 4.7, the results are summarized in Table 4.3. From the analysis of the values tabulated in Table 4.3, setting time of speed response of the separately excited DC motor with fuzzy PI, PSO fuzzy PI and PSODE fuzzy PI controllers is close to 0.01seconds. Settling time with FLC is 0.011 seconds. No overshoot occurs in speed response for all the four controllers. Speed (rads/sec) 47 Fuzzy Fuzzy PI Time (sec) Figure 4.6 Change in Load with Constant Speed for Fuzzy and Fuzzy PI Speed (rads/sec) Controllers PSODE Fuzzy PI PSO Fuzzy PI Time (sec) Figure 4.7 Change in Load with Constant Speed for PSO Fuzzy PI and PSODE Fuzzy PI Controllers 48 Table 4.3 Performance Analysis of DC Motor for Sudden Change in Load with Constant Speed At reference speed 120 Fuzzy Fuzzy PI rads/sec PSO Fuzzy PI PSO DE Fuzzy PI OS (%) - - - - ts (s) 0.011 0.01 0.01 0.01 OS (%) - - - - ts (s) 0.011 0.01 0.01 0.01 At load applied At load released From the above tabulation, it is evident that in this criterion, the settling time of the speed response of DC for all the controllers is close to 0.01 seconds while applying the load and releasing the load. The speed of the DC drops from the reference speed when applying the load and again reaches the reference speed when load is released. In both the cases, the settling time of speed response is 0.01 seconds in all the controllers. 4.6.4 Varying Speed and Load Simultaneously In this condition, simultaneous changes in both load and speed are executed. Here, the motor with reference speed 1 and no load condition is applied. This resembles first condition of the system. When the system attains a steady state, the speed of the motor is changed along with the load. Even though the speed of the motor is changed, there will be slight decrease in speed due to increase in load. Performance analysis of simulation for this investigation is summarized in Table 4.4 based on the speed response graph of the motor from Figures 4.8 and 4.9. Speed (rads/sec) 49 Fuzzy Fuzzy PI Time (sec) Speed (rads/sec) Figure 4.8 Change in Speed and Load for Fuzzy and Fuzzy PI Controllers PSODE Fuzzy PI PSO Fuzzy PI Time (sec) Figure 4.9 Change in Speed and Load for PSO Fuzzy PI and PSODE Fuzzy PI Controllers 50 Table 4.4 Performance Analysis of DC Motor for Changes in Speed and Load Simultaneously Fuzzy Fuzzy PI PSO Fuzzy PI PSO DE Fuzzy PI Sudden OS( %) - - - - change 1 ts (sec) 0.1 0.07 0.05 0.03 Sudden OS( %) - - - - change 2 ts (sec) 0.15 0.05 0.04 0.03 Under the sudden change 1, settling time of speed response is 0.1 seconds with FLC, 0.07 seconds with fuzzy PI, 0.05 seconds with PSO Fuzzy PI and 0.03 seconds with PSODE fuzzy PI. Under the sudden change 2, settling time of speed response is 0.15 seconds with FLC, 0.05 seconds with fuzzy PI, 0.04 seconds with PSO Fuzzy PI and 0.03 seconds with PSODE fuzzy PI. From the performance comparison of the controllers, the PSODE gives comparatively better results than the other controllers. 4.7 MOTOR PARAMETERS Armature Resistance (Ra) – 0.5 Ohms Armature Inductance (La) – 0.01 Hendry Field Resistance (Rf) – 240 Ohms Field Inductance (Lf) – 120 Hendry Total inertia (J) – 0.05 Kg-m2 Viscous friction coefficient (B) – 0.02 N-m-s Change in both Speed and Load Simultaneously Change in Load under Constant Speed Change in Speed under Constant Load Change in Speed under No Load 2.0 1.5 1.5 1.5 1.53 1.5 2.6 1.5 1000Rpm to 2000 Rpm 500 Rpm to 1000 Rpm 1000Rpm to 2000 Rpm At load applied At load released Sudden Change 1 Sudden Change 2 S 500 Rpm to 1000 Rpm Conditions PI 3 3 2.8 2.4 2.8 2.4 2.4 2.2 H 1.45 0.9 0.3 1.38 1.4 1.35 1.01 0.92 S H 1.48 1.48 0.9 1.48 1.5 2 1.28 1.28 Fuzzy 1.1 0.62 0.3 1.05 1.1 1.05 0.6 0.61 S 1.32 1.32 0.8 1.2 1.8 1.28 1.2 1.2 H Fuzzy PI 0.8 0.52 0.3 0.88 0.85 0.85 0.52 0.52 1.28 1.28 0.8 1 1.6 1.2 1.15 1.15 PSO Fuzzy PI S H S – Simulation 0.7 0.5 0.13 0.71 0.7 0.7 0.58 0.48 1 0.9 0.78 0.8 0.85 0.9 0.84 0.84 PSO DE Fuzzy PI S H H – Hardware Table 4.5 Comparative Analysis of settling time (in seconds) of all the controllers under all four conditions for speed control of DC motor 51 52 4.8 WORK CARRIED OUT ON DC MOTOR WITH MODIFIED PARAMETERS All the work mentioned in the section 4.5 is carried out in both simulation and experimental setup for the system with new parameters, given below: Armature Resistance (Ra) – 6.2 Ohms Armature Inductance (La) – 76.3mH Field Resistance (Rf) – 598 Ohms Field Inductance (Lf) – 74.2 mH Total inertia (J) – 0.12Kg-m2 Viscous friction coefficient (B) – 0.008 N-m-s The performance of the controllers under the various operating conditions for the speed control of DC motor is tabulated in Table 4.5, based on the simulation and experimental setup results, shown in Figures A 1.1 to A 1.20 of Appendix 1 (x-axis represents Time in seconds, y-axis represents Speed in rpm and Current in amperes). Channel 1 represents reference speed, Channel 2 represents actual speed and Channel 3 represents the armature current. From the observation, the proposed PSODE fuzzy PI controller gives better settling time at all the operating conditions than all other controllers in both simulation and hardware results. 4.8.1 Stability Analysis The stability analysis is performed as follows for the DC motor. The settling time and peak time of the all the responses are obtained for all the 53 controllers under the four conditions. From the settling time and the peak time, the damping ratio and natural frequency of the system are calculated. From the values of damping ratio and natural frequency, the transfer function and the poles of the response are derived. With the help of the location poles, the stability of the system is obtained by using the root locus method. From the observations and calculations, the system is stable for all the conditions mentioned in this chapter for all the controllers. These observations are verified by taking the criteria of varying speed with constant load as example for stability analysis. The settling time and peak time of the response of all the controllers are tabulated in Table 4.6. With help of this, the values of natural frequency and damping ratio are derived. By using the second order standard formulae, the transfer function of the system is derived the stability of the system is analyzed by root locus method. Table 4.6 Stability Analysis of controllers for the speed control of DC Motor under varying speed at constant load S. Controllers No. 1 Fuzzy 2 Settling time in seconds Natural Peak time in frequency seconds n Damping Ratio 2 1 3.72 0.53 Fuzzy PI 1.28 1.28 4 0.5 3 PSO Fuzzy PI 1.2 0.8 5.14 0.64 4 PSODE Fuzzy PI 0.78 0.9 5.2 0.85 Transfer Function Stability Analysis s2 13.8 34 s 13.8 Stable s2 15.77 4 s 15.77 Stable s2 26.5 6.67 s 26.5 Stable s2 28.05 8.9 s 28.05 Stable 54 4.8.2 Ts Tp 0.9 sec s 0.78 sec 4 Ts n n Sample Calculations 1 4 0.9 (4.13) 4.44 2 Tp 0.78 (4.14) 4.02 2 poles n j n (4.15) 1 poles 4.44 j 4.02 s1 4.44 j 4.02 s2 n 4.44 0.85 5.2 j 4.02 Transfer function of the system at this instant is s2 28.05 8.89 s 28.05 From the above calculation, the two poles of the system are derived from the settling time and peak time. It is observed that the system is stable at this instant because two poles of the system are located in left half of the S Plane. The graphs obtained for the transfer functions to analyze the stability are displayed in Figures A 1.21 to A 1.24 of Appendix 1. 4.8.3 Dynamic behaviour analysis Dynamic characteristics of the system are analyzed by comparing the speed and current waveforms for all the controllers, under all the conditions. From the observations it is found that, while increasing the speed, the current of the motor increases suddenly and decreases when the speed is settled down at the desired speed and maintained at constant value. While increasing the load of the motor, the current is suddenly increased from its 55 present value. After the peak, the current is settled with increased value than the previous value up to further changes in the load. When load is released, the current of the motor is decreased from its present value. From the graphs, variation of the current in PSODE based fuzzy PI controller is small, while either changing the speed or changing the load or changing both simultaneously, when compared to other controllers, for all the conditions. 4.8.4 Operating Range All the controllers performed smoothly for all the ranges of speed within the rated speed. For all the ranges of load, the speed of the motor can be controlled effectively without overshoot, by all the controllers. The range of settling time is differed based on the algorithms. The settling times of the controllers are already compared and the values are illustrated in the Table 4.5. If the gain value in the transfer function is equal to one, the system is stable. While increasing the gain value from 1 to 15, the system is stable with small oscillatory response. While increasing the gain value from 15 to 25, the system becomes oscillatory, but finally settles down. Thus the stability of the system is decreased. While further increasing the gain value above 25, the system’s state becomes unstable from stable. All the four controllers developed and reported in this thesis have good adaptability and strong robustness than the conventional PI controller. 56 4.9 CONCLUSION A PSODE-based fuzzy PI controller for the speed controller system has been successfully developed to control the speed of a separately excited DC motor. Simulation has been performed using MATLAB. Also, FPGA based experimental setup has been developed to control the speed of the motor. A comparative analysis of the simulation and hardware results has been done for the fuzzy, fuzzy PI, PSO fuzzy PI, PSODE fuzzy PI and conventional PI controller. It has been found that the speed regulation by the proposed PSODE-Fuzzy PI controller is better than the other controllers.