TJFS: Turkish Journal of Fuzzy Systems (eISSN: 1309–1190

An Official Journal of Turkish Fuzzy Systems Association Vol.1, No.1, pp. 36-54, 2010.

DC motor position control using fuzzy proportional-derivative controllers with different defuzzification methods
Manafeddin Namazov Cumhuriyet University, Faculty of Engineering, Department of Electrical & Electronics Engineering, 58140 Sivas, Turkey E-mail: Onur Basturk* Cumhuriyet University, Faculty of Engineering, Department of Electrical & Electronics Engineering, 58140 Sivas, Turkey E-mail: *Corresponding author
Received: February 1, 2010 - Revised: April 2, 2010 – Accepted: May 26, 2010

Abstract This paper presents the design of a fuzzy control system to control the position of a DC motor. The motor was modelled and converted to a subsystem in Simulink. First, a crisp proportional-derivative (PD) controller was designed and tuned using a Simulink block instead of conventional tuning methods such as hand-tuning or Ziegler-Nichols frequency response method. Then a fuzzy proportional-derivative (FPD) controller was designed and system responses of FPDs with different defuzzification methods were investigated. A disturbance signal was also applied to the input of the control system. FPD controller succeeded to reject the disturbance signal without further tuning of the parameters whereby crisp PD controller failed. Keywords: Fuzzy logic, DC motor position control, Fuzzy proportional-derivative controller, Response optimization, Ziegler-Nichols method

1. Introduction Because of their high reliabilities, flexibilities and low costs, DC motors are widely used in industrial applications, robot manipulators and home appliances where speed and position control of motor are required. PID controllers are commonly used for motor control applications because of their simple structures and intuitionally comprehensible control algorithms. Controller parameters are generally tuned using hand-tuning or Ziegler-Nichols frequency response method. Both of these methods have successful results but long time and effort are required to obtain a satisfactory system


hydraulic and electrical objects such as DC motors and observed that fuzzy controller was able to reject the noise signal applied to the input of system (Namazov. nonlinear and/or time-varying systems is a challenging task using conventional methods because of uncertainties. 1965) which led to a new control method called Fuzzy Control which is able to cope with system uncertainties. M. Zadeh et. the mathematical model of a dc motor is used to obtain a transfer function between shaft position and applied armature voltage. 2004). Some of the 37 . Mishra et. al. 1994). Lin et. In the next section. Then the parameters may be slightly varied to obtain the user-defined performance of the real-time control system. it’s mentioned about the fuzzy logic controller design issues and a fuzz y proportional-derivative controller is designed with the proposed approach. al. design and tuning of proportional-integral-derivative (PID) controllers are reviewed and a crisp PD control system is designed in Simulink with the proposed design procedure. al.response. Two main problems encountered in motor control are the time-varying nature of motor parameters under operating conditions and existence of noise in system loop. Thus. 1998). explained that one of the best methods for control of a DC motor with time-varying parameters was fuzzy sliding mode control (Zadeh. Ziegler-Nichols frequency response method is usually used to adjust the parameters of the PID controllers. inserting a resistor in series with the armature circuit are also available (Chapman. Namazov et. DC motor control is generally realized by adjusting the terminal voltage applied to the armature but other methods such as adjusting the field resistance. made a comparison between PID and FLC for servomotor control and described that PID parameters had to be tuned again under variations of plant parameters or noise wherever FLC parameters had not (Mishra. Azevedo et. But it’s not always possible to get most of the technological plants into oscillation. 2007). designed a relay type fuzzy controller in control of double integrator systems which can be used to model many mechanical. al. 2006). Analysis and control of complex. In Section 3. The proposed approach uses both fuzzy controllers and response optimization method to obtain the approximate values of the controller parameters. 1974). This model is then built in MATLAB Simulink. Kwon et. Fuzzy set theory (Zadeh. al. (Kickert. have shown that FLC is less sensitive than PID to load variations (Azevedo.H. compared PID and FLC for position control and observed that FLC performed better than PID (Lin. al. One of the most important advantages of fuzzy control is that it can be successfully applied to control nonlinear complex systems using an operator experiences or control engineering knowledge without any mathematical model of the plant (Assilian. designed an FLC for an ultrasonic motor which has a different operation principle than electromagnetic motors (Bal. 1993). al. There are many papers about DC motor fuzzy control system design. it’s an actual problem to design adaptive PID controllers without getting the system into the oscillation mode. The rest of this paper is organized as follows. Bal et. 2005). 2003). 1976). However. it is needed to get the system into the oscillation mode to realize the tuning procedure. designed a PI controller for a brushless DC motor and built an adaptive fuzzy tuning system to modify the controller parameters under load variations during operation (Kwon. In Section 4.

2. DC motor model In armature control of separately excited DC motors. Figure 1.commonly used defuzzification methods are discussed and system responses with different defuzzification methods are compared. Figure 1 shows a separately excited DC motor equivalent model. Finally disturbance rejection capabilities of the designed controllers are investigated. the voltage applied to the armature of the motor is adjusted without changing the voltage applied to the field. DC motor model where armature voltage ( ) armature resistance ( ) armature inductance ( ) armature current ( ) back emf ( ) angular speed ( ) motor torque ( ) angular position of rotor shaft ( rotor inertia ( ) viscous friction coefficient ( torque constant ( ) back emf constant ( ) ) ) Let us combine the upper equations together: 38 .

Motor model was converted to a 2-in 2-out subsystem. Input ports are armature voltage (Va) and load torque (Tload) and the output ports are angular speed in (w) and position (teta).Laplace transforms of (5) and (6) are: If current is obtained from (8) and substituted in (7) we have Then the relation between rotor shaft speed and applied armature voltage is represented by transfer function: The relation between position and speed is: Then the transfer function between shaft position and armature voltage at no-load is: Figure 2 shows the DC motor model built in Simulink. 39 .

Proportional-integral-derivative (PID) controller PID controllers are widely used in industrial control applications due to their simple structures. Simulink model A 3. 1750 rpm DC motor with the below parameters was used: 3. 40 . comprehensible control algorithms and low costs.Figure 2. Figure 3. its integral and derivative. PID control system Control signal is a linear combination of error . 240V. Figure 3 shows the schematic model of a control system with a PID controller.70 kW.

Remove derivative and integral actions by setting and 2. Table 1. Increase slightly and adjust to dampen the overshoot 4.where = proportional gain = integral gain = derivative gain = integral time = derivative time If the controller is digital. then increasing results in a more stable control. Tune such that final offset is removed 5. Repeat steps from 3 until is as large as possible 41 . then the derivative term may be replaced with a backward difference and the integral term may be replaced with a sum. For a small constant sampling time . For example if an integrator exists in the plant. But these rules are not always valid. 2007). Tune such that it gives the desired response except the final offset value from the set point 3. Hand-tuning rules A simple hand-tuning procedure is as follows: 1. Hand-tuning is generally used by experienced control engineers based on the rules shown in Table 1. (14) can be approximated as: 3.1 Tuning PID parameters PID controllers are usually tuned using hand-tuning or Ziegler-Nichols methods (Jantzen.

Damping is generally poor. 3. Ziegler-Nichols rules Ziegler-Nichols frequency response method gives poor results especially for the systems with a time lag much greater than the dominating time constant (Jantzen. 1997).2 PD controller design A PD controller was designed to control the DC motor. 2008). Rules work better for PID controllers than PI controllers and it is not stated how to calculate the parameters for a PD controller. Increase until system response oscillates with a constant amplitude and record that gain value as (ultimate gain) 2. The procedure is as follows: 1. Another method to tune PID parameters is Ziegler-Nichols frequency response method. Control signal of a PD controller is as follows: Controller parameters were tuned using Signal Constraint block of Simulink Response Optimization Toolbox instead of conventional methods. Calculate the oscillation period and record it as 3. Another method proposed by Ziegler and Nichols is the reaction curve or step response method where the unit-step response of the plant is used to adjust parameters.The disadvantage of this method is that it should take a long time to find the optimal values. Tune parameters using Table 2 Table 2. But the plant must not involve any integrators or dominant complex conjugate poles for this method to apply (Ogata. 2007). Signal Constraint is a block where response signals can be graphically constrained and model parameters should be automatically optimized to obtain the performance requirements (Mathworks. Performance criteria were specified as: Rise time Settling time Maximum overshoot Steady state error 42 .

3 Simulink implementation Figure 4 shows the PD control system designed in MATLAB Simulink where controller coefficients were adjusted using the Signal Constraint block. Determine a reasonable set which represents the behaviour of closed loop system at any time instant.The objective in control system design is to find a control signal that satisfies the performance requirements (Veremey). 3. Then the objective is to find an vector that satisfies the performance requirements.e. 43 . Assume that the mathematical model of the plant can be represented by a differential equation: where time vector -vector of state variables -control vector -disturbance vector Also assume that controller is represented by: where – differential operator – transfer matrix of the controller Assume that transfer matrix structure is known and vector of controller parameters to be tuned ( ) is also included in this structure. ). Integral coefficient of PID controller was set to zero (i. It is obvious that this set should only be obtained by the choice of vector.

64s 0. It can be seen from Figure 5 that Signal Constraint block adjusted the parameters such that a very small overshoot occurs. Crisp PD control system Figure 5 shows the optimization process of controller parameters where obtained as . and were Figure 5. respectively.Figure 4.88s 0. Performance specifications for crisp PD control system 0. Optimization of PD parameters Overshoot is not desired especially in position control systems.2% None 44 . Table 3 shows the values of the performance criteria obtained with the adjusted controller parameters. Table 3.

inference mechanism. PID controllers are simple. linear controllers which consist of linear combinations of three signals.Figure 6 shows output and control signals of PD control system with adjusted parameters. settling time or steady state error is affected when controller parameters or control rules are changed. FLCs are complex. Therefore it’s difficult to predict how the rise time. 4. On the contrary. nonlinear controllers. Figure 6. rule base and defuzzification interface. Output and control signals for crisp PD control system 45 . Fuzzy logic controller A fuzzy logic controller has four main components as shown in Figure 7: fuzzification interface.

Figure 7. membership functions etc. 5. FLCs can be tuned not just by adjusting controller parameters but also by changing control rules. Fuzzy logic controller Implementation of an FLC requires the choice of four key factors (Mamdani. But it’s possible to construct a rule base with linear input-output characteristics. should be multiplication and defuzzification method must be “centre of gravity” (COGS). inference mechanism and defuzzification methods are the sources of nonlinearities in FLCs. Rule base. 4. 1977): number of fuzzy sets that constitute linguistic variables. membership values add to 1. Linguistic values must consist of symmetric triangular fuzzy sets that intercept with neighbouring sets at a membership value of so that for any time instant. Support sets of input linguistic variables must be large enough so that input values stay in limits. control protocol that determines the controller behaviour and shape of membership functions. 2007): 1. mapping of the measurements onto the support sets. 4. Thus.1 FPD controller design Figure 8 shows an FPD controller that acts on the same signals with a PD controller but the control strategy is constructed as fuzzy rules (Jantzen. 2. For an FLC to become a linear controller with a control signal where is “error” and is “change of error”. Rule base must consist of -combinations of all fuzzy sets. 46 . Output linguistic variables must consist of singleton fuzzy sets positioned at the sum of the peak positions of input fuzzy sets. 2007). some conditions must be satisfied (Jantzen. 3.

A linear approximation should be obtained with a suitable choice: Then When we compare this equation with the control signal of a crisp PD controller. 47 . the relationship between gains of a PD controller and of an FPD controller is: Consequently. parameter values of a linear FPD controller may be determined from a tuned PD controller. FPD controller Control signal is a nonlinear function of “error” and “change of error”. Figure 9 shows the control system with an FPD controller. Thus. where represents the control algorithm.Figure 8.

For continuous sets summations are replaced by integrals. For discrete sets. BOA is a computationally complex 48 . is calculated as follows: where is a point in the universe of the conclusion and is the membership value of the resulting conclusion set.Figure 9. is the index of the largest abscissa . The bisector of area (BOA) defuzzification method calculates the abscissa of the vertical line that divides the area of the resulting membership function into two equal areas. Control system with an FPD controller 4. There are many defuzzification methods but the most common methods are as follows: 1) Center of gravity (COG) 2) Bisector of area (BOA) 3) Smallest of maximum (SOM) 4) Mean of maximum (MOM) 5) Largest of maximum (LOM) For discrete sets COG is called center of gravity for singletons (COGS) where the crisp control value is the abscissa of the center of gravity of the fuzzy set. is the abscissa that minimizes Here method.2 Defuzzification methods Defuzzification interface uses the implied fuzzy sets or the overall implied fuzzy set to obtain a crisp output value.

