You are on page 1of 21

96

CHAPTER 6

FUZZY LOGIC BASED CONTROLLER

6.1 INTRODUCTION

A fuzzy logic system (FLS) can be defined as the nonlinear mapping


of an input data set to a scalar output data (Mendel 1995). A FLS consists of
four main parts namely fuzzifier, rules, inference engine and defuzzifier.

The fuzzy logic process has been explained by the following steps.
Initially, a crisp set of input data have been converted into a fuzzy set by
using fuzzy linguistic variables, fuzzy linguistic terms and membership
functions. This process is known as fuzzification. Secondly an inference is
framed by using a set of rules. Finally the process of defuzzification has been
carried out with the output of the fuzzification and converted to a crisp data
using the membership functions.

6.1.1 Linguistic Variables

Linguistic variables are the input or the output variables of the


system whose values are words or sentences from a natural language, instead
of numerical values. A linguistic variable is generally decomposed into a set
of linguistic terms.

6.1.2 Membership Functions

Membership functions play an important role in the fuzzification


and defuzzification steps of a FLS, to convert the non-fuzzy input values into
97

fuzzy linguistic terms and vice versa. A membership function is used to


quantify a linguistic term. There are different forms of membership functions
such as triangular, trapezoidal, piecewise linear, Gaussian and singleton as
shown in Figure 6.1.The most common types of membership functions are
triangular, trapezoidal, and Gaussian shapes. The type of the membership
function can be context dependent and it is generally chosen arbitrarily
according to the user experience.

triangul trapezoidal

piecewise linear Gaussian

singleton

Figure 6.1 Different types of membership functions


98

6.1.3 Fuzzy Set Operations

Fuzzy set operations evaluate the fuzzy rules and the combines the
results of the individual rules. The operations on fuzzy sets are different than
the operations on non-fuzzy sets. The mostly used operations for OR & AND
operators are max and min, respectively. After evaluating the result of each
rule, these results should be combined to obtain a final result. This process is
called inference.

6.1.4 Fuzzification

The conversion of crisp quantities into fuzzy quantities is known as


fuzzification. The fuzzification is performed by assigning membership values
for the given crisp quantities. The several methods of fuzzifing crisp
quantities as follows.

Intuition
Inference
Rank ordering
Angular fuzzy set
Neural network
Genetic algorithm
Inductive reasoning

6.1.4.1 Intuition

The humans own intelligence and understanding to develop the


membership functions are the necessary thinks for the intuition to be done.
The knowledge of problems and the knowledge related to linguistic variable
99

must be known. In intuition method, triangular membership function is used


for fuzzification of crisp value into membership value.

In the proposed Fuzzy Logic based controller, the variables such as


irradiation, temperature and duty cycle are fuzzyfied into membership value
using triangular membership function.

6.1.4.2 Inference

The knowledge to perform the deductive reasoning is very


important for this method. The membership function is formed from the
knowledge and the known facts.

6.1.4.3 Rank ordering

The assigning of membership values for the crisp quantities by rank


ordering method is done by the polling concept. Pair wise comparisons are
made and based on this ordering the membership values are assigned.

6.1.4.4 Angular fuzzy set

Angular fuzzy sets are applied in quantitative descriptions of


linguistic variables known truth values.

6.1.4.5 Neural network

The assignment of membership values for a crisp quantity is made


on the concept of the human brain, which can be used to perform
computations on computers.
100

6.1.4.6 Genetic algorithm

Genetic algorithm uses the concept of Darwin’s theory of


evolution, which is based on the rule ‘survival of the fittest’.

6.1.4.7 Inductive reasoning

A well defined database must be needed for developing input,


output relationships. And hence this method is more suitable for complex
systems where the data are abundant and static.

6.1.5 Defuzzification

After the inference, the obtained overall result is a fuzzy value. This
result should be converted into defuzzified to obtain a final crisp output.
Defuzzification is performed according to the membership function of the
output variable. The different defuzzification methods are:

Max membership principle


Centroid method
Weighted average method
Mean max membership
Center of sums
Center of largest area
First of maxima or last of maxima.

6.1.5.1 Max membership principle

Max membership method can be used for peaked output functions


only .This method is also known as Height method and it can be expressed as
101

*
cz
~
c
~
z

Where
z* is the defuzzified value, and it is shown in the Figure 6.2
graphically.

Z* Z
Figure 6.2 Max membership principle defuzzification

6.1.5.2 Centroid method

Centroid method is the most appealing method among all the


defuzzification method and it is also called as center of area or center of
gravity. It is the most prevalent and commonly used method. The graphical
representation of centroid method is shown in Figure 6.3 and it is given by the
algebraic expression

c z .zdz
z* ~

c z dz
~

Where
denotes an algebraic integration.
102

Z* Z
Figure 6.3 Centroid method

6.1.5.3 Weighted average method

Among the various defuzzification methods the weighted average


method is the most frequently used since it is one of the more
computationally efficient method. But the main drawback of this method is
restricted to symmetrical output membership functions. It is given by the
algebraic expression
c z .z
z* ~

cz
~

Where
represents the algebraic sum and

z is the centroid of each symmetric membership function.


The weighted average method can be shown graphically as in Figure 6.4.

0.5

0
a b z

Figure 6.4 Weighted average method of defuzzification


103

The weighted average method is formed by weighting each membership


function in the output by its respective maximum membership value. In the
proposed Fuzzy Logic based controller, weighted average method is used to
defuzzify the output variables.

6.1.5.4 Mean max membership

Mean max method or middle-of-maxima method is closely similar


to the Max membership method, except that the locations of the maximum
membership can be non unique. Diagrammatically this method can be shown
as in the Figure 6.5.
Algebraically this method is given by the following expression

a b
z*
2

0.5

0
a z* b z
Figure 6.5 Mean max membership method

6.2 PROPOSED FUZZY LOGIC CONTROLLER FOR BOOST


INVERTER

Fuzzy Logic based Controller (Narasimharaju et al 2011) is


discussed to deal with the problems like fluctuating output voltage of the
converters due to fluctuations in the irradiation and temperature. The control
structure for boost inverter is shown in Figure 6.6. Also due to parasitic
104

resistances, stray capacitances and leakage inductances, the operation of


converter deviates from theoretical prediction to practical.

S1 D2
+
L1 C1 VC1
D -
+ +
S2 D1 V0
C VS

- -

2
T C0G W/m
S4 D4
FLC +
L2
C2 VC2
%D -
S3 D3
PWM

AND S1, S3

(50Hz), 00
phase delay

(50Hz), 1800 AND S2, S4


phase delay

Figure 6.6 Boost inverter with proposed fuzzy logic controller


105

Generally the converters must operate into a closed loop for giving
the desired output voltage irrespective of the source and the load disturbances.
All these problems are efficiently dealt with Fuzzy Logic Controller (FLC).

Since this method does not need accurate mathematical model of a


plant, it matches well to a process where the model is unknown or ill-defined.
The Fuzzy controller (Mattavelli et al 1997, Gupta et al 1997) is divided into
four sections: Fuzzifier, Rule Base, Decision Making and Defuzzifier. The
fuzzifier converts crisp data into linguistic format.

The output of the inference system passes through the defuzzifier


wherein the linguistic format is converted back into the numeric data or crisp
data. The various methods of fuzzy reasoning are reported in the literature
(Takagi & Sugeno 1985, Bose 1994) such as larsen’s, mamdani’s, tsukamot
and sugeno’s methods. Sugeno’s fuzzy reasoning method is used to obtain the
inference result from a system. The solar photovoltaic module’s temperature
(T) and the irradiation (G) are determined and processed through Fuzzy Logic
Controller.

The two inputs will be fuzzified by using normalized fuzzy sets with
four triangular membership functions (MFs – input-1):Very Low (VL), Low
(L), Normal (N) and High (H), (MFs – input-2): Low (L), Normal (N), High
(H) and Very High (VH) as shown in Figure 6.7 (a) & (b).

The output variable consists of a normalized fuzzy set with


triangular MF: Very Low (VL), Low (L), Normal (N) and High (H) as shown
in Figure 6.7 (c).

After the fuzzification of the crisp inputs, the resulting fuzzy sets
have to be compared to the rule-base. The rule base is a set of " And method-
‘prod’ & Or method-‘probor" rules constructed according to the Table 6.1.
106

Depending on the value of the temperature and irradiation of the solar pv


panel the fuzzy out is determined as shown in the Table 6.1.

VL L N H
1
Deg.

of MF

0
400 600 800 10000
Irradiation in W/m2

Figure 6.7(a) Input membership functions of irradiation of the solar

L N H VH
1
Deg.

of MF

0
20 25 30 35
Temperature in 0C

Figure 6.7(b) Input membership functions for Temperature of the solar


PV panel
107

VL L N H
1
Deg.

of MF

0
0.7173 0.7217 0.7277 0.7336
Duty Cycle

Figure 6.7(c) Output membership functions of duty cycle for boost


inverter

The last step in the FLC process is the defuzzification, which takes
the implied fuzzy set and transforms it back to a real continuous number or a
crisp output. The continuous pulse with desired duty cycle can be generated
by comparing the crisp set values with the high frequency triangular wave by
pulse width modulation (PWM) technique.

Table 6.1 Fuzzy Rule Base Matrix

G
VL L N H
T
L H N L VL
N H N L VL
H N L VL VL
VH H H N L
108

This continuous pulsatory signal was modified by logically AND


with 00 phase shifted square wave of fundamental frequency with 50Hz. As a
result a pulsated continuous signal can be obtained for every alternative 10ms
and it controls the switches (S1 & S3) of the boost inverter, capacitor voltage
(VC1) and inductor current (IL1) of the current bi-directional boost dc-dc
converter-1 as shown in Figure 6.8.

G W/m2
Decision %D
Fuzzifier DeFuzzifier PWM
Making
T 0C

Rule
s

S1, S3 AND

(50Hz), 00
phase delay

S2, S4 AND

(50Hz), 1800
phase delay

Figure 6.8 Proposed fuzzy logic controller scheme for boost inverter

The same technique is used to control the capacitor voltage (VC2)


and inductor current (IL2) and switches (S2 & S4) of the boost inverter to get
the fundamental frequency of the square wave with the 1800 phase shift.

Therefore the output of the boost dc-ac inverter can be regulated by


controlling the switches of the both current bi-directional boost dc-dc
109

converters to match with the grid parameters like voltage, phase angle and
frequency. The main advantage of this control method is to keep the output
voltage constant barring various irradiations and temperatures.

6.3 SIMULATION MODEL OF PROPOSED SYSTEM

The proposed standalone solar power generation using boost


inverter using Fuzzy Logic Controller (FLC) Figure 6.9 (a) and (b), was
developed by MATLAB SIMULINK assuming the power switches, capacitor
voltage and inductors current with internal resistance Ra are ideal. The
parameters are:
Vin = 100 V, Vo = 220sin t, Po = 100 W, L1, L2 = 65 mH each,
C 1, C2 = 100 µF each and Duty ratio (D) of 0.7173 to 0.7336.

Figure 6.9(a) MATLAB SIMULINK model of proposed single stage solar


power generation using boost inverter with fuzzy logic
controller
110

Figure 6.9(b) MATLAB SIMULINK model of boost inverter


111

6.4 SIMULATION RESULTS

Figure 6.10(a) Output of the solar pv array and input of the boost
inverter (VS)

Figure 6.10(b) Output voltage of the boost inverter (Vo) in volts;


200V/div, 0.05s/div under T=300C,G=1000W/m2

An input voltage 100V dc as shown in Figure 6.10 (a) is applied


through battery. The Figure 6.10 (b) shows the simulated results of the
proposed fuzzy logic controller for single stage boost dc-ac inverter. It has the
rms value of the output voltage of the boost inverter is 155V and the
maximum ac voltage is 220V with the fundamental frequency of 50Hz for the
load of 60W. By operating the set of switches alternatively for every 10ms at,
a fundamental frequency of 50Hz can be obtained. The angle of phase shift of
112

the output voltage is 300 and also the magnitude of the output voltage is not
220Vrms, which can not satisfy the grid parameters.

Figure 6.11(a) Inductor current of the boost inverter (IL1 & IL2); 10A/div,
0.05s/div

Figure 6.11(b) Load current for 60watts load in amps; 0.38A/div,


0.05s/div
113

Figure 6.12 Capacitor voltages of the each boost dc-dc converter


(VC1&VC2)

Figure 6.13(a) Total Harmonic Distortion for load current


114

Figure 6.13(b) Total Harmonic Distortion for output voltage

Figure 6.14 Control signals for switches as 1,2,3,& 4 of the boost


inverter

6.5 RESULTS AND DISCUSSION

The simulated results of the proposed Fuzzy logic based controller


for boost dc-ac inverter for a 60W load has been shown in the waveforms.
The maximum value of the output voltage of the proposed model is 220Vm for
an input voltage of 100Vdc as shown in Figure 6.10.
115

Figure 6.11 (a) shows that the inductor current IL1 is less than 8A
and initial transient current is 10A with very minimum current ripple.
Therefore the inductor averaged current is controlled significantly. The
maximum instantaneous voltages of capacitors VC1 and VC2 is 300V which
are phase shifted by 1800 with each other as shown in Figure 6.12.

Simulated results of output voltage THD, load current THD,


inductor current and capacitor voltage for various loads such as RL and RLC
are noted and given in the table 6.2.

Table 6.2 Output voltages, output voltage THD and load current THD
of the Boost Inverter under various loads

Initial inductor Initial capacitor


Load VO(rms) surge surge % THD for % THD for
Type
(W) Volts current voltage VO Iload
(A) (V)
60 156 10 367 4.91 4.93
R 100 155 10 367 4.48 1.87
140 152 10 367 5.00 4.51
60 170 10 374 4.74 2.37
RL 100 177 10 374 4.94 2.48
140 180 10 374 5.01 2.57
60 163 10 365 4.85 2.17
RLC 100 167 10 365 4.13 2.27
140 165 10 365 4.44 2.42
116

Table 6.3 Output voltages and THD of the Boost Inverter under various
solar temperatures and irradiations

Input Output
Solar cell Irradiance Duty
Sl. voltage voltage
Temp.(T) (G) in cycle % THD
No. 0 2 (Vin) in (V0) in
in C W/m (D)
volts volts
1. 25 1000 0.7212 104.5 230 4.58
2. 25 800 0.7237 102.8 230 4.49
3. 30 1000 0.7255 105.9 230 4.48
4. 30 800 0.7255 104.3 230 4.46
5. 35 1000 0.7173 107.3 232 4.48
6. 35 800 0.7197 105.6 231 4.51
7. 20 600 0.7288 99.31 228 4.33
8. 20 400 0.7336 96.24 228 4.33

The Total Harmonic Distortion (THD) of VO is less than the 4.5%


when compared to the THD obtained by using sliding mode controller as
shown in the Figure 6.13 (b). The Total Harmonic Distortion of the load
current is 1.87% for the fundamental frequency as shown in the
figure 6.13 (a).

Table 6.2 and table 6.3 shows the output voltage variations in
variable loads and calculation of duty cycle for various temperatures,
irradiation of the solar PV array corresponding output voltages and THD of
the boost inverter are presented.

You might also like