You are on page 1of 13

35

CHAPTER 3

DESIGN OF FUZZY CONTROLLER

3.1. INTRODUCTION

This chapter enumerates the design of fuzzy controller for closed loop
control of DC drives. The controller designed has two loops with an inner current
controller and an outer fuzzy speed controller. The designed fuzzy controller is
tested by computer simulations. The controller is used to change the duty cycle of
the converter switches and thereby, the voltage fed to the armature of the separately
excited motor to regulate the speed. The simulated closed loop performance
regarding load variation and set speed change for fuzzy logic controller has been
reported. The fuzzy controller is found to be more advantageous.

3.2. DESIGN METHODOLOGY AND CONTROL IMPLEMENTATION

The following steps are applied to design and implement the fuzzy logic
controller.

1. First the system is analyzed whether it has sufficient elements to be


a fuzzy controlled system.

2. All the information about the system is collected.

3. The control elements are identified to apply fuzzy logic.

4. Input and output variables for the fuzzy logic controller are
identified.

5. Universe of discourse is defined for input and output.


36

6. The fuzzy sets and the corresponding membership function shape


are determined.

7. The rule table is defined.

8. Scale factors of the variables are determined.

9. The system is simulated with the defined fuzzy controller and its
performance is observed under different conditions of operation.

10. The rule table and membership functions are iterated until the
performance of the system is satisfactory.

11. The controller is implemented in real time and further iterated for
optimum performance.

3.3. PROPOSED SYSTEM BASED ON FUZZY LOGIC


CONTROLLER

Figure 3.1 shows the block diagram of the complete proposed system
based on fuzzy logic controller. The system consists of an H-bridge converter for
driving the separately excited motor. A micro-controller is used to generate the
PWM waveform required to switch the H-bridge converter. The designed closed
loop control has two loops. One is outer speed control loop and another one is inner
current control. In the outer speed control loop, the speed is fed back and is
compared with set speed or reference speed. After comparison, error signal is
calculated. This error signal and the reference speed values are given as input to the
fuzzy logic controller. In this proposed work, the error is normalized to per unit
value with respect to the reference speed. This helps in using the fuzzy controller for
any desired reference speed. The fuzzy controller will attempt to reduce the error to
zero by changing the duty cycle of switching signal.
37

Figure 3.1 Proposed system based on fuzzy logic controller

The proposed system has an inner ON / OFF current control loop. This
inner current control loop has the advantage of making the system universal so that
it can be used for any motor with any specifications. Changing the motor reference
current, Ireference can change the controller to work for motor of any current rating.
The controller is designed to work with H- bridge converter and so the speed can be
controlled over a wide range from zero to the rated speed.

Initially, the DC motor and H- bridge converter were developed and


simulated. The fuzzy inference system is developed using control system design
toolkit and the rules are defined using fuzzy system designer tool kit. The designed
FLC was then implemented in LabVIEW and it is used for speed control of DC motor
over Internet using server, client computers. It is seen that the speed is regulated
according to the reference speed value which is selected by a remote client.

3.4. FUZZY LOGIC CONTROLLER

The actual motor speed is fed back and is compared with reference speed.
After comparison, error signal is calculated. This calculated error signal and the
reference speed values are given as input to fuzzy logic controller. In this proposed
work, the error is normalized to per unit value with respect to the reference speed.
This helps in using the fuzzy controller for any desired reference speed. The fuzzy
controller will attempt to reduce the error to zero by changing the duty cycle of
switching signal. The new duty cycle is calculated by adding the output of fuzzy
logic controller with 15% of previous duty cycle. The fuzzy logic controller
structure shown in Figure 3.2 is used for implementation.
38

Figure 3.2 Block diagram of the proposed fuzzy logic controller structure

3.4.1. Fuzzification

The process of converting a crisp variable (real number) into a linguistic


variable (fuzzy number) is called fuzzification. In the proposed work, fuzzy
controller inputs are error value, reference speed and the output is duty cycle. The
inputs error and reference speed are fuzzified [102,103]. These inputs error and
reference speed uses seven linguistic variables and the output change in duty cycle
uses eight linguistic variables. Linguistic variables using triangular membership
function is used as in Figure 3.3.

a. Membership functions for Error

Figure 3.3 (Continued)


39

b. Membership functions for reference speed

c. Membership functions for change in duty cycle

Figure 3.3 Fuzzy membership functions

The fuzzy input error uses seven linguistic variables such as NB


(Negative big), NM (Negative medium), NS (Negative small), Z (Zero), PS (Positive
small), PM (Positive medium) and PB (Positive big). The reference speed input also
uses seven linguistic variables like VVL (Very very low), VL (Very low), L (Low),
LL (Little low), ML (Medium low), N (Normal), and H (High). The duty cycle
output uses eight linguistic variables like VVL (Very very large), VL (Very large), L
(Large), LL (Little large), ML (Medium large), N (Normal), S (Small) and Z (Zero).
40

3.4.2. Defuzzification

The reverse of fuzzification is called defuzzification. That is the process


of converting a linguistic variable in to a crisp variable is called as defuzzification.
The Fuzzy logic controller (FLC) produces required output in a linguistic variable
(fuzzy number). According to real world requirements, the linguistic variables have
to be transformed to crisp output. Centre-of-Area method is the best well-known
defuzzification method which has been used in this work.

3.4.3. Rule Table and Inference Engine

The rules are in the following format. If error is Ai and reference speed is
Bi then output is Ci. Here, if part of the rule is called the rule antecedent and is a
description of a process state in terms of a logical combination of atomic fuzzy
propositions, the then part of the rule is called the rule consequent and is a description
of the control output in terms of logical combinations of fuzzy propositions. The rule
table for the designed fuzzy logic controller is given in Table 3.1.

Table 3.1 Fuzzy rule table

Reference
speed VVL VL L LL ML N H
Error
NB Z Z Z Z S N ML
NM Z Z Z S N ML LL
NS Z Z S N ML LL L
Z Z S N ML LL L VL
PS S N ML LL L VL VVL
PM N ML LL L VL VVL VVL
PB ML LL L VL VVL VVL VVL
41

3.5. SIMULATION OF FUZZY LOGIC CONTROLLER FOR DC


MOTOR CONTROL

The simulation of fuzzy logic controller based DC motor is done based


on state model using LabVIEW. The developed simulation model of the proposed
system is given in Figure 3.4. The control system design tool kit is used to test and
evaluate the proposed fuzzy controller. The simulation was done for a fuzzy logic
controller based DC motor. The parameters of the DC motors used are given in
Tables A1.1 and A1.2 of Appendix 1. The computer simulation is run for a step
change in motor reference speed and the actual change in speed is recorded. The step
change in load torque is also applied and the corresponding change in the speed is
recorded. The fuzzy controller performance was also compared with the
conventional PID controller for the selected motor parameters.

Figure 3.4 Simulated model of fuzzy logic controller based DC motor

3.6. RESULTS AND COMPARATIVE ANALYSIS OF


CONVENTIONAL CONTROLLER AND FUZZY LOGIC
CONTROLLER

The performance of the controllers is studied using LabVIEW simulation


and then validated using experimental implementation for real time robot navigation
control. Initially, a conventional PID controller is designed for the DC drive system.
42

Then, the design of fuzzy logic controller is performed. The simulation model of the
DC motor is developed using LabVIEW. The closed loop operation is simulated with
the designed controllers and their performance is studied. The parameters selected for
the comparison are the steady- state error, rise time, peak overshoot and settling time.

Using LabVIEW control system design functions sub-palette, the PID


and fuzzy controllers are designed and tested. Fuzzy logic controllers have the
advantage that can deal with non-linear systems and use the human operator
knowledge. PID controller has only three parameters to adjust. The PID controlled
system shows good results in terms of response time and precision, when these
parameters are well adjusted. The fuzzy logic controller has a lot of parameters to
adjust. The most important is to make a good choice of rule base and parameters of
membership functions. When these parameters are well chosen, the response of the
system has very good time domain characteristics. The PID controller cannot be
applied with the systems which have a fast change of parameters, because it would
require the change of PID constants in the time.

The computer simulation is run for a step change in motor reference speed
and the corresponding change in actual speed is recorded. The step change in load
torque is applied and the corresponding change in the actual speed is also recorded.

The simulated graphs of speed variation of a 220V and 110V motors with
PID controller and Fuzzy logic controller for a reference speed change from 1000
rpm to 1500 rpm with no load are given in Figures 3.5, 3.6, 3.9 and 3.10. The graphs
of speed variation with step change in speed and step change in load torque are
shown in Figures 3.7, 3.8, 3.11 and 3.12. The reference speed is initially 1000 rpm
and changed to rated speed of 1500 rpm at 100 secs with no load. The load torque is
initially not applied and then changed to full load torque at 200 secs and removed at
300 secs.
43

Figure 3.5 Graph of speed variation for the step change in the reference speed
with PID controller for a 220V motor

Figure 3.6 Graph of speed variation for the step change in the reference
speed with fuzzy logic controller for a 220V motor
44

Figure 3.7 Graph of speed variation for the step change in the reference speed
and step change in load torque with PID controller for a 220V
motor

Figure 3.8 Graph of speed variation for the step change in the reference
speed and step change in load torque with fuzzy logic controller
for a 220V motor
45

Figure 3.9 Graph of speed variation for the step change in the reference
speed with PID controller for an 110V motor

Figure 3.10 Graph of speed variation for the step change in the reference
speed with fuzzy logic controller for an 110V motor
46

Figure 3.11 Graph of speed variation for the step change in the reference
speed and step change in load torque with PID controller for an
110V motor

Figure 3.12 Graph of speed variation for the step change in the reference
speed and step change in load torque with fuzzy logic controller
for an 110V motor
47

Based on the simulation results, the time-response specifications of fuzzy


logic controller and the PID controller based 220V and 110V DC motors are given
in Tables 3.2 and 3.3. The time-response specifications of the simulation results
show that the fuzzy logic controller performance is better in respect of steady state
error and settling time. The speed regulation for various loaded conditions of PID
controllers compared with fuzzy logic controller. The simulation results of PID
controller and fuzzy logic controller confirm that the fuzzy logic controller provides
better dynamic response and can be used for DC motor speed control which can be
implemented for achieving navigation, steering control of various robots.

Table 3.2 Time-response specifications of simulation results of 220V DC motor

Time-response specifications Fuzzy logic Controller PID Controller


Rise time tr 3 Sec 3.5 Sec
Peak time tp 13 Sec 17 Sec
Maximum overshoot Mp 30% 58%
Steady state error 0 rpm 22 rpm
Drop in speed when loaded
30 rpm 100 rpm
with 100% Load torque

Table 3.3 Time-response specifications of simulation results of 110V DC motor

Time-response specifications Fuzzy logic Controller PID Controller


Rise time tr 3 Sec 3.5 Sec
Peak time tp 13 Sec 17 Sec
Maximum overshoot Mp 30% 57.5%
Steady state error 0 rpm 10 rpm
Drop in speed when loaded
30 rpm 80 rpm
with 100% Load torque

You might also like