Input and output variables of FPD consist of seven fuzzy sets namely NB (negative big). and is One can also choose the leftmost point among the points which have maximum membership to the overall implied fuzzy set. PM (positive medium) and PB (positive big) as shown in Figure 10(a) and (b). Therefore it’s a common practice to calculate the mean value of these points. This method is called smallest of maximum (SOM) or the leftmost maximum (LM) defuzzification method. PS (positive small). reaches its maximum . Crisp value is calculated as follows: Another possibility is to choose the rightmost point among the points which have maximum membership to the overall implied fuzzy set. This method is called largest of maximum (LOM) or the rightmost maximum (RM) defuzzification method where crisp value is calculated as: 4. Fuzzy input-output variables 49 . There may be several points in the overall implied fuzzy set which have maximum membership value. This method is called mean of maximum (MOM) and the crisp value is calculated as follows: Here is the (crisp) set of indices where its cardinality (the number of members).3 Simulink implementation Inputs of FPD are “error” and “change of error” where the output is “control”. NS (negative small). Z (zero). (a) Fuzzy input variables “error” and “change of error” (b) Fuzzy output variable “output” Figure 10.Another approach to obtain the crisp value is to choose the point with the highest membership. NM (negative medium). Table 4 shows fuzzy rules.

Fuzzy rules Figure 11 shows the fuzzy PD control system designed in Simulink.1649 Figure 12(a)-(d) shows the system responses and control signals for the fuzzy control systems with different defuzzification methods. 50 .01 0.1236 4. Table 5 shows the tuned values of the controller parameters for different defuzzification methods.01 0.1901 0. Table 6 shows the values of the performance criteria for different defuzzification methods with the tuned controller parameters. Controller parameters for different defuzzification methods Method Bisector SOM MOM LOM 2.2484 4. Fuzzy PD control system Different defuzzification methods were used to obtain the control signal.7623 0.5538 4.Table 4. Figure 11. Table 5.

Figure 14 shows the applied disturbance signal and Figure 15 shows the system response and error signals. Figure 12 and Table 6 show that different defuzzification methods result in different performance and parameters as well as different control signals. Conclusions and future work Parameters of PD and FPD controllers were tuned using a Simulink block instead of conventional tuning methods. SOM defuzzification method had the best performance in this particular application. optimal energy consumption etc. Initial values of parameters were defined as and the new parameter values were adjusted in just a few iterations as shown in Figure 5. Therefore a disturbance signal (Gaussian type noise with zero mean and 0. The controller must be able to dampen out the effects of disturbance signals existing in the system loop. “soft-tuning” fuzzy controllers will be designed to vary the parameters in a fuzzy interval. After obtaining the controller parameters. The performance criteria are defined in time domain where the transient response of the system to a step input was considered. FPD controller rejected the disturbance signal without further tuning of the controller parameters. 5. the variation of the controller parameters between maximum and minimum values will be considered as fuzzy.).05 variance) was applied to the input of the control system as shown in Figure 13. Thus the time and effort for tuning parameters decreased considerably.Disturbance rejection is important in controller design. This paper presents the optimization of the controller parameters via a Simulink block instead of conventional tuning methods. However. As a future work. 51 . Thus. a fuzzy control system will be designed using various performance measures commonly encountered in optimal control theory (optimal time. PD controller was unable to reject the disturbance signal and it failed to satisfy the performance requirements.

Performance specifications for fuzzy PD control system Method Bisector SOM MOM LOM 0.2 0.91 1.26 0.2 52 .2 1 0.2 0. Output and control signals for different defuzzification methods Table 6.97 0.68 0.16 1 None None 1 0.(a) Bisector (b) SOM (c) MOM (d) LOM Figure 12.97 0.83 1.

Azevedo. FPD control system with a disturbance signal at the input Figure 14. A Fuzzy Logic Controller for dc Motor Position Control. 53 . and Mamdani. 18-27.F. 1-13. H. S. IEEE 2nd International Workshop on Emerging Technologies and Factory Automation.R. E. and Mota Alves. 1974.H. 7(1). 1993. Workshop Proceedings.Figure 13... Disturbance signal Figure 15. An Experiment in Linguistic Synthesis with a Fuzzy Logic Controller. J.B.. S. System response and error References Assilian. International Journal of Man-Machine Studies.M. Brandao. Design and Operations of Intelligent Factories.

J. Kickert. Foundations of Fuzzy Control. A. K. E. G. E. 301-308. H. W. 338-353. and Ghosh. Kothari. Nonlinear Control Design Blockset [Online] Available: http://matlab. M. S. R. M. J.. Automation and Motion (SPEEDAM 2006). Application of Fuzzy Logic to Approximate Reasoning Using Linguistic Synthesis. W. 1976. 54 . Comparison on Fuzzy Logic and PID Controls for a DC Motor Position Controller. Automatica. Ltd. Hwang. Chapman.. 45. L. Kothari. Information and Control. Development of a Fuzzy Logic Controller for Servo Systems. 2006. NJ: Prentice Hall.H. Electric Machinery Fundamentals. Speed controller with adaptive fuzzy tuning for BLDC motor drive under load variations.B. Zadeh. A.Y. C. Fuzzy logic based DSP controlled servo position control for ultrasonic motor.J. 7-11. Samet. 1998. 2007. 1997. 12(4). 3rd edition.. and Pogojev. J. Conference Record of the 1994 IEEE Industry Applications Society Annual Meeting... and Chou. SICE Annual Conference.. E. Kwon.P. H. H.G.K.exponenta. 2008. Fuzzy Sets. 3139–3153. M. S.. 1413-1418. Han. 1994. D. and Mohamadian. IEEE Transactions on Computers. Lin.. 8.php Zadeh. S.. Robust Position Control in DC Motor by Fuzzy Sliding Mode Control. Communication and Control (TENCON '98).. 1977. 2004. Ogata.. Simulink® Response Optimization™ Getting Started Guide. S.. 26(12). Veremey. I. 2003. WS: John Wiley & Sons. 1965. and Lee C.Bal. 1182-1191. IEEE Region 10 International Conference on Global Connectivity in Energy. Jantzen. Mathworks Inc. Demirbas.. 2007. and Colak. A. Namazov. M. Electrical Drives. New York: McGraw Hill. M. A. R. Kim.. Mamdani..G. Modeling&Simulation. R... Yazdian. and van Nauta Lemke. 2005... 4th edition. Modern Control Engineering. P. Application of a Fuzzy Controller in a Warm Water Plant. Proceedings of 9th WSEAS International Conference on Automatic Control. Bekiroglu.. Mishra. Modelling and Simulation of the Fuzzy Relay Type Controller for Solving the Double Integrator Control Problems. Computer. J. International Symposium on Power Electronics. and Huseynov. Energy Conversion and Management. 204-207. 3118-3121... 3rd printing.J. 1930-1935...

Sign up to vote on this title
UsefulNot useful