Fuzzy Logic Control in Energy Systems With Design Examples
Fuzzy Logic Control in Energy Systems With Design Examples
This publication is copyright under the Berne Convention and the Universal Copyright
Convention. All rights reserved. Apart from any fair dealing for the purposes of research
or private study, or criticism or review, as permitted under the Copyright, Designs and
Patents Act 1988, this publication may be reproduced, stored or transmitted, in any
form or by any means, only with the prior permission in writing of the publishers, or in
the case of reprographic reproduction in accordance with the terms of licences issued
by the Copyright Licensing Agency. Enquiries concerning reproduction outside those
terms should be sent to the publisher at the undermentioned address:
While the author and publisher believe that the information and guidance given in this
work are correct, all parties must rely upon their own skill and judgement when making
use of them. Neither the author nor publisher assumes any liability to anyone for any
loss or damage caused by any error or omission in the work, whether such an error or
omission is the result of negligence or any other cause. Any and all such liability is
disclaimed.
The moral rights of the author to be identified as author of this work have been
asserted by him in accordance with the Copyright, Designs and Patents Act 1988.
1 Introduction 1
1.1 Introduction 1
1.2 Fuzziness 3
1.3 Fuzzy membership functions 4
1.4 Fuzzy sets 5
1.5 Latest developments in energy systems 5
References 6
3 Fuzzy decision-making 87
3.1 Introduction 87
xii Fuzzy logic control in energy systems, 2nd edition
Index 555
This page intentionally left blank
About the author
This book is about fuzzy logic controller and its applications in energy systems. It
aims to give an insight of clear understanding and design approaches of fuzzy logic
controllers in MATLAB and MATLAB/Simulink environment. It includes a
basic theory of fuzzy sets and fuzzy logic to prepare the reader for a better
understanding of fuzzy partitioning, fuzzy relation, and fuzzy decision-making
processing, which are required for designing fuzzy logic controllers. A fuzzy unit
called fuzzy processor is developed and designed to be used as a fuzzy decision-
maker and a fuzzy logic controller depending on the application problem.
Energy system is one of the application areas of fuzzy logic. It is used to
manage, control, and operate electrical energy systems. Examples in the book are
related to the control, operation, and management of electrical energy utilization.
The following examples of fuzzy logic control and fuzzy management are dis-
cussed and studied in the scope of the book.
l DC motor speed and torque control
l Excitation and load-frequency control in power systems
l Multi-area load-frequency control in power systems
l Wind energy control systems (WECS)
l Photovoltaic (PV) solar energy control systems
l Maximum power point tracking in PV systems
l Energy management in WECS
l Energy management in PV systems
İsmail H. Altaş
Karadeniz Technical University
June 2017
This page intentionally left blank
Preface to 2nd edition
The technology of electrical distribution systems has been changing too fast based
on the developments in computers, digital systems, power electronic components,
communication capabilities, and control tools. Therefore, it was inevitable to revise
and update the content of the book. As a result of this, the topics about the basics of
fuzzy logic and fuzzy set theory have been abbreviated and combined under one
chapter while more details are given in fuzzy reasoning, fuzzy decision-making,
and fuzzy controller. Besides, physical system modeling and numerical solution
methods for digital simulation have been expanded. New application areas of fuzzy
logic in power flow, solar PV, and microgrid energy management systems have
been added. The new chapters and the topics added to the second edition are
listed below:
Chapter 1. Introduction
Chapter 2. Fuzzy sets and fuzzy partitioning
Chapter 3. Fuzzy decision-making
New subsection: Human decision-making process
Chapter 4. Fuzzy logic controller (FLC)
Chapter 5. System modeling and control
New subsection: Numerical solution of model equations
Chapter 6. FLC in power systems
New subsection: FLC in load flow analysis
New subsection: FL-accelerated Gauss–Seidel algorithm
New subsection: FL-accelerated Newton–Raphson algorithm
New subsection: FL-accelerated fast decoupled algorithm
Chapter 7. FLC in wind energy systems
Chapter 8. FLC in PV solar energy systems
New subsection: Shading effects in PV arrays
New subsection: PV arrays with identical PV panels
New subsection: PV arrays with Unidentical PV panels
New subsection: MPPT in PV arrays under shading
xxiv Fuzzy logic control in energy systems, 2nd edition
fuzzy logic processor with the ability to interfere with the code in MATLAB .m
files and also in Simulink’s operational blocks. The proposed approach will make
the readers not just software users but also software developers.
İsmail H. Altaş
Karadeniz Technical University
February 2024
This page intentionally left blank
Acknowledgments
A brief history of fuzzy set theory and its application areas are summarized in
this chapter. Besides, an introductory knowledge of electrical energy systems
and novel approaches to the problems arising with the developments of dis-
tributed generation and microgrids is given.
1.1 Introduction
Many words we use arbitrarily in our daily life are usually fuzzy in terms of verbal
meanings. When expressing or describing a system or an event we use words such
as old, young, tall, short, cold, warm, hot, sunny cloudy, fast, slow, etc. that are
fuzzy in nature. We, humans, use uncertain, vogue, and muddy words when dis-
cussing something or making decisions to perform some actions. Depending on his/
her age, we call that person old, middle-aged, young, very old, and very young. We
press the gas or brake more or less according to the road condition whether it is dry,
slippery, ramp, or flat. If the lights in our study room are low, we increase it a little
bit otherwise we decrease it a little bit. All these examples show how our brain acts
and makes decisions during situations that are uncertain and fuzzy.
Studies on systems with uncertainty and muddy data have gained a new era with
the publication of the article “Fuzzy sets” by Lotfi A. Zadeh [1]. Although this first
article was published in 1965, the use of fuzzy logic (FL) increased after the second
half of the 1970s when Lotfi A. Zadeh published two more articles [2,3], in which the
application of fuzzy set theory to uncertain systems and decision-making is described.
FL applications have gained a high speed as the Japanese started using them in com-
mercially available appliances. Nowadays, it is possible to find fuzzy-based applica-
tions in almost every area [4]. Some of the utilization areas of FL are listed below.
FL is used in robotics, automation, tracking systems, temperature control, flow
control, motion control, commercial products, and many more utilization areas of
automatic control systems [4–7]. It is used in information systems as a database
tool to store and recall knowledge, uncertain data, expert’s ideas, and operational
behavior of machines. Image processing, signal aliasing, and human–machine
interaction are also some of the application areas of FL [4]. It is possible to find
many more FL-based applications in social and medical sciences as well [4]. FL is
also used as a mathematical tool in areas such as function optimization, filtering,
curve fitting, etc. [4].
2 Fuzzy logic control in energy systems, 2nd edition
Control systems are one of the first application areas of FL. Mamdani et al.
used FL to control a plant comprising a steam engine and boiler combination [5–7]
in the early 1970s. Since then there has been a considerable interest in the subject
so a massive amount of work has appeared in the literature [4]. FL control and its
applications to power and energy systems are given in this book.
Electrical power systems have many issues from the generation site to the user
site. Generation, transmission, distribution, and consumption stages of power sys-
tems all have specific problems to be solved. Conventional methods have been used
in power systems successfully over the years. However, the integration of renew-
able energy systems into power distribution networks has changed the conventional
structure of power distribution systems yielding microgrid power distribution net-
works. Microgrids include both generation and distribution in the same operating
frame that requires a massive control process besides measurements, communica-
tion, and management. Therefore, intelligent methods are developed to overcome
the problems that occur in microgrids. That’s how the concept of smart grids has
become an advanced structured power distribution network. As a part of intelligent
methods, fuzzy set theory and FL are used in power and energy systems in different
ways. This book addresses the use of fuzzy set theory, fuzzy decision-making, and
FL control in the control and energy management of energy systems.
Contrary to classical PID controllers, FL controllers do not require a mathe-
matical model of the systems to be controlled. It adjusts the plant input to get the
desired output by just looking at the current output from the system. This simple
decision process is nothing but an expert’s decision process. That means that
machines are programmed to make decisions similar to those of humans by using FL
and fuzzy set theory. Due to its adaptivity in nature, FL has gained great importance
over the years to control both linear and nonlinear systems. Actually, nothing is
linear in real life. They are just linearized using proper approximation methods.
However, any linearization process reduces the accuracy of the system model
leading to operational errors with PID controllers, which require mathematical
models for design. The errors that occur due to linearization do not affect the per-
formance of FL controllers since they do not need mathematical modeling to gen-
erate the expert’s thoughts. Therefore, FL controllers become an alternative to
control nonlinear systems. The nonlinearity of the systems is compensated through
rules, membership functions, and decision-making processing in fuzzy systems. The
use of FL increases the accuracy and system performance while simplifying and
reducing the cost of the system. Selecting rules closer to reality enables the FL
controllers to deal with nonlinear systems better than conventional linearized
approaches. Most of the control applications have multiple inputs and parameters
that are required to be modeled and adjusted, which are time-consuming and bring
difficulties to the application. On the other hand, the rules of FL controller include
nonlinear properties so that they simplify the application by uniting multiple inputs
with the implementation of individual verbal expression as if . . . then . . . else . . .
rules. This process is called fuzzy implication and is carried out in terms of the fuzzy
relation of the fuzzy subsets used in the rule. Fuzzy set theory, or the application of
FL itself for a special system is actually not very different from the application of
Introduction 3
Boolean logic or probability logic. The difference in FL comes from its ability to
create a more general theory of decision process that is called fuzzy processor, which
is a special case of approximate reasoning. Fuzzy processor uses fuzzy set and FL
theory in the reasoning process and operates as a fuzzy reasoning algorithm.
Approximate reasoning or fuzzy reasoning is carried out by fuzzy words we use
frequently in our daily life. For example, expressions such as a little bit cold, almost
there, somehow successful, and more than hot contain approximate terms a little bit,
almost, somehow, and more than. These terms are used with fuzzy words such as
cold, warm, hot, young, and old in order to change the degree of fuzziness.
In order to understand fuzzy systems and fuzzy processes, first the meaning of
fuzziness should be understood well.
1.2 Fuzziness
Fuzzy sets are the core elements of FL and are characterized by membership
functions. In fact, these membership functions are nothing but some sort of fuzzy
numbers. One should know the meaning of fuzziness in order to understand the
terms fuzzy logic, membership function, and fuzzy number. For example, two colors
defined in the universe of colors are blended and shown in Figure 1.1. First, the
color is white, then it is changed to black over a transition region such that it
becomes light gray, gray, dark gray, and black as we move from left to right. It is
not a clear single color during the transition. It includes shades of both white and
black and no one can distinguish one color from the other because the transition
part is fuzzy. The colors in the transition area can be distinguished as white, light
gray, gray, dark gray, and black as shown in Figure 1.1.
The concept of fuzziness comes from uncertainty. If data are not crisp and hard
to distinguish one data from the other one, they are represented by inclusion degrees
in related categories. There are two color categories in Figure 1.1 as WHITE and
BLACK, which are called fuzzy subsets or fuzzy membership functions. Fuzzy
subset WHITE in Figure 1.1 shows the degrees of colors being white while fuzzy
1.0
WHITE BLACK
Membership values
Light gray
Dark gray
White
Gray
Black
0.5
0.0
Universe of discourse (colors)
subset BLACK represents the degree of colors being black. The universe of colors
starts from white and goes toward black as we move from left to right in Figure 1.1.
During this transition, the shades of gray change from lighter to darker while mem-
bership degrees become smaller in WHITE and larger in BLACK. Along the tran-
sition region, the colors are both white and black. They are neither just white nor
black. Therefore, the color spectrum along the transition is fuzzy.
References
[1] Zadeh L.A. ‘Fuzzy sets’. Information and Control. 1965;8(3):338–353.
[2] Zadeh L.A. ‘Outline of a new approach to the analysis of complex systems
and decision processes’. IEEE Transactions on Systems, Man, and Cyber-
netics. 1973;3(1):28–44.
[3] Zadeh L.A. ‘The concept of linguistic variable and its application to
approximate reasoning. Part I, II, and III’. Information Sciences. 1975;8
(3):199–249, 8(4):301–357, 9(1):43–80.
[4] Maiers J. and Sherif Y.S. ‘Applications of fuzzy set theory’. IEEE Trans-
actions on Systems, Man, and Cybernetics. 1985; 15(1):175–189.
[5] Mamdani E.H. and Assilian S. ‘An experiment in linguistic synthesis with a
fuzzy logic controller’. International Journal Man-Machine Studies. 1975;7
(1):1–13.
[6] Mamdani E.H. ‘Application of fuzzy algorithms for control of simple
dynamic plant’. IEE Proceedings. 1974;121(12):1585–1588.
[7] Mamdani E.H. ‘Advances in the linguistic synthesis of fuzzy controllers’.
International Journal Man-Machine Studies. 1976;8(6):669–678.
[8] Silva J.F. and Pinto S.F., ‘Linear and nonlinear control of switching power
converters’, Editor: Rashid M.H., Power Electronics Handbook (4th ed.),
Oxford: Butterworth-Heinemann, 2018, pp. 1141–1220.
[9] Skalna I., Re˛biasz B., Gaweł B., et al., Advances in Fuzzy Decision Making:
Theory and Practice. Cham: Springer International Publishing, 2015, http://
dx.doi.org/10.1007/978-3-319-26494-3.
[10] Mengi O.O. and Altas I.H., ‘A fuzzy decision-making energy management
system for a PV/wind renewable energy system’, 2011 International Sympo-
sium on Innovations in Intelligent Systems and Applications, Istanbul, Turkey,
2011, pp. 436–440, http://dx.doi.org/10.1109/INISTA.2011.5946112.
[11] Ali M., Hossain M.I. and Shafiullah M., ‘Fuzzy logic for energy manage-
ment in hybrid energy storage systems integrated DC microgrid’, 2022
International Conference on Power Energy Systems and Applications
Introduction 7
2.1 Introduction
Membership functions characterizing fuzzy sets and aggregations done using them
are the basis of fuzzy sets and fuzzy logic systems. Therefore, understanding fuzzy
sets and their aggregations is important in order to know what can be done by using
fuzzy sets and fuzzy logic. Therefore, this chapter is reserved to introduce fuzzy
sets and analyze their properties from a control application point of view. Well-
known membership functions used to represent fuzzy sets will be reviewed one by
one and MATLAB functions will be written for each one as a part of developing a
user-defined fuzzy logic toolbox.
Fuzzy sets are defined in the interval [0, 1]. Each fuzzy set is characterized by
a membership function that assigns membership values between 0 and 1 to each
element. This definition of fuzzy sets is made by the founder Lotfi A. Zadeh [1]. If
an element is not a member of the fuzzy set, then its membership value is defined as
0. A membership value 1 is assigned as a full membership degree if an element is
known to be completely included in that set. The interval [0, 1] is used to assign a
membership value between 0 and 1 for an element, which is somehow included in
the set with an inclusion degree that may be any number between 0 and 1. On the
other hand, crisp sets do not include any element with uncertainty. An element is a
member of crisp set or not. Figure 2.1 shows crisp and fuzzy subsets used to
categorize the ages of people into subclasses. The center of the figure represents the
age of infants as the outer circle corresponds to the age of old people in the universe
of ages.
As depicted in Figure 2.1(a), crisp subsets are clearly indicated by their sharp
borderlines. For example, those smaller than 2 years of age are members of the
crisp subset Infant. People between 2 and 15 years old belong to crisp subset
Young, people between 15 and 30 are included in crisp set Young, and people above
10 Fuzzy logic control in energy systems, 2nd edition
Figure 2.1 Crisp and fuzzy subsets. (a) Crisp subsets. (b). Fuzzy subsets.
30 years old are members of the crisp subset Old. According to crisp subsets, a
29-year-old person is considered as young while a 31-year-old person is as same
as a person at the age of 60. Figure 2.1(b) shows ages as categorized into sub-
sections, too. However, there is no border between the subsections this time. It is
not clear where the subset Infant ends and subset Young starts. Similarly, it is not
easy to say where the subset Young ends and the subset Old starts. The subclasses
of ages in Figure 2.1(b) are defined as fuzzy subsets because the boundaries
between these subclasses are not certain. A small survey done with the students
attending the Fuzzy Logic course in the Department of Computer Engineering at
Karadeniz Technical University, Türkiye, yielded the results given in Table 2.1.
The question asked to the students is:
“What should be the upper limit of a fuzzy set representing young
people?”
Fuzzy sets and fuzzy partitioning 11
As the survey shows, the students do not agree on the upper limit of the subset
Young. The answers to the questions asked vary from 25 to 40 with an average of
31.3. Therefore, age 30 might be assumed to be the upper limit for the subset
Young. Similarly, the lower and upper limits of all subsets can be defined as given
in Figure 2.1 by their pictorial view. In order to work with the subsets, they are
represented by their membership functions as shown in Figure 2.2(a) and (b) for
crisp and fuzzy subsets, respectively. Since ages are members of crisp subsets or
not, they do not have any membership values rather than 0 and 1 as depicted in
Figure 2.2(a). However, Membership functions representing the fuzzy subsets
have boundary regions with membership values rather than 0 and 1 as given in
Figure 2.2(b). Fuzzy membership functions vary between 0 and 1 in an interval
[0, 1]. Triangular-type membership functions are used in Figure 2.2(b) to repre-
sent fuzzy subsets Infant, Child, Young, and Old. Those equal or below 2 years
old are considered exactly infants and they are given a full membership degree.
Above the age of 2, they start becoming a member of the fuzzy subset Child
while getting away gradually being the member of Infant. At age 15 the mem-
bership function representing Infant is terminated while the membership function
Child makes a peak. After the age of 15, the membership function Child starts
decreasing as Young is increasing until it becomes maximum at age 30 with a
membership value of 1. Then membership function representing the fuzzy subset
Membership value, μ
1
Infant
0
2 10 15 20 30 40 50 60
Universe of ages
(a)
Membership value, μ
0
2 10 15 20 30 40 50 60
Universe of ages
(b)
Figure 2.2 Crisp and fuzzy subsets and representation by membership functions.
(a) Crisp sets and their membership functions and (b) fuzzy sets and
their membership functions.
12 Fuzzy logic control in energy systems, 2nd edition
Figure 2.3 Crisp and fuzzy Young subsets and their membership functions.
(a) Crisp Young and its crisp membership function and (b) fuzzy
Young and its fuzzy membership function.
Young goes to 0 as the one representing Old increases to 1 at age 60. Aged 60 and
up are assumed to be completely crisp Old.
In order to show the differences between crisp and fuzzy subsets and their
membership functions, let us analyze crisp and Fuzzy Young subsets, which are
separated from the others and are given in Figure 2.3 alone.
According to Figure 2.3(a), only the people who are between 15 and 30 years
old are exactly Young but the others are not. People between 15 and 60 in
Figure 2.3(b) are also young. In the latter, people are exactly young at the age of 30
with a full membership value and they are young with some degrees as one gets
away from the age of 30. People represented by the membership function Young in
Figure 2.3(b) are called fuzzy Young.
A fuzzy set is represented by a membership or a characteristic function that
shows the inclusion degrees of the elements in that set. Fuzzy membership functions
are defined either as continues or discrete functions. For example, a fuzzy set A can
be represented by its membership function as
A ¼ fðx; mA ðxÞÞ; Such that x 2 X g (2.1)
where m(x) is the membership value of the element x in fuzzy subset A. The crisp
variable x is an element of the universe X. Representation of a fuzzy subset A in
discrete and continues formats are given in Equations (2.2) and (2.3), respectively.
X m ðxi Þ
A¼ A
ðDiscrete formÞ (2.2)
xi 2X
xi
ð
mA ðxÞ
A¼ ðContinues fromÞ (2.3)
X x
Expressions (2.1)–(2.3) show P
how a Ðfuzzy subset is characterized by a
membership function. The symbols and used in (2.2) and (2.3) do not mean
for summation or integration. They are used to represent discreteness and
continuity.
Fuzzy sets and fuzzy partitioning 13
Example 2.1
A discrete fuzzy subset C is defined in the crisp universe X = {0, 1, 2, 3, 4, 5, 6, 7, 8,
9, 10} and given as
X11
mC ðxi Þ
C¼
i¼1
xi
Answer 2.1
A plot of membership function mC(x) in a discrete graphical form is obtained using
MATLAB code in Figure E2.1. As depicted in Figure E2.2, a discrete graphic
Figure E2.1 MATLAB code for plotting discrete subset C. Discrete plot of fuzzy
membership function.
includes the information only at sampling instants and does not give any ideas
during the gaps. Therefore, data points are not connected using straight lines. The
discrete form may be useful for the representation of sampled data, which is
recorded periodically.
Example 2.2
The membership function representing the fuzzy subset Young in Figure 2.3(b) is
defined as
8
>
> jxj jaj
>
> ; for a x b
< jbj jaj
mYoung ðxÞ ¼ jcj jxj
>
> ; for b x c
>
: jcj jbj
>
0; otherwise
where a = 15, b = 30, c = 60, and the universe of discourse X is defined in the
interval [0, 70]. Plot the membership function Young in continuous form.
Answer 2.2
The continuous membership function representing the fuzzy subset Young is plot-
ted and shown in Figure E2.3. This plot is obtained using MATLAB codes given in
Figures E2.4 and E2.5. MATLAB functions are useful tools to be used for repeating
software codes. A MATLAB function, triangle00m.m, given in Figure E2.5 is
recalled from the code given in Figure E2.4 in order to plot the triangular-type
fuzzy membership function.
0.8
Membership values
0.6
0.4
0.2
0
0 10 20 30 40 50 60 70
Universe of discourse, X
Figure E2.4 MATLAB code for plotting continuous fuzzy membership function
Young
Membership functions representing fuzzy sets have different shapes, which are
defined by certain types of mathematical formulas. The most used membership
function types are listed as triangular, trapezoid, bell, sinusoid, Gaussian, Cauchy,
and sigmoid. The properties of these membership functions will be analyzed in the
next sections of this chapter. During the analysis, MATLAB functions similar to
the one given in Example 2.2 and shown in Figure 2.4 will be developed and used
to design toolboxes for decision-making and control applications.
In order to make the operations on fuzzy sets easier, the membership functions
are formulated in terms of their parameters [2], which include information about
fuzziness and location range in the universe of discourse. The flexibility of
adjusting parameters makes membership functions adjustable, too. Due to linearity
in their structure, triangular and trapezoid-type membership functions are preferred
over the others. However, in some applications, the membership functions are
16 Fuzzy logic control in energy systems, 2nd edition
is satisfied as long as for x x2 and x2 x3. In other words, the output is equal to
the smaller part of Equations (2.5) or (2.6). However, these equations give a negative
output if x < x1 or x > x3. Since the membership degrees are defined in interval [0, 1],
the negative outputs should be changed to 0. Therefore, the maximum value between
0 and the output from Equations (2.5) or (2.6) should be selected. According to these
comments, Equation (2.4) can be converted to the one given in (2.7).
x x1 x3 x
mA ðxÞ ¼ max min ; ;0 (2.7)
x2 x1 x3 x2
A MATLAB function can be written as an .m file as in Figure 2.5 to execute
Equation (2.7). The same function can also be realized in Simulink as shown in
Figure 2.6.
Both MATLAB and Simulink functions given in Figures 2.5 and 2.6, respec-
tively, are used to find the membership value of variable x in a fuzzy set triangle
defined by its parameters x1, x2, and x3 in the universe of discourse, X. The meaning
of these parameters is shown in Figure 2.4. As given in the MATLAB function
triangle01m.m in Figure 2.5 and Simulink function in Figure 2.6, the variable x and
the parameters x1, x2, and x3 are the inputs to triangular functions.
Example 2.3
Triangles A, B, and C are defined in the universe of X = {5, 4, 3, 2, 1, 0, 1,
2, 3, 4, 5} with their parameters as A (4, 2, 0), B (2, 0, 2), and C (0, 2, 4). Use
MATLAB and Simulink functions given in Figures 2.5 and 2.6, respectively, and
(a) Plot the triangles A, B, and C in the universe of X
(b) Obtain the membership values of x = 1.5 and x = 1 on the fuzzy subsets A, B,
and C.
Answer 2.3
This example is given to show how MATLAB and Simulink can be used as a tool
in order to model and simulate fuzzy subsets. The use of a triangular fuzzy subset
modeled in Simulink is given in Figure E2.3(a). In this simulation, a ramp
signal with a slope of 1 is added to 5 to generate the universe of X from 5 to 5
as a function of the simulation time. The variable x and triangle parameters x1, x2,
and x3 are entered from the input ports of the triangle block. The outputs of triangle
blocks are the membership values, which are sent to the workspace so that they can
be plotted in MATLAB. A small plotting code of the workspace data is also given
in Figure E2.3(a). The resultant plots of the fuzzy subsets A, B, and C are shown in
Figure E2.3(c). A MATLAB .m file can be used to simulate the same triangular
fuzzy subset models, too, as given in Figure 2.3(b). The MATLAB function file
triangle01m.m defined earlier and given in Figure 2.5 is called as a subprogram to
simulate the triangle fuzzy subset.
(a) This example also shows how a function file is recalled from another program.
This example will be extended for other applications in the coming chapters. In
order to develop our own fuzzy toolbox, we create function files step by step
and keep them in a safe place to be used later.
0.8
Membership values
0.6
0.4
0.2
0
–5 –4 –3 –2 –1 0 1 2 3 4 5
Universe of X
(b) The second part of the example is about using triangular functions modeled in
MATLAB and Simulink. If x = 1.5 or x = 1.0 is entered as input to the model of
the triangle in MATLAB or Simulink, the results given in Table E2.3 are obtained.
Due to their linear structures, triangular fuzzy subsets are easy to model and easy to
simulate. The sharp peak enables them to react to any changes even if they are very
small. Therefore, the sharp peak makes triangle membership functions sensitive to
the changes in the crisp variable x.
where the parameters x1, x2, x3, and x4 give the location of fuzzy membership
function A in the universe of X. Actually, the parameters x1, x2, x3, and x4 represent
the address of the membership function A and tell us where it is located in the
corresponding universe. It is sufficient to change the values of parameters in order
to define a new membership function with a similar shape or change the location in
the universe of discourse. Equation (2.8) may also be used for the triangular
membership function by setting x2 = x3. As it is done for the triangular fuzzy
membership function, an analysis of Equation (2.8) shows that there are two con-
vergence points, which are x2 and x3. It is clear that
x x1 x4 x
mA ðxÞ ¼ < 1 and (2.9)
x2 x1 x4 x3
for x1 x2 and x x2. And also
x x1 x4 x
mA ðxÞ ¼ 1 < and (2.10)
x2 x1 x4 x3
for x2 x x3. Similarly,
x4 x x x1
mA ðxÞ ¼ < and 1 (2.11)
x4 x3 x2 x1
is obtained for x x3 and x3 x4. In other words, the output is equal to a smaller
part of Equations (2.9), (2.10), or (2.6). However, these equations give a negative
output if x < x1 or x > x4. Since the membership degrees are defined in interval [0, 1],
the negative outputs should be changed to 0. Therefore, the maximum value between
0 and the output from Equations (2.9), (2.10), or (2.11) should be selected. According
to these comments, Equation (2.8) can be converted to the one given in (2.12).
x x1 x4 x
mA ðxÞ ¼ max min ; 1; ; 0 (2.12)
x 2 x1 x4 x3
The MATLAB function given in Figure 2.8 can be used to execute Equation
(2.12). The same trapezoid function can also be realized in Simulink as shown in
Figure 2.9.
Both MATLAB and Simulink functions given in Figures 2.8 and 2.9, respec-
tively, can be used to simulate the fuzzy set trapezoid defined by its parameters x1,
x2, x3, and x4 in the universe of discourse, X.
Figure 2.9 Simulink function for simulating trapezoid fuzzy subset. (a) Closed
form of the Simulink block and (b) inside view of the block in (a).
Due to their linear structures, trapezoid fuzzy subsets are also easy to model
and easy to simulate. The flat top gives a crisp behavior to trapezoid membership
functions so that the sensitivity of the membership function to the changes in the
crisp variable is reduced.
Example 2.4
Trapezoid membership functions A, B, and C are defined in the universe of X =
{5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5} with their parameters as A (5, 54, 1),
B (4, 1, 1, 4), and C (1, 4, 5, 5). Use MATLAB and Simulink functions given in
Figures 2.8 and 2.9, respectively, and
(a) Plot trapezoid membership functions A, B, and C in the universe of X.
(b) Obtain the membership values of x = 3.5, x = 2, x = 2.5, and x = 4 on the
fuzzy subsets A, B, and C.
Answer 2.4
(a) Ideal fuzzy subsets modeled in MATLAB and Simulink are given in
Figures E2.4(a) and E2.4(b), respectively.
Fuzzy sets and fuzzy partitioning 23
In the MATLAB .m file simulation given in Figure E2.4(a), variable x and trape-
zoid function parameters x1, x2, x3, and x4 are entered directly inside the parenthesis
where the function is recalled. Then results are plotted as shown in Figure E2.4(c).
A ramp source block with a slop of 1 is used to generate the universe of X in an
interval [5, 5] in the simulation model developed in Simulink as shown in
Figure E2.4(b). The outputs of trapezoid blocks are the membership values, which
are sent to the workspace so that they can be plotted using MATLAB .m files.
1
Membership values 0.8
0.6
0.4
0.2
0
–5 –4 –3 –2 –1 0 1 2 3 4 5
Universe of X
A small plotting code of the workspace data is also given in Figure E2.3(a). The
resultant plots of the fuzzy subsets A, B, and C are shown in Figure E2.4(c).
The second part of the example is about using trapezoid functions modeled in
MATLAB and Simulink. For the values of x = 3.5, 2, 2.5, and 4, the model of
trapezoid function in MATLAB or Simulink yields the results given in Table E2.4.
mA ðxÞ ¼ e2ð Þ
1 xxP 2
w (2.13)
where x is the crisp variable defined in the universe of X. XP is a crisp number
located at the center of the membership function A with the maximum membership
degree of 1. The parameter w defines the distribution width of the Gaussian
membership function and must be selected carefully. Larger values of w convert the
Fuzzy sets and fuzzy partitioning 25
1
XP =0
w =1.2
0.8
Membership degrees
0.6
0.4
0.2
0
–5 –4 –3 –2 –1 0 1 2 3 4 5
Universe of X
Gaussian function into a signal oscillating like a sinewave, whereas smaller values
of w convert it to a single line at XP. A plot of Gaussian function is given in
Figure 2.10, which is obtained using Equation (2.13) with the parameters w = 1.2
and XP = 0 in the universe of X defined in the interval [5, 5].
A more generalized Gaussian-type function is given in Equation (2.14), which
is used to represent the numbers close to crisp a. This generalized type membership
function is also called as fuzzy number due to its normality and convexity.
However, the function given by Equation (2.14) is concentrated toward a, which
makes it less fuzzy compared to (2.13). The smaller values of b may be decreased
to increase the width of the function. If b is selected as 0 < b < 1, the fuzziness of
the function is increased along with the width. However, smaller b values cause
more increment in the bottom part of the function so that zero crossing points with
the crisp axis move toward infinity.
1
mA ðxÞ ¼ (2.14)
1 þ bðx aÞ2
Figure 2.11 shows the changes due to b in the membership function given in
Equation (2.14). It is shown that the fuzziness of the membership function increases
as b decreases.
Parameter m in Equation (2.15) defines the width of the flat top (the crisp
section) of the bell function and it is a positive number. Negative values of m yield
26 Fuzzy logic control in energy systems, 2nd edition
0.8
Membership degrees
0.6
β=10
Equation (2.13)
0.4 β=1
β=0.1
0.2
0
–5 –4 –3 –2 –1 0 1 2 3 4 5
Universe of X
1.1 m
1
0.9
Membership degrees
0.8
0.7
0.6
0.5
0.4
0.3 w
0.2
0.1
0
–5 –4 –3 –2 –1 0 1 2 3 4 5
xP Universe of X
the inverse of the bell function. The bandwidth of the bell function is determined by
parameter w as shown in Figure 2.12. In other words, the flat top and bandwidth of
the bell function are adjusted by parameters m and w, respectively. The adjustment
of the flat top and bandwidth of a fuzzy membership function is nothing but the
adjustment of its fuzziness. Larger values of m turn the bell function into a per-
pendicular or square crisp function while very small values of w change it to a
Cauchy curve function, which is described in the next section. The MATLAB code
given in Figure 2.13 is an example using the function file bell01m.m to plot the
bell-type fuzzy subset.
Fuzzy sets and fuzzy partitioning 27
Figure 2.13 Using the bell function to plot the bell type fuzzy subset
to the peak of fuzzy subsets with the maximum membership degree of 1. This point
indicates the location of a fuzzy subset in the related universe.
Sinusoid membership functions are symmetrical due to the characteristic
properties of a sinewave. Therefore, they are usually placed symmetrically as 0 line
being the reference.
Example 2.5
Sinusoid membership functions A, B, and C are defined in the universe of X = {4,
3, 2, 1, 0, 1, 2, 3, 4}. Develop and use MATLAB and Simulink functions, and
(a) Plot sinusoid functions A, B, and C in the universe of X.
(b) Add another function D and repeat (a) for four membership functions defined
in the same universe of X.
(c) Obtain the membership values of x = 3.5, x = 2, x = 2.5, and x = 4 on the
fuzzy subsets A, B, C, and D.
Answer 2.5
Let us assume that set A and set C are one-sided lower and upper boundary sets,
respectively, and set B is a two-sided center set as shown in Figure E2.5(a), which
shows that set B is defined on the full universe of X from 4 to 4 while set A and set
C are defined on the sections 4 to 0 and from 0 to 4, respectively. It can easily be
seen from Figures 2.14 and E2.5(a) that one cycle of the sinewave function is equal
to four times the parameter a (T = 4a), as in Equation (2.18).
Since the universe of X = {4, 3, 2, 1, 0, 1, 2, 3, 4}, the parameters X, T,
and a are obtained as
X ¼ x2 x1 ¼ 4 ð4Þ ¼ 8
X 8
a¼ ¼ ¼4
n1 31
bp
q1 ¼ ¼0
a2
(a) Now, let us write a sinusoid membership function and use it in a MATLAB .m
file to plot the subsets A, B, and C.
(b) If another function D is added, there will be four membership functions in the
same universe of X = {4, 3, 2, 1, 0, 1, 2, 3, 4}. The input parameters to
the MATLAB .m file shown in Figure E2.5(a) become n = 4; x1 = 4, and x2 =
4. The rest is just a series of calculations using Equations (2.16)–(2.23) to reach
the sinusoid membership functions as shown in Figure E2.5(b).
(c) The membership values of x = 3.5, x = 2, x = 2.5, and x = 4 on the fuzzy
subsets A, B, C, and D are obtained using the sinusoid MATLAB function
given in Figure E2.5(c) and listed in Table E2.5. In order to find the mem-
bership values for individual x’s, it will be useful to convert the MATLAB code
given in Figure E2.5(b) to a MATLAB function so that just the value of x is
sufficient as input. Such as function file is given in Figure E2.5(c), which is
applicable for this example only.
Practice 2.1
The sinusoidal MATLAB function given in Figure E2.5(c) includes repeating lines
and processes. Modify the given code and develop a new shorter and simpler-to-use
Fuzzy sets and fuzzy partitioning 31
Membership degrees 1 A B C
0.5
0
–4 –2 0 2 4
Universe of X
Figure E2.5(b) The use of sinusoid function in MATLAB, for example, 2.5(a)
sinusoid function so that the command m = sinus (n, x1, x) should be sufficient to get
the membership values of x in all n fuzzy subsets, which are defined in the universe
X in the interval [x1, x2].
A B C D
1
Membership Degrees
0.8
0.6
0.4
0.2
0
–4 –3 –2 –1 0 1 2 3 4
Universe of X
Figure E2.5(c) The use of sinusoid function in MATLAB for example 2.5(b)
Figure E2.5(d) The use of sinusoid function for specific x’s in Example 2.5(c)
0.8
0.7
0.6 μ(x) = 0.5
0.5
0.4
Decreasing Increasing
0.3
0.2
0.1
0
–5 –4 cdec –2 –1 0 1 2 cinc 4 5
x1dec x2dec Universe of X x1inc x2inc
Example 2.6
Develop a MATLAB function representing sigmoid fuzzy subsets and use it to plot
the increasing and decreasing sigmoid functions as shown in Figure 2.15. Assume
that the universe of X is defined in the interval [5, 5] and the parameters are given
as c = 3 and a = 4.
Answer 2.6
The MATLAB function given in Figure E2.6 can be used to plot the sigmoid
functions in Figure 2.15.
Example 2.7
The fullness level of the battery charging unit has been defined from 0% to 100%
where they mean empty (EM) and full (FU), respectively. Give another definition
to the fullness level as half full (HF) and represent them by fuzzy subsets in the
universe of fullness (FLNS).
(a) Define the types of starting and ending boundary sets.
(b) Define the type of sets that are applicable to be used as two-sided middle fuzzy
subsets.
(c) Plot the defined fuzzy subsets in the universe of fullness.
Fuzzy sets and fuzzy partitioning 35
Answer 2.7
Since the universe of fullness is defined from 0% to 100%, these two values are the
lower and upper limits of the universe and fuzzy subsets will be defined in this
universe.
(a) In order to represent the fuzzy sets EM and FU, right triangles, trapezoid,
sinusoid, and sigmoid-type membership functions can be used as shown in
Figure E2.7.
(b) The fuzzy subset HF is a two-sided middle set and should be represented
properly by the sets with similar properties. Two-sided triangular, trapezoid,
bell, and Gaussian-type membership functions can be used for HF. Since the
sigmoid functions are one-sided, they are not applicable to represent the fuzzy
subset HF.
(c) The plot of defined fuzzy subsets E, HF, and F are shown in Figure E2.7(a).
This example includes lower and upper boundary fuzzy subsets besides the one
in the center. Figures E2.7(a)–E2.7(c) show which types of fuzzy subsets can
be used as lower and upper ends and which ones can be used in the middle.
Figure E2.7(a) gives a chance to compare the fuzziness of sinusoid, triangular, and
Gaussian membership functions. All three membership functions are symmetrical
around the axis passing through their peek points. Gaussian function is con-
centrated toward 50%, which means that it is less fuzzy than the others. The
smoothness of the sinusoid function on the peak point can be seen clearly as the
smoothness of the Gaussian function is lost very fast as data moves away from
the center. The comparison of sinusoids and triangular-type fuzzy subsets can be
made better in Figure E2.7(b) where the peak points are clearly examined. We can
conclude that the systems using the triangular membership function respond very
fast to the changes in the related data, while the systems using the sinusoid function
respond slower. A comparison between trapezoid and bell-type functions is shown
36 Fuzzy logic control in energy systems, 2nd edition
1
0.9
0.8
Membership degrees
0.7
0.6
0.5
0.4
0.3
0.2
0.1
0
0 10 20 30 40 50 60 70 80 90 100
Universe of fullness (%)
Figure E2.7(a) The use of sigmoid, sinusoid, triangular, and Gaussian functions
together
1
Membership degrees
0.8
0.6
0.4
0.2
0
0 10 20 30 40 50 60 70 80 90 100
Universe of fullness (%)
in Figure E2.7(c). There is no big difference in the fuzziness for the membership
values over 0.5, while the fuzziness is less in the bell function if the membership
value is below 0.5.
The MATLAB codes used to simulate the membership functions in Example E2.7
are given in the MATLAB .m-file library, which is available on the publisher site.
Practice 2.2
Develop Simulink-based membership functions and repeat Example 2.7 using
Simulink.
Fuzzy sets and fuzzy partitioning 37
0.8
Membership degrees
0.6
0.4
0.2
0
0 10 20 30 40 50 60 70 80 90 100
Universe of fullness (%)
Practice 2.3
Infant (IN), child (CH), young (YN), middle aged (MA), and old (OL) fuzzy sub-
sets are defined in the universe of age.
(a) Use triangular-type membership functions and plot these fuzzy subsets in the
same graph such that the maximum membership values of these functions from
infant to old occur at 0, 10, 20, 40, and 60.
(b) Determine the types of fuzzy membership functions that can be used as lower
end, upper end, and the ones in between.
(c) Try all possible membership function types to represent the starting and ending
fuzzy subsets.
(d) Represent the fuzzy subsets Young and Middle Aged by using triangular,
sinusoid, and Gaussian membership functions and comment about the suit-
ability of these membership functions on representing the given fuzzy subsets
in terms of fuzziness.
(e) Use trapezoid and bell membership functions to represent the above-mentioned
fuzzy subsets in the universe of age and comment on the meaning of the
flat tops.
(f) Plot all your solutions to explain them better using MATLAB .m and Simulink.
Practice 2.4
A crisp universe of discourse X is defined in the interval of [0, 10] and partitioned
into three fuzzy subsections as SMALL, MEDIUM, and LARGE. Triangular-type
fuzzy sets are used to represent these fuzzy subsets.
(a) Draw a software algorithm that gives you the membership value of any x on X
in the fuzzy subsets SMALL, MEDIUM, and LARGE.
(b) Write a MATLAB function that simulates the algorithm you developed in
part (a).
38 Fuzzy logic control in energy systems, 2nd edition
(c) Write a Simulink function that simulates the algorithm you developed in
part (a).
(d) Repeat the previous parts for the sinusoid membership function.
core
crossover points
boundary bandwidth boundary
α-cut
support
Crossover points of a fuzzy set A are the crisp elements with membership
degrees equal to 0.5 and are defined as
crosoverðAÞ ¼ fx; such that mA ðxÞ ¼ 0:5g (2.27)
Bandwidth of a fuzzy set A is described as the crisp elements with the mem-
bership values equal to or greater than 0.5 in A.
bandwidthðAÞ ¼ fx; such that mA ðxÞ 0:5g (2.28)
The boundary of a fuzzy set includes the crisp elements whose membership
values are between 0 and 1 in set A. The boundary set is defined as
boundaryðAÞ ¼ fx; such that 0 < mA ðxÞ < 1g (2.29)
The support of a fuzzy set consists of the crisp elements of the universe of X
such that the membership values of these elements in A are greater than 0.
supportðAÞ ¼ fx such that mA ðxÞ > 0g (2.30)
a-cut of a fuzzy set A is a crisp set Aa such that the elements of this crisp set
are defined in the universe of X and have the membership values equal or greater
than a in A. For example, the a-cut of a = 0.5 in A is equal to the bandwidth of set
A. The a-cut of a fuzzy set A is defined as in (2.31).
a cutðAÞ ¼ Aa ¼ fx; such that mA ðxÞ ag (2.31)
If the membership degrees of a-cut (A) are greater than a, then it is called hard
a-cut and defined as
hard a cutðAÞ ¼ eAa ¼ fx; such that mA ðxÞ > ag (2.32)
According to these definitions, a = 1 yields the core (A) and a = 0 gives the
support set of A.
A1 ¼ coreðAÞ
A0 ¼ supportðAÞ
Convexity of a fuzzy set exists if the condition given in (2.33) is satisfied.
mA ðlx1 þ ð1 lÞx2 Þ minðmA ðx1 Þ; mA ðx1 ÞÞ (2.33)
where x1 and x2 are the elements of the universe of X and l[[0, 1]. The convexity
can be explained better using Figure 2.17(a) and (b).
Height of a fuzzy set is defined by the membership values of the set. If the
membership value of a set is equal to 1.0, which is the highest degree, then this set
is called as a normal fuzzy set. If the highest membership value is smaller than 1.0,
than the set is called as subnormal fuzzy set. Under normal conditions, the fuzzy
subsets are defined as normal sets. However, after some allegations of fuzzy sub-
sets, subnormal sets might be obtained and used in applications. For example, the
40 Fuzzy logic control in energy systems, 2nd edition
Figure 2.17 Convex and nonconvex fuzzy sets. (a) Convex set, (b) nonconvex set.
intersection of two normal fuzzy set may be a subnormal set. When required, the
subnormal fuzzy sets may be normalized to be used.
Cardinality of a fuzzy set is defined as the sum of membership values of the
elements belonging to that set and represented as
X
jA j ¼ mA ðxÞ (2.34)
where x [ X and X is the universe of discourse. Another term called relative car-
dinality is then defined as
jA j
kAk ¼ (2.35)
jX j
where jAj is the cardinality of fuzzy set A and jX j is the cardinality of crisp universe
of X. The cardinality of a crisp set is the number of elements in that set.
Example 2.8
Equations (2.13) and (2.22) are used to represent the numbers close to 0 in a uni-
verse of discourse X defined in an interval of [10, 10]. Assume that the para-
meters xP = 0 and w = 1.5 for Gaussian and n = 3; x1 = 6; x2 = 6; for the sinusoid
function. Obtain a-cuts for a = 0.2 and 0.6.
(a) Find and comment on the characteristic properties of the sinusoid fuzzy
membership function representing the numbers close to 0.
(b) Repeat (a) for the Gaussian function.
Answer 2.8
The plots of the numbers close to 0 are given in Figure E2.8(a) and E2.8(b) for
sinusoid and Gaussian functions, respectively. The plots will help to describe the
properties. Let us use the definition given in Equation (2.26)–(2.32).
(a) Properties of sinusoid function
The core set is obtained as coreðAÞ ¼ f0; where mA ðxÞ ¼ 1g:
Fuzzy sets and fuzzy partitioning 41
1.1
1
0.9
Membership degrees
0.8
0.7
0.6
0.5
0.4
0.3
0.2
0.1
0
–6 –5 –4 –3 –2 –1 0 1 2 3 4 5 6
Universe of X
Crossover points are obtained as crossover (A) = f4 and 4; where mA ðxÞ ¼ 0:5g:
Bandwidth set of the fuzzy set A is equal to the crisp interval [4, 4], which is
obtained from bandwidthðAÞ ¼ f½4; 4 where mA ðxÞ 0:5g:
The boundary set of a fuzzy set includes the crisp elements as defined by
(2.29). Therefore, there are two boundary sets for the sinusoid function used in this
example
Boundary set1 : boundaryðAÞ ¼ fx; where 6 < x < 0 such that 0 < mA ðxÞ < 1g
Boundary set 2 : boundaryðAÞ ¼ fx; where 0 < x < 6 such that 0 < mA ðxÞ < 1g
The support set of the fuzzy set A is obtained as
supportðAÞ ¼ fx; where < x < 6 suchthat 6mA ðxÞ > 0g
42 Fuzzy logic control in energy systems, 2nd edition
0.2 0.6
10 0
9 0
8 0
7 0
6 0
5 0.25 0.25 0.25 0.25
4 0.50 0.5 0.50 0.50 0.50 0.50
3 0.70 0.70 0.70 0.70 0.70 0.70
2 0.86 0.86 0.86 0.86 0.86 0.86
1 0.96 0.96 0.96 0.96 0.96 0.96
0 1.00 1.00 1.00 0.00 1.00 1.00 1.00
1 0.96 0.96 0.96 0.96 0.96 0.96
2 0.86 0.86 0.86 0.86 0.86 0.86
3 0.70 0.70 0.70 0.70 0.70
4 0.50 0.5 0.50 0.50 0.50 0.50
5 0.25 0.25 0.25 0.25
6 0
7 0
8 0
9 0
10 0
Fuzzy sets and fuzzy partitioning 43
Universe X mA (x)
6 0.0000
5 0.2588
4 0.5000
3 0.7071
2 0.8660
1 0.9659
0 1.0000
1 0.9659
2 0.8660
3 0.7071
4 0.5000
5 0.2588
6 0.0000
jX j ¼ 13 jAj ¼ 7.5958
jAj/jX j = 0.5843
Fuzzy sets are characterized by fuzzy membership functions and fuzzy numbers.
Operations done using fuzzy membership functions or fuzzy numbers are the basis
of fuzzy logic and fuzzy sets. First, these operations must be understood well in
order to understand what can be done with fuzzy sets and fuzzy logic. Therefore,
the fundamental fuzzy set operations and their properties, especially the properties
used in automatic control system applications are studied in this section.
The fuzzy set operations are either done by using the fuzzy sets themselves or
membership functions carrying their characteristic properties. As in crisp sets,
fuzzy sets also have definitions such as subset, empty set, intersection set, union
set, and complement of a set.
Three main fuzzy set operators are given in this part. These operators are
l Intersection
l Union
l Complement
Example 2.9
The fullness percentages of a battery charging unit are defined as empty (EM), full
of a quarter (OQ), half full (HF), full of three quarters (TQ), and full (FU), which
are represented by triangular fuzzy subsets using their parameters as EM (0%, 0%,
25%), OQ (0%, 25%, 50%), HF (25%, 50%, 75%), TQ (50%, 75%, 100%), and FU
(75%, 100%, 100%). These fuzzy subsets are shown in Figure E2.9. The universe
of fullness has been partitioned into five sub-sections and each one is represented
by a fuzzy membership function. Find the followings
(a) Intersection of the subsets OQ and HF
(b) Intersection of HF and TQ
(c) Intersection of OQ and TQ
(d) Comment on the meanings of the above results.
Answer 2.9
(a) Intersection of the subsets OQ and HF can be obtained using the min operator
as given in (2.39). A MATLAB code and the resultant figure for the solution
are given in Figure E2.9(a).
(b) Intersection of HF and TQ can be obtained using the min operator as given in
(2.39). A MATLAB code and the resultant figure for the solution are given in
Figure E2.9(b).
(c) Intersection of OQ and TQ can be obtained using the min operator as given in
(2.39). Actually, as can be seen in Figure E2.9, fuzzy subsets OQ and TQ do
not have any common area, and therefore their intersection is an EM set.
(d) Comment on the meanings of the above results.
As mentioned earlier, intersection or t-norm operator is used to process the
word and in Boolean algebra.
Intersection operator in (a) represents the expression “the water tank is full
of a quarter (OQ) and a half (HF).” This means that the amount of water in the
tank is more than a quarter and less than a half so that an intersection exists.
Membership degrees
Percentage of fullness
Percentage of fullness
Percentage of fullness
Intersection operator in (b) represents the expression “the water tank is half
(HF) and three quarter full (TQ).” In this case, the water in the tank is more
than half but less than full capacity.
In part (c), the intersection is an EM set since there is no intersection of the
sets OQ and TQ. This means that “the water thank is neither full of a quarter
nor full of three quarter.” In this case, the water thank may be exactly 50% full,
which means HF in a crisp manner.
Fuzzy intersection operator has some conditions to be satisfied. Without going into
details and proofs of the axioms, these conditions are listed in Table 2.2. Details can
be found in [3]. The boundary condition of intersection operator acts as the same as
that of a crisp set. The letter t in Table 2.2 stands for the operator t-norm.
Condition Definition
Boundary tð1; 1Þ ¼ 1
tð1; 0Þ ¼ 0
tð0; 1Þ ¼ 0
tð0; 0Þ ¼ 0
Commutativity tða; bÞ ¼ tðb; aÞ
Associativity tðtða; bÞ; cÞ ¼ tða; tðb; cÞÞ
a1 a2
Monotonicity then tða1 ; b1 Þ tða2 ; b2 Þ
b1 b2
Idempotent tða; aÞ ¼ a
Continuity The intersection (t-norm) continues
operator. Let A and B be two fuzzy subsets and C is the union set of A and B, where
A, B, and C are all defined in interval [0, 1] and are the elements of universe of X.
Then the union C is written as
C ¼A[B (2.40)
where A[[0, 1], B[[0, 1], and C[[0, 1]. Equation (2.40) can be written in terms of
membership functions as
mC ðxÞ ¼ mA [ mB ðxÞ (2.41)
mC ðxÞ ¼ mA ðxÞ [ mB ðxÞ (2.42)
mC ðxÞ ¼ maxðmA ðxÞ; mB ðxÞÞ (2.43)
where x[X. Equation (2.43) shows that the union of two fuzzy subsets can be
obtained as the maximum of these subsets. The intersection process using the
max operator is called the Zadeh union [3]. Researchers on fuzzy sets and sys-
tems have developed various equations that can be used to process the union or
t-conorm operator [3]. Due to its simplicity, Zadeh maximum is preferred to be
used in this book.
Example 2.10
The fullness percentages of a battery charging unit are defined as empty (EM), full
of a quarter (OQ), half full (HF), full of three quarters (TQ), and full (FU), which
are represented by triangular fuzzy subsets using their parameters as described in
Example 2.9 and shown in Figure E2.9. Find the following:
(a) Union of the subsets OQ and HF
(b) Union of HF and TQ
(c) Union of OQ and TQ
(d) Comment on the meanings of the above results.
48 Fuzzy logic control in energy systems, 2nd edition
Answer 2.10
(a) Union of the subsets OQ and HF can be obtained using the max operator as
given in (2.43). The MATLAB code given in Figure E2.9(a) can be used for
this example as well by just using the max operator instead of min as
MAXOQHF = max (OQZ, HFZ). The resultant union set is shown in
Figure E2.10(a).
(b) Union of HF and TQ can be obtained using the max operator as given in (2.43).
the MATLAB code in Figure E2.9(b).
(c) can be adapted to this example by just replacing the min operator by max as
MAXOQHF = max (HFZ, TQZ). The resultant union set is shown in
Figure E2.10(b).
(d) Union of OQ and TQ can be obtained using the max operator as given in (2.43).
Actually, as can be seen in Figure E2.9, fuzzy subsets OQ and TQ do not have
any common area. However, contrary to the intersection operator, the union of
these subsets is not an EM set and includes both of these subsets with FU
capacity as shown in Figure E2.10(c).
Membership degrees
Percentage of fullness
Condition Definition
Boundary sð1; 1Þ ¼ 1
sð1; 0Þ ¼ 1
sð0; 1Þ ¼ 1
sð0; 0Þ ¼ 0
Commutativity sða; bÞ ¼ sðb; aÞ
Associativity sðsða; bÞ; cÞ ¼ sða; sðb; cÞÞ
a1 a2
Monotonicity then sða1 ; b1 Þ sða2 ; b2 Þ
b1 b2
Idempotent sða; aÞ ¼ a
Continuity The union (t-conorm) continues
50 Fuzzy logic control in energy systems, 2nd edition
Fuzzy Union operator has some conditions to be satisfied as in the case of inter-
section. Without going into details and proofs of the axioms, these conditions are
listed in Table 2.3. Details can be found in [3]. The boundary condition of the union
operator acts as the same as that of a crisp set. The letter s in Table 2.3 stands for
the operator t-conorm, which is also called s-norm.
2.4.3 Complement
The complement of fuzzy subsets is also called negation and corresponds to the
operator not in Boolean algebra. Therefore, the verbal term not in fuzzy systems
has the same meaning as negation and is processed by the complement operator.
Let A be a fuzzy subset and C is the complement of A, where A and C are defined in
interval [0, 1] and are the elements of universe of X. Then the union C is written as
C¼A (2.44)
where A[[0, 1] and C[[0, 1]. Equation (2.44) can be written in terms of member-
ship functions as
mC ðxÞ ¼ mA ðxÞ (2.45)
mC ðxÞ ¼ 1 mA ðxÞ (2.46)
where x [ X. Equation (2.46) shows that a complement of fuzzy subsets can be
obtained by subtracting the membership function from the full membership value
of 1.0. Since the membership functions are defined in interval [0, 1], the maximum
value or the upper boundary of the universe for the membership degrees is 1.0. The
complement using the not operator is called the Zadeh complement [3].
Researchers on fuzzy sets and systems have developed various equations that can
be used to process the complement operator [3]. Due to its simplicity, the Zadeh
complement is preferred to be used in this book.
Example 2.11
The fullness percentages of a battery charging unit are defined as empty (EM), full
of a quarter (OQ), half full (HF), full of three quarters (TQ), and full (FU), which
are represented by triangular fuzzy subsets using their parameters as described in
Example 2.9 and shown in Figure E2.9. Find the following:
(a) Complement of the subset EM and FU separately.
(b) Complement of the subset HF and TQ separately.
(c) Complement of the subset OQ \ HF and OQ [ HF separately.
(d) Complement of the subset OQ \ TQ and OQ [ TQ separately.
(e) Comment on the meanings of the above results.
Answer 2.11
(a) Complements of the subsets EM and FU can be obtained using the not operator
as given in (2.46). The MATLAB code given in Figure E2.9(a) can be modified
Fuzzy sets and fuzzy partitioning 51
Membership degrees
Membership degrees
Percentage of fullness Percentage of fullness
(i) (ii)
Figure E2.11(a) The complements of the sets empty and full. (i) The charging unit
is not empty. (ii) The charging unit is not full.
Membership degrees
Membership degrees
Figure E2.11(b) The complements of the sets half full and full of three quarters.
(i) The charging unit is not half full. (ii) The charging unit is not
full of three quarters.
for this example as well by using not operator instead of min as notEM = 1–EM
and notFU = 1–FU. The resultant complements are shown in Figure E2.11(a).
(b) Complement of HF and TQ can be obtained using the not operator as given in
(2.46). the MATLAB code used for part (a) can be used here as notHF = 1HF
and notTQ = 1TQ. The resultant complement sets are shown in Figure E2.11(b).
(c) Complement of OQ\HF and OQ[HF are obtained in two steps. First, the
intersection and union of OQ and HF are obtained. Then the complement is
applied to the results from the first step to complete the solution. Therefore, the
MATLAB code used in previous parts can be modified and used for this part as
notOQIHF = 1 – (OQ\HF) and notOQUHF = 1 – (OQ[HF).
(d) Complement of OQ\TQ and OQ[TQ are obtained in two steps as in part (c).
First, the intersection and union of OQ and TQ are obtained. Then the com-
plement is applied to the results from the first step to complete the solution.
52 Fuzzy logic control in energy systems, 2nd edition
Figure E2.11(c) The complements of the intersection and union of the sets full
of a quarter and half full. (i). OQ \ HF and its complement.
(ii) OQ [ HF and its complement.
Therefore, the MATLAB code used in previous parts can be modified and used
for this part as notOQITQ = 1 – (OQ\TQ) and notOQUTQ = 1 – (OQ[TQ).
(e) The complement operator is used to obtain the negations of the given fuzzy
membership functions. The resultant membership functions represent the
opposite meaning of the set negated. The use of complement with intersection
and union gives additional meaning to these operators. This example shows
some cases of using the complement, union, and intersection together.
The complement of the subset EM is given in Figure E2.11(a). The com-
plement of empty means not empty and obtained as not empty = 1-empty.
Similarly, the complement of the fuzzy subset full represents the expression not
full and is obtained as not full = 1-full as shown in Figure E2.11(a). The com-
plements of HF and full of three quarters (TQ) are given in Figure E2.11(b).
Attention should be given to the complements of intersection and union of the
subsets OQ and HF shown in Figure E2.11(c). The complement of the inter-
section of two neighboring fuzzy subsets looks like the opposite of the inter-
section set as expected. The complement of the union of two neighboring fuzzy
subsets also shows a similar behavior. If the fuzzy subsets do not have any
common area, then their intersection will be an EM set as shown in
Figure E2.11(d) while the complement of this EM set will be equal to the FU
membership value of 1.0. The union of two fuzzy subsets whose intersection is
an EM set covers all of these two subsets as given in part (ii) of Figure E2.11(d)
as well. The complement of the union of fuzzy subsets OQ and TQ becomes the
opposite of the union set.
Fuzzy complement operator has some conditions to be satisfied as in the case of
intersection and union. These conditions are listed in Table 2.4. Details can be
Fuzzy sets and fuzzy partitioning 53
Figure E2.11(d) The complements of the intersection and union of the sets full of
a quarter and full of three quarters. (i) OQ\TQ and its
complement. (ii) OQ[TQ and its complement.
Condition Definition
Boundary cð1Þ ¼ 0
cð0Þ ¼ 1
Monotonicity cðaÞ cðbÞ if a < b
Idempotent cðcðaÞÞ ¼ a
Continuity The complement continues
where a and b [[0, 1].
found in [3]. The boundary condition of complement operator acts as the same as
that of a crisp set. The letter c in Table 2.4 stands for the operator complement.
of a quarter, half full, full of three quarters, and full are all fuzzy words as same as
the words child, young, middle aged, old, short, medium height, tall, cold, warm,
hot, small, normal, large, big, slow, fast, soft, hard, etc. A fuzzy word is also called
as a fuzzy variable. However, they are actually called as fuzzy variables if they are
used with fuzzy adjectives, which affect the shapes and scopes, i.e., the fuzziness of
a fuzzy set. Some examples of fuzzy adjectives can be given as very, few, a few,
more, some, almost, toward, close to, near, far, more or less, etc.
If a fuzzy adjective is added to a fuzzy word or a fuzzy variable, the fuzziness
of the fuzzy variable changes. For example, let the fuzzy word young be the core
fuzzy set of a fuzzy variable. Then many fuzzy variables can be generated by
adding fuzzy adjectives as very young, almost young, more or less young, a little bit
young, not young, not too young, etc. The use of a fuzzy adjective with fuzzy words
generates a subset of the original word. For example, let us define the numbers
close to 0, which is also called fuzzy zero, represented by sinusoid type member-
ship function as:
p
mA ðxÞ ¼ sin x þ 90 for 5 x 5 (2.47)
2a
where a = 2. Now let us define the numbers very close to 0 as the square of the
numbers close to 0.
p 2
mB ðxÞ ¼ ½mA ðxÞ2 ¼ sin x þ 90o for 5 x 5 (2.48)
2a
In order to show the effect of the fuzzy word very, both of them are plotted in
the same graph as given in Figure 2.18. As it can be understood clearly from
Figure 2.18, the fuzzy subset representing the word close is more fuzzy than the
word very close. The adjective very has caused the word close to shrink toward the
core of the original set.
Since the membership values are from 0 to 1, the square of a membership
function shrinks toward the core and bandwidth becomes narrower. Except for the
1
Membership degrees
0.8
0.6
0.4
0.2
0
–5 –4 –3 –2 –1 0 1 2 3 4 5
Universe of X
Figure 2.18 Fuzzy subsets represent the numbers close to zero and very close to
zero
Fuzzy sets and fuzzy partitioning 55
Having the opposite meaning of very, the word less is also used as an adjective
to affect the meaning of the fuzzy words used with. The word less increases the
fuzziness as very decreases it. Therefore, the root square of the membership func-
tion is used to implement the fuzzy adjective less.
The root square of the fuzzy membership function mA(x) increases the band-
width and membership values between 0 and 1. With larger membership values the
fuzzy subset becomes fuzzier, which means the fuzziness is increased. As it is
understood from ongoing analysis, the fuzzy word very acts as a concentrator and
the process is called concentration. Similarly, the word less expands the fuzzy
subset as a dilation operator. Based on Equations (2.51) and (2.52), the con-
centration and dilation are defined as
ð
ðmA ðxÞÞn
conðAÞ ¼ An ¼ (2.53)
X x
ð
ðmA ðxÞÞm
dilðAÞ ¼ Am ¼ (2.54)
X x
where n is a positive integer and m is defined as 0 < m < 1. Another function used
for the adjustment of fuzzification is the combination of concentration and dilation
operators called contrast intensification. This function increases the fuzziness of
the bandwidth set while decreasing fuzziness outside the bandwidth as defined in
(2.55).
8
< 2A2 ; 0 mA ðxÞ 0:5
ciðAÞ ¼ (2.55)
:
2ðAÞ2 Þ; 0:5 mA ðxÞ 1
1
0.9
0.8
Membership degrees
0.7
0.6
0.5
0.4
0.3
0.2
0.1
0
–6 –5 –4 –3 –2 –1 0 1 2 3 4 5 6
Universe of X
Fuzzy sets are defined in universes of discourse to represent groups of objects that
are hard to clearly distinguish one from another. They show the inclusion levels of
the objects in the group and are characterized by membership functions with var-
ious types, which have been discussed in previous sections. Fuzzy membership
functions represent linguistic variables that are used to distinguish subgroups from
each other. That is the point where the problems arise. When defining and ordering
the fuzzy subsets in a universe of discourse, the boundaries, support, and core sets
of the fuzzy membership functions gain great importance, because fuzzy linguistic
variables do not have a certain or measurable support set. For example, let us
partition the universe of age into subcategories as infant, child, young, middle aged,
and old represented by triangular-type fuzzy membership functions. Then let us
define the support sets for infant, child, young, middle aged, and old. Where does
the support set of fuzzy set young start and end? Where is the starting point of the
support set of fuzzy set middle aged? The same questions can be asked for all of the
fuzzy sets mentioned above. Who do we call as infant, child, young, middle aged,
and old? We do not have a unique answer for each one of these age categories. The
support and the core sets of the linguistic variables representing these five groups of
ages are not unique and may vary from person to person. 56 undergraduate students
with ages 20 to 30 were asked to write down the ending age for infant, the starting
age for old, and the starting and ending ages for child, young, and middle-aged. The
results of this small survey come up with different ideas about the age groups as
depicted in Figures 2.20–2.24.
As the survey shows, the people do not have the same idea about starting
and ending ages for the subcategories infant, child, young, middle aged, and old.
Fuzzy sets and fuzzy partitioning 57
The boundaries of each subcategory are mixed with the boundaries of the neigh-
boring category. Therefore, partitioning a universe of discourse into subcategories
is not an easily distinguishable task. It is uncertainty in transition parts from one
category to the other and fuzzy partitioning is required to represent the uncertainty
during this transition.
The support set of each subcategory can be defined similarly to (2.30) as
supportðAÞ ¼ fx such that mA ðxÞ > 0g (2.56)
Then the membership function can be defined in terms of the related support
set. For example, let us use triangular-type fuzzy membership functions to repre-
sent the subcategories given in Figures 2.20–2.24 as
mA ðxÞ ¼ triangleðxL ; xP ; xR Þ (2.57)
Figure 2.21 Survey results of starting and ending ages for child
Figure 2.22 Survey results of starting and ending ages for young
58 Fuzzy logic control in energy systems, 2nd edition
Figure 2.23 Survey results of starting and ending ages for middle aged
where xL, xP, and xR are left, peak, and right parameters of triangular membership
functions, and are obtained from the survey data as
xL ¼ minðsupportðAÞÞ (2.58)
xR ¼ maxðsupportðAÞÞ (2.59)
xR xL
xP ¼ x L þ (2.60)
2
Similar approach can be used to define the subcategories by the other types of
membership functions
Example 2.12
Use the lowest age value for the starting and highest age value for the ending points
from the survey data given in Figures 2.20–2.24 as the parameters of triangular-
type fuzzy sets and represent the subcategories by triangular fuzzy subsets. Assume
the middle points of the lowest starting and the highest ending points as the para-
meters for a triangular peak. Besides, use right triangles for infant and old.
Answer 2.12
As a first step, let us determine the parameters for triangular fuzzy subsets
according to the definitions made in question part and put them in a table form.
Since a triangular-type fuzzy subset is represented by a membership function in
terms of its parameters x1, x2, and x3 as in Equations (2.4) and (2.7), let us obtain
these parameters from the survey data shown in Figures 2.20–2.24.
As a second step, let us plot them in the defined universe of discourse, age.
Fuzzy sets and fuzzy partitioning 59
Table E2.12 Parameters of triangular membership functions from the survey data
Fuzzy subset xL xP xR
Infant 0 0 7
Child 1 10 20
Young 11 26 40
Middle aged 24 44 65
Old 40 70 70
where each one of the fuzzy subsets Ai is normal with the highest membership
value of 1.0 for some xi. Each x in the universe of X has a nonzero membership
value for some Ai and zero for others.
More theoretical approaches for fuzzy partitioning can be found in [12–17] as
additional information. Fuzzy partition of the crisp universes in this book is based
on knowledge and information obtained from experiments, simulations, and experts
on the topic. Therefore, the definition of the universe of discourse and partition by
fuzzy subsets are straightforward processes for the energy systems.
Example 2.13
The power generated by photovoltaic (PV) solar cells changes as a function of solar
irradiation level and operating temperature. So, the generated power increases as
the solar irradiation level increases, but decreases as the operating temperature
increases. Therefore, meteorologic data about solar irradiation, temperature, wind,
and waves are measured daily, monthly, and annual basis to be used in renewable
energy projects. These measurements show that 50 mW/cm2 is low and 200 mW/
cm2 is well over average and assumed to be good. Similarly, the ambient tem-
perature varies between 20 C and 40 C around the world where humans live.
Based on these comments, a crisp universe of solar irradiation level (S) can be
defined in an interval as {50, 200} mW/cm2, and a crisp universe of temperature
(T) can be defined in the interval {20, 40} C.
(a) Partition the universe of S into fuzzy subsets Low (L), Sufficient (Su), Good
(G), and High (Hi), which are represented by evenly distributed triangular-type
membership functions.
(b) Partition the universe of T into fuzzy subsets Freezing (F), Cold (C), Warm
(W), and Hot (Ho), which are represented by evenly distributed triangular-type
membership functions.
Answer 2.13
The upper and lower boundary sets in both universes are represented by right tri-
angles assuming that solar irradiation level below 50 mW/cm2 is crisp low and
above 200 mW/cm2 is crisp high. Similarly, the temperature below 20 C is
assumed to be crisp freezing and above 40 C is crisp hot. The other fuzzy sets will
be two-sided and placed evenly in the corresponding universe such that the
boundaries of all the fuzzy subsets will have the same length.
Fuzzy sets and fuzzy partitioning 61
(a) The universe of S can be portioned into the following fuzzy subsets:
Figure E2.13(a) A partition of the universe of solar irradiation into fuzzy subsets
(b) The universe of T can be portioned into the following fuzzy subsets:
Example 2.14
The mechanical power generated by a wind turbine is determined by wind
speed and the area swept by the rotor blade of the turbine. Such that the gen-
erated power increases at higher wind speeds and greater rotor diameters.
Studies show that a wind speed of around 15 m/s is a good average speed for
wind turbines to be operated. Therefore, a universe of wind speed can be
defined in an interval of {0, 20}. The rotor diameter has been increased from
15 m to over 120 m from 1980 to 2013 [18,19] and keeps increasing. Using this
information from literature, a universe of rotor diameter is defined in the
interval of {0, 130} meters.
(a) Create five fuzzy subsets in the universe of wind speed as Zero, Slow, Medium,
Fast, and Faster, and place them evenly in the universe.
(b) Create three fuzzy subsets in the universe of rotor diameter as Small, Medium,
and Big, and place them evenly in the universe.
62 Fuzzy logic control in energy systems, 2nd edition
Answer 2.14
The upper and lower boundary sets in both universes are represented by right tri-
angles assuming that there is no wind speed below 0 m/s and wind speed above
20 m/s is not usable. Similarly, the lowest diameter is crisp 0 m and the highest is
crisp 130 m. The other fuzzy sets will be placed evenly in the corresponding uni-
verse such that the boundaries of all the fuzzy subsets will have the same length
because they have the distance between the peak points.
(a) The universe of wind speed is portioned into the following five fuzzy subsets:
Figure E2.14(a) A partition of the universe of wind speed into fuzzy subsets
(b) The universe of rotor diameter is portioned into the following three fuzzy
subsets:
Figure E2.14(b) A partition of the universe of rotor diameter into three subsets
Example 2.15
The power in electrical energy systems is a complex quantity with real and ima-
ginary components. The real component is called active power, which is converted
to usable energy by electrical machines and devices such as motors and heaters.
The imaginary component is called reactive power and is used by electrical
machines and devices such as motors, transformers, and reactors.
Fuzzy sets and fuzzy partitioning 63
The active power component is a factor of the complex power and is deter-
mined by a term called a power factor (PF), which is defined as cosf in the interval
[0, 1]. In order to have minimum power distribution losses, the PF is kept close to 1,
such as 0.95 or higher. In order to keep cosf = 0.95, capacitors are connected at the
end of the distribution line. However, connecting more capacitors than the required
amount results in a voltage increment at the end of the line that is not desired.
The expert operator at the end of the power distribution line, switches the
capacitors on or off by looking at the values of PF and bus voltage. The operator
uses the following decision rules while deciding the amount of the capacitors to be
switched on or off.
If PF is high (HPF) and bus voltage is low (LV) then there is no change (NC).
If PF is high (HPF) and bus voltage is normal (NV) then decrease (D) the
capacitors.
If PF is high (HPF) and bus voltage is high (HV) then decrease (D) the capacitors.
If PF is normal (NPF) and bus voltage is low (LV) then increase (I) the capacitors.
If PF is normal (NPF) and bus voltage is normal (NV) then there is no change (NC).
If PF is normal (NPF) and bus voltage is high (HV) then decrease (D) the
capacitors.
If PF is low (LPF) and bus voltage is low (LV) then increase (I) the capacitors.
If PF is low (LPF) and bus voltage is normal (NV) then increase (I) the capacitors.
If PF is low (LPF) and bus voltage is high (HV) then there is no change (NC).
This decision process is actually a collection of conditional sentences includ-
ing verbal terms that all are fuzzy variables. There are three universes in this
decision process. Two of them are input universes and one is the output. The verbal
terms are defined in these universes depending on the intervals, which may vary
from one to another.
(a) Define the universe of discourses for each universe.
(b) Show the fuzzy verbal terms high, normal, and low in the universe of PF
assuming a PF of 0.95 is normal.
(c) Assume zero voltage drop as normal and show the fuzzy verbal terms high,
normal, and low in the universe of voltage.
(d) Assume no change stands for zero and show the fuzzy verbal terms increase,
decrease, and no change in the universe of capacitor change.
Answer 2.15
(a) Definitions of the universes.
Considering the meaning of PF explained above, an interval of {0.8, 1} as in
Figure E2.15(a) can be defined as its universe of discourse.
The maximum voltage drop allowed in power distribution lines is specified
by standards and published in related guidelines. According to the guidelines,
the voltage drop may vary from 0% to 5% for short lines or 10% for long lines.
Therefore, the bus voltage can be 10% lower or 10% higher than the normal
value. If the rated bus voltage is assumed to be the base voltage, then the bus
64 Fuzzy logic control in energy systems, 2nd edition
Figure E2.15(a) A partition of the universe of power factor into three subsets
Figure E2.15(c) A partition of the universe of capacitor’s changes into three subsets
voltage becomes 1.0 per unit (pu) when it is equal to its rated value, which is
called normal. Values of the bus voltage up to 10% above the normal value are
called high and 10% down from the normal value is called low. Considering
these definitions of low, normal, and high, the universe of bus voltage can be
defined in the interval {0.9, 1.1} in pu as shown in Figure E2.15(b).
Fuzzy sets and fuzzy partitioning 65
Example 2.16
The PF described in Example 2.15, is partitioned into six subcategories in its uni-
verse, which is the interval {0, 1}. Instead of three subcategories used in Example
2.15(a), this time six subcategories are defined in the universe of PF. Triangular-
type membership functions given below in terms of their parametrized functions
are used to represent these subcategories.
Minimum (0.50, 0.50, 0.70)
Lower (0.50, 0.70, 0.80)
Low (0.70, 0.80, 0.90)
Good (0.80, 0.90, 0.95)
Better (0.90, 0.95, 1.0)
Maximum (0.95, 1.0, 1.0)
(a) Show these subcategories in a figure in the universe of PF.
(b) Obtain the membership degrees of cosf = 0.88 in the fuzzy subsets described
in (a).
Answer 2.16
The MATLAB codes given in previous sections of this chapter for the triangular
membership function can be used to plot the fuzzy subsets described in this pro-
blem. An updated code used for this problem is given in Figure E2.16(a) where the
66 Fuzzy logic control in energy systems, 2nd edition
MATLAB function code of triangle01m.m is given in Figure 2.5. The other types
of fuzzy membership functions discussed in in previous sections of this chapter can
also be used to represent the subsets given in this example. Trapezoid, Gaussian,
bell, sinusoid, and sigmoid-type membership functions all can be used in this
example. However, triangular-type membership function is preferred due to its
simplicity and linearity.
Besides the partitioning of the universe of PF, this example has an interpreta-
tion of a crisp element PF = cosf = 0.88 with the fuzzy subsets. In part (b), the
inclusion of the crisp PF value in fuzzy subsets is asked to be determined.
(a) Figure E2.16(a) depicts the MATLAB code used to plot six subcategories of PF
as described in the question part of this example. The resultant plot is given in
Figure E2.16(b).
(b) If PF has a crisp value of PF = cosf = 0.88, then it will have nonzero mem-
bership values in fuzzy subsets Low and Good. Figure E2.16(b) shows the
Figure E2.16(a) MATLAB code used to plot the fuzzy subsets in Example 2.16
Figure E2.16(b) Fuzzy subsets used to partition the universe of power factors
Fuzzy sets and fuzzy partitioning 67
Example 2.17
In electrical power transmission and distribution systems, the voltages may include
additional frequency components besides the rated frequency. These additional
frequency components are called harmonics, which are not wanted at all.
Especially devices that cause discontinuity in current are the main harmonic sour-
ces such as switched-power electronic devices. The harmonics in power systems
cause losses and misoperation of the system. Therefore, they are eliminated or
minimized to reduce the unwanted effects by designing proper filters. Since the
harmonics are not able to be eliminated completely, standards are developed to
guide the users so that the total harmonic distortion (THD) is kept below the
standard values. IEEE Std 519-2014, “Recommended Practices and Requirements
for Harmonic Control in Electrical Power Systems” provides suggested harmonic
values for power systems [20] as shown in Table E2.17.
(a) Partition the universe of bus voltage into the subcategories as low voltage (LV),
medium voltage (MV), high voltage (HV), and extra high voltage (EHV), and
show them in a graphic.
(b) Partition the universe of individual harmonics into the subcategories as extra
low harmonics (ELH), low harmonics (LH), medium harmonics (MH), high
harmonics (HH), and extra high harmonics (EHH) and show them in a graphic.
(c) Partition the universe of total harmonic distortion into the subcategories as
ELH, LH, MH, HH, and EHH and show them in a graphic.
Answer 2.17
(a) Partition of the universe of bus voltage into four subcategories is shown in
Figure E2.17(a1). Four subcategories are defined using parametrized triangular
fuzzy membership functions as below.
LV (k) = triangle01m (0, 0, 1, v)
Figure E2.17(a1) Partition of power system bus voltages into fuzzy subsets
LV MV
1
Membership degrees
0.8
0.6
0.4
0.2
0
0 0.2 0.4 0.6 0.8 1
Bus voltage (kV)
Figure E2.17(a2) Partition of low voltage section into fuzzy subsets LV and MV
Fuzzy sets and fuzzy partitioning 69
(c) Partition of the universe of total harmonic distortion into the subcategories as
extra low harmonics (ELH), low harmonics (LH), medium harmonics (MH),
high harmonics (HH), and extra high harmonics (EHH) are shown in
Figure E2.17(c). The parameters of triangular membership functions are
selected as
ELHT (k) = triangle01m (0, 0, 1.5, th)
LHT (k) = triangle01m (0, 1.5, 2.5, th)
MHT (k) = triangle01m (1.5, 2.5, 5, th)
HHT (k) = triangle01m (2.5, 5, 8, th)
EHHT (k) = triangle01m (5, 8, 8, th)
Example 2.18
Oscillatory transients in electrical power systems are described as sudden, non-
power frequency changes in the steady-state condition of voltage, current, or both
that have both positive and negative polarity values (bidirectional). In other words,
the instantaneous voltage or current value of an oscillatory transient varies its
70 Fuzzy logic control in energy systems, 2nd edition
Answer 2.18
(a) Let us partition the universe of transient frequency into fuzzy subcategories as
low frequency (LF), medium frequency (MF), and high frequency (HF). A plot
of the portioned universe and fuzzy subsets is shown in Figure E2.18(a).
(b) Let us partition the universes of transient duration into fuzzy subcategories as
short duration (SD), medium duration (MD), and long duration (LD). A plot of
the portioned universe and fuzzy subsets is given in Figure E2.18(b).
(c) Let us partition the universes of oscillating voltage magnitude into fuzzy sub-
categories as low voltage (LV) and high voltage (HV). Figure E2.18(c) shows a
plot of the portioned universe and fuzzy subsets.
Example 2.19
The active power transferred between two buses is expressed as
VS VR
Pe ¼ sin d
XL
where VS and VR are the sending and receiving bus voltages, respectively, and XL is
the reactance of the line connecting the buses to each other. d is the phase differ-
ence between the voltages VS and VR and called power angle. The bus voltage
magnitudes VS and VR are controlled and kept constant in steady-state operation.
Since the voltage frequency and dimensional properties of the power line are
constant, the line reactance XL is also constant. Therefore, the electrical power
transmission between two buses is written as a function of the power angle d.
In an interconnected power transmission system, the line connecting two buses
has a reactance of 0.5 pu. The bus voltages are measured to be equal and 1.0 pu. If
the power angle d is defined between 0 and p rad, obtain the following:
(a) Partition the universe of power angle d into subcategories as zero (ZD), quarter
(QD), half (HD) three quarter (TQD), and p (PD).
(b) Partition the power Pe into subcategories as zero (ZP), small (SP), medium
(MP), high (HP), and maximum (MXP).
72 Fuzzy logic control in energy systems, 2nd edition
Answer 2.19
The equation given for the transmitted active power between two busses is a
sinusoid function defined over half a period as shown in Figure E2.19 using the
given data.
Both power angle, d, and active power, Pe, transmitted between the busses are
two separate universes and can be partitioned into subcategories similar to the ones
given in question part. Now, let us partition the crisp universes d and Pe given in
Figure E2.19.
(a) The partition of the universe of power angle d into subcategories as ZD, QD,
HD TQD, and p (PD) is shown in Figure E2.19(a). It should be noted that these
subcategories are not the only choices. Less or more subcategories can be
defined as well. Sinusoid membership functions are used to represent the sub-
sets in the partitioned space.
(b) The partition of the power Pe into subcategories as ZP, SP, MP, HP, and MXP
are given in Figure E2.19(b). As it was written in part (a), less or more sub-
categories can be defined for the power Pe as well. Sinusoid membership
1
Membership degrees
0.8
0.6
0.4
0.2
0
0 45 90 135 180
Power angle (Deg)
Membership degrees
0.8
0.6
0.4
0.2
0
0 0.5 1 1.5 2
Power (pu)
functions are used to represent the subsets in the partitioned crisp space of the
transmitted electrical power.
Example 2.20
PV solar cells are modeled as a current source such that the generated current is a
function of photocurrent, which depends on sunlight or solar irradiation level. Since
the PV cell is a sort of P–N diode, a reverse diode saturation current and losses due
to heating are subtracted and the remaining current becomes the cell output current,
which is the load current. The mathematical model of a PV cell is written for the
output voltage as [22–24]
BTC Iph þ I0 IC
VC ¼ K ln RS IC
q I0
where the curve fitting factor K = 62, Boltzmann constant B = 37.674 1023 J/ C,
electron charge q = 1.106 1019 C. Assume that the above equation is adapted
to a PV array (PVA) as the photocurrent Iph = 5 A for solar irradiation level
SC = 100 mW/cm2 and ambient temperature TC = 20 C. Diode saturation current
I0 = 0.01 A and the series resistance RS representing the losses is equal to
0.002 Ohms.
(a) Use the given data in the above equation and obtain current–voltage (I–V) and
power–voltage (P–V) curves, assuming that the PVA output current is defined
in the interval {0, 5} Amperes. Use per-unit (pu) values of current, voltage, and
power in the plots assuming that the maximum power is the base value of
power. The current and voltage values corresponding to the maximum power
are the base values for current and voltage.
(b) Partition the universes of PVA voltage in pu, PVA current in pu, and PVA
power in pu into fuzzy subcategories. Use at least four subcategories for each
universe.
Answer 2.20
The MATLAB .m file code given in Figure E2.20 is used to plot the I–V and P–V
curves. The values of power, current, and voltage are converted to pu using the base
74 Fuzzy logic control in energy systems, 2nd edition
1.4
1.2
PVA Current and power (pu)
0.8
0.6
0.4
0.2
0
0 0.2 0.4 0.6 0.8 1 1.2 1.4
PVA voltage (pu)
values as described in the question. This normalization is done to fit both curves
into the same graph.
(a) Current–voltage (I–V) and power–voltage (P–V) characteristics of a PV array.
(b) Partition of the universes of PVA voltage in pu, PVA current in pu, and PVA
power in pu into fuzzy subcategories are given in Figures E2.20(b), E2.20(c),
Fuzzy sets and fuzzy partitioning 75
and E2.20(d). The boundaries of the voltage, current, and power are depicted
in Figure E2.20(a). These values can be used to define the universes and their
fuzzy subcategories represented by triangular membership functions as
follows.
2.7 Problems
P2.1 Define three fuzzy sets A, B, and C in the universe of X and explain why these
sets are fuzzy.
P2.2 Define three fuzzy subsets in each universe of discourses given as education,
age, height, and weight.
P2.3 List at least five utilization areas where the fuzzy logic is applied.
76 Fuzzy logic control in energy systems, 2nd edition
P2.4 Fuzzy variables A, B, C, and D are defined in the universes X1, X2, X3, and
X4, respectively, and given as
(a) Represent these fuzzy subsets using proper fuzzy membership functions
and show them in the corresponding universe of discourses.
(b) Define a common normalized universe of discourse for the given fuzzy
subsets such that just three fuzzy subsets will be sufficient in order to
represent all four of them.
P2.5 Fuzzy variables A, B, C, and D are defined in the universes X1, X2, X3, and
X4, respectively, and given as
(a) Two fuzzy subsets A and B are defined in the universe of X = {5, 5}.
(b) Obtain a = 0 and a = 0.5 a-cuts of these fuzzy subsets.
(c) Obtain support sets of these fuzzy subsets.
(d) Comment on the convexity of these fuzzy subsets.
0:0 0:2 0:4 0:6 0:8 1:0 0:8 0:6 0:4 0:2 0:0
A¼ þ þ þ þ þ þ þ þ þ þ
5 4 3 2 1 0 1 2 3 4 5
0:0 0:2 0:4 0:6 1:0 1:0 1:0 0:6 0:4 0:2 0:0
B¼ þ þ þ þ þ þ þ þ þ þ
5 4 3 2 1 0 1 2 3 4 5
P2.6 The fuzzy subsets A, B, and C are defined in the universe X = {4, 8} and
given as
0:0 0:5 1:0 0:5 0:0
A ¼ Zero ¼ þ þ þ þ
2 1 0 1 2
(a) Show the fuzzy subsets A, B, and C on the same figure in the common
universe.
(b) Represent the fuzzy subsets A, B, and C by using triangular membership
functions.
(c) Repeat (b) for Gaussian and sinusoid membership functions.
Fuzzy sets and fuzzy partitioning 77
P2.7 Cold and Hot fuzzy words are defined in the universe of temperature in C as
given below.
1 1 0:9 0:8 0:7 0:6 0:5 0:4 0:3
Cold ¼ þ þ þ þ þ þ þ þ
30 25 20 15 10 5 0 5 10
0:2 0:1 0 0
þ þ þ þ
15 20 25 30
0 0 0:1 0:2 0:3 0:4 0:5 0:6 0:7
Hot ¼ þ þ þ þ þ þ þ þ
30 25 20 15 10 5 0 5 10
0:8 0:9 1 1
þ þ þ þ
15 20 25 30
Answer the following by generating a fuzzy subset for each question.
(a) The weather was neither cold nor hot yesterday. How was the weather
yesterday?
(b) The weather was either cold or hot yesterday. How was the weather
yesterday?
(c) The weather in Trabzon is both cold and hot in October. How is the
weather in Trabzon in October?
(d) Which ones of the resultant fuzzy subsets in parts (a), (b), and (c) are convex?
(e) Which ones of the resultant fuzzy subsets in parts (a), (b), and (c) are also a
fuzzy number?
P2.8 Use the trapezoid fuzzy membership function defined in (2.12) with the
parameters given as x1 = 1.5, x2 = 0.5, x3 = +0.5, and x4 = +1.5 in the
universe of X = {2, 2}.
(a) Develop a MATLAB .m file to plot this membership function.
(b) Develop a Simulink model to plot this membership function.
(c) Develop a Simulink model for the trapezoidal membership function such
that the membership value of x is calculated when x, x1, x2, x3, and x4 are
entered as the inputs.
P2.9 A normal fuzzy subset is defined in the universe of X = {0, 20}. The height
of the fuzzy subset corresponds to the crisp 10. Develop a MATLAB code to
obtain core, crossover points, bandwidth, boundaries, cardinality, support,
height, and a-cuts for a = 0.2, a = 0.5, and a = 0.8.
P2.10 Fuzzy subsets A, B, and C are defined in a universe of X = {4, 4} and are
given as
0 0:5 1 0:5 0
A¼ þ þ þ þ
4 3 2 1 0
0 0:5 1 0:5 0
B¼ þ þ þ þ
2 1 0 1 2
0 0:5 1 0:5 0
C¼ þ þ þ þ
0 1 2 3 0
78 Fuzzy logic control in energy systems, 2nd edition
P2.14 A crisp universe of discourse X is defined in the interval of [0, 10] and
partitioned into three fuzzy subsections as SMALL, MEDIUM, and
LARGE. Triangular-type fuzzy sets are used to represent these fuzzy sub-
sets. Draw a software algorithm that gives you the membership value of any
x on X in the fuzzy subsets SMALL, MEDIUM, and LARGE.
P2.15 In electrical power systems, a term called power factor is defined as cosf in
the interval [0, 1]. In order to reduce the power losses in power distribution
networks, the PF is kept close to 1.0 such as 0.5 by connecting power
capacitors at the end of the distribution line. However, connecting more
capacitors than the required amount causes the bus voltage to be increased
and decreases the electrical loads being fed.
The expert, operating the PF unit at the end of the line, determines the
right amount and adjusts the capacitors to be connected by looking at PF and
line voltage values. The human operator uses a decision process like the one
given in Table P2.15(a).
where H, N, and L stand for high, normal, and low, respectively. NC, I,
and D mean no change, increase, and decrease. The subscriptions PF, V, and
C represent PF, voltage, and capacitor change, respectively.
Crisp numerical values of the verbal terms given in Table P2.15(a) are
given in Tables P2.15(b) and P2.15(c). Represent the verbal terms low,
Line voltage
Power factor LV NV HV
HPF NCC DC DC
NPF IC NCC DC
LPF IC IC NCC
Table P2.15(c) Crisp data for the output space in Problem P2.15
Table P2.16 Crisp data for the output space in Problem P2.15
Minimum Very low (VL) Low (L) Good (G) Very good (VG) Maximum
(MIN) (G)
0.50 0.70 0.80 0.90 0.95 1.0
may have the option to be delayed for a short time, some longer and some may
be canceled. In order to use the generated power more efficiently for energy
saving and sustainability, energy management algorithms are applied.
(a) The load supplied by the power utility is classified as residential,
industrial, street lights, health centers, transportation, and entertainment.
Represent these subclasses of loads by fuzzy subsets in the universe of
load importance.
(b) Categorize the loads as can be canceled, can be delayed longer, can be
delayed shorter, and must be used in the universe of load importance.
(c) Categorize the loads as not important, somehow important, important, or
highly important in the universe of load importance.
P2.20 An industrial plant gets its required electrical power from the utility grid
besides its own generation from a wind energy conversion (WEC) system, a
PV solar system, and a fuel cell (FC) system. In order to reduce the pay-
ments to the utility, the power demand of the industrial plant is managed to
be supplied from its own sources by reducing the power drawn from the
utility. A fuzzy reasoning process using the rules below is employed in this
management system to decide which source is better to use for the moment.
R1: If PV is sufficient and WEC is insufficient and FC is empty then use PV
only.
R2: If PV is sufficient and WEC is insufficient and FC is full then use PV
and FC only.
R3: If PV is insufficient and WEC is insufficient and FC is empty then use
Utility only.
R4: If PV is insufficient and WEC is sufficient and FC is empty then use
WEC only.
R5: If PV is insufficient and WEC is sufficient and FC is full then use
WEC only.
R6: If PV is insufficient and WEC is insufficient and FC is full then use FC
and Utility.
R7: If PV is sufficient and WEC is sufficient and FC is empty then use
WEC and PV.
(a) Determine the verbal fuzzy variables and show them in their universes.
(b) Determine the input and output spaces in this decision process.
P2.21 The windings of a three-phase transformer are diagnosed by a thermal
camera. Depending on thermal data, the operator is able to understand
whether the transformer is operating normally, under heavy load, light load,
or under internal or other faulted conditions. Thermal photographs are
obtained and stored from initial tests performed for no load, light load,
nominal load, heavy load, extra heavy load, other faulted condition, and
internal faulted condition. Then, thermal photographs from real-time oper-
ating conditions are taken periodically and compared with the original data
82 Fuzzy logic control in energy systems, 2nd edition
P2.23 The fuzzy color spectrum shown in Figure P2.22a is partitioned into six
subcategories, which represent the thermal colors of loading conditions in a
power line. The subcategories are defined as no load (NoL), light load (LL),
nominal load (NomL), heavy load (HL), extra heavy load (EHL), and faulted
(F) conditions.
Thermal pictures of a power transmission line are taken at different
instants under various operating conditions and given in Figure P2.22b.
According to the partition space given in Figure P2.22a, determine the
operating condition of each case.
References
[6] Ishibuchi H., Nozaki K., Yamamoto N. and Tanaka H. ‘Selecting fuzzy if-
then rules for classification problems using genetic algorithms’. IEEE
Transactions on Fuzzy Systems. 1995;3(3):260–270.
[7] Park D., Kandel A. and Langholz G. ‘Genetic-based new fuzzy reasoning
models with application to fuzzy control’. IEEE Transactions on Systems,
Man, and Cybernetics. 1994;24(1):39–47.
[8] Chen J.Q., Xi Y.G. and Zhang Z.J. ‘A clustering algorithm for fuzzy model
identification’. Fuzzy Sets and Systems.1998;98(3):319–329.
[9] Seng T.L., Khalid M.B. and Yusof R. ‘Tuning of a neuro-fuzzy controller by
genetic algorithm’. IEEE Transactions on Systems, Man, and Cybernetics,
Part B (Cybernetics). 1999;29(2):226–236.
[10] Nauck D. and Kruse R. ‘A neuro-fuzzy method to learn fuzzy classification
rules from data’. Fuzzy Sets and Systems.1997;89(3):277–288.
[11] Shi Y. and Mizumoto M. ‘A new approach of neuro-fuzzy learning
algorithm for tuning fuzzy rules’. Fuzzy Sets and Systems. 2000;112(1):
99–116.
[12] Nguyen H.T., Prasad N.R., Walker C.L. and Walker E.A. A First Course in
Fuzzy and Neural Control. London: Chapman & Hall/CRC; 2003.
[13] Lee-Kwang H. and Lee K.M. ‘Fuzzy hypergraph and fuzzy partition’. IEEE
Transactions on Systems, Man, and Cybernetics. 1995;25(1):196–201.
[14] Murata T., Ishibuchi H. and Gen M. ‘Adjusting fuzzy partitions by genetic
algorithms and histograms for pattern classification problems’. IEEE Inter-
national Conference on Evolutionary Computation; Anchorage, AK, May
1998. pp. 9–14.
[15] Okuda Y., Yamashita H. and Inaida J. ‘Fuzzy reasoning using fuzzy par-
tition and its application’. Conference of the North American Fuzzy
Information Processing Society (NAFIPS); Pensacola Beach, FL, Aug
1998. pp. 324–328.
[16] Hoppner F. and Klawonn F. ‘A new approach to fuzzy partitioning’. Joint 9th
IFSA World Congress and 20th NAFIPS International Conference; Van-
couver, BC, July 2001, vol. 3, pp. 1419–1424.
[17] Chuang C.C. ‘Fuzzy weighted support vector regression with a fuzzy parti-
tion’. IEEE Transactions on Systems, Man, and Cybernetics, Part B
(Cybernetics). 2007;37(3):630–640.
[18] Thresher R.W. and Dodge D.M. ‘Trends in the evolution of wind turbine
generator configurations and systems’. Wind Energy. 1998;1(1):70–86.
[19] Quilter J. Gamesa progress on 5MW offshore turbine [online]. Spain:
WindPower; 2013. Available from http://www.windpowermonthly.com/
article/1184003/gamesa-progress-5mw-offshoreturbine [Accessed 19 Aug
2016].
[20] IEEE Recommended Practices and Requirements for Harmonic Control in
Electrical Power Systems. IEEE Std 519-2014 (Revision of IEEE Std 519-
1992); New York, NY: IEEE.
[21] IEEE Recommended Practice for Monitoring Electric Power Quality. IEEE
Std 1159-2009 (Revision of IEEE Std 1159-1995); 2009. pp. c1–81.
Fuzzy sets and fuzzy partitioning 85
[22] Altas I.H. Control strategies for maximum power tracking and energy utili-
zation of a standalone photovoltaic energy system. PhD Thesis, Faculty of
Engineering, Department of Electrical Engineering, University of New
Brunswick, Fredericton, NB, Canada, 1993.
[23] Altas I.H. and Sharaf A.M. ‘A fuzzy logic power tracking controller for a
photovoltaic energy conversion scheme’. Electric Power Systems Research
Journal. 1992;25(3):227–238.
[24] Altas I.H. and Sharaf A.M. ‘Novel maximum power fuzzy logic controller
for photovoltaic solar energy systems’. Renewable Energy. 2008;33(3):
388–399.
This page intentionally left blank
Chapter 3
Fuzzy decision-making
3.1 Introduction
Relation is an indication of the connectivity, reflexivity, and similarity between two
or more sets. These properties either exist or do not in a crisp relation. The exis-
tence of these properties in a fuzzy relation, on the other hand, has some certain
degrees. The relation of fuzzy sets is also fuzzy and called fuzzy relation.
Therefore, the relation between the elements of fuzzy sets has some membership
degrees in the interval [0, 1], not just 0 or 1. Elements of two fuzzy sets may not
have any relation as they may have full relation. However, there might be some
cases in which one may not be sure to decide whether a relation exists or not. Due
to the gradual inclusion of the elements in a fuzzy relation, it is not easy to say
certainly that “there is a relation” or “there is not a relation.” The gradual inclusion
represents the fuzziness of the relation between the elements of the fuzzy sets.
Therefore, these types of relations are called fuzzy relations.
The fuzzy relation between two fuzzy sets leads us to define the fuzzy impli-
cations, which are the basis of fuzzy rules. A fuzzy relation is nothing but the
effective weightings of fuzzy rules, which are also used to develop fuzzy inference
systems and fuzzy decision-makers.
This chapter covers the concept of fuzzy reasoning and fuzzy decision-makers
besides a brief introduction to fuzzy relation. User-defined MATLAB files are used
to support the operational behaviors of fuzzy decision-making in this chapter. Well-
known fuzzy reasoning algorithms such as Mamdani fuzzy reasoning, Sugeno
fuzzy reasoning, and Tsukamoto fuzzy reasoning have also been explained with
examples here.
88 Fuzzy logic control in energy systems, 2nd edition
R ¼ A1 A2 A3 An (3.1)
where the operator \ stands for intersection, which is a min operator. Therefore,
(3.2) can be written as
ð
minðmA1 ðy1 Þ; mA2 ðy2 Þ; . . .; mAn ðyn ÞÞ
R ¼ A1 A2 An ¼
Y1 Y2 Yn y1 ; y2 ; . . .; yn
(3.3)
Example 3.1
P–N junction temperature of monocrystalline Si photovoltaic (PV) solar cells
increases almost linearly with the ambient temperature [1,2]. Fuzzy subsets
High (HA) for ambient temperature and High (HJ) for the junction temperature
are both defined in the same universe of temperature (T) with a universe defined
in {0, 100}.
(a) Show the fuzzy subsets HA and HJ as graphics in the universe of temperature.
(b) Obtain the cartesian product R = HA HJ as a relation between high ambient
and high junction temperatures in monocrystalline Si PV solar cells.
(c) Obtain the relation R in a matrix format.
(d) Write a MATLAB .m file code to calculate the relation R.
(e) Plot the relation matrix R as a three-dimensional surface in the universe of
TA TJ.
Fuzzy decision-making 89
Answer 3.1
(a) Representing the fuzzy subsets HA and HJ as graphics in the universe of
temperature.
R ¼ HA HJ
0 0:2 0:4 0:6 0:8 1
¼ þ þ þ þ þ
50 55 60 65 70 75
0 0:2 0:4 0:6 0:8 1
þ þ þ þ þ
75 80 85 90 95 100
0 \ 0 0 \ 0:2 0 \ 0:4 0 \ 0:6 0 \ 0:8 0\1
R ¼ HA HJ ¼ þ þ þ þ þ
50; 75 50; 80 50; 85 50; 90 50; 95 50; 100
0:2 \ 0 0:2 \ 0:2 0:2 \ 0:4 0:2 \ 0:6 0:2 \ 0:8 0:2 \ 1
þ þ þ þ þ þ
50; 75 50; 80 50; 85 50; 90 50; 95 50; 100
0:4 \ 0 0:4 \ 0:2 0:4 \ 0:4 0:4 \ 0:6 0:4 \ 0:8 0:4 \ 1
þ þ þ þ þ þ
50; 75 50; 80 50; 85 50; 90 50; 95 50; 100
0:6 \ 0 0:6 \ 0:2 0:6 \ 0:4 0:6 \ 0:6 0:6 \ 0:8 0:6 \ 1
þ þ þ þ þ þ
50; 75 50; 80 50; 85 50; 90 50; 95 50; 100
0:8 \ 0 0:8 \ 0:2 0:8 \ 0:4 0:8 \ 0:6 0:8 \ 0:8 0:8 \ 1
þ þ þ þ þ þ
50; 75 50; 80 50; 85 50; 90 50; 95 50; 100
1 \ 0 1 \ 0:2 1 \ 0:4 1 \ 0:6 1 \ 0:8 1\1
þ þ þ þ þ þ
50; 75 50; 80 50; 85 50; 90 50; 95 50; 100
90 Fuzzy logic control in energy systems, 2nd edition
0 0 0 0 0 0
R ¼ HA HJ ¼ þ þ þ þ þ
50; 75 50; 80 50; 85 50; 90 50; 95 50; 100
0 0:2 0:2 0:2 0:2 0:2
þ þ þ þ þ þ
50; 75 50; 80 50; 85 50; 90 50; 95 50; 100
0 0:2 0:4 0:4 0:4 0:4
þ þ þ þ þ þ
50; 75 50; 80 50; 85 50; 90 50; 95 50; 100
0 0:2 0:4 0:6 0:6 0:6
þ þ þ þ þ þ
50; 75 50; 80 50; 85 50; 90 50; 95 50; 100
0 0:2 0:4 0:6 0:8 0:8
þ þ þ þ þ þ
50; 75 50; 80 50; 85 50; 90 50; 95 50; 100
0 0:2 0:4 0:6 0:8 1\1
þ þ þ þ þ þ
50; 75 50; 80 50; 85 50; 90 50; 95 50; 100
As seen in Example 3.1, he cartesian product HA HJ is a subset of the
cartesian product TA TJ, where TA and TJ are the temperature values in the
universe of temperature and they represent Ð ambient and junction tempera-
tures, respectively. The symbols S and are used to represent the fuzzy
subsets in discrete and continues forms, respectively.
(c) The relation R in a matrix format
The result of fuzzy relation can be represented by using the “+” sign
between each element in a line format. However, some other formats such as
tables, membership matrices, suggested graphs, and basic graphs can be used
for clarity and understandability. These formats will be introduced later in this
chapter. Since the matrix format gives an overlook view of the membership
values of the relation, the matrix format is preferred to be used. The relation
matrix for Example 3.1 is given in Table E3.1(a).
As it can be easily understood from the matrix format, the fuzzy relation R
is a two-dimensional fuzzy variable while the fuzzy subsets HA and HJ are
one-dimensional fuzzy variables.
(d) A MATLAB .m file code is given in Figure E3.1(b).
0 0 0 0 0 0 0
50 50;75 50;80 50;85 50;90 50;95 50;100
0:2 0 0:2 0:2 0:2 0:2 0:2
55 50;75 50;80 50;85 50;90 50;95 50;100
0:4 0 0:2 0:4 0:4 0:4 0:4
R ¼ HA H J ¼ 60 50;75 50;80 50;85 50;90 50;95 50;100
0:6 0 0:2 0:4 0:6 0:6 0:6
65 50;75 50;80 50;85 50;90 50;95 50;100
0:8 0 0:2 0:4 0:6 0:8 0:8
70 50;75 50;80 50;85 50;90 50;95 50;100
1 0 0:2 0:4 0:6 0:8 1\1
75 50;75 50;80 50;85 50;90 50;95 50;100
Fuzzy decision-making 91
0
50 0 0 0 0 0 0
0:2
55 0 0.2 0.2 0.2 0.2 0.2
0:4
R ¼ HA H J ¼ 60 0 0.2 0.4 0.4 0.4 0.4
0:6
65 0 0.2 0.4 0.6 0.6 0.6
0:8
70 0 0.2 0.4 0.6 0.8 0.8
1
75 0 0.2 0.4 0.6 0.8 1
HA × HJ
(◦C)
mperature
ent te
Ambi
The fuzzy relation R in Example 3.1 is a relation between two fuzzy subsets.
The relation may also exist among more than two fuzzy subsets. A relation between
two fuzzy subsets is called as a binary fuzzy relation. If the relation is among three
fuzzy subsets, then it is called a ternary fuzzy relation. The names of the relations
that happen between two or more fuzzy subsets are listed as
l Binary relation occurs between two fuzzy subsets
l Ternary relation occurs among three fuzzy subsets
l Quaternary relation occurs among four fuzzy subsets
l Quinary relation occurs among five fuzzy subsets
l n-ary relation occurs among n-fuzzy subsets
This book focuses on binary fuzzy relations. Therefore, no more information is
going to be given about higher-order relations.
Example 3.2
A description of oscillatory transients in electrical power systems was given in
Example 2.18 in Chapter 2. The oscillatory transients are categorized into three
subclasses low-, medium-, and high-frequency oscillations [3]. These frequency
ranges correspond to common types of power system oscillatory transient phe-
nomena in terms of frequency, duration, and voltage magnitude and are repre-
sented by fuzzy subsets in their related universes as depicted in Figures E3.2(a),
E3.2(b), and E3.2(c) using triangular-type fuzzy membership functions.
It can be concluded from [3] that the oscillation transients of the voltage
magnitude are
(i) Low (LV) and long duration (LD) at low frequencies (LF).
(ii) High (HV) and medium duration (MD) at medium frequencies (MF)
(iii) Low (LV) and short duration (SD) at high frequencies (HF)
where the terms LV, HV, LD, MD, SD, LF, MF, and HF are fuzzy subsets and are
given in Figures E3.2(a), E3.2(b), and E3.2(c).
Fuzzy decision-making 93
(a) Relate the voltage magnitude with oscillation duration at low frequencies.
(b) Relate the voltage magnitude with oscillation duration at medium frequencies.
(c) Relate the voltage magnitude with oscillation duration at high frequencies.
Answer 3.2
(a) The relation between the voltage magnitude and oscillation duration at low
frequencies can be expressed as
R1 ¼ LV LD
ð
minðmLV ; mLD Þ
mR1 ðV ; DÞ ¼
V D LV; LD
94 Fuzzy logic control in energy systems, 2nd edition
where LV and LD stand for low voltage and long duration, respectively. V
represents the universe of voltage and D represents the universe of duration.
LV and LD are fuzzy subsets defined in the universes of V and D, respectively.
The relation surface of R1 = LV LD is shown in Figure E3.2(d), which is
obtained using the MATLAB code given in Figure E3.2(e). Instead of a sur-
face plot, the relation could have been shown by its numerical data using the
matrix format. However, in order to see the relation surface with higher
resolution, the number of numerical data is kept high, which is too much to
but in a numerical matrix format. Therefore, the relation surface and the
MATLAB code used for plotting are given instead.
s)
ion (m
Durat
Figure E3.2(d) The relation between low voltage magnitude and long duration
Figure E3.2(e) The MATLAB code for the relation between voltage magnitude
and duration
Fuzzy decision-making 95
(b) The relation between the voltage magnitude and oscillation duration at med-
ium frequencies can be expressed as
R2 ¼ HV MD
ð
minðmHV ; mMD Þ
mR1 ðV ; DÞ ¼
V D HV; MD
where HV and MD stand for high voltage and medium duration, respectively.
V represents the universe of voltage, and D represents the universe of dura-
tion. HV and MD are fuzzy subsets defined in the universes of V and D,
respectively.
The surface plot of the relation R2 ¼ HV MD can be obtained by using a
MATLAB code similar to the one given in Figure E3.2(e). The line starting
with LV(k) in Figure E3.2(e) is replaced by
LVðk1Þ ¼ triangle01mð0; 4; 4; xÞ;
and the line starting with LD(k) is replaced by
MDðk1Þ ¼ triangle01mð0; 50; 300; xÞ;
The resultant surface plot of the relation R2 ¼ HV MD is shown in
Figure E3.2(f).
Since the number of the numerical data is small enough as 5 7, we can
use the matrix format to show the relation R2 as in Table E3.2(b).
(c) Since the voltage magnitude is low and the duration is short at high fre-
quencies, the relation between the voltage magnitude and oscillation duration
ms)
tion (
Dura
Figure E3.2(f) The relation between high voltage magnitude and medium
duration
96 Fuzzy logic control in energy systems, 2nd edition
Du
ra
tio
n(
m
s)
Figure E3.2(g) The relation between low voltage magnitude and short duration
0 10 20 30 40 50
0 1 0.8 0.6 0.4 0.2 0
1 0.75 0.75 0.6 0.4 0.2 0
Low voltage (pu) 2 0.5 0.5 0.5 0.4 0.2 0
3 0.25 0.25 0.25 0.25 0.2 0
4 0 0 0 0 0 0
Operations done with fuzzy relations are similar to those of fuzzy sets. Since the
fuzzy relations are obtained using fuzzy sets, the operators applied to fuzzy sets can
be applied to fuzzy relations, as well [4]. The most used operators with fuzzy
relations in this book are
l Intersection
l Union
l Negation (Complement)
Example 3.3
In the problem described in Example 3.2, the relation between high voltage and
medium duration is obtained and given below as R1. Similarly, the relation between
low voltage and short duration is given as R2.
2 0 10 20 30 40 503
0 1 0:8 0:6 0:4 0:2 0
166 0:75 0:75 0:6 0:4 0:2 0 77
R2 ¼ 2 6
6 0:5 0:5 0:5 0:4 0:2 0 77
3 4 0:25 0:25 0:25 0:25 0:2 0 5
4 0 0 0 0 0 0
Answer 3.3
(a) The intersection of the relations R1 and R2.
Using (3.4) or (3.5) as
mR3 ðV ; DÞ ¼ min mR1 ðV ; DÞ; mR2 ðV ; DÞ
2 3 2 3
0 0 0 0 0 0 0 1 0:8 0:6 0:4 0:2 0
6 0 0:25 0:25 0:25 0:25 0:20 07 6 7
6 7 6 0:75 0:75 0:6 0:4 0:2 07
R3 ¼ 6
6 0 0:50 0:50 0:50 0:40 0:20 07 6
7 \ 6 0:5 0:5 0:5 0:4 0:2 077
4 0 0:75 0:75 0:60 0:40 0:20 0 5 4 0:25 0:25 0:25 0:25 0:2 05
0 1:0 0:80 0:60 0:40 0:20 0 0 0 0 0 0 0
Fuzzy decision-making 99
2 3
0 0 0 0 0 0 0
60 0:25 0:25 0:25 0:20 0 07
6 7
R3 ¼ R1 \ R2 ¼ 6
60 0:50 0:50 0:40 0:20 0 077
40 0:25 0:25 0:25 0:20 0 05
0 0 0 0 0 0 0
(b) The union of the relations R1 and R2.
Using (3.6) or (3.7) as
mR3 ðV ; DÞ ¼ max mR1 ðV ; DÞ; mR2 ðV ; DÞ
2 3 2 3
0 0 0 0 0 0 0 1 0:8 0:6 0:4 0:2 0
6 0 0:25 0:25 0:25 0:25 0:20 07 6 0:75 0:75 0:6 0:4 0:2 077
6 7 6
R3 ¼ 6
6 0 0:50 0:50 0:50 0:40 0:20 07 6
7 [ 6 0:5 0:5 0:5 0:4 0:2 077
4 0 0:75 0:75 0:60 0:40 0:20 0 5 4 0:25 0:25 0:25 0:25 0:2 05
0 1:0 0:80 0:60 0:40 0:20 0 0 0 0 0 0 0
2 3
1 0:80 0:60 0:40 0:20 0 0
6 0:75 0:75 0:60 0:4 0:25 0:20 07
6 7
R3 ¼ R1 [ R2 ¼ 6
6 0:50 0:50 0:50 0:50 0:40 0:20 077
4 0:25 0:75 0:75 0:60 0:40 0:20 05
0 1:0 0:80 0:60 0:40 0:20 0
(c) The negation of R1
Using (3.8) as
mR1 ðV ; DÞ ¼ 1 mR1 ðV ; DÞ
2 3
1 1 1 1 1 1 1
6 1 0:75 0:75 0:75 0:75 0:80 17
6 7
mR1 ðV ; DÞ ¼ 6
6 1 0:50 0:50 0:50 0:60 0:80 177
4 1 0:25 0:25 0:40 0:60 0:80 15
1 0:0 0:20 0:40 0:60 0:80 1
The negation of R2.
2 3
0:0 0:2 0:4 0:6 0:8 1
6 0:25 0:25 0:4 0:6 0:8 17
6 7
mR2 ðV ; DÞ ¼ 6
6 0:5 0:5 0:5 0:6 0:8 177
4 0:75 0:75 0:75 0:75 0:8 15
1 1 1 1 1 1
The inverse of a fuzzy relation R is also equal to its transpose and is defined as
mR1 ðx; yÞ ¼ mRT ðx; yÞ (3.10)
where mR(x, y) is a fuzzy relation defined on X Y such that x[X and y[Y. It can
also be shown that
1 1
R ðx; yÞ ¼ Rðx; yÞ (3.11)
Example 3.4
Let X = {x, y, z} and Y = {a, b} be two universes of discourse and R(X, Y) be a fuzzy
relation defined in X Y as
2 a b 3
x 0:2 0:1
mR ðx; yÞ ¼ y 4 0:3 0:5 5
z 0:8 1:0
Obtain the inverse of the fuzzy relation R.
Answer 3.4
x y z
a 0:2 0:3 0:8
mR1 ðx; yÞ ¼ mRT ðx; yÞ ¼
b 0:1 0:5 1:0
intersection and union the composition operator of binary relations can be realized
by the membership matrices.
Let us define A, B, and C as three fuzzy relations such that the fuzzy relation A
is defined in X Y and has a membership matrix MA
MA ¼ ½aik (3.16)
where aik is the membership values of the membership matrix. Similarly, let us
define fuzzy relation B in the universe Y Z. Then the membership matrix MB can
be defined as
MB ¼ bkj (3.17)
where
Sometimes the min operator is replaced by arithmetic product and the com-
position is called max–product composition, which is defined as
Example 3.5
X = {x, y, z}, Y = {a, b}, and Z = {a, b} are three universes and fuzzy relations A(X, Y)
and B(Y, Z) are defined as
102 Fuzzy logic control in energy systems, 2nd edition
2 a b 3
x 0:2 0:1 a b
a 0:2 0:7
mA ðx; yÞ ¼ y 4 0:3 0:5 5 , mB ðy; zÞ ¼
z 0:8 1:0 b 0:1 0:8
Answer 3.5
(a) The fuzzy relation C(X, Z) using max–min composition.
2 3 2 3
0:2 0:1 c11 c12
0:2 0:7
mC ðx; zÞ ¼ 4 0:3 0:5 5 ¼ 4 c21 c22 5
0:1 0:8
0:8 1:0 c31 c32
all the elements of the composition matrix C are obtained in the same way
using max–min composition and given below.
2 3 2 3
0:2 0:1 0:2 0:2
0:2 0:7
mC ðx; zÞ ¼ 4 0:3 0:5 5 ¼ 4 0:2 0:5 5
0:1 0:8
0:8 1:0 0:2 0:8
all the elements of the composition matrix C are obtained in the same way
using max–product composition and given below.
2 3 2 3
0:2 0:1 0:04 0:14
0:2 0:7
mC ðx; zÞ ¼ 4 0:3 0:5 5 ¼ 4 0:06 0:4 5
0:1 0:8
0:8 1:0 0:16 0:8
Example 3.6
The fuzzy relations R1 and R2 representing the verbal expressions “x is greater than y”
and “y is approximately equal to z,” respectively, are given below. The parameters x[X,
y[Y, and z[Z and the universes X, Y, and Z are given as X = Y = Z = {1, 2, 3, 4}. Obtain
the relation R3 = R1οR2 and comment about the verbal meaning of the relation R3.
y!1 2 3 4 z!1 2 3 4
2 3 2 3
1 0 0 0 0 1 1 0:5 0 0
2 6 0:2 0 0 07 2 6 0:5 1 0:5 0 7
mR1 ðx; yÞ ¼ x 6 7 mR2 ðy; zÞ ¼ y 6 7
3 4 0:5 0:1 0 05 34 0 0:5 1 0:5 5
4 0:8 0:3 0:1 0 4 0 0 0:5 1
104 Fuzzy logic control in energy systems, 2nd edition
Answer 3.6
The relation R3 = R1R2 can be obtained using (3.20) and (3.21).
2 3 2 3
0 0 0 0 1 0:5 0 0
6 0:2 0 0 07 6 0:5 1 0:5 0 7
mR3 ðx; zÞ ¼ mR1R2 ðx; zÞ ¼ 6
4 0:5 0:1
76 7
0 0 5 4 0 0:5 1 0:5 5
0:8 0:3 0:1 0 0 0 0:5 1
2 3
0 0 0 0
6 0:2 0:2 0 0 7
mR3 ðx; zÞ ¼ mR1R2 ðx; zÞ ¼ 6
4 0:5 0:5
7
0:1 0 5
0:8 0:5 0:3 0:1
where for x = 4 and z = 3.
Each component in relation R3 is calculated using the max–min composition.
In order to show how it is done, the calculation of R3(4, 3) is given below.
mR3 ð4; 3Þ ¼ max½minð0:8; 0Þ; minð0:5; 0Þ; minð0:3; 0:5Þ; minð0:1; 1:0Þ
¼ 0:3:
Conclusion
R1 is a relation from X to Y and represents the expression “x is greater than y” and
R2 is a relation from Y to Z and represents the expression “y is approximately
equal to z”
Then, as a relation from X to Z, R3 should represent the expression “x is greater
than z.”
This comment is correct as we can see that the relation matrix R3 is similar to R1,
which is used for greater. x is greater than y, y is equal to z, hence x becomes
greater than z.
The MATLAB code given in Figure E3.5 can be used to obtain the composi-
tion matrix for Example 3.6, too. Just replace the contents of the relations R1 and R2
with the input relation matrices given in this example.
function mB(y) other fuzzy set B can be calculated. In order to find the fuzzy set B
from known fuzzy relation R and fuzzy set A, Equations (3.26) and (3.27) are
defined.
B¼AR (3.26)
mB ðyÞ ¼ mAR ðyÞ ¼ max minðmA ðxÞ; mR ðx; yÞÞ (3.27)
where x[X, y[Y, and R is defined in X Y. Similarly, if the fuzzy set B and the
relation R are known, then the other fuzzy set A can be obtained using (3.28) and
(3.29).
A¼BR (3.28)
mA ðxÞ ¼ mBR ðxÞ ¼ max minðmB ðyÞ; mR ðx; yÞÞ (3.29)
This form of the max–min composition is called as the compositional rule of
inference.
Example 3.7
A fuzzy subset Small defined in universe X = {1, 2, 3, 4} and a fuzzy relation R
representing verbal expression “approximately equal” are given below.
2 3
1 0:5 0 0
1 0:6 0:2 0 6 0:5 1 0:5 0 7
Small ¼ þ þ þ ; R¼6 4 0 0:5 1 0:5 5
7
1 2 3 4
0 0 0:5 1
If x is known to be small and approximately equal to y, then y should be small,
too. Show that y is also small and approximately equal to x.
Answer 3.7
Since x is known to be small, the fuzzy subset small given in question can be used
to represent x. The fuzzy relation given in question part is a relation that represents
the verbal expression “approximately equal.” Therefore, relation R can be used for
“x approximately equal to y,” which means that R is a relation from X to Y. Since X
is known, then Y can be obtained using the compositional rule of inference.
2 3
1 0:5 0 0
6 0:5 1 0:5 0 7
mB ðyÞ ¼ mAR ðyÞ ¼ ½ 1 0:6 0:2 0 6 4 0 0:5 1 0:5 5
7
0 0 0:5 1
The MATLAB code given in Figure E3.5 can be modified to be used for the
compositional rule of inference in this example. Actually replacing the relation
matrices with A and R will be sufficient for the modification as given in
Figure E3.7.
Calculation of the compositional rule of inference manually is given below for
a clear understanding of the process. Since the result of the composition of a fuzzy
106 Fuzzy logic control in energy systems, 2nd edition
set with a relation yields another fuzzy set with the same set used in the compo-
sition, it will look like the one given below.
mB ðyÞ ¼ ½ b11 b12 b13 b14
The components b11, b12, b13, and b14 are obtained as follows:
b11 ¼ max½minð1; 1Þ; minð0:6; 0:5Þ; minð0:2; 0Þ; minð0; 0Þ ¼ maxð1; 0:5; 0; 0Þ ¼ 1
b12 ¼ max½minð1; 0:5Þ; minð0:6; 1Þ; minð0:2; 0:5Þ; minð0; 0Þ ¼ maxð0:5; 0:6; 0:2; 0Þ ¼ 0:6
b13 ¼ max½minð1; 0Þ; minð0:6; 0:5Þ; minð0:2; 1Þ; minð0; 0:5Þ ¼ maxð0; 0:5; 0:2; 0Þ ¼ 0:5
b14 ¼ max½minð1; 0Þ; minð0:6; 0Þ; minð0:2; 0:5Þ; minð0; 1Þ ¼ maxð0; 0; 0:2; 0Þ ¼ 0:2
mB ðyÞ ¼ ½ 1 0:6 0:5 0 :2
1 0:6 0:5 0:2
y ¼ small ¼ þ þ þ
1 2 3 4
This process, in fact, noting but the extending the fuzzy set A from the universe
X along the universe Y. The opposite process of the extension is called projection
and is defined as
ð
RX ¼ max mR ðx; yÞ=x (3.31)
X y
ð
RY ¼ max mR ðx; yÞ=y (3.32)
Y x
Example 3.8
Some information about power systems harmonics is in Example 2.17 in Chapter 2.
As stated in Example 2.17, standards are developed to guide power system design
engineers to keep the total harmonic distortion below the standard values. IEEE Std
519-2014, “Recommended Practices And Requirements For Harmonic Control In
Electrical Power Systems” provides suggested harmonic values for power systems
[5] as summarized in Table E2.17, which yields the following statements:
If the voltage is low (LV) then the total harmonic distortion is extra high (EHH).
If the voltage is medium (MV) then the total harmonic distortion is high (HH).
108 Fuzzy logic control in energy systems, 2nd edition
Membership degrees
Bus voltage (kV)
Figure E3.8(a) Partition of power system bus voltages into fuzzy subsets
Membership degrees
THD (%)
If the voltage is high (HV) then the total harmonic distortion is medium (MH).
If the voltage is extra high (EHV) then the total harmonic distortion is low (LH).
where the fuzzy subsets are defined as in Figures E3.8(a) and E3.8(b).
Assume that the statement “If voltage is high (HV) then the total harmonic
distortion is medium (MH)” is a relation R = HV MH. Find the following:
(a) Plot the fuzzy high voltage (HV) in the universe of bus voltage.
(b) Plot the fuzzy medium harmonic (MH) in the universe of total harmonic
distortion.
(c) Plot the membership matrix mR1 ðV ; HÞ ¼ min½mHV ðvÞ; mMH ðhÞ of relation R
Answer 3.8
(a) The plot of the fuzzy high voltage (HV) in the universe of bus voltage is
shown in Figure E3.8(c).
(b) The plot of the fuzzy medium harmonic (MH) in the universe of total har-
monic distortion is given in Figure E3.8(d).
(c) The plot of the membership matrix mR1 ðV ; HÞ ¼ min½mHV ðvÞ; mMH ðhÞ of
relation R is obtained as in Figure E3.8(e).
The MATLAB code given in Figure E3.1(d) can be modified to plot the fuzzy
sets and relation HV MH in this example.
Fuzzy decision-making 109
Membership degrees
Bus voltage (kV)
THD (%)
Example 3.9
Assume that the fuzzy membership functions HV and MH described in Example
E3.8 are represented using Gaussian functions to yield the three-dimensional
membership surface mR ðV ; HÞ ¼ min½mHV ðvÞ; mMH ðhÞ as shown in Figure E3.9.
(a) Use the extension principle and extend the fuzzy set HV along the universe of V.
(b) Use the extension principle and extend the fuzzy set MH along the universe of H.
110 Fuzzy logic control in energy systems, 2nd edition
Answer 3.9
(a) Fuzzy membership function representing the high voltage HV in the universe
of voltage and its projection from the two-dimensional plot of mR(V, H) are
shown in Figures E3.9(a-a) and E3.9(a-b).
(b) Fuzzy membership function representing the medium harmonics MH in the
universe of harmonics (H) and its projection from the two-dimensional plot of
mR(V, H) are shown in Figures E3.9(b-a) and E3.9(b-b).
Similarly, the statement “If voltage is low (LV) then the total harmonic dis-
tortion is extra high (EHH)” is another relation R2 = LV EHH, and the expression
“If voltage is extra high (EHV) then the total harmonic distortion is low (LH)” is
also a relation as R3 = EHV LH. The extension principle can be applied to these
Membership degrees
Membership degrees
Vol
Bus voltage (kV) tag
e (k
V) (%)
THD
(a) (b)
Membership degrees
Membership degrees
Vol
tag
e (k
V) (%)
THD (%) THD
(a) (b)
Example 3.10
Recall that current–voltage relationship of a constant resistor is defined by Ohm’s
law as
vR ðtÞ
iR ðtÞ ¼
R
where there will be an iR(t) for every vR(t) indicating a one-to-one mapping.
Assume that a 12 Ohm resistor is connected across a voltage source whose output
voltage can be adjusted from zero to 12 V. If the source voltage is partitioned into
fuzzy subsets Zero (ZV), Medium (MV), and High (HV) in the universe of voltage
in volts as shown in Figure E3.10, obtain the fuzzy subsets defined in the universe
of current in Amperes.
Answer 3.10
In this example, the membership functions ZV, MV, and HV defined in the uni-
verse of voltage are to be mapped onto the universe of current as ZI, MI, and HI
using the equation defined by Ohm’s law. The calculation of ii = f(vi) and then
transferring it to vi = f(vi) are summarized in Table E3.10 and shown in
Figure E3.10(a).
Membership degrees
Voltage (V)
mðvi Þ mðii Þ
vi [ V vi f (vi) = vi/R ii
Rii = vi/R
ZV MV HV ZI MI HI
0 1 0 0 0 1 0 0
3 0.5 0.5 0.0 0.25 0.5 0.5 0.0
6 0 1 0 0.5 0 1 0
9 0 0.5 0.5 0. 75 0 0.5 0.5
12 0 0 1 1.0 0 0 1
Example 3.11
The active power transferred between two buses is expressed as Pe ¼ Pm sin d,
where Pm = VSVR/XL is the maximum power that can be transmitted between two
busses and is usually assumed to be constant. A numerical example of the power
transfer between two busses was given in Example 2.19. The partitions of the
universes of transmitted power and the power angle into fuzzy subcategories are
also given in Example 2.19. The fuzzy subset half (HD) defined in the universe of
power angle is shown in Figure E3.11.
Use the formula given as Pe ¼ 2 sin d where d is defined in the interval
{0,p} radians or {0 , 180 } and map the fuzzy subset HD[d onto a fuzzy subset in
the universe of Pe.
Answer 3.11
Figure E3.11 shows both power–power angle curve, Pe = f (d), and the membership
function half (HD). Since Pe = f (d) is a sine function and the fuzzy set HD is
represented by a sinusoid membership function and they both have their peaks at
90 , the points over the curves become symmetrical according to the line passing
through 90 . As given in Figure E3.11 and in Table E3.11, for five values of d there
Fuzzy decision-making 115
Pe=f(δ)
are three values of power Pe. Therefore, this is a many-to-one mapping process.
The resulting mapped fuzzy membership function is also shown in Figure E3.11 as
HP, which stands for high in the universe of active power.
Example 3.12
Photovoltaic array (PVA) characteristics and partitioning of the universes of vol-
tage, current, and power were given in Example 2.20. Use the information from the
Example and map the fuzzy subset optimum voltage (OV) from the universe of
PVA voltage onto the universe of PVA power. The math function for the mapping
is defined by P–V curve shown in Figure E2.20a and given below in Figure E3.12.
The PV cell operating power as a function of the cell current and voltage can be
expressed by the following equation [9].
BTC Iph þ I0 IC
PC ¼ VC IC ; where VC ¼ K ln R S IC
q I0
116 Fuzzy logic control in energy systems, 2nd edition
Answer 3.12
The P–V curve and redefined fuzzy subset OV from Example 2.20 are replotted and
shown in Figure E3.12.
The verbal expressions in fuzzy propositions are represented by fuzzy sets and
processed by fuzzy relations. Let (3.38) and (3.39) be fuzzy propositions.
if A than B (3.38)
if A then B else C (3.39)
where A, B, and C are fuzzy subsets that may be defined in different universes X, Y,
and Z, respectively, and they represent some verbal fuzzy variables. The verbal
expressions (3.38) and (3.39) can be written in terms of cartesian products as
fuzzy implications since they have at least one input and one output universe. In
order to obtain a generalized form of fuzzy implication, let us define fuzzy subsets
A1, A2, . . . , An in the universe of X and fuzzy subsets B1, B2, . . . , Bn in the universe
of Y and write a series of implications.
if A1 then B1
else if A2 then B2
else if A3 then B3
(3.41)
else if An1 then Bn1
else
An then Bn
These implications can be written in a compact form as cartesian products
RT ¼ A1 B1 þ A2 B2 þ þ An Bn (3.42)
where each implication is a cartesian product and each cartesian product is a fuzzy
relation. Now, let us write each implication as a relation
R1 ¼ A1 B1 ) mR1 ðx; yÞ ¼ minðmA1 ðxÞ; mB1 ðyÞ
R2 ¼ A2 B2 ) mR2 ðx; yÞ ¼ minðmA2 ðxÞ; mB2 ðyÞ
: : : (3.43)
: : :
Rn ¼ An Bn ) mRn ðx; yÞ ¼ minðmAn ðxÞ; mBn ðyÞ
Since the term else used to connect the implications in (3.41) has a similar
meaning with or, Then the total relation becomes the union of all relations and is
written as in (3.44) and (3.45).
RT ¼ R1 [ R2 [ [ Rn (3.44)
mRT ðx; yÞ ¼ maxðR1 ; R2 ; . . .; Rn Þ (3.45)
Then (3.45) can be written as a max–min process as in the compositional rule
of inference.
mRT ðx; yÞ ¼ max½minðmA1 ; mB1 Þ; minðmA2 ; mB2 Þ; . . .; minðmAn ; mBn Þ (3.46)
The implications or the relations given in (3.39), (3.40), and (3.41) are all single
input–single output. There is an input universe X and an output universe Y. The verbal
expressions with multiple input and multiple output spaces can also be represented by
implications with multiple input/output (I/O) spaces. For example, let us write the
implication in (3.47) as combination of the cartesian products as in (3.48).
If A then ðif B then C else DÞ else E (3.47)
ABCþABDþAE (3.48)
118 Fuzzy logic control in energy systems, 2nd edition
Both (3.47) and (3.48) have the same meaning and are meant to be the same.
There are two fuzzy sets A and B as inputs from different input universes and three
output sets C, D, and E defined in three different output universes. The verbal
expressions used (3.42) and (3.47) appear in many fuzzy logic applications.
Especially the expert’s knowledge is stored and processed as fuzzy rules in fuzzy
logic control applications. The fuzzy rules are represented by verbal expressions
similar to the ones given above.
Example 3.13
In order to supply electrical power to large urban areas, usually three types of
power stations are used for efficient energy management. The power stations with a
generating capacity of 5 MW and below are called small (S) power stations. The
stations with generating capacity of up to 50 MW are considered as medium (M)
size power stations and stations with generating capacity of 100 MW and above are
classified as big (B) power stations. This classification of power stations is repre-
sented by fuzzy subsets as shown in Figure E3.13(a).
The management of the power stations described above is done according to
power demand by loads. Such that, the big power stations are always kept in ser-
vice. Depending on power demand, medium- and small-sized power stations are
put into service. Whenever there is a decrement in power demand, some units in
medium or small size power stations are turned off. During the increment in power
demand, the units are turned on. Based on these explanations, the following single
input–single output implications are developed.
R1: If increment in demand is low then increment in generation is low.
R2: If increment in demand is medium then increment in generation is medium.
R3: If decrement in demand is low then decrement in generation is low.
R4: If decrement in demand is medium then decrement in generation is medium
R5: If change in demand is zero then change in generation is zero.
where the words low, medium, and zero are defined in the universes of change in
power demand and change in power generation representing both increment and
decrement cases as shown in Figure E3.13(b).
Obtain the consequences of these implications.
Membership values
Membership values
Figure E3.13(b) Fuzzy partition of the changes in power demand and generation
Answer 3.13
Let us represent the increments as positive (P) and decrement as negative (N). The
letter D can be used with the fuzzy subsets related to demand and the letter G can
be used with the fuzzy subsets related to the generation in order to distinguish the
fuzzy subsets with the same name. For example positive low in the universe of
increment in power demand is represented as PLD and positive low in the universe
of increment in power generation is represented as PLG. Then the first implication
becomes,
R1: If decrement in demand is medium (NMD) then decrement in generation is
medium (NMG). This implication can be abbreviated as if PLD and then PLG.
Similarly, all implications can be written as
if NMD then NMG
If NLD then NLG
If ZED then ZEG
If PLD then PLG
If PMD then PMG
These implications can be written as fuzzy relations, which are the con-
sequences. Using the definitions of the fuzzy subsets given in Figure E3.13(b), the
following fuzzy relations can be obtained as the consequences of the fuzzy impli-
cations expressed in the example.
R1 ¼ NMD NMG ) mR1 ðd; gÞ ¼ minðmNMD ðd Þ; mNMG ðgÞ
R2 ¼ NLD NLG ) mR2 ðd; gÞ ¼ minðmNLD ðdÞ; mNLG ðgÞ
R3 ¼ ZED ZEG ) mR3 ðd; gÞ ¼ minðmZED ðdÞ; mZEG ðgÞ
R4 ¼ PLD PLG ) mR4 ðd; gÞ ¼ minðmPLD ðdÞ; mPLG ðgÞ
R5 ¼ PMD PMG ) mR5 ðd; gÞ ¼ minðmPMD ðdÞ; mPMG ðgÞ
Since the same fuzzy subsets are used to represent the changes in both power
demand and generation, the relation between the same fuzzy subsets yields this set
and the implications take form as in Table E3.13. The membership functions of the
resultant fuzzy relations are given in Figure E3.13(c). Note that the membership
functions given in Figure E3.13(c) are the same as those shown in Figure E3.13(b).
120 Fuzzy logic control in energy systems, 2nd edition
Example 3.14
The power generated by PV solar cells changes as a function of solar irradiation
level and operating temperature. So, the generated power increases as the solar
irradiation level increases, but decreases as the operating temperature increases.
Some information about PV solar cells were discussed and a partitioning of the
universes of temperature and solar irradiation levels were given in Examples 2.13
and 2.20 in Chapter 2. Some knowledge about the effect of junction temperature,
I–V, and P–V characteristics was given in Example 3.1.
From information about the effect of ambient temperature and solar irradiation,
the following implications can be written.
If solar irradiation is good then the power is high else the power is low.
where the fuzzy subset good (G) in the universe of solar irradiation level is defined
as in Figure E3.14(a) and fuzzy subsets high (H) and low (L) are defined in the
universes of power as shown in Figure E3.14(b). Obtain the consequence of this
single input–single output fuzzy implication.
Answer 3.14
Let us abbreviate the given sentence as
If Good then High else Low.
Fuzzy decision-making 121
1
Membership values
1
Membership values
GOOD HIGH
LOW
0.5 0.5
0 0
50 100 150 200 0 0.2 0.4 0.6 0.8 1
Universe of solar irradiation (mW/cm2) Power (pu)
(a) (b)
Sol
ar i
rrad
iati
on
(mW r (pu)
/cm 2 Powe
)
Sol
ar i
rrad
iati
on
(mW
/cm
(pu)
Power
2)
So
la
ri
rra
di
at
io
n
(m u)
W e r (p
/c
m2 Pow
)
Figure E3.14(e) The relation surface of good high + not good high
Practice 3.1
Consider a 100 km long high voltage power transmission line and write at least
five fuzzy implications about the receiving end bus voltage depending on the
loading conditions of the line.
Fuzzy decision-making 123
if x is x1 then y is y1
also if x is x2 then y is y2
also if x is x3 then y is y3
(3.51)
::: ::: :::
::: ::: :::
also if x is xn then y is yn
i ¼ I0 eqv=kT (3.52)
where q is electron charge, v is bias voltage, k is Boltzmann constant, and T is
temperature in Kelvin. Under constant temperature, the current of a diode can be
written as just a function of voltage as
i ¼ f ðvÞ (3.53)
It is clear from Figure 3.4 that every input v does not give a new and different
output. Therefore, every input v does not correspond to every output. For example,
while v1 yields a current i1, the input v2 does not yield any current at all. In this
latter case one cannot give a decision about i2 and the implication does not have a
consequence as in (3.54).
if v is v1 then i is i1
(3.54)
also if v is v2 then i is?
Since the function i = f (v) used as the premise here, is a crisp function, each
output node must be in pair with an input node. If there is a little uncertainty in
data, the output from the crisp reasoning is considered wrong or it is not accepted as
an output at all.
Example 3.15
Assume that the word good used in Example 3.14 is represented as a crisp set in the
universe of solar irradiation level and defined as in Figure E3.15.
A measurement of solar irradiation level on a partially cloudy day shows that
the irradiation level is 100 mW/cm2 at 14:00 and 99 mW/cm2 at 16:00. Use the
Fuzzy decision-making 125
crisp reasoning algorithm given by (3.50) and find the consequences for these two
measurements. Are these two solar irradiation levels considered as good?
Answer 3.15
The answer can be obtained by using the inference system given in (3.50).
Premise : good ¼ f100; 150g definition from Figure E 3:15:
S1 ¼ 100 mW=cm2 and
Fact :
S2 ¼ 99 mW=cm2
S1 is good
Consequence :
S2 is not good: It is not defined:
Example 3.16
Let us use the terms good and high defined in Example 3.14 for solar irradiation
level and power generated by PV panels, respectively.
Knowledge : If solar irradiation is good then solar power is high
Data : Solar irradiation is good:
Conclusion : Solar power is high:
B0 ¼ A ðA ! BÞ (3.57)
where A!B is a fuzzy implication from A to B.
Example 3.17
Let us use the fuzzy implication R = LV!LD defined in Example 3.2 as the
relation between voltage magnitude and transient duration in power systems.
Knowledge : If voltage is LV then duration is LD
Data : Voltage is LV 0
Conclusion : duration is LD0 :
In fuzzy control, the knowledge base is a collection of fuzzy implications,
which are called rules consisting of the required actions to be taken. The input data
Fuzzy decision-making 127
is the fuzzy subsets indicating the current situation and the conclusion is the
resultant action subtracted from the knowledge base or rule base.
X is A1 Y is A1
X is A2 Y is A2
X is An Y is An
Figure 3.5, the compositional rule of inference engine given in (3.56) can be written
for the fuzzy processor as in (3.58).
Rule base : If x is A then y is B
Data base : x is A (3.58)
Conclusion : y is B
The input and the output of the fuzzy processor given in (3.58) and in Figure 3.5,
are considered as fuzzy input and fuzzy output. If the input is crisp, then a fuzzifier is
added to the input side of fuzzy processor. Sometimes crisp output may be required.
This time a defuzzification unit is added to the output terminals of the fuzzy processor
in order to convert fuzzy conclusion into a crip number or decision.
The inference algorithm given for the fuzzy processor in (3.58) represents the
approximate reasoning more than that of fuzzy. Because for y to be B is possible if
and only if x is A. If x is different than A, a connection between y and B cannot be
established. It should be noted that the rule base, database, and conclusion triangle
are a result of the generalized modus ponen inference system. While crisp modus
ponen inference system gives crisp reasoning, the compositional rule of inference,
which is suggested by Zadeh [10] as the fuzzy version of modus ponens, gives
fuzzy reasoning. Therefore, the fuzzy processor is nothing but a fuzzy reasoning
version of the compositional rule of inference. In fuzzy processor, for y to be B, x
does not have to be A. If x is A0 then y may be B0 as shown in (3.59).
Rule base : If x is A then y is B
Data base : x is A0 (3.59)
Conclusion : y is B0
This forward reasoning inference system is useful, especially in fuzzy logic
controllers. A similar but backward inference system can be written from modus
ponen inference system as in (3.60), which is useful in medical science and expert
system applications of fuzzy processors.
Rule base : If x is A then y is B
Data base : y is B0 (3.60)
Conclusion : x is A0
The examples given for the approximate and fuzzy reasoning inference systems
were all based on single input–single rule structure. That was fine for explaining the
topic and the concept. However, in many applications, there may be more than one
input, input space, and multiple rules. Some of these cases are given next.
where x is a member of the input space X and y is a member of the output space Y.
Fuzzy sets A and B are defined as the input and output sets in X and Y, respectively.
The single input–single rule inference engine can be used with both crisp and fuzzy
rule-based systems. Some verbal implications can be given as examples:
l If ambient temperature is high (HA) then junction temperature is high (HJ).
l If power demand is medium (MD) then generation is medium (MG).
l If solar irradiation is low (LS) then power generation is low (LP).
l If voltage is medium (MV) then the total harmonic distortion is high (HH).
Example 3.18
Let us refer to Example 3.8 where the relation between voltage magnitude and
harmonics in power systems was discussed and some implications were given. Use
the following implication as an example here.
If voltage is medium (MV) then the total harmonic distortion is high (HH).
where the input fuzzy set MV is defined in the universe of voltage and the output
fuzzy set HH is defined in the universe of harmonic distortion. The fuzzy subsets
are already given in Example 3.8.
Apply a single input–single rule inference algorithm and obtain the final
decision if the input voltage is extra high (EHV).
Answer 3.18
The single input–single rule inference engine algorithm is shown in Figure E3.18,
which is a graphical representation of (3.59) and (3.61). There is one rule base, one
input data, and a conclusion part in Figure E3.18, besides the rule processing unit.
For this problem, Equation (3.59) can be applied as follows in written format:
Rule base : If v is MV then thd is HH
Data base : v is HV
Conclusion : thd is HH 0
The rule processing is shown graphically in Figure E3.18. The fuzzy set
entered as data is not exactly the same as the one used in the rule. However, they
are defined in the same universe of V. Since there is just one single rule, then there
is just one output fuzzy set. Because a different fuzzy set HV is used as the input
data set, the output will not be exactly the same as the one given in the rule. A
weighting factor is used to obtain the effect of the output set in the conclusion. This
weighting factor is obtained as a membership value using the intersection (min)
operator in the same way as it is used for fuzzy relation in (3.43).
mHH0 ðthdÞ ¼ minðmMV ðvÞ; mHV ðvÞ
where mC(z) is the membership value of the fuzzy set C and represents the
weighting effect of the rule at the output universe Z depending on the inclusion of
the input fuzzy sets A1 and B1 in A and B, respectively. The membership value mC(z)
determines the effectiveness of the fuzzy set C at the output as a new fuzzy set C1
where C1C. It should be noted that arithmetic products can be used instead of
the min operator as given by (3.67). However, as stated earlier, the min operator is
preferred to be used in this book.
mC ðzÞ ¼ ½mA ðxÞ mA1 ðxÞ ½mB ðyÞ mB1 ðyÞ (3.67)
Example 3.19
The power generated by PV solar cells changes as a function of solar irradiation
level and operating temperature. So, the generated maximum power increases as
the solar irradiation level increases, but decreases as the operating temperature
increases. Fuzzy partitions of solar irradiation (S) and ambient temperature (T)
into subcategories are given in Figure E3.19(a) and E3.19(b). Find the conclu-
sion of the fuzzy rule given below if the solar irradiation level is sufficient (SI)
and the temperature is warm (WT) where SI and WT are defined in the universes
of S and T, respectively.
FT CT WT HT
1
μ(V)
–20 0 20 40 T
Answer 3.19
The rule given in this example has two input spaces and one output space. In order
to write a shorter rule let us use some abbreviations such as s[SI for the solar
irradiation level, t[T for the temperature, and p[P for the power. Then write the
fuzzy inference system as
Rule base : If s is GI and t is CT then p is HP
Data base : s is S and t is WT
Conclusion : p is HP2
Since there is only one rule, the output will be always hihg (HP). However, the
effective amount of HP, which is shown as HP2, is determined from the intersection
of the fuzzy sets GI and SI in the universe of S and the intersection of the fuzzy sets
WT and CT in the universe of T. The interpretation of the inference system given in
(3.65) and (3.66) is represented graphically as in Figure E3.19(d).
LP MP HP EHP
1
μ (V)
The final membership value mHP2(p) = w2 of HP2 can be obtained using (3.66).
where
where C1, C2, . . . , Cn are the outputs from each individual rule and C0 is the
final effect of all the rules together. The rules in (3.68) are all standing inde-
pendently from each other. In order to obtain a final single effective output, the
rules should be combined. The combination of the rules is done using either
union or intersection operators. Therefore, else if or also are used to connect the
rules to each other. Due to the form of their usage, else if and also are called
connectors here.
134 Fuzzy logic control in energy systems, 2nd edition
The fuzzy inference engine uses the connector else if is given by (3.69).
The inference engine of multiple input–multiple rule system with the else
connector given in (3.69) can be written as in (3.70) to (3.75), as well.
Example 3.20
Consider the PV system described in Example 3.19 and assume that a second rule is
added to the existing one as below. Find the conclusion of the fuzzy rules given
above if the solar irradiation level is sufficient (SI) and temperature is warm (WT)
Fuzzy decision-making 135
where all the fuzzy subsets are given in Figures E3.19(a), E3.19(b), and E3.19(c).
If s is good ðGIÞ and t is cold ðCTÞ then p is high ðHPÞ
else if s is low ðLIÞ and t is hot ðHTÞ then p is low ðLPÞ
Answer 3.20
The rules given in this example have two input spaces. Each rule has its own output
resulting in two outputs in total. Since the rules are connected using the else con-
nector, (3.69) can be applied as the inference engine.
Rule 1 : If s is good ðGIÞ and t is cold ðCTÞ then p is high ðHPÞ
Rule 2 : else if s is low ðLIÞ and t is hot ðHTÞ then p is low ðLPÞ
Data : s is low ðSIÞ and t is hot ðWTÞ
Conclusion : p is P0
Since there are two rules, each rule will have its own output. The outputs are
high (HP) and low (LP) from Rule 1 and from Rule 2, respectively. The effective
amounts of the output set HP and LP are shown as HP’ and LP’ in Figure E3.20 and
where
wA1 ðxÞ ¼ minðmA1 ðxÞ; mA0 ðxÞÞ; wA1 ðxÞ ¼ minðmB1 ðyÞ; mB0 ðyÞÞ
wA2 ðxÞ ¼ minðmA2 ðxÞ; mA0 ðxÞÞ; wA1 ðxÞ ¼ minðmB2 ðyÞ; mB0 ðyÞÞ
(3.80)
......
wAn ðxÞ ¼ minðmAn ðxÞ; mA0 ðxÞÞ; wAn ðxÞ ¼ minðmBn ðyÞ; mB0 ðyÞÞ
The only difference between the usage of else if and also is the final compo-
sition, in which the max operator is used for else if while the min operator is used
for also. Replacing the union ([) by intersection (\) and max by min, equations
written for else if can be converted to equations for also.
It should also not be forgotten that arithmetic products can also be used instead
of the min operator.
Fuzzy inference engine is explained above with examples. It can be concluded
from the explanations and examples given that the fuzzy inference system is
nothing but a collection of fuzzy processes. That is why it is suggested to call the
inference system as fuzzy processor. Fuzzy inference system transfers the facts of
input fuzzy data to the output as a fuzzy output. This process can also be called
mapping the fuzzy data from input spaces onto the output space as fuzzy output.
In practical applications especially in control systems, the input data is usually
measured and crisp. Therefore, it must be converted to fuzzy data before being used
in a fuzzy processor. Similarly, the output of the fuzzy processor must be converted
to crisp value so that it can be used by devices. The fuzzy processor using crisp
input and giving crisp output requires a fuzzification unit at the input side and a
defuzzification unit at the output side. Fuzzy processors with crisp input and crisp
outputs have been studied in literature by various researchers. The following are
three of the most known fuzzy reasoning algorithms.
l Mamdani fuzzy reasoning
l Sugeno fuzzy reasoning
l Tsukamoto fuzzy reasoning
These three fuzzy reasoning algorithms are explained in the next chapter.
Practice 3.2
In a water station, the tanks are filled manually such that the valve is fully open
(100%) when the tank is empty, half open (50%) when the tank is half full, and
closed (0%) when the tank is completely full. Representation of the valve opening
and water level in the tank by fuzzy membership functions is described in
Table P3.2.
(a) Partition the water level space into subsets using triangular membership func-
tions such that the peak points of triangular membership functions are equally
placed. Show this partitioning in a figure.
(b) Partition the valve position space into subsets using triangular membership
functions such that the peak points of triangular membership functions are
equally placed. Show this partitioning in a figure.
138 Fuzzy logic control in energy systems, 2nd edition
(c) Write a single input–single output fuzzy reasoning algorithm (FRA) and a set
of rules for this operation.
(d) Obtain the valve position if the tank is full by 20%.
Example 3.21
Fuzzy set cold (C) in the universe of temperature T is defined by a triangular
membership function C(20, 0, 20) and fuzzy set high (H) representing the PV
output voltage is defined as H(0, 40, 40). Obtain a fuzzy relation that represents the
fuzzy implication given below.
If the ambient temperature is cold then PV output voltage is high.
Use the numerical values with membership degrees of 0.0, 0.5, and 1.0 only and
show the process in a matrix format.
Answer 3.21
The answer to Example 3.21 is given in Table E3.21.
Table E3.21 Fuzzy relation matrix R for the implication given in Example 3.21
Temperature, cold ( C)
0 0:5 1 0:5 0
20 10 0 10 20
0 0 0 0 0 0
0 0;20 0;10 0;0 0;10 0;20
PV voltage, high (V) 0:5 0 0:5 0:5 0:5 0
20 20;20 20;10 20;0 20;10 20;20
1 0 0:5 1 0:5 0
40 40;20 40;10 40;0 40;10 40;20
Example 3.22
A family, consisting of mom, dad, and two children, has gone to a cultural vacation.
The satisfaction degree of the vacation is determined by evaluating traveling
comfort, accommodation comfort, and the approbation of the visited places. After
the vacation, the family members evaluated the vacation as in Table E3.22.
The fuzzy verbal expressions used in Table E3.22 are defined by triangular
membership functions as shown in Figure E3.22(a).
Obtain how the vacation was satisfactory for all family members.
Fuzzy decision-making 139
Table E3.22 Satisfaction of family members about the vacation in Example 3.22
1
Bad Fair Good
Membership Values
0.8
0.6
0.4
0.2
0
0 25 50 75 100
Universes of Travel, Accommodation, and Places
Figure E3.22(a) Fuzzy subsets bad, fair, and good in the related universes
Answer 3.22
Mom thinks that the traveling was fair and accommodation was fair and the places
were good. Since the expressions are connected by the term and, the consequence
will be the intersection of the fuzzy subsets used in the sentence as shown in
Figure E3.22(b).
Mom’s thoughts = fair \ fair \ good
Child HE thinks that the traveling was fair and accommodation was good and
places were fair. The consequence will be the intersection of the fuzzy subsets fair
and good as in Figure E3.22(b) given for mom.
Thoughts of child HE = fair \ good \ fair
According to child CS, the traveling was bad and accommodation was good
and places were bad. The consequence will be the intersection of the fuzzy subsets
bad and good as in Figure E3.22(a). The fuzzy subsets bad and good do not have
any common area. Therefore, their intersection becomes an empty set.
Thoughts of child CS = bad \ good \ bad = ∅
Dad thinks that the traveling was good and the accommodation was good and
places were good. Since all the fuzzy subsets are good, the consequent becomes
good as shown in Figure E3.22(c).
Dad’s thoughts = good \ good \ good = good
140 Fuzzy logic control in energy systems, 2nd edition
1
Bad Fair Good
Membership Values
0.8
0.6
0.4
0.2
0
0 25 50 75 100
Universes of Travel, Accommodation, and Places
1
Bad Fair Good
Membership Values
0.8
0.6
0.4
0.2
0
0 25 50 75 100
Universes of Travel, Accommodation, and Places
Example 3.23
The satisfaction degree of the family members in Example 3.22 is represented by a
fuzzy subset called satisfied in the universe of satisfaction in percentages. A
triangular-type membership function is used to represent the fuzzy subset satisfied
as fuzzified = triangle (0, 100, 100).
Obtain the satisfaction levels of each family member and determine who is the
one who enjoyed the vacation most.
Answer 3.23
It is clear that the output space is the satisfaction in percentages. Since satisfaction
is measured in terms of traveling comfort, accommodation comfort, and visited
places, these universes are the input spaces. The reasoning process and the con-
sequences are shown in Figure E3.23.
The overall family satisfaction from this vacation can be obtained by getting
the weighted average of the consequences from each rule as
100 þ 50 þ 50 þ 0 200
Family satisfaction ¼ ¼ ¼ 50%
4 4
Figure E3.23 The reasoning algorithm for Example E3.23
142 Fuzzy logic control in energy systems, 2nd edition
The individual conclusions from each rule show that dad has 100% satisfaction
from the vacation. Therefore, it is clear that dad is completely satisfied. Mom and
child HE are pleased with the vacation by 50%. However, Child CS has not been
satisfied at all. The overall family satisfaction is found to be 50%.
Fuzzy sets are used to represent uncertain and fuzzy data in the way as human does.
We as humans get data from the five sense organs, which are eyes, nose, ears, skin,
and tongue. All data one gets from these five sensing organs are fuzzy in nature not
crisp. We see around and objects as colored images without knowing the exact
length, width, size, and certain color. We evaluate the smell of odor as none, a little,
or intolerable without knowing its OUe value. We can hear sounds as low, normal,
or high without knowing its dB value. Our skin enables us to feel cold, warm, pain,
etc. as low, medium, and high without certain measurements in units. We use our
tongue to sense the taste and describe it as sweet, salty, and spicy without mea-
surement units. We can grade these definitions as very salty, very sweet and very
spicy by adding another fuzzy word such as adverb “very.”
A decision process includes mainly three parts such as data (sensing), knowl-
edge (rules), and conclusion as shown in Figure 3.5. In fuzzy reasoning, the data is
the current measurement represented by fuzzy subsets, which are also called fuzzy
membership functions. The knowledge is the ability of experts who are making
decisions. Therefore, the knowledge is represented by if . . . then . . . else type rules
in a rule base. And finally the conclusion is the fuzzy output as resultant decision to
be applied to take action.
Human decision-making process is very similar to that of fuzzy decision.
Figure 3.6 depicts how a human driver makes decision in order to keep an ambu-
lance on the road in correct direction.
The driver sees the correct direction, qr, by looking at the road and keeping it
in mind as the reference direction angle. The reference angle is usually in the same
direction as the road and is assumed to be 0 . Then the driver measures the actual
direction ambulance as the angle qv by using the eyes as sensors. The action to be
taken, in order to keep the ambulance in the right direction, depends on the direc-
tion angle error, which can be defined as the angular difference between reference
and deviation angles as
qe ðtÞ ¼ qr ðtÞ qv ðtÞ (3.80)
The driver uses (3.80) in his/her mind and calculates the direction angle error.
If the reference direction angle is taken as zero, then (3.80) can be written as
qe ðtÞ ¼ qv ðtÞ (3.81)
The aim here is to make the deviation angle (or the direction error) zero.
Therefore, the driver reaches a conclusion (gives a decision) whether to turn the
steering wheel to right or to left or do nothing. This decision is sent from the brain
to the arms, which are the actuators used to perform the action.
In the human decision-making process, the driver sees (measures) the devia-
tion angle as input data, and checks whether it is zero. A non-zero deviation value
means that there is a deviation to right or to left. If there is a deviation angle to right
or to left, the driver makes a decision in his/her mind to turn the steering wheel
toward the opposite direction in order to bring the vehicle to the reference direction.
The decision made in the brain is the output of the human decision-making process.
This decision is sent to hands through the synapsis of neurons in the arms to per-
form the decision. The hands of the driver are the actuators in the human case.
When human decision-making is required for the speed adjustment of the vehicle,
then the actuator would be the driver’s foot to press the gas pedal more or less.
The similarities between fuzzy decision-making and human decision-making
processes are summarized in Figure 3.6. A human being can understand whether
the deviation is to right or to left by just looking at the road and road lines. In the
intelligent machine case, the right or left directions of deviation are determined by
the sign of deviation angle. Let us assume that the deviation angle, qv, is positive if
the vehicle is going toward right instead of the reference direction as given in
Figure 3.6 and qv is negative if the vehicle is going toward left instead of reference
direction. According to these assumptions, there would be three options for the
direction error, qe, as
Deviation to right : qe ðtÞ ¼ 0 ðqv ðtÞÞ ¼ qv ðtÞ < 0 (3.82)
Deviation to left : qe ðtÞ ¼ 0 ðqv ðtÞÞ ¼ þqv ðtÞ > 0 (3.83)
No deviation exist : qe ðtÞ ¼ 0 ðqv ðtÞ ¼ qr ðtÞÞ ¼ 0 (3.84)
These three options of the direction error can be evaluated by a person as fuzzy
positive (P), fuzzy zero (Z), and fuzzy negative (N) instead of crisp numerical
degrees. However, human drivers may think that the deviation to left or right is
144 Fuzzy logic control in energy systems, 2nd edition
small or large, and turn the steering wheel toward left or right with small or large
changes. Therefore, fuzzy sets P and N should be defined with subcategories as
negative large (NL), negative small (NS), positive small (PS), and positive large
(PL). As stated in Chapter 1, these definitions of the direction error are the verbal
fuzzy variables and are represented by fuzzy subsets NL, NS, ZE, PS, and PL as
shown in Figure 3.7.
The boundaries of the direction angle error are set to 10 and +10, which
means that any angle error below 10 is assumed to be exactly crisp NL, and any
angle error above +10 is assumed to be exactly crisp PL. Any value of the angle
error from 10 to 5 is both fuzzy NL and NS. Similarly, any value of the angle
error from 5 to 0 would be fuzzy NS and ZE. It is also clear that the value of the
angle error above 0 is positive similar to those on negative side.
The driver makes decisions to turn the steering wheel toward right or left in
order to bring the direction of the vehicle on the reference and make direction angle
error zero. The driver’s decisions are based on the state of the deviation angle being
N, Z, or P according to the reference direction. From the definitions of (3.82)–
(3.84), it can be understood that the vehicle makes an angle of deviation to the right
if qe < 0, and therefore the driver must turn the steering wheel toward left (LF). If
qe > 0, then the driver has to turn the steering wheel toward right (RG) because the
vehicle is making an angle of deviation to the left. Nothing (NT) is to be done when
vehicle is going in the reference direction with a zero deviation angle, qe = 0. These
statements can be written in a rule-based format as in (3.85). If (qe is N) then (turn
the steering wheel toward RG).
If ðqe is PÞ then ðturn the steering wheel toward RGÞ
else if ðqe is NÞ then ðturn the steering wheel toward LFÞ (3.85)
else ðdo nothing ðNTÞÞ
where left (LF), right (RG), and nothing (NT) are also fuzzy variables. A driver
does not turn the steering wheel suddenly with large steps but turns it gradually
toward right or left under normal driving conditions making incremental or
decremental changes in rotation angle of the steering wheel. Therefore, the rotation
angle steps (changes) of steering wheel should be defined for fuzzy decision-
makers in order to have a smoother rotation. The rotation angle changes can be
defined as subcategories of LF, and RG as large LF (LLF), small LF (SLF), small
RG (SRG), and large RG (LRG), which are given in Figure 3.8.
Fuzzy decision-making 145
Figure 3.8 Fuzzy subsets for the rotation angle changes of steering wheel
Figure 3.9 Fuzzy subsets for the change in direction angle error
A driver never turns the steering wheel suddenly all the way left or right. He/
she observes the change in deviation angle and decides to how much turn the
steering wheel. Therefore, to make a healthy conclusion, fuzzy decision-making
algorithm needs another input data, which is the amount of change in deviation or
in direction angle error, qe.
Let us define the change in the error of direction angle as the difference
between its two consecutive values as in (3.86).
Dqe ðkÞ ¼ qe ðkÞ qe ðk 1Þ (3.86)
The amount of change Dqe in direction angle error is evaluated as negative
large (NL), negative small (NS), no change (NC), positive small (PS), and positive
large (PL), which are all fuzzy variables and can be represented by fuzzy mem-
bership functions as given in Figure 3.9. Since the change Dqe in direction angle
error may increase or decrease, it takes both positive and negative values.
If the amount of change Dqe in direction angle error is included in the decision-
making process, the rules in (3.85) can be expanded to yield (3.87).
Rule Base : If qe is NL and D qe is NL then D qSW is LRG
else if qe is NS and D qe is NL then D qSW is LRG
else if qe is ZE and D qe is NL then D qSW is SRG
:::
else if qe is PL and D qe is PS then D qSW is SLF
else qe is PL and D qe is PL then D qSW is LLF
Data Base : qe is PS and D qe is NS
Conclusion : DqSW is SLF
(3.87)
146 Fuzzy logic control in energy systems, 2nd edition
Table 3.1 The states of deviation angle and driver’s actions to them
qe + + 0 0 + 0
Dqe + + + 0 ö 0
DqSW + + + + 0
Table 3.2 The states of deviation angle and driver’s actions in rule
table format
l If deviation angle qe is positive and its change Dqe is positive then the driver turns
the steering wheel toward right, which is negative side, with step changes.
l If deviation angle qe is positive and its change Dqe is negative then the driver turns
the steering wheel toward right, which is negative side, with step changes.
l If deviation angle qe is negative and its change Dqe is negative then the driver
turns the steering wheel toward left, which is positive side, with step changes.
l If deviation angle qe is negative and its change Dqe is positive then the driver
turns the steering wheel toward left, which is positive side, with step changes.
l If deviation angle qe is positive and its change Dqe is zero then the driver turns
the steering wheel toward right, which is negative side, with step changes.
l If deviation angle qe is negative and its change Dqe is zero then the driver turns
the steering wheel toward left, which is positive side, with step changes.
l If deviation angle qe is zero and its change Dqe is positive then the driver turns
the steering wheel toward left, which is positive side, with step changes.
l If deviation angle qe is zero and its change Dqe is negative then the driver turns
the steering wheel toward right, which is negative side, with step changes.
l If deviation angle qe is zero and its change Dqe is zero then the driver does
nothing.
Table 3.1 can be summarized as follows and as in Table 3.2, which is a rule
table representation of driver’s actions with positive step changes in upper left
corner and negative step changes in lower right corner.
If qe is not zero then DqSW takes the opposite sign of qe
Else DqSW takes the opposite sign of Dqe.
Table 3.2 is a nine-rule table. Three fuzzy verbal variables positive, negative,
and zero are used to establish this rule table. If subcategories small and large of
negative and positive variables are used, a 25-rule table can be established
including the variable zero. A 25-rule table is given in Table 3.3. The content of
this 25-rule table is explained in more detail in the next chapter.
148 Fuzzy logic control in energy systems, 2nd edition
3.11 Problems
P3.1 A fuzzy relation R1 representing the verbal expression “close to each other”
and another fuzzy relation R2 representing “away from each other” are given
below.
1 2 3 4 1 2 3 4
2 3 2 3
1 1 0:5 0:2 0 1 0 0:2 0:5 1
2 6 0:5 1 0:5 0:2 7 2 6 0:2 0 0:2 0:5 7
mR1 ðx; xÞ ¼ 6 7 mR2 ðy; yÞ ¼ 6 7
3 4 0:2 0:5 1 0:5 5 3 4 0:5 0:2 0 0:2 5
4 0 0:2 0:5 1 4 1 0:5 0:2 0
P3.3 In an electrical circuit with a voltage source (E) and a resistor (R), it is
observed that the current (I) flowing through the resistor is approximately
1.0 A and the resistor is approximately 20 Ohms. The current and resistor are
given below. Obtain the source voltage, E = I R
0 0:5 1 0:5 0 0 0:5 1 0:5 0
I ¼ þ þ þ þ ; R ¼ þ þ þ þ
0 0:5 1 1:5 2 10 15 20 25 30
P3.4 Two fuzzy numbers zero (ZE) and positive medium (PM) are defined in the
universe of X = {5, 5} and are given below.
0 0:5 1 0:5 0 0 0:5 1 0:5 0
ZE ¼ þ þ þ þ ; PM ¼ þ þ þ þ
2 1 0 1 2 0 1 2 3 4
(a) Obtain the a-cuts of these two fuzzy subsets for a = 0 and a = 0.5.
(b) Obtain the support sets of these fuzzy subsets.
(c) Obtain the resultant membership matrix R for the implication “if ZE
then PM.”
(d) A third fuzzy subset called positive small (PS) is defined as below.
Obtain a fourth fuzzy subset using the compositional rule of inference as
C ¼ PS R and comment on the meaning of fuzzy set C.
0 0:5 1 0:5 0
PS ¼ þ þ þ þ
1 0 1 2 3
P3.5 Two series of connected resistors are defined by fuzzy numbers as given
below. Obtain total equivalent resistor value RT = R1 + R2 in Ohms using the
extension principle.
0:5 0:8 0:6 0:3 1 0:4
R1 ¼ þ þ W; veR2 ¼ þ þ W:
3 4 5 8 9 10
P3.6 The resistance of conductors varies with temperature. The following equation can
be used to define the resistance of a copper conductor as a function of temperature.
RX ¼ R0 ð1 þ 0:00428 TX Þ
where R0 is the known resistance when the temperature is 0 C and RX is the
resistance when the temperature is TX. The resistance value of the cooper
conductor at 0 C is approximately 200 Ohms as given below. Obtain the
fuzzy resistance value of this conductor if the temperature TX = 80 C.
0:6 0:8 1 0:8 0:6
R0 ¼ þ þ þ þ W
190 195 200 205 210
P3.7 Fuzzy numbers 8 and 4 are given as
0 0:5 1 0:5 0 0 0:5 1 0:5 0
A¼ þ þ þ þ ; B¼ þ þ þ þ
6 7 8 9 10 2 3 4 5 6
150 Fuzzy logic control in energy systems, 2nd edition
P3.10 The fuzzy set given below is defined in the universe of X = {5, 4, 3,
2, 1, 0, 1, 2, 3, 4, 5}. Map the fuzzy set A[X from the universe of X onto
universe of Y as a fuzzy set B[Y using the crisp function
f ðxÞ ¼ 2x2 3x þ 1.
0 0:2 0:4 0:6 0:8 1 0:8 0:6 0:4 0:2 0
A¼ þ þ þ þ þ þ þ þ þ þ
5 4 3 2 1 0 1 2 3 4 5
P3.11 The success of a company depends upon mainly two factors, which are the
work efficiency and quality of the manufactured goods. The work efficiency
and goods quality are given by the fuzzy subsets WE and GQ below. Obtain
the fuzzy success of this company.
0:0 0:5 1:0 0:5 0:0
WE ¼ þ þ þ þ
0 0:5 1:0 1:5 2:0
0:0 0:2 0:4 0:6 0:8 1:0
GQ ¼ þ þ þ þ þ
0 0:2 0:4 0:6 0:8 1:0
P3.12 The heat control of a room is based on the room temperature and light
coming from the windows in order to use the heater during the daytime only.
(a) Partition the universes of heat level, light level, and switching into
fuzzy subcategories based on your intuitions.
Fuzzy decision-making 151
(b) Write at least three expressions to turn the heater’s switch on/off
depending on the room temperature and light level.
(c) Write a MATLAB .m file to simulate your expressions in part (b).
P3.13 Membership function of linguistic variable cold (C) and membership matrix
of relation R representing the expression “if cold then turn on the heater” are
given below.
2 3
1 0:6 0:4 0:2
1 0:6 0:4 0:0 6 0:6 0:6 0:4 0:1 7
Cold ¼ þ þ þ ; R¼6 4 0:4 0:4 0:4 0:1 5
7
5 0 5 10
0:1 0:1 0:1 0:0
(a) How much is the heater on?
(b) Obtain the numerical value of the expression “if cold then on.”
(c) Obtain a relation matrix to represent the expression “in not cold then
not on.”
P3.14 The use of a battery is defined by the relation R = I H where I is the
current in Amperes drawn from the battery and H is the duration of the
current drawn from the battery. The relation R represents the total lifetime of
the battery. The possibility of fuzziness of each independent factor is about
20%. Normalized fuzzy sets of these factors are given as
0:0 0:5 1 0:5 0:0 0:0 0:5 1 0:5 0:0
I¼ þ þ þ þ ; H¼ þ þ þ þ
0:0 0:5 1 1:5 2:0 0:0 1 2 3 4
(a) Obtain the relation R = I H
(b) The energy stored in the battery is finished after being used fuzzy four
hours, which is defined as
0:0 0:5 1 0:5 0:0
FF ¼ þ þ þ þ
0:0 2 4 6 8
The amount of amper hour (Ah) of the battery is obtained as a
relation between current and usage time as asked in part (a). What can
you say about the current drawn from the battery?
P3.15 Two fuzzy sets young (Y) and high school student (HSS) defined in the
universe of ages are given below.
1 0:8 0:6 0:4 0:2 0
Young ¼ þ þ þ þ þ
15 20 25 30 35 40
0 0:5 1 0:5 0
High School Student ¼ þ þ þ þ
12 14 16 18 20
A fuzzy implication is stated as “If Hilal is a high school student then
she is young.” and obtained by the Cartesian product as given below,
which yields Table E3.21.
152 Fuzzy logic control in energy systems, 2nd edition
Table E3.21 The relation matrix for high school student young
Young
If Elif’s age is defined as below, what can be said about Elif being a high
school student.
1 0:8 0:6 0:4 0:2 0
Elif ’s age ¼ þ þ þ þ þ
5 8 10 12 14 16
P3.16 A fuzzy reasoning process is given as
Rule base : If x is small and y is medium then z is big
Data base : x is very small and y is close to medium
Conclusion : z ¼ ?
The fuzzy subsets small (S), medium (M), and big (B) are defined in the
interval {0, 10} as below. Show the fuzzy reasoning process in a graphical
format.
1 0:5 0 0 0
Small ¼ þ þ þ þ
0 2:5 5 0:75 10
0 0:5 1 0:5 0
Medium ¼ þ þ þ þ
0 2:5 5 7:5 10
0 0 0 0:5 1
Big ¼ þ þ þ þ
0 2:5 5 7:5 10
P3.17 In the thermal characteristics of conductors show that the conductor resis-
tance increases as it gets heated. Use this information and generate a fuzzy
implication by assigning some fuzzy subsets to the changes in heat and
resistance of a copper conductor.
P3.18 In a room heating process, the difference between the set value and actual
room temperature is called the control error (E), and the difference between
two values of control error from two consecutive samples is called the
change in error (CE). It is known that the time response of the control error
is similar to that of an oscillatory decaying second-order system and can be
Fuzzy decision-making 153
Table P3.18 Parameters of the fuzzy membership functions for Problem 3.18
made zero by increasing or decreasing the voltage applied to the heater. Let
us call these increment and decrement processes the change in voltage (CV).
The universe of error in the control system described above is partitioned into
three subcategories as negative error (NE), zero error (ZE), and positive error
(PE). Similarly, the universe of the change in error is also partitioned into three
subcategories negative change (NCE), zero change (ZCE), and positive change
(PCE). In order to make the error to be zero, the applied voltage to the heater is
increased or decreased by fuzzy steps such as negative change in voltage (NCV),
zero change in voltage (ZCV), and positive change in voltage (PCV). All these
fuzzy subsets are represented by parametrized triangular fuzzy membership
functions, whose parameters are given in Table P3.18. Note that the error and the
change in error are in C and the maximum change in voltage is 1 V.
Develop a series of control rules by considering the values of error and the
change in error to give some increments and decrements to the voltage
applied to the heater so that the error will be zero.
P3.19 Two fuzzy numbers defined in the universe X = {5, 5} are given below.
0 0:5 1 0:5 0
A ¼ Zero ¼ þ þ þ þ
2 1 0 1 2
and
0 0:5 1 0:5 0
B ¼ Positive Medium ¼ þ þ þ þ
0 1 2 3 4
(a) Obtain a fuzzy relation R that represents the implication If A then B.
(b) If another fuzzy number C is defined as follows in the same universe of
X, obtain the fuzzy number D = C R by using max–min composition.
0 0:5 1 0:5 0
C ¼ Positive Small ¼ þ þ þ þ
1 0 1 2 3
154 Fuzzy logic control in energy systems, 2nd edition
P3.20 A city has four main entrance points (E1, E2, E3, and E4) from the sur-
rounding highway. Sensors are placed at each entrance counting the vehicles
entering to and going out of the city. These four entrances are also connected
to each other by four main streets (S1, S2, S3 and S4). Depending on the
traffic on the streets and the entrance points, the vehicles are guided toward
the streets and the entrance points with light traffic. The guiding monitors
are placed at each entrance and at cross-sections of the streets.
Develop a rule base system such that the traffic conditions at the entrance
points and at the streets are used as inputs and the new recommended
direction of the traffic is the output.
P3.21 A crisp universe of discourse X is defined in the interval of [0, 10] and
partitioned into three fuzzy subsections as small, medium, and large.
Triangular-type fuzzy sets are used to represent these fuzzy subsets. Draw a
software algorithm that gives you the membership value of any x on X in the
fuzzy subsets small, medium, and large.
References
[1] Jiang J.A., Wang J.C., Kuo K.C., et al. ‘Analysis of the junction temperature
and thermal characteristics of photovoltaic modules under various operation
conditions’. Energy. 2012;44(1):292–301.
[2] Jang S.H. and Shin M.W. ‘Thermal characterization of junction in solar cell
packages’. IEEE Electron Devıce Letters. 2010;31(7):743–745.
[3] IEEE Recommended Practice for Monitoring Electric Power Quality. IEEE
Std 1159-2009 (Revision of IEEE Std 1159-1995); 2009. pp. c1–81.
[4] Klir G. and Folger T. Fuzzy Sets, Uncertainty, and Information. Englewood
Cliffs, NJ: Prentice-Hall; 1988.
[5] IEEE Recommended Practices and Requirements for Harmonic Control in
Electrical Power Systems. IEEE Std 519-2014 (Revision of IEEE Std 519-
1992); New York, NY: IEEE.
[6] Zadeh L.A. ‘Fuzzy sets as a basis for a theory of possibility’. Fuzzy Sets and
Systems. 1978;1(1): 3–28.
[7] Zadeh L.A. ‘Outline of a new approach to the analysis of complex systems
and decision processes’. IEEE Transactions on Systems, Man, and Cyber-
netics. 1973;3(1):28–44.
[8] Zadeh L.A. ‘The concept of linguistic variable and its application to
approximate reasoning. Part I, II, and III’. Information Sciences. 1975;8
(3):199–249, 8(4):301–357, 9(1):43–80.
[9] Altas I.H. and Sharaf A.M. ‘A fuzzy logic power tracking controller for a
photovoltaic energy conversion scheme’, Electric Power Systems Research
Journal. 1992;25(3):227–238.
[10] Zadeh L.A. ‘A theory of approximate reasoning’ in Hayes J. And Mikulich L.
I. (eds.). Machine Intelligence. New York: Halstead Press; 1979, vol. 9, pp.
149–194.
Fuzzy decision-making 155
Fuzzy logic controller (FLC) theory and design approaches are given in this
chapter. Machines operate the human way as if run by expert operators and
steps toward FLCs are given. Rule development, the way of putting expert
ideas into rules, and inference system structure are studied. From crisp input
variables to crisp output, all process is discussed and shown. Defuzzification,
rule processing, fuzzy reasoning, and crisp output after defuzzification are
explained. Using the FLC as an optimization tool is introduced as a new
subsection for this edition. User-developed FLC examples are given.
4.1 Introduction
Theoretical studies in approximate and fuzzy reasoning have increased with the
application of fuzzy logic in engineering, medical science, and social science. In
engineering, fuzzy logic and reasoning algorithms are used in control, systems iden-
tification, modeling, optimization, decision-making, management, and many other
similar applications related to industrial developments and management. Zadeh has
suggested new concepts on linguistic variables and decision-making processes,
Mamdani and his colleagues have applied fuzzy logic to a pressure control system,
Takagi and Sugeno used it in system modeling and identification, and Tsukamoto
developed a reasoning algorithm. Many other researchers on fuzzy sets and fuzzy
logic published very important papers showing their studies in the topic. Among all
those studies, the approaches introduced by Mamdani, Takagi–Sugeno, and
Tsukamoto have attracted the others. All these approaches use fuzzy processing
algorithms that are called by different names as mentioned in the section “Fuzzy
Reasoning” in the previous chapter. Since fuzzy reasoning and fuzzy decision include
the process of fuzzy data, fuzzy subsets, and fuzzy rules a more generalized name
“fuzzy processor” is used to call all of those methods and approaches. In this chapter,
the most used fuzzy reasoning approaches by Mamdani, Takagi–Sugeno, and
Tsukamoto are discussed and fuzzy processing steps in these algorithms are given.
After the introduction of the fuzzy logic concept by Lotfi A. Zadeh in 1965 [1],
Mamdani and his colleagues developed and used a fuzzy logic controller (FLC) in a
158 Fuzzy logic control in energy systems, 2nd edition
Example 4.1
The generated maximum power in a PV system changes as a function of solar
irradiation level and operating temperature. Some information about the PV
systems was described in Examples 3.19 and 3.20. The maximum power points
at some solar irradiation and temperature levels are defined as a relation PM.
Fuzzy logic controller (FLC) 159
LT WT HT
LS LP LP LP
MS MP MP MP
HS HP HP HP
Find the power output in pu of this fuzzy rule base system if the solar irra-
diation level is 125 mW/cm2 and the temperature is 15 C. Assume that the base
power used for pu conversion of the maximum power is equal to the maximum
power available from the PV system under the best conditions where it is located.
Rule 1 : if s is LS and t is LT then p is LP
Rule 2 : else if s is LS and t is WT then p is LP
Rule 3 : else if s is LS and t is HT then p is LP
Rule 4 : else if s is MS and t is LT then p is MP
Rule 5 : else if s is MS and t is WT then p is MP
Rule 6 : else if s is MS and t is HT then p is MP
Rule 7 : else if s is HS and t is LT then p is HP
Rule 8 : else if s is HS and t is WT then p is HP
Rule 9 : else if s is HS and t is HT then p is HP
where LS, MS, and HS stand for low, medium, and high solar irradiation. LT, WT,
and HT are used for low, warm, and hot temperature. LP, MP, and HP represent
low, medium, and high maximum power.
Answer 4.1
The solution to this problem is done graphically and depicted in Figure E4.1(d).
The crisp solar irradiation level of 125 mW/cm2 has non-zero membership degree
in fuzzy subsets medium (MS) and high (HS). Since the membership value of solar
irradiation is zero in fuzzy subset low (LS), the line starting with LS in Table E4.1
does not have any effects on the output. Therefore, the first three rules are not
active and they are not fired. Similarly, the crisp temperature value of 15 C has
non-zero membership values in the fuzzy subsets low (LT) and warm (WT), only.
Since the membership degree is zero in the fuzzy subset hot (HT), the column of
the fuzzy rule matrix has no effect on the output. Therefore, the rules 3, 6, and 9 are
not fired. The active rules, which are the fourth, fifth, seventh, and eighth rules, are
fired and only these active rules are shown in Figure E4.1(d).
The result of each rule is obtained as follows:
mP4 ðpÞ ¼ mMP ðpÞ ¼ minðmMS ðsÞ; mLT ðtÞÞ ¼ minð0:75; 0:04Þ ¼ 0:04
mP5 ðpÞ ¼ mMP ðpÞ ¼ minðmMS ðsÞ; mLT ðtÞÞ ¼ minð0:75; 0:7Þ ¼ 0:7
mP7 ðpÞ ¼ mHP ðpÞ ¼ minðmHS ðsÞ; mLT ðtÞÞ ¼ minð0:25; 0:04Þ ¼ 0:04
mP8 ðpÞ ¼ mHP ðpÞ ¼ minðmHS ðsÞ; mWT ðtÞÞ ¼ minð0:25; 0:7Þ ¼ 0:25
Figure E4.1(d) Mamdani fuzzy reasoning algorithm
162 Fuzzy logic control in energy systems, 2nd edition
Each rule results in a membership value, which is obtained as the minimum of the
membership values coming from the input spaces. The resultant membership value
from each rule is a weighting factor used to determine the effectiveness of the
rule on the output space. For example mP4(p) = 0.04 is the weighting factor from
Rule 4 and it shows how much the fuzzy set medium power (MP) is effective as
depicted by the shaded area in the upper right corner in Figure E4.1(d). Similarly,
mP5(p) = 0.7 is the weighting factor from Rule 5 and it shows the effectiveness of
the fuzzy set medium power (MP) by shaded area as seen in the second graph on the
upper right corner in Figure E4.1(d). The effects of Rules 7 and 8 are also shown by
shaded areas in the same figure.
The final fuzzy output in this problem is the union of the areas obtained from
each active rule because the rules are connected to each other by the term else. The
unified fuzzy output is seen in the lower right corner of Figure E4.1(d). Mamdani
fuzzy reasoning has another section called defuzzifier as depicted in Figure 4.1.
Defuzzifier is used to convert the fuzzy output to a crisp output by extracting a crisp
value from the unified shaded area. There are several defuzzification methods to
obtain a crisp output. One of these methods is called the center of area (COA)
method and is used as follows for this example:
P
n
mRi ðpÞ pRi
p ¼ i¼1P
n
mRi ðpÞ
i¼1
4.2.1 Fuzzification
The crisp inputs entered into the input spaces are considered as triggering signals.
They activate the rules in which they have non-zero membership values in the
fuzzy subsets used in the rules. In Example 4.1, the input signal s = 125 mW/cm2
has non-zero membership degrees in the fuzzy subsets medium (MS) and high (HS)
in the universe of solar irradiation level. Therefore, the input s = 125 mW/cm2
activates the rules that include fuzzy subsets MS and HS. The input signal t = 15 C
Fuzzy logic controller (FLC) 163
has non-zero membership degrees in the fuzzy subsets low (LT) and warm (WT) in
the universe of temperature and activates the rules that include fuzzy subsets LT
and WT. Actually, the fuzzification is nothing but the activation of the rules. The
crisp inputs are converted to a fuzzy membership function of the active rules. This
process is shown in Figure 4.2 for the active rules in Example 4.1.
The membership values of s = 125 mW/cm2 in fuzzy subsets MS and HS in
one of the input universes are obtained for four active rules and carried out of the
fuzzification as mMS(s) from Rules 4 and 5, and as mHS(s) from Rules 7 and 8. The
membership values of t = 15 C in fuzzy subsets LT and WT in the other input
universe are obtained for four active rules and carried out of the fuzzification as mLT
(t) from Rules 4 and 7, and as mWT(t) from Rules 5 and 8. After the fuzzification,
one membership value from each input universe is obtained at the output of the
fuzzification. Since there are two input universes in Example 4.1, consequently
there are two membership values at the output of the fuzzification from each rule.
Therefore, it can be concluded that the number of the membership values from each
rule is equal to the number of the input spaces. There are four active rules for the
μMS(s)
μLT(t)
μMS(s)
μWT(t)
μHS(s)
μLT(t)
μWT(t)
μHS(s)
given two crisp inputs in Example 4.1, and therefore there are eight fuzzy mem-
bership values at the output of the fuzzifier.
Two membership values from each rule are then used in the reasoning section
to obtain the weighting factors in order to determine the effectiveness of the related
rule at the output space.
where N is the total number of the rules. The effect of each rule can also be
obtained using the arithmetical product as in (4.5) instead of the min operator given
in (4.3).
mRi ðpÞ ¼ wRi mCP ðpÞ; for i ¼ 1; 2; . . .; N (4.5)
where N is the total number of the rules. As stated in the previous chapter, the min
operator is preferred to be used in examples of this book.
Practice 4.1
Write a MATLAB .m file in order to simulate Example 4.1 so that the shaded
fuzzy subsets are plotted as the fuzzy conclusion for given crisp input values.
4.2.4 Defuzzification
The union of the conclusions from individual rules is the final conclusion obtained
using (4.2), (4.3), and (4.4). The final fuzzy conclusion is usually an area similar to the
one shown on the right in Figure 4.4. In order to explain different defuzzification
methods a more generalized fuzzy conclusion area given in Figure 4.5 is used in this
section. In this figure, m0 (z) 1, and CT0 is the total area representing the final con-
clusion as the union of all individual rules. Z is the universe of discourse.
Defuzzification is done in order to convert the fuzzy conclusion into a crisp
value. In real-time control system applications, the decision is usually a crisp signal
used to trigger real-time devices such as electronic switches and relays. Therefore,
defuzzification is required in many applications while the fuzzy conclusion may be
sufficient for some.
Defuzzification may be explained as the extraction of a single crisp value from
an area that represents the fuzzy conclusion of a fuzzy reasoning process. The most
known defuzzification methods are listed below.
l Lower maximum
l Upper maximum
l Mean of maxima
l Equal areas
l Center of areas
l Center of gravity
The lower maximum (LM) is used as one of the defuzzification methods. It is equal
to the first element of the core set of the final fuzzy subset representing the final
conclusion as shown in Figure 4.5 and defined in (4.6).
zLM ðzÞ ¼ zi ; such that mðzi Þ > mðzj Þ for i 6¼ j and zi < zk for mðzi Þ ¼ mðzk Þ
(4.6)
Center of areas
where the crisp value zi is the support set of fuzzy memberships mC0 (z), which have
maximum values in the final output set C0 T, and n is the number of elements in this
support set.
The equal area (EA) method is also used for defuzzification. In this method,
the final conclusion area is divided into two equal areas. The crisp value corre-
sponding to the point that separates two equal areas is taken as the crisp output and
expressed as in (4.9).
ð ZEA ð Z2
mC0 ðzÞdz ¼ mC0 ðzÞdz (4.9)
z1 ZEA
where zEA is the equilibrium point that divides the total output set C0 T into two
equal areas. The first integration starts from the left starting point of C0 T and ends at
the point zEA. The equilibrium point zEA is the starting point for the second integral
which ends at the right ending point of C0 T.
The center of areas (COA) method is the most used one in fuzzy logic control
applications [4,5]. In this method, the crisp output is the point that corresponds to
the center of areas that are obtained as the union of the areas from individual rules.
The defuzzification is done using the formula given in (4.10).
P
n
wRi zi
i¼1
zCOA ¼ Pn (4.10)
wRi
i¼1
where n is the number of the active rules, wRi(z) is the weighting factor from the ith
rule, and zi is the crisp value defined in the output universe and corresponds to the
center of the core set of the output fuzzy set. In order to understand the use of
(4.10), let us use the output space and unified areas of final fuzzy conclusions
shown in Figure 4.6.
Fuzzy logic controller (FLC) 169
Example 4.2
In a system, the universe of X is partitioned into three categories A1, A2, and A3. A
second universe called Y is also portioned into three subcategories B1, B2, and B3.
The fuzzy subcategories are represented by triangular fuzzy membership functions
as described in Table E4.2(a).
The relation between the universes X and Y yields another universe Z, which is
also partitioned into three subcategories C1, C2, and C3 whose parameters are also
B1 B2 B3
A1 C2 C3 C3
A2 C1 C2 C3
A3 C1 C1 C2
listed in Table E4.2(a). The rules describing the relation between the universes X
and Y are given in a rule table as in Table E4.2(b).
Obtain the value of z if x = 1.8 and y = 0.35. Use the Mamdani Reasoning
approach with the center of area defuzzification method.
Answer 4.2
The solution to this problem will be given step by step in a MATLAB .m file format.
Fuzzyfication is the first step in Mamdani fuzzy reasoning algorithm and it is used to
convert crisp inputs to fuzzy membership values. Therefore, the crisp inputs
x = 1.8 and y = 0.35 should be written in terms of their membership values in the
fuzzy subsets defined in the same universe. The MATLAB code given in Figure E4.2
(a) can be used as the fuzzification.
The term “triangle01m” is a MATLAB function developed in Chapter 2 for the
triangular fuzzy membership function. The code in Figure E4.2(a) gives the
membership values of x in the fuzzy subsets as A1 = 0, A2 = 0.25, A3 = 0.75, B1 = 0,
B2 = 0.6, and B3 = 0.4.
The second step in Mamdani fuzzy reasoning is the rule base system.
Therefore, the rules are fired to yield the weighting factor as a result of each rule.
The MATLAB code for the weighting factors is given in Figure E4.2(b).
The numerical values of the weighting factors are given in matrix format for
the data used in this example. The matrix format is similar to the rule table and
20 0:6 0:4 3
0 0 0 0
mR ðzÞ ¼ 0:25 4 0 0:25 0; 25 5
0:75 0 0:6 0:4
Since mA1(x) = 0 and mB1(y) = 0, the first line and column become zero,
Therefore, the weighting factors in the first line and column are zero. Only Rules 5,
6, 8, and 9 are active.
At this point let us use the code given in Figure E4.2(c) to plot and see the
fuzzy membership functions C1, C2, and C3 in the universe of Z. The resultant plot
is shown in Figure E4.2(d).
It was mentioned earlier that (4.5) can be used to determine the effects of the
rules on the fuzzy sets in output space. The weighting factors can be obtained by
using the code in Figure E4.2(b) and substituted into (4.5) as in Figure E4.2(e) to
Figure E4.2(c) MATLAB code for plotting the fuzzy subsets in output universe Z
Figure E4.2(d) The fuzzy subsets C1, C2, and C3 in output universe Z
Figure E4.2(e) The code to find the effect of each rule in output space Z
172 Fuzzy logic control in energy systems, 2nd edition
yield the effective areas of the fuzzy subsets in the output space Z. The resultant
effective areas for Rules 1, 2, 3, 4, and 7 become zero because these rules are not
fired for the given values of x and y. Therefore, only the effect of the active Rules 5,
6, 8, and 9 in the output space are shown in Figure E4.2(f). The final fuzzy con-
clusion is then obtained by using (4.4) as given in Figure E4.2(g), which results in
the plot shown in Figure E4.2(h).
The final crisp output is obtained by defuzzifying the final fuzzy conclusion
shown in Figure E4.2(i). Using the numerical values of the parameters wi and zi
given in Figure E6.2(f) in (6.10) or (6.11) the crisp output is obtained. A MATLAB
code used for defuzzification in this example is given in Figure E6.2(i), besides the
Figure E4.2(f) The effects of the active rules in the output space
Figure E4.2(g) The code to find the union of active rule outputs
Fuzzy logic controller (FLC) 173
Figure E4.2(h) The unified final fuzzy conclusion for Example E4.2
where
XN
wRi ffi 1 (4.15)
i¼1
where N is the total number of the rules or active rules, wRi is the weighting factor
obtained from the ith rule and zi is given in (4.13). The values of wRi are obtained as
the process of the rule base system using the operator min or arithmetic product,
which makes the output equal to or smaller than the inputs. Therefore, equation
(4.15) is expected to be satisfied, otherwise, if the sum of the weighting factors is
much >1, the fuzziness of the process weakens. Since the outputs from individual
rules are not fuzzy, a defuzzification is not required in TS fuzzy reasoning, and
(4.14) is used. However, in some applications, if (4.15) is not approximately
satisfied, then the final crisp output is obtained as a weighted average similar to the
center of area method given by (4.10) and repeated in (4.16).
PN
wRi zi
z ¼ i¼1N (4.16)
P
wRi
i¼1
Fuzzy logic controller (FLC) 175
Since the final conclusion is just the weighted sum of the active rules outputs
as in (4.14), the process time becomes smaller compared to the use of (4.16). A
graphical view of the TS or TS fuzzy reasoning algorithm is shown in Example 4.3.
Example 4.3
Let us repeat Example 4.1 using TS fuzzy reasoning instead of Mamdani fuzzy
reasoning for the same input data as solar irradiation level s = 125 mW/cm2 and
temperature t = 15 C. Use the same triangular fuzzy membership functions with the
same definitions in the universe of solar irradiation and modify the fuzzy mem-
bership functions in the universe of temperature by using sinusoid membership
functions instead of Gaussian as shown in Figure E4.3(a). Since the output universe
is not fuzzy, then the rule table is modified as in Table E4.3(a).
where
P1 ¼ 1 e0:1s e0:1t
P2 ¼ 1 e0:05s e0:06t (E4.3a)
P3 ¼ 1 e0:02s e0:015t
Answer 4.3
The answer to this example is very similar to the answer given for Example 4.1. The
difference occurs at the output space since the output space in the TS reasoning
algorithm is crisp and defined by the functions P1, P2, and P3. Therefore, the rule
table does not contain fuzzy membership functions in the conclusion part. From input
variables s and t to the output of the fuzzification are the same as in Example 4.1. Then
the weighting actor from each rule is obtained using either min or product operator as
the same in Example 4.1 given for Mamdani fuzzy reasoning. Therefore, the differ-
ence starts right in the output space, which yields crisp output directly.
The membership values of s = 125 mW/cm2 in the fuzzy subsets defined in the
universe of solar irradiation (S) are obtained using the MATLAB function
mðxÞ ¼ triangle01mðx1 ; x2 ; x3 ; xÞ given in Figure 2.5 as follows:
mMS ð125Þ ¼ triangle01mð0; 100; 200; 125Þ ¼ 0:75 (E4.3b)
mHS ð125Þ ¼ triangle01mð100; 200; 200; 125Þ ¼ 0:25 (E4.3c)
The membership values of t = 15 C in the fuzzy subsets defined in the
universe of temperature (T) are obtained using the MATLAB function
LT WT HT
LS P3 P3 P3
MS P2 P2 P2
HS P1 P1 P1
s
LT WT HT
LS R1 = P3 R2 = P3 R3 = P3
MS R4 = P2 R5 = P2 R6 = P2
HS R7 = P1 R8 = P1 R9 = P1
178 Fuzzy logic control in energy systems, 2nd edition
If the sum of the weightings is approximately equal to unity, then the weighted
sum of the outputs from individual rules can be considered as the final conclusion
for the reasoning algorithm. However, the sum of the weightings is much greater
than unity here and the use of weighted sum may lead to the wrong conclusion as
given below.
pW ¼ w4 P1 þ w5 P1 þ w7 P2 þ w8 P2
pW ¼ 0:38 0:7769 þ 0:75 0:7769 þ 0:25 0:5915 þ 0:25 0:5915
(E4.3i)
pW ¼ 0:295 þ 0:58 þ 0:15 þ 0:15 ¼ 1:175
pW ¼ 1:175
In this problem, the universe of P is the maximum power generated by a
specific PV panel under various levels of solar irradiation and temperature. The
possible maximum power that can be generated by this panel where it is located is
selected as the base power. Therefore, the highest value of the universe of S is given
as unity. This means that, pW cannot be >1 pu. In this case, the weighted average
should be used to obtain the final conclusion as follows:
w4 P1 þ w5 P1 þ w7 P2 þ w8 P2
pAV ¼
w4 þ w5 þ w7 þ w8
0:38 0:7769 þ 0:75 0:7769 þ 0:25 0:5915 þ 0:25 0:5915
pAV ¼ (E4.3j)
0:38 þ 0:75 þ 0:25 þ 0:25
0:295 þ 0:58 þ 0:15 þ 0:15 1:175
pAV ¼ ¼ ¼ 0:72
1:63 1:63
The result from the weighted average is close to 0.75, which was obtained in
Example 4.1 using Mamdani fuzzy reasoning.
Example 4.4
An industrial plant is fed from wind (WES) and photovoltaic (PES) energy systems
besides the utility distribution network (UDN). WES, PES, and the industrial plant
belong to the same company. For economical considerations, the company wants to
minimize the electrical power from the utility by using WES and PES by utilizing a
fuzzy decision process based on the rules given below
R1: If PES is sufficient and WES is insufficient then the use of UDN = 1-min (mRES,
mGES)
R2: If PES is sufficient and WES is sufficient then the use of UDN = 1-min (mRES,
mGES)
R3: If PES is insufficient and WES is insufficient then the use of UDN = 1-min (mRES,
mGES)
R4: If PES is insufficient and WES is sufficient then the use of UDN = 1-min (mRES,
mGES)
Fuzzy logic controller (FLC) 179
The transition from one rule to the next one is done by using the term else and the
fuzzy subsets used in the rules are defined as follows:
Insufficient in the universe of PES, (IPES) = triangle (0, 0, 200)
Sufficient in the universe of PES, (SPES) = triangle (0, 200, 200)
Insufficient in the universe of WES, (IWES) = triangle (0, 0, 20)
Sufficient in the universe of WES, (SWES) = triangle (0, 20, 20)
The universe of the use of UDN is defined in interval {0, 1} such that UDN =
0 means that the UDN is not being used, and UDN = 1 means that all the required
power (100%) is supplied from UDN. Obtain the percentage of the use of UDN if
the solar irradiation level in PES is 80 mW/cm2 and wind speed in WES is 15 m/s.
Answer 4.4
The graphical representation of the rule processing makes the reasoning algorithm
more clear and understandable. Therefore, the solution of this example is done both
in graphical and written formats.
Since the input data is crisp, they should be fuzzified first using the MATLAB
function mðxÞ ¼ triangle01mðx1 ; x2 ; x3 ; xÞ given in Figure 2.5 as follows:
mIPES ð80Þ ¼ triangle01mð0; 0; 200; 80Þ ¼ 0:6
mSPES ð80Þ ¼ triangle01mð0; 200; 200; 80Þ ¼ 0:4
(E4.4a)
mIWES ð15Þ ¼ triangle01mð0; 0; 20; 15Þ ¼ 0:25
mSWES ð15Þ ¼ triangle01mð0; 20; 20; 15Þ ¼ 0:75
Substitution of the numerical values into the rules results in the outputs from
each rule.
R1: PES = SPES (0.4) and WES = IWES (0.25) then UDN = 1 0.25 = 0.75
R2: PES = SPES (0.4) and WES = SWES (0.75) then UDN = 1 0.4 = 0.6
R3: PES = IPES (0.6) and WES = IWES (0.25) then UDN = 1 0.25 = 0.75
R4: PES = IPES (0.6) and WES = SWES (0.75) then UDN = 1 0.6 = 0.4
The sum of the weightings becomes
XN
wRi ¼ 0:25 þ 0:4 þ 0:25 þ 0:6 ¼ 1:5 > 1:0 (E4.4b)
i¼1
Since the sum of the weightings is much greater than unity, the weighted average
should be used to obtain the final conclusion as follows:
μ s
μ w u
μ s
u
μ w
μ s μ w
u
s w
Example 4.5
Assume that the fuzzy rules in Example 4.4 are redefined for the same problem as
below
R1: If PES is sufficient and WES is insufficient then the use of UDN is Medium
R2: If PES is sufficient and WES is sufficient then the use of UDN is low
R3: If PES is insufficient and WES is insufficient then the use of UDN is high
R4: If PES is insufficient and WES is sufficient then the use of UDN is Medium
The transition from one rule to the next one is done by using the term else and the
fuzzy subsets used in the rules are defined as follows:
Insufficient in the universe of sunlight, (IS) = triangle (0, 0, 200)
Sufficient in the universe of sunlight (SS) = triangle (0, 200, 200)
Insufficient in the universe of wind, (IW) = triangle (0, 0, 20)
Sufficient in the universe of wind, (SW) = triangle (0, 20, 20)
Low in the universe of the use of utility (LU) = triangle (0, 0.5, 0.5)
Medium in the universe of the use of utility (MU) = triangle (0.25, 0.75, 0.75)
High in the universe of the use of utility (HU) = triangle (0.5, 1, 1)
Obtain the percentage of the use of UDN if the solar irradiation level in PES is
80 mW/cm2 and wind speed in WES is 15 m/s.
182 Fuzzy logic control in energy systems, 2nd edition
Answer 4.5
The solution of this example is done both in graphical and written formats. This
time the graphical solution is given first as in Figure E4.5.
Since the fuzzification process is the same as in the Mamdani and TS algo-
rithms, there is no need to repeat the same process. Therefore, the weighting factors
obtained in Example 4.4 can be used in this example, too.
mIS ð80Þ ¼ 0:6; mSS ð80Þ ¼ 0:4; mIW ð15Þ ¼ 0:25; mSW ð15Þ ¼ 0:75 (E4.5a)
Substitution of the numerical values into the rules results in the outputs from
each rule.
R1: PES = SS (0.4) and WES = IW (0.25) then u1 = 0.25 + w/2 = 0.25 + 0.25/2 =
0.375
R2: PES = SPES (0.4) and WES = SWES (0.75) then u2 = 0 + w/2 = 0.4/2 = 0.2
R3: PES = IPES (0.6) and WES = IWES (0.25) then u3 = 0.5 + w/2 = 0.5 + 0.25/2
= 0.625
R4: PES = IPES (0.6) and WES = SWES (0.75) then u4 = 0.25 + w/2 = 0.25 + 0.6/
2 = 0.55
μ s
μ w
μ w μ s
μ s
μ w
μ s
μ s
s w
Example 4.6
A power management system was introduced in Example 3.13. Three types of power
stations were described as small, medium, and large and represented by fuzzy subsets
as shown in Figure E3.13(a). It was addressed that the generated power should be
equal to the dissipated power demand plus the losses so that the equilibrium of the
system is guaranteed. Based on these operating conditions and power system proper-
ties, the following single input and single output rules are rewritten for this example.
R1: If change in demand is PLD then change in generation is PLG.
R2: if change in demand is PMD then change in generation is PMG.
R3: if change in demand is NLD then change in generation is NLG.
R4: if change in demand is NMD then change in generation is NMG
R5: if change in demand is ZED then change in generation is ZEG.
where PLD, PMD, NLD, NMD, and ZED stand for positive low, positive medium,
negative low, negative medium, and zero changes, respectively, in the universe of
power demand. PLG, PMG, NLG, NMG, and ZEG are used for positive low,
positive medium, negative low, negative medium, and zero changes, respectively,
in the universe of generation. These fuzzy subsets are described in Figure E5.1 for
this example, as well. Note that both the changes in power demand and in power
generation have the same universes.
During a balanced operating period, while the power system is under equili-
brium operating conditions, it is observed that the demand power has decreased
about 2 MW. Find the amount of change in generated power and give a decision
about the power station where the power change is subject to be applied. Use the
center of area defuzzification method where it is necessary.
Answer 6.6
A decrement of 2 MW in power demand means that the change in power demand is
2 MW. Therefore, a power change of 2 MW has membership values in the
fuzzy subsets negative low (NL) and zero (ZE) only. Under these conditions, there
will be two active rules among the given five rules. The active rules include
negative low (NLD) and zero (ZED) changes in power demand.
if NLD then NLG
If ZED then ZEG
184 Fuzzy logic control in energy systems, 2nd edition
The output responses of a linear time-invariant (LTI) system for a step-type refer-
ence input are shown in Figure 4.7 for different cases of a second-order system. The
step response of an LTI stable physical system reaches a constant steady-state value
either smoothly or after some oscillations depending on the parameters and order of
the system equations. The oscillating response occurs if the mathematical model of
the system has second- or higher-order equations. Therefore, a second-order system
with a characteristic equation in the s-domain as in (4.19) can be used to analyze
and simulate the LTI systems.
Time (s)
SS
y(t)
e(t)
SS
S
s
value is kept short or minimum. In order to control a physical system, mainly three
parameters, which are overshoot, settling time, and steady-state error as depicted in
Figure 4.8 are affected by the controller.
A classical automatic control system uses the error signal in order to generate a
control signal to drive the physical system or process so that the actual output tracks
the reference with zero or minimum error. The error e(t) is obtained as the differ-
ence between reference r(t) and actual system output y(t) as given in (4.18) and
shown in Figure 4.8. In a classical control system, the error signal is either ampli-
fied, integrated, and/or derivate to yield the required control action. The controllers
with these processes are called as proportional (P), integral (I), and derivative (D)
controllers and their combination is called as PID controller. The PID controllers
have been used successfully in the industry for a long time.
In order to understand and design an FLC, the operation and characteristic
properties of the classical PID controller should be understood first. An operational
block diagram of a classical feedback control system including the actuator, as
well, is given in Figure 4.9.
The system output y(t) is measured and fed back to a summer located at the
input side of the controller. The summer acts as a comparator to compare the actual
output y(t) with the desired reference input r(t). The difference between the refer-
ence and the actual output is the error signal defined as in (4.18) and compensated
by the controller so that the output tracks the reference input with a zero or mini-
mum steady-state error. In the human decision process, the error signal is calculated
in mind by observing and comparing the output variable with the reference in mind.
The controller generates a control signal u(t), which drives the physical system
to be controlled. In a human decision case, the control signal is determined by the
human expert using his/her ability and experience on the subject. Depending upon
188 Fuzzy logic control in energy systems, 2nd edition
u u
r V
V
t
ω on
g
g
C
V
V t
V
T
ω
J
L R a
V
b
the physical system the signal u(t) may be used directly to drive the system or it
may be used by actuators, which are additional devices or drives used to drive the
main physical system, which is called plant in control system theory. The actuators,
for example, in the human driver’s case are the arms, hands, and feet. In most cases,
the control signal u(t) is used as a triggering signal to open a gateway for larger
quantities to flow through the gate with the amount determined by the control
signal u(t). A more detailed representation of the actuator and the plant is given in
Figure 4.10. A PMDC motor speed control system is depicted in Figure 4.10. The
control signal u(t) is used by the actuator in order to adjust the voltage va(t) applied
to the PMDC motor. The actuator in Figure 4.10 is a simple controlled DC chopper,
which is used to obtain an adjustable DC voltage from the input DC voltage. The
DC chopper has an electronic switch such as a thyristor, a GTO, or a MOSFET
Fuzzy logic controller (FLC) 189
u u
V
Example 4.7
A PMDC motor is represented by its state-space model equations as given in
(E4.7a). Replace the “DC Motor” block in Figure 4.12 with the state-space model
equations and simulate the feedback control system shown in Figure 4.12.
2 3 2 R K e 3 21 3
dia a
0
6 dt 7 6 La La 7 ia þ 6 La 7 va
¼
4 dw 5 4 K bm 5 wm 4 1 5 TL (E4.7a)
m t
0
dt Jm Jm Jm
where the load torque TL may be a constant or a polynomial equation to represent a
fan-type load as
TL ¼ k0 þ k1 wm þ k2 w2m (E4.7b)
The nominal voltage, current, and speed of the PMDC motor are given as Va = 36 V,
Ia = 15 A, and Nn = 3400 rpm, respectively. The no-load current is INL = 1.62 A and
the other parameters of PMDC motor and PI controller are given as follows:
Electrical parameters: Ra = 1.4 W, La = 0.008 H Ke = 0.095 V s/rad.
Mechanical parameters: bm = 4.5 103 Nm s, Jm = 1.5 104 kg m2 and Kt =
0.095 Nm/A.
Load torque: TL = 0.5 Nm.
Controller: KP = 0.001 and KI = 0.15.
Answer 4.7
The simulation algorithm of the PMDC motor speed control system can be con-
structed from reference input to system output in the same order shown in
Figure 4.12. Assume that initially, the DC motor is standing still and the output
speed is zero. Therefore, the error as the input to the controller is nonzero and equal
to the reference speed input at the starting instant. The controller generates an
output u(t), which is multiplied by V in the actuator block to yield he adjusted
voltage u0(t) to be applied to the motor. V in the actuator block is the maximum
voltage that can be applied to the motor. The control signal u(t) acts as a scaling
factor and changes the value of u0(t) from 0 to V. Due to starting error signal a
nonzero u0(t) is generated to operate the motor. Once the motor starts rotating, the
speed will not be zero anymore and the error signal will be reduced as a result of
Fuzzy logic controller (FLC) 191
(4.18). A MATLAB code and resultant speed responses are given in Figures E4.7
(a) and E4.7(b).
The simulation started with a reference speed of 1000 rpm and increased by
30% after some time while the system was operating at a steady state. Then the
reference speed was dropped down starting value of 1000 rpm after reaching and
operating at a steady state again. These step changes in reference input are done to
see the performance of the controller in terms of how the output speed is tracking
the reference. The controller shows a good performance so the step input tracking
is good.
The same control system can be simulated in Simulink as given in Figure E4.7(c).
It should be noted that the block diagram shown in Figure 4.12 can be represented
almost with the same view in Simulink. Both MATLAB and Simulink are using rad
and rad/s in mathematical calculations. Therefore, the reference and motor speed are
converted from rpm to rad/s before the simulation and then converted from rad/s to
rpm after the simulation. These conversions are done because the expression of the
speed s rpm is more common and understandable in industry and system operators.
The simulation model of the PMDC model to be used in MATLAB and
Simulink will be discussed in the next chapter along with the modeling methods of
electrical, mechanical, and electromechanical systems.
Example 4.7 is given to understand the dynamic behaviors of a second-order
electromechanical system. Let us think that the control signal u(t) is adjusted by a
human operator manually so that the operator uses a potentiometer to obtain a
voltage from 0 to 1 V, which is used to generate pulses for the chopper drive
system. Similar to the automatic controller, the human operator increases and
decreases the control signal u(t) manually to increase and decrease the speed such
that these increments and decrements may be in large or small steps. If the response
is away from the reference the incremental change becomes larger. If the response
is closer to the reference then the incremental changes become smaller. Instead of
the system output response, similar actions can be done according to the error
192 Fuzzy logic control in energy systems, 2nd edition
Figure E4.7(b) MATLAB .m file code for the speed control of a PMDC motor
Fuzzy logic controller (FLC) 193
Figure E4.7(c) Simulink model of the speed control of the PMDC motor
Figure 4.13 Error signals of the first- and second-order systems for a step input
signal. In this case, the incremental changes in the control signal u(t) become larger
if the error is large and smaller if the error is getting closer to zero. Therefore, the
time response of the control error and its derivation are usually used as two input
parameters to carry the decision process and actions of the human operator to the
FLC. Since the error response includes the information about system output, it is
used as a bridge connecting the system’s input to the output over a set of linguistic
fuzzy rules.
A linear time-invariant (LTI) system can be represented in different ways such
as state-space model, transfer functions, simulation diagrams, signal flow graphs,
and differential equations, which are mostly in first, second, or higher order. A
more detailed discussion of the mathematical modeling of the physical systems for
simulation purposes is given in Chapter 5. However, in order to derive the fuzzy
rules from system behaviors, typical dynamic responses in time domain are
reviewed in this section. The error response given in Figure 4.8 is redrawn in
Figure 4.13 for various responses to the error. In order to make decisions about the
size of step changes in the control signal, the deviation of the error is required. For
example, the smaller deviations mean that the error is getting closer to zero or its
steady-state value. Therefore, smaller steps should be given to increase or decrease
194 Fuzzy logic control in energy systems, 2nd edition
Figure 4.14 e-de space represents the time responses of error and change in error
the control input signal. The deviation of the error signal is used to determine the
step size of the control signal while the error signal determines the sign of the
change in the control signal. Figure 4.14 depicts a plot of the error versus the
change in error in order to see the boundaries and the support sets of both signals.
Figure 4.14 represents e-de space and is used as a design space for the fuzzy logic
system.
The time responses of error signals can be used to represent information
related to the system output behavior. As the error signals approach zero the
output signals move toward the reference set point. Depending on the perfor-
mances of the controllers used, the error signals may or may not become zero.
The dynamic responses of error signals in a controlled system will be sufficient to
derive the control rules since it contains the necessary information about the
output. Therefore, the error signals shown in Figure 4.13 are used as the source of
information for constructing the rule base systems for FLC. These signals may
represent any type of control error with a step-type reference input. In fact, the
error signal of a control system with a ramp input will not be much different than
that given in Figure 4.13 in spite of the differences between the outputs of the
systems with step and ramp inputs.
In a control system, the human operator makes necessary adjustments fast or
slowly by looking at the system output. A fast action, a high change in magnitude,
is required if the output is away from the target, i.e., the error is large, while a
slower action, a small change in magnitude, may be enough for the output closer to
the reference target. Therefore, information about the amount of change in error
signal over a sampling period is also required. A plot of the time variation of error
versus the time variation of its change is given in Figure 4.14, which can be used to
obtain this information.
The values of error, e, and its change, de, start with larger values and
terminate at the origin or near the origin in a controlled system. As given
in Figure 4.14, the values of e and de from the first-order system lie only in
Fuzzy logic controller (FLC) 195
where KI is the integral constant, T is the sampling period, and e(k) is the integrated
signal. The change du(k) on the output of an integrator becomes zero when the
input e(k) is zero. Therefore, the output of an integrator retains the previous value.
Hence, (4.26) can be used for simulating an integrator. The difference between an
integrator and an FLC is the method that is used to obtain du(k), which is obtained
using (4.27) for an integrator, and fuzzy processor for the FLC.
196 Fuzzy logic control in energy systems, 2nd edition
x y z
x y z
x y z
having some initial rules. A rule construction process will be given next to show a
way of constructing the rules.
system with a zero steady-state error? What could be the action taken by the
operator at each region of the error response? Does he/she give an increase or a
decrease to the control signal depending on the values of e(k) and de(k) in the
regions?
The fuzzy rules represent the knowledge and abilities of a human operator who
makes necessary adjustments to operate the system with minimum error and fast
response. In order to model the actions that a human operator would decide whether
the change, du(k), at the output of the fuzzy processor should increase or decrease
the control signal according to the error e(k) and its change de(k). It is necessary to
observe the behaviors of the error signal e(k) and its change de(k) on different
operating regions, as shown by the Roman numbers in Figure 4.16. The output du
(k) from the FLC is the change that is required to increase or decrease the overall
control action to the controlled system. Therefore, the signs of e(k) and de(k) are
used to determine the signs of du(k), which determines whether the overall control
signal is to be increased. The sign of du(k) should be positive if u(k) is required to
be increased and it should be negative otherwise.
Step input responses of reference r(k), actual system output y(k), control error
e(k), and change in error de(k) are given in Figure 4.16 for an oscillatory second-
order system. Since the magnitude of the error change de(k) is much smaller than
e(k) and the others, it was multiplied by 10 in order to make it visible in the figure.
Now, let us look at closely to each region and see what an operator is supposed to
do to have a zero steady-state error.
At region I: e(k) is “+” and de(k) is “.” The error is positive and its change is
negative, which means that the error is decreasing toward zero.
Therefore, the control input u(k) should be increased so that the
decrement of error toward zero becomes faster. In order to
increase the value of u(k), du(k) should be “+.”
At region II: e(k) is zero and de(k) is “.” The error is zero, but its change is
negative. This means that the control signal u(k) is higher than
the required value and must be reduced. Otherwise, the error will
be negative and continue to get away from zero. The error
becomes negative when the output y(k) becomes greater than the
reference r(k). Therefore, control input u(k) should be reduced by
generating a negative “” du(k).
At region III: Both e(k) and de(k) are negative “.” The error is negative and
continues to be more negative. That means that the overshoot is
increasing. Something must be done to reduce the control signal
u(k) so that the overshoot and error will be smaller or brought to
zero. Therefore, du(k) must have a negative “” sign.
At region IV: e(k) is negative “” and de(k) is positive “+.” The error is still
negative, but getting toward zero because of positive de(k). The
overshoot is also decreasing. In order to make this decrement
faster, the control signal u(k) should be reduced again.
Therefore, du(k) is kept negative “.”
Fuzzy logic controller (FLC) 199
At region V: e(k) is zero and de(k) is “+.” The error is zero, but its change is
positive. This means that the control signal u(k) is smaller than
the required value and must be increased. Otherwise, the error
will be positive and keep increasing in a positive direction. The
error continues to be positive with a larger magnitude and the
output y(k) becomes smaller than the reference r(k). Therefore,
control input u(k) should be increased by generating a positive
“+” du(k).
At region VI: Both e(k) and de(k) are negative “+.” The error is positive and
increases in a positive direction. That means that the output y(k)
is under the reference r(k) and needs to be increased. The
control signal u(k) must be increased to increase y(k) so that the
error will be smaller or brought to zero. Therefore, du(k) must
be positive “+.”
At region VII: This is a repeat of region I with smaller magnitudes.
At region XIII: e(k) is positive “+” and de(k) is zero “0.” The error is positive
and constant since there is no change. This means that the
oscillations are over or very small. However, the output is
smaller than the reference and the control signal u(k) needs to be
increased. Therefore, a positive “+” value for du(k) should be
assigned.
At region IX: e(k) is negative “” and de(k) is zero “0.” The error is negative
and constant since there is no change. This means that the
oscillations are over or very small. However, the output is
greater than the reference and the control signal u(k) needs to be
reduced. Therefore, a negative “” value for du(k) should be
assigned to decrease the error.
At region X: Both e(k) and de(k) are zero “0.” The error is zero and not
changing anymore. Therefore, du(k) is set to zero since no
change is required for the control signal u(k).
As stated in previous sections, the error e(k) and its change de(k) are two crisp
inputs to the fuzzy processor, and du(k) is the crisp output. The sign assignment of
du(k) is done using the signs of e(k) and de(k) in all 10 regions. Therefore, the fuzzy
rule base system should be designed correctly so that the sign assignments of du(k)
are done properly and reflect the signs of e(k) and de(k). The sign assignments of du
(k) are summarized in Table 4.1.
An analysis of Table 4.1 shows that the du(k) takes the sign of e(k) as long as
e(k) is not zero and it takes the sign of de(k) if e(k) is zero. This conclusion can be
expressed as in (4.30).
If eðkÞ is Zero then duðkÞ takes the sign of deðkÞ
(4.30)
else duðkÞ takes the sign of eðkÞ
Table 4.1 shows that each one of e(k), de(k), and du(k) has three different
options for the signs to be assigned. They are either positive or negative if not zero.
200 Fuzzy logic control in energy systems, 2nd edition
Table 4.1 The sign assignments of du(k) for basic control actions
Operating regions
e(k) de(k)
Therefore, the universes of error, change in error, and change in control signal can
be partitioned into three categories negative (N), zero (Z), and positive (P), initi-
ally. Keeping in mind these three options, an initial rule decision table with nine
rules can be formed as shown in Table 4.2 using the expression (4.30).
Representing the input crisp variables e(k) and de(k) by three fuzzy sets, P, N,
and Z means that these input spaces are partitioned into three fuzzy regions each
yielding a fuzzy output space with nine rules maximum as given in Table 4.2. A
nine-rule fuzzy decision table may be sufficient for some applications. However,
many applications require more rules than nine. In order to construct a fuzzy rule
decision table with more than nine rules, the input spaces must be partitioned into
more than three regions each. For example, the linguistic variable negative can be
partitioned into subcategories as negative small (NS) and negative big (NB).
Similarly the term positive can have subcategories as positive small (PS) and
positive big (PB). Using the subset zero (ZE) besides these four subsets, there will
be five fuzzy subsets defined in the universes of e(k) and de(k). Therefore, a 5 5
decision space is obtained for du(k) at the output as given in Table 4.3.
The output space u(k) is partitioned into five subcategories as it is done for the
input spaces e(k) and de(k). The sign of du(k) is determined from the signs of e(k)
and de(k) according to (4.30). Besides the signs, the subsets in the input spaces are
also reflected in the output space. For example, if e(k) is PBe then du(k) is PBdu, if e
(k) is NSe, then du(k) is PSdu. If e(k) is ZEe and de(k) is NSde, then du(k) is NSdu.
The fuzzy rule table given in Table 4.3 can be expanded to a 49-rule table by
adding fuzzy subsets of negative medium (NM) and positive medium (PM) into
negative and positive sections of e(k) and de(k). After obtaining these initial rule
tables, they are modified to fit the problem or application where the rule table is
going to be used. Too many methods have been proposed and studied in the
Fuzzy logic controller (FLC) 201
literature. Some of these studies on fuzzy rule generation and construction can be
found in [33–39].
Now let us look at Table 4.3 more closely. The decision space defined in the
universe of du(k) has five fuzzy subsets as NBdu, NSdu, ZEdu, PSdu, and PBdu similar to
the fuzzy subsets defined in the universes e(k) and de(k). However, while the fuzzy
subset zero stands as a separator between negative and positive fuzzy subsets in the
universes e(k) and de(k), the negative and positive fuzzy subsets are mixed and border
each other without a zero separator between them. Therefore, the initial fuzzy rule
table given in Table 4.3 should be modified so that a zero fuzzy subset separate
positives and negatives. Table 4.2 shows that the upper right part is mostly positive
and the lower left part is mostly negative. Therefore, a fuzzy zero separator can be
placed on the main diagonal of Tables 4.2 and 4.3. If zero fuzzy subsets are placed on
the main diagonals, these rule tables become as in Tables 4.4 and 4.5.
e(k) de(k)
e(k) de(k)
e(k) de(k)
The zero diagonal in Table 7.5 is separating positives and negatives from each
other. However, two fuzzy subsets, PSdu at line 2 column 1, and NSdu at line 4
column 5, are breaking this rule. Therefore, these two fuzzy subsets should be
changed to proper fuzzy subsets. Since they are next to zero diagonal, just a sign
change corrects the table as in Table 4.6.
Macvicar-Whelan has shown the importance of having a symmetrical fuzzy
rule table for man–machine interaction [40]. The symmetrical fuzzy rule table can
be used as a generalized rule table that works for many applications with small
changes. In order to have a generalized fuzzy rule base system let us convert
Table 4.6 to a symmetrical one. Since the universes of e(k) and de(k) are partitioned
into fuzzy subsets in the order of NB, NS, ZE, PS, and PB, let us use the same order
in the output space du(k) and put the fuzzy subsets into the same order from the
lower left corner to the upper right corner as shown in Table 4.7, which can be
extended to a 49-rule table by including the fuzzy subsets negative medium (NM)
and positive medium (PM) as in Table 4.8.
The universes e(k) and de(k) are partitioned into the same number of fuzzy
subsets in Tables 4.2–4.8. Both universes have three, five, or seven fuzzy subsets,
e(k) de(k)
e(k) de(k)
NBde NSde ZEde PSde PBde
PBe ZEdu PSdu PSdu PBdu PBdu
PSe NSdu ZEdu PSdu PSdu PBdu
ZEe NSdu NSdu ZEdu PSdu PSdu
NSe NBdu NSdu NSdu ZEdu PSdu
NBe NBdu NBdu NSdu NSdu ZEdu
Fuzzy logic controller (FLC) 203
e(k) de(k)
NBde NSde ZEde PSde PBde PBde PBde
PBe ZEdu PSdu PSdu PMdu PMdu PBdu PBdu
PSe NSdu ZEdu PSdu PSdu PMdu PMdu PBdu
ZEe NSdu NSdu ZEdu PSdu PSdu PMdu PMdu
NSe NMdu NSdu NSdu ZEdu PSdu PSdu PMdu
NBe NMdu NMdu NSdu NSdu ZEdu PSdu PSdu
NBe NBdu NMdu NMdu NSdu NSdu ZEdu PSdu
NBe NBdu NBdu NMdu NMdu NSdu NSdu ZEdu
resulting in a square output space with nine, 25, or 49 rules. The number of the
fuzzy subsets in the universes of e(k) and de(k) do not have to be equal and the
output space does not have to be square, neither. Therefore, the output space may
be a square or a perpendicular. Whatever the size of the output space is, the
number of active rules is small and four in most of the cases. The number of
active rules is determined by the interaction of the neighboring fuzzy subsets in
the same universe. In other words, the number of active rules is related to the
inclusion of the crisp inputs in the fuzzy subsets of the crisp input universes. For
example, if e(k) has non-zero membership value in two fuzzy subsets and de(k)
has two nonzero membership values in two fuzzy subsets, then there will be four
active rules in the output space.
Figure 4.18 Crisp input space, fuzzification, and fuzzy weightings in an FLC
smaller sampling period gives smaller de(k) values. However, the plot of e(k)
versus de(k) depicts everything to set the boundaries. A point (e(k), de(k)) is
marked in the input space in Figure 4.18 for the values of e(k) = 0.16 and de(k) =
0.006. With this given value, e(k) has nonzero membership degrees in fuzzy
subsets PSe and PMe, while de(k) has the membership nonzero membership values
in the fuzzy subsets NBde and NSde. Using the given parameters of the triangular
fuzzy subsets in Figure 2.5, the related membership values are obtained as shown in
Figure 4.18 and written as
mPSe ðeÞ ¼ triangle01mð0; 0:1; 0:2; 0:16Þ ¼ 0:4
mPMe ðeÞ ¼ triangle01mð0:1; 0:2; 0:3; 0:16Þ ¼ 0:6
(4.31)
mNBde ðdeÞ ¼ triangle01mð0:01; 0:01; 0:005; 0:006Þ ¼ 0:2
mNSde ðdeÞ ¼ triangle01mð0:01; 0:005; 0:0; 0:006Þ ¼ 0:8
These membership values are the outputs of the fuzzification process. They are
used in fuzzy rule-based systems to obtain related consequences of the rules as the
weighting factors, which are used in the output universe du(k) as rule scaling fac-
tors. The resulting weighting factors from each rule are given in the upper left
corner of Figure 4.18. Before proceeding more, let us generate the rule base for the
system shown in Figure 4.18. Since the number of the subsets in the universes of e
(k) and de(k) are six and five, respectively, a rule base with 30 rules can be gen-
erated as in Table 4.9.
206 Fuzzy logic control in energy systems, 2nd edition
e(k) de(k)
NBde NSde ZEde PSde PBde
PBe PSdu PSdu PBdu PBdu PBdu
PMe ZEdu PSdu PSdu PBdu PBdu
PSe NSdu ZEdu PSdu PSdu PBdu
ZEe NSdu NSdu ZEdu PSdu PSdu
NSe NBdu NSdu NSdu ZEdu PSdu
NMe NBdu NBdu NSdu NSdu ZEdu
e(k) de(k)
NBde NSde
PMe ZEdu PSdu
PSe NSdu ZEdu
where the fuzzy subsets defined in the universe of du are represented by triangular fuzzy
membership functions as NBdu = triangle(1, 1, 0.5), NSdu = triangle(1, 0.5,
0.0), ZEdu = triangle (0.5, 0, 0.5), PSdu = triangle(0, 0.5, 1), PBdu = triangle(0.5, 1, 1).
The crisp input e(k) = 0.16 has membership values in the fuzzy subsets PSe and PMe
as mPSe(e) = 0.4 and mPMe(e) = 0.6, respectively. Therefore, the active rules will be on the
rows corresponding to PSe and PMe. The crisp input de(k) = 0.006 has membership
values in the fuzzy subsets NBde and NSde as mNBde(de) = 0.2 and mNSde(de) = 0.8,
respectively. Therefore, the active rules will be on the columns corresponding to NBde
and NSde. The active rules will be on the cross-section of PSe and PMe with NBde and
NSde as shown in Table 4.10. There will be four active rules and four resulting weighting
factors, which are shown in the upper left corner of Figure 4.18.
The linguistic expressions of the active rules are written as in (4.32), which yields
the weighting factors for the consequent fuzzy subsets in the output space as in (4.33).
If eðkÞ is PMe and deðkÞ is NBde then duðkÞ is ZEdu
else if eðkÞ is PMe and deðkÞ is NSde then duðkÞ is PSdu
else if eðkÞ is PSe and deðkÞ is NBde then duðkÞ is NSdu (4.32)
else if eðkÞ is PSe and deðkÞ is NSde then duðkÞ is ZEdu
else duðkÞ is ZEdu
Fuzzy logic controller (FLC) 207
w21 ¼ mZEdu ðduÞ ¼ min½mPMe ðeÞ; mNBde ðdeÞ ¼ minð0:6; 0:8Þ ¼ 0:6
w22 ¼ mPSdu ðduÞ ¼ min½mPMe ðeÞ; mNSde ðdeÞ ¼ minð0:6; 0:2Þ ¼ 0:2
(4.33)
w31 ¼ mNSdu ðduÞ ¼ min½mPSe ðeÞ; mNBde ðdeÞ ¼ minð0:4; 0:8Þ ¼ 0:4
w32 ¼ mZEdu ðduÞ ¼ min½mPSe ðeÞ; mNSde ðdeÞ ¼ minð0:4; 0:2Þ ¼ 0:2
Then the final crisp output is obtained after the defuzzification using the center
of area method.
P
n
wnm ðduÞ DUnm
i¼1
duðkÞ ¼ P
n (4.34)
wnm ðduÞ
i¼1
The final conclusion is the change in control input signal u(k). Therefore, du(k) is
added to the previous value of u(k) to obtain the new control signal. Since du(k) is
obtained as a negative value, then du(k) will be reduced by the amount of 0.0833.
Example 4.8
The principle diagram of a radar tracking system to be used in this example is
shown in Figure E4.8(a). The system consists of a radar, a radar receiver, an
amplifier, and a permanent magnet direct current (PMDC) motor. The motor and
the radar are coupled together over a gear system. The radar is supposed to track the
car passing by. Two angles, qRd and qC, which represent the radar position and the
car location axes, respectively, are determined by the radar system. These two
inputs from the radar are then used by the controller to generate a control signal
which is amplified and applied to the motor.
The difference between the car position axis and the radar axis is defined as the
tracking error signal to be compensated and is obtained as
eðtÞ ¼ qC ðtÞ qRd ðtÞ (E4.8a)
As long as the error signal e(t) is not zero, then, the amplified value Va of the
controlled signal u is applied to the motor. The motor accelerates until it catches
the moving car. If the radar axis overlaps the car axis and they are synchronized, the
208 Fuzzy logic control in energy systems, 2nd edition
C u u0
error becomes zero. When this condition is satisfied, the changes in both angles
must be equal to each other for a zero steady-state error operation.
dqC dqRd
¼ while qC ¼ qRd (E4.8b)
dt dt
The angle qC representing the car position is the reference input to the controller. It
is assumed that the radar can be rotated between 0 and 180 . Therefore, the
reference angle is also varied from 0 to 180 . The control block diagram of the
system studied is given in Figure E4.8(b) where only the blocks of the system
components are shown.
Although the mathematical model of the physical system to be controlled is not
needed in real-time fuzzy logic-based control systems, one is needed here since the
system is to be simulated. Therefore, the simulation diagram of the radar system
comprising the PMDC motor and the gears is obtained as in Figure E4.8(c).
The methods for obtaining a dynamic model of physical systems are discussed in
Chapter 5.
Fuzzy logic controller (FLC) 209
a a
a m m m m
a m Rd
t
a m
m m
m
The state-space model of the PMDC motor is written below for armature
current speed from Figure E4.8(c).
2 R ke 3 21 3
a
0
i_ a 6 La L 7 ia 6 La 7 va
¼4 k Bm 5 wm þ 4
a
1 5 TL (E4.8c)
w_ m t
0
Jm Jm Jm
where wm and ia are the motor speed and the motor armature current, respectively.
The rotor position angle qm and radar position angle qRd are obtained by integrating
the speed wm and considering the turn ratio NG of the gear system as
ð
qm ¼ wm ðtÞdt (E4.8d)
As can be seen in Figure E4.8(b), the signal u is the controlled input to the
system, and it is determined by the controller. This signal is multiplied by the
nominal voltage Va of the motor to determine the applied voltage u0 to
the motor.
Assume that the position angle of the moving object varies between 0 and
180 (or 0 and p rad) with respect to the position angle of the radar system, the
error between these two position angles may vary from p to +p rad. It is also
assumed that the car position angle varies from 0 to p rad in 4 s.
Use the following PMDC motor data and turns ratio of the gears and design an
FLC for the radar tracking system described above.
Ra = resistance of armature winding = 1.4 Ohm
La = inductance of armature winding = 0.0805 H
Ke = voltage constant = 0.095 V s/rad
Kt = torque constant = 0.095 Nm/A.
Jm = moment of inertia = 0.0007432 kg m2
Bm = viscous constant = 0.000431 Nm s.
Va = Nominal armature voltage = 36 V
N = Turns ratio of the gears = 2.67
210 Fuzzy logic control in energy systems, 2nd edition
Answer 4.8
The design process of the FLC for the given problem should start with some
decisions such as the structure of the FLC, the fuzzy rules, and the types of fuzzy
membership functions used to represent the fuzzy subsets. Let us make the fol-
lowing selections.
l Use the FLC structure shown in Figure 4.15.
l Use the fuzzy rule table given by Table 4.7.
l Use sinusoid membership functions defined in (2.23) and given in Figure E2.5(a).
The fuzzy rule table given by Table 4.7 includes 25 rules because the universes of e
(k) and de(k) are partitioned into five fuzzy subsets as negative big (NB), negative
small (NS), zero (ZZ), positive small (PS), and positive big (PB). These fuzzy
subsets are represented by sine functions for all universes of e, de, and du in this
example using the function in Figure E2.5(a).
Since the position angle of the moving object varies between 0 and p rad with
respect to the position angle of the radar system, the error between these two position
angles may vary from p to +p rad. Therefore, the minimum and the maximum
limits of the universe of error, e, are taken as emin = p rad and emax = + p rad,
respectively. After simulating the system without any controllers, it can be observed
that the change in error is very small compared to the error depending on the sam-
pling time. Therefore, the minimum and the maximum limits of the error change are
assigned as demin = emin/50 rad and demax = emax/50 rad, in order to make the changes
in error more effective in terms of the controller. The minimum and the maximum
values of the change in control signal are 1 and +1, respectively. Besides,
MATLAB uses radians in mathematical calculations. Therefore, data related to
position angles should be in radians. The locations of the fuzzy subsets in the uni-
verses of e(k), de(k), and du(k) are shown in Figure E4.8(d).
The sinusoid-type membership functions representing the fuzzy subsets men-
tioned above are evenly spaced in related universes as depicted in Figure E4.8(e).
Figure E4.8(d) Fuzzy subsets defined in the universes of e(k), de(k) and du(k)
Fuzzy logic controller (FLC) 211
Figure E4.8(f) The definition of the universes of car and radar position angles
After this point, the design process of the FLC will be given by MATLAB
codes and their explanations. Therefore, let us enter the data first. Figure E4.8(f)
shows the input data for the plant, the system to be controlled. In order to generalize
the solution, the raw data is converted to state-space model data by constructing A,
B, C, and D matrices and U input matrix. Then starting time and sampling period
are given. The iteration counter k is set to 1. The initial values of all variables are
set to zero.
When the simulation is started, the radar position axis and the car axis might
be anywhere in the space defined in the interval {y1, y2} = {0, 180} in degrees or
{Y1, Y2} = {0, p} in radians. The definition of the operation area is given in
Figure E4.8(f). Assume that the car position axis is at 0 and mowing up to 180 in
4 s. The radar position axis might be anywhere between 0 and 180 and assumed
to be in the midpoint as being Y2/2, which is converted to radians as TETAM0.
In the next step, the input parameters of the fuzzy subsets used in FLC are
entered. Upper and lower boundaries of error e(k), its change de(k), and control
input change du(k) are entered as EMAX, EMIN, DEMAX, DEMIN, DUMAX, and
DUMIN. Then these three universes are partitioned into five subsets as negative big
212 Fuzzy logic control in energy systems, 2nd edition
(NB), negative small (NS), zero (ZE), positive small (PS), and positive big (PB) for
the error e, error change de, and control input change du as given in Figure E4.8(g).
In the bottom part of Figure E4.8(g), the initial values of the variables e(k), de(k),
and du(k) are entered.
The rule table can be entered as a membership matrix consisting of the values
of du(k) such that
mNBdu ðduÞ ¼ mNSdu ðduÞ ¼ mZZdu ðduÞ ¼ mPSdu ðduÞ ¼¼ mPBdu ðduÞ ¼ 1
(E4.8e)
where the crisp values of NBDU, NSDU, ZZDU, PSDU, and PBDU are defined in
Figure E4.8(g). These values correspond to the crisp values du(k) with the mem-
bership value of 1.0. In other words, these crisp values correspond to the peak
points of the sinusoid fuzzy subsets and can be considered as their addresses in the
universe of du. The membership matrix is shown in Figure E4.8(h). The number of
Figure E4.8(g) The definition of the universes of car and radar position angles
rows and columns of the rule matrix is determined as DUR and DUC to be used in
the latter parts of the simulation.
Since all definitions, initials, and required data are entered, the simulation loop
can be started. The beginning of this loop is given in Figure E4.8(i). The loop will
continue to iterative simulation as long as the simulation time t0 is smaller than the
end time tend.
The first two lines in the loop are used to limit the values of error e(k) and its
change de(k) in order to keep these values between the defined lower and upper
boundaries of the related universes. The outputs from the function limiter are the
values of e(k) and de(k) as E and DE for the current sampling instant k. At this
point, the crisp values of two inputs to the fuzzy processor are set and ready to be
fuzzified. Therefore, a MATLAB function sinusoid5.m is used to fuzzify E and DE.
The function sinusoid5 uses the crisp variable, E or DE as the input along with the
parameters of the sinusoid function and fuzzy membership functions, and returns
the fuzzified values of E or DE as FSE or FSDE, respectively. The fuzzified value
FSE contains the membership values of E in the fuzzy subsets NBE, NSE, ZZE,
PSE, and PBE while FSDE includes the membership values of DE in the fuzzy
subsets NBDE, NSDE, ZZDE, PSDE, and PBDE.
After the fuzzification, the rules are to be processed. The rule processing
stage is shown in Figure E4.8(j). Since the weighting factors of the fuzzy sets in
the universe of u are obtained as the minimum of the intercepting fuzzy mem-
bership values of e(k) and de(k) in the related rules, the min operator is used for
each rule to obtain these weightings as FSDU in Figure E4.8(j). Recall from
(4.33) that the numerator of the center of area method is equal to the sum of the
product of the weightings and du corresponding to the peak of the fuzzy
membership function defined as the output decision for the related rule. This
multiplication is represented by DDU in Figure E4.8(j). Then the sum of these
multiplications is obtained as DDUTOP, which is divided by the sum of the
weightings, FSDUTOP, in order to obtain the defuzzified crisp output as given
in Figure E4.8(k). The final defuzzified output from the fuzzy processor is duu,
which corresponds to the change in control signal for the current sampling
instant k.
Since the boundaries of the universe of du are set to as {1, 1}, the value
duu is limited to be in this interval and to yield du for the sampling k. The
change du is added to the previous value U00 of the control signal to obtain the
new control signal UU. The control signal is defined in the interval {0, 1}, and a
limiter function is used to keep it in this interval to yield the control signal U to
be applied to the plant. The actuator, which is assumed to be a chopper is
simulated as in (4.25). The remaining part of the process is almost the same as
in Example 4.7.
The function runge.m is called to solve the PMDC motor equations for the
input voltage U0. Then the variables are updated for the next step to continue the
simulation until the condition of the while loop is over. The last part of the while
loop is given in Figure E4.8(l).
The resultant responses of the moving car and radar positions are depicted in
Figure E4.8(m). The radar axis is assumed to be at 90 initially and start following
the car axis as soon as the car is in the range of the radar starting from 0 . The radar
axis catches and locks the car position axis after a short transient. The error and the
change in error become very small and zero during the first 2–3 s as given in
Figure E4.8(m).
The speed of the car is assumed to be very fast, so it takes 4 s for the car to be
in the range of the radar. If this duration is longer than 4 s, then it will be easier for
the radar to catch and track the car.
Figure E4.8(m) The simulation results of Example 4.8. (a) The time responses of
the car and radar axes and (b) the time responses of the error and
the change in error.
The radar tracking example is selected to test the FLC because the reference is
a ramp. Using a ramp instead of a step function as the reference to be tracked makes
the problem harder. Fuzzy logic-based controllers are used in many different
applications. Some of these application areas will be discussed in the latter chap-
ters. Therefore, more examples are left to the application chapters. Example E4.78
is given to address the operational behavior of an FLC and step-by-step algorithm
code in a MATLAB .m file. The simulation algorithm given in Example E4.8 is
summarized in Figure 4.18.
216 Fuzzy logic control in energy systems, 2nd edition
[40,41]. The first step here is to generate a fuzzy membership function for parti-
tioning the input and output spaces into fuzzy subsets. As given in Figure 4.15, the
process of an FLC can be summarized in four steps: Fuzzification, rule base, fuzzy
reasoning, and defuzzification. Due to its simplicity and linearity, triangular fuzzy
membership functions are used in both fuzzification and defuzzification stages. The
Simulink model of the triangular fuzzy membership function was given in
Figure 2.6 in Chapter 2 and is repeated in Figure 4.19, where x1, x2, and x3 are the
crisp parameters used to define the location and shape of the triangle as given in
Figures 2.4 and 2.5. The input x is the crisp variable whose membership value on
this triangle fuzzy subset is the output m(x) in Figure 4.19.
Let us work on a fuzzy processor with two inputs and one output universe,
which are partitioned into five fuzzy subsets each as shown in Figure 4.20. The
fuzzy subsets defined in Figure 4.20 will be used in Simulink modeling of the FLC.
Therefore, the partitioning and the membership functions used as fuzzy subsets
must be understood well, so that the data points and Simulink blocks can be con-
nected correctly. Assume that the input universes are error, e, and error change, de,
and the output universe is the change du in the control signal. The labeling of the
fuzzy subset parameters are the definition parameters and represent their locations
in the corresponding universe. The universe of X in Figure 4.20 may be universe of
error e or de. Therefore, the subscript x is replaced by e for the universe of e and
replaced by de for the universe of de.
Figure 4.21 The Simulink process of the fuzzification and resulting weightings
Fuzzification stage and the first part of the rule-based fuzzy processing unit of
the FLC are given in Figure 4.21. The crisp inputs e(k) and de(k) are converted to
fuzzy membership values on the fuzzy subsets NB, NS, ZZ, PS, and PB. Each fuzzy
subset (FS) is shown by blocks in Figure 4.19 and represented by a triangular
membership function as described in Figure 4.20. The letters E and DE in
Figure 4.21 are used to indicate whether the elements belong to error, e, or its
change de, respectively.
Fuzzy logic controller (FLC) 219
The Boolean operator “min” is used for the verbal connector “and” to simulate
the input space of the rules that have the structure as in expression (4.35). The input
space of the fuzzy rules used here has two inputs and one output as
If e is A and de is B then du is C: (4.35)
where A, B, and C in (4.35) represent any one of the fuzzy subsets NB, NS, ZZ, PS,
and PB defined in Figure 4.20.
The input spaces in (4.35) are in the part represented by the expression (e is A
and de is B). Therefore, the min operator in Simulink Block Library is used to
model the input spaces of 25 rules used by FLC. The outputs of the “min” operators
are the weighting factors from each rule and they indicate the strength (membership
degree) of the rules in the output space du. The implementation of the rule input
universes by the expression (e is A and de is B) is nothing but the fuzzification of
the two crisp inputs e and de for all the rules. The process of fuzzification of the
input space with 25 rules is shown in Figure 4.21.
The membership degrees obtained as depicted in Figure 4.21 are multiplied by
the crisp values of each corresponding fuzzy subset in the output space du as shown
in Figure 4.22. The crisp values of the fuzzy subsets used in this multiplication
process are the values that have a maximum membership degree of 1.0 in the
corresponding fuzzy subset. In other words, these crisp values indicate the peak
locations of the triangular fuzzy subsets. Actually, this multiplication process
represents the products in the nominator of center of area defuzzification method.
Then the sum of these products is divided by the sum of the weighting factors
obtained as in Figure 4.22, which has two combined blocks called “Fuzzification”
and “Fuzzy Rules and Reasoning.” The inside views of these “Fuzzification” and
“Fuzzy Rules and Reasoning” blocks are shown in Figures 4.21 and 4.22,
respectively.
Simulation model of the center of area method is depicted in Figure 4.23. This
is the final stage of the FLC to generate the required change in the control signal for
the current kth sampling. In order to prevent zero division that causes simulation
problems such as delayed simulation time and simulation hanging, a signal route
has been provided.
A general overlooked view of the FLC Simulink block diagram is given in
Figure 4.24 where the processes from inputs e and de to output du are shown.
The input data blocks representing fuzzy membership functions for the error e,
error change de, and the controlled output change du are shown in Figure 4.24.
The user is able to edit and change the parameters of the membership functions
on this stage without going into the details of the FLC. The definition para-
meters of the fuzzy membership functions are problem-dependable and must be
set accordingly. Once the maximum and minimum values of the inputs and
output signals are assigned, the other subvalues can be placed in between these
limits. If the initial settings are to be used, then some gain blocks can be used to
match the signals with the predefined membership parameters. The difference
between reference and feedback signals is the error signal e and used as the
input variable E to the block called “Fuzzy Reasoning,” whose inside view is
shown in Figure 4.23. The change in error e is obtained as the difference
between two consecutive values of e using a discrete difference block (z1/z).
Fuzzy logic controller (FLC) 221
The error change DE is another input variable signal to the “Fuzzy Reasoning”
block.
The parameters of the universes E, DE, and DU are entered using the blocks
called “E Parameters,” “DE Parameters,” and “DU Parameters” in Figure 4.24. The
reference signal wref is used to determine the upper and lower boundaries of the
input variables E and DE such that + wref is assigned as the upper boundary and
wref is assigned as the lower boundary. A scaling factor 0.1 is used for the output
du. Therefore, the upper and lower boundaries of the change in control signal DU
are set to +1 and 1, respectively.
The Simulink model of the FLC described and explained above has been
represented by a simple block with input and output connection ports so that it can
be inserted into different systems as a fully functioning controller. The model
blocks in Figure 4.24 are combined as a subsystem to obtain a single FLC block
with reference input and feedback signals as the inputs to the block and the control
222 Fuzzy logic control in energy systems, 2nd edition
signal u is the output from the controller. The single FLC block is shown in
Figure 4.25.
The designed FLC block is used to simulate the control of five different
systems namely a PMDC motor speed control system, a PMDC motor-driven
position control system, a radar tracking control system, a synchronous gen-
erator terminal voltage control system, and a two-area load–frequency control
power system. The modeling details of the PMDC motor speed control system
are given in [22,25] as the modeling details for position control and radar
tracking systems are given in [42] and [43], respectively. The modeling details
of the synchronous generator terminal voltage control and two area power sys-
tem load–frequency control systems can be found in [44]. Since the modeling
processes of the systems used here have been done before and given in the
references as just indicated, these modeling details are not repeated here. Five
different controlled systems are simulated using both FLC and PID controllers
for comparison and validation purposes.
Example 4.9
PMDC motor speed control using FLC Simulink model.
MATLAB/Simulink model block diagram of the PMDC motor speed con-
trol system is shown in Figure E4.9(a) and the related simulation results are
given in Figures E4.9(b) and E4.9(c). For the simulation with a PID controller,
the FLC block in Figure E4.9(a) is replaced by a PID controller block with the
proportional gain (KP) set to 0.001, integral gain (KI) set to 0.01, and derivative
gain (KD) set to 0.
The speed control responses from both FL and PID controllers are plotted on
the same graph for better comparison. Although there are some differences during
the transient period of speed, both controllers give almost the same settling time
and steady-state operation by responding to step changes in reference input as
depicted in Figure E4.9(b). However, each controller gives different current
responses during the transients. As depicted in Figure E4.9(c), the current has fewer
ripple magnitudes during the transients with FLC than it has with the PID
controller.
Figure E4.9(a) Using FLC block for PMDC motor speed control
Fuzzy logic controller (FLC) 223
250
Reference
200
150
Speed (rad/s)
100
PID
50
FLC
0
0 10 15
Time (s)
Figure E4.9(b) PMDC motor speed control responses using FL and PID
controllers
Figure E4.9(c) Responses of the PMDC motor speed control system using FL and
PID controllers
224 Fuzzy logic control in energy systems, 2nd edition
Example 4.10
Position control using the FLC Simulink model.
The operational block diagram of the position control system using FLC is
shown in Figure E4.10(a). The FLC block is replaced by a PID controller block
with the parameters set to KP = 0.08, KI = 0.001, and KD = 0 when PID is used.
The simulation results for the position control system are given in
Figures E4.10(b) and E4.10(c), where the differences in transient responses of both
FLC and PID controllers are shown. The position response from FLC seems to be
slower than that obtained with PID when step changes occur in the reference
position input level. However, with the FLC controller, the control signal, motor
voltage; motor current, and motor speeds have considerably reduced magnitudes
during transient periods.
Example 4.11
Radar tracking control using the FLC Simulink model.
The operational Simulink block diagram of the radar tracking system with the
FLC is given in Figure E4.11(a). The simulation results of this system are shown in
Figure E4.11(b) for both FLC and PID controllers. In the radar tracking system, it is
assumed that the radar is tracking moving objects as discussed in Example 4.8, so that
Figure E4.10(a) Using FLC block for PMDC motor-driven position control
Figure E4.10(c) Responses from the position control system using FL and PID
controllers
Figure E4.11(a) Using FLC block for PMDC motor-driven radar control system
226 Fuzzy logic control in energy systems, 2nd edition
after catching the object, the radar then locks and tracks it on a surface with 360
rotating ability. Therefore, the reference input to the radar tracking system is a ramp
input as a function of the simulation time. It is also assumed that the moving object
slows down and speeds up again during the simulation as shown in Figure E4.11(b),
where both FL and PID controllers are tracking the object. However, the FLC has a
better and closer tracking performance even if it has some small oscillations. In order to
simulate the radar tracking system with the PID controller, the FLC block is replaced
by a PID block with the parameters set to KP = 1.1, KI = 0.8, and KD = 0.
The proposed FLC block for the MATLAB/Simulink environment is also validated
by simulating two power system examples from [43]. These examples are originally
simulated in [43] using PID controllers, which are replaced by the proposed FLC here in
order to show the simplicity of using the FLC block as a simple controller that can be
inserted in a system model just like it is done with the classical PID controllers.
Example 4.12
Power system voltage control using the FLC Simulink model.
One of the power system control examples is an automatic voltage regulator
(AVR) control system used to keep the terminal voltage of the synchronous gen-
erators constant. The block diagram of the FL-based voltage control system is
given in Figure E4.12(a). The block diagram representing the voltage control sys-
tem of a synchronous generator is adapted from [44]. The PID block with the
parameters, KP = 1, KI = 0.25, and KD = 0.28 in the original block diagram in [44] is
replaced by the FLC as shown in Figure E4.12(a). The FLC results in a slower
transient response for the system used as shown in Figure E4.12(b). However, both
controllers give the same steady-state operating response.
Fuzzy logic controller (FLC) 227
1.2
Reference
PID
Terminal Voltage (pu)
0.8
FLC
0.6
0.4
0.2
0
0 2 4 6 8 10 12 14 16 18 20
Time (s)
Example 4.13
Two-area automatic generation control (AGC) system using FLC Simulink model.
The second power system control example is a two-area AGC based on load–
frequency control two areas, which is also taken from [44] for comparison. The PID
controller with the parameters KP = 0, KI = 0.3, and KD = 0, is replaced by the FLC
as shown in Figure E4.13(a), yielding the simulation results given in Figure E4.13(b)
where the FLC responses for both areas have less oscillations and shorter
settling time.
Actually, it should be noted that the comparison made here is not given to
show which controller is better. The comparison is given to show that the proposed
FLC model for MATLAB/Simulink environment works and gives acceptable
results without redesigning it for each separate system.
228 Fuzzy logic control in energy systems, 2nd edition
0.01
Frequency Change (pu)
–0.005
Area 1
–0.01
–0.015
0 5 10 15 20 25 30 35 40
Time (s)
× 10–3
5
Frequency Change (pu)
With PID
0
–5
Area 2
–10
Area 1
–15
0 5 10 15 20 25 30 35 40
Time (s)
the fuzzy rules, the FLC is capable of handling different types of systems with
different orders. The rule table is formed in such a way that the table itself becomes
fuzzy with a zero main diagonal separating positive and negative fuzzy rules that
are also partitioned into sub-fuzzy rules among themselves. The approach is used to
generate a generalized FLC Simulink block that can be used in different types of
system control schemes by just inserting the block to the model of the system to be
controlled. The generated FLC block requires only small gain adjustments to be
adapted for different systems. In order to validate the developed FLC model, five
different systems, which are a PMDC speed control system, a position control
system, a radar tracking system, a voltage regulator system, and a two-area load–
frequency control system, are controlled using the proposed FLC and the results are
compared with those obtained using PID controllers. The results from five simu-
lations showed good and acceptable performances for the FLC. The purpose here is
not to compare the FLC with PID to see which one gives better performance but to
observe whether the FLC gives acceptable results as a PID controller does.
Therefore, the comparisons are not focused on observing which one gives better
response. However, it was observed that the FLC gives lower transient magnitudes
in some system variables such as current and input voltage as in position and speed
control systems.
4.10 Problems
P4.1 Assume that the fuzzy rules in Example 4.4 are redefined for the same pro-
blem and given below in the forms of verbal statements, which are repre-
sented by Table P4.1.
Rule 1: If sunlight is low and wind is low then use utility
Rule 2: Else if sunlight is low and wind is medium then use utility
Rule 3: Else if sunlight is low and wind is high then use WES
Rule 4: Else if sunlight is medium and wind is low then use Utility
Rule 5: Else if sunlight is medium and wind is medium then use PES
and WES
Rule 6: Else if sunlight is medium and wind is high then use WES
Rule 7: Else if sunlight is high and wind is low then use PES
Rule 8: Else if sunlight is high and wind is medium then use PES
Rule 9: Else if sunlight is high and wind is high then use WES
LW MW HW
LPV U U WES
MPV U PES + WES WES
HPV PES PES WEs
230 Fuzzy logic control in energy systems, 2nd edition
The fuzzy subsets low (LPV), medium (MPV) and high (HPV) in the
universe of PV, and the fuzzy subsets low (LW), medium (MW), and high
(HW) in the universe of wind are represented by triangular fuzzy subsets and
defined as follows. If solar irradiation level and wind speed are 80 mW/cm2
and 15 m/s, respectively, find the decision of this energy management sys-
tem using a proper fuzzy decision algorithm.
P4.2 Assume that a rule base system with nine rules (3 3) is generated in
Problem P3.18 in Chapter 3 and the following four rules are active for a
sampling instant such that the error and change in error are measured to be
e = 0.5 and e = 0.2, respectively. Obtain the change in the voltage applied to
the heater using a proper fuzzy reasoning approach.
R1 : If e is NE and ce is ZCE then cv is NCV
R2 : else if e is NE and ce is PCE then cv is NCV
R3 : else if e is ZE and ce is ZCE then cv is ZCV
R4 : else if e is ZE and ce is PCE then cv is PCV
P4.3 Two input and one output crisp spaces are defined in the universes X, Y, and
Z, respectively, in the interval {0, 10} as in Problem P3.16 in Chapter 3. The
relation between the input and output spaces is described by four rules, which
are given below.
Rule 1: If x is small and y is small then z is large
Rule 2: If x is small and y is medium then z is big
Rule 3: If x is medium and y is small then z is small
Rule 4: If x is medium and y is medium then z is small
where the fuzzy subsets small, medium, and big are described in Problem
P3.16. If the crisp data from the input spaces are given as x = 1.5 and y = 3,
find the crisp output z by using the following reasoning methods in the fuzzy
processor.
(a) Mamdani fuzzy reasoning.
(b) Tsukamoto fuzzy reasoning.
P4.4 A room heating process was described in Problem P3.18 and asked to gen-
erate a series of fuzzy rules for the process. Assume that a rule-based system
with nine rules is generated and the following four rules are active for the
given crisp inputs E = 0.5 and CE = 0.2. Obtain the crisp consequent z by
using Mamdani fuzzy reasoning.
Rule 1: If E is NE and CE is ZCE then CV is NCV
Rule 2: If E is NE and CE is PCE then CV is NCV
Rule 3: If E is ZE and CE is ZCE then CV is ZCV
Rule 4: If E is ZE and CE is PCE then CV is PCV
P4.5 The final fuzzy conclusion of a fuzzy processor is shown in Figure P4.5. This
conclusion is obtained as the union of the individual consequences from each rule
at sampling k. The shaded areas depict the effectiveness of the related rules and
output fuzzy subsets, which are defined by the parameters shown in Figure P4.5.
Fuzzy logic controller (FLC) 231
where NS is used for negative small, ZE is used for zero. PS, PM, and PB
stand for positive small, positive medium, and positive big, respectively. Use
a defuzzification algorithm and obtain the final conclusion as a crisp output.
P4.6 Two fuzzy rules are described as
Rule 1: if x is cold and y is negative then z1 = p1x + q1y + r1.
Rule 2: if x is hot and y is zero then z2 = p2x + q2y + r2.
where the coefficients are given as p1 = 1, q1 = 1.5, r1 = 1, p2 = 1, q2 =
2, and r2 = 1. The fuzzy subsets cold (C), warm (W), and hot (H) in the
universe of temperature and negative (N), zero (Z), and positive (P) in the
interval {0, 1} are defined by parametrized triangular fuzzy membership
functions as in Figure 2.5 and given in Table P4.6.
The input variables to this system are given as A(0, 5, 10) and B(0, 0.5, 1),
where A and B are fuzzy subsets and represented by triangular-type fuzzy
membership functions with the parameters given in the parenthesis. Fuzzy set
A is defined in the universe of temperature and fuzzy set B is defined in the
interval {0, 1}. Obtain the final consequence of these two rule systems using
the TS fuzzy reasoning algorithm.
232 Fuzzy logic control in energy systems, 2nd edition
Caution: Since the inputs are fuzzy, the conclusion will not be just a single
crisp number but a series of numbers defined in an interval in the output space
Z. Example 4.3 in [15] will be helpful for the solution of this problem.
P4.7 The required electrical power in an industrial plant is supplied from wind
(WE), solar PV, and fuel cells (FC) systems besides the national electricity
distribution system, i.e., the utility. The wind, PV, and FC power generating
systems belong to the company, which owns the industrial plant, too.
Therefore, the company develops an energy management system as given
below in order to minimize the use of electrical power from the utility grid.
R1: If PV is sufficient and WE is insufficient and FC is empty then use PV.
R2: If PV is sufficient and WE is insufficient and FC is full then use PV
and FC.
R3: If PV is insufficient and WE is insufficient and FC is empty then use
utility.
R4: If PV is insufficient and WE is sufficient and FC is empty then use WE.
R5: If PV is insufficient and WE is sufficient and FC is full then use WE.
R6: If PV is insufficient and WE is insufficient and FC is full then use FC
and utility.
R7: If PV is sufficient and WE is sufficient and FC is empty then use PV
and WE.
The power required to charge the FC system is also considered as a part of
the load in an industrial plant. The Fuzzy expressions sufficient (SU),
insufficient (IS), full (FU), empty (EM), and use (U) used in the rules are
defined in their crisp universes as in Figures P4.7(a) and P4.7(b).
If the solar irradiation level for PV system is 80 mW/cm2, the wind speed is
15 m/s and the fuel cell is 40% full, then how the required power to the
industrial plant is supplied?
P4.8 The power in alternating current power systems is a complex quantity called
as complex power with real and imaginary components. The real component
is called active power, which is the one converted to useful energy by elec-
trical machines and devices. The reactive component is usually required for
magnetizing and dissipated by reactors. Since the reactive power can be
generated by capacitors, its transmission is not needed. Therefore, the
Figure P4.7(a) The input universes and fuzzy subsets defined in these universes
Fuzzy logic controller (FLC) 233
Figure P4.7(b) The output universe and output fuzzy subset use
reactive power is supplied by capacitors near the load and its transmission is
minimized in order to reduce the transmission losses. Due to minimized
reactive power, the active power component of the transmitted complex
power becomes close to the complex power.
The amount of the active power as one of the components of the complex
power is determined by a factor called power factor and represented by cosf,
which is defined in the interval [0, 1]. In order to minimize the transmission
losses in power systems, the power factor is kept closer to 1, such as around
0.95. In order to keep the power factor of the transmitted power around 0.95,
capacitors are connected at the end of the power transmission line. However,
if the capacitive value of the capacitors connected at the end of the line is
greater than the required amount, the voltage at the bus where the capacitors
are connected increases resulting in unwanted events. Therefore, the power
system operator increases or decreases the number of capacitors according to
the values of the bus voltage and the power factor of the transmitted power
using a decision process given in Table P4.8(a).
where the crisp fuzzy subsets used in the rules are represented by triangular
fuzzy membership functions with the parameters given in Table P4.8(b).
The abbreviations NC, ZC and PC are used for negative, zero, and positive
changes. The measurement devices in the power management center show
that the power factor of the transmitted power is cosf = 0.90 and the change
in bus voltage is 5%.
(a) Determine the active rules in Table P4.8(a).
(b) Defuzzify the crisp inputs and obtain the related membership values.
(c) Determine the weighting factor from each rule.
(d) Determine the final fuzzy conclusion
(e) Determine the final crisp conclusions.
(f) Determine the amount of capacitors to be switched on or switched off.
P4.9 The input data to a fuzzy decision maker is categorized as low (L), normal
(N), and high (H), which are used to reach a decision. For example, the fuzzy
decision maker (FDM) is used to generate a decision about the amount of
detergent in a washing machine depending upon the darkness in the color of
output water and washing time.
Assume that the universe of water darkness and the universe of washing
time in minutes are partitioned into subcategories as follows:
Water darkness: NW (0%, 0%, 50%), LW (0%, 50%, 100%), and HW
(50%, 100%, 100%).
The washing time: LT (0, 0, 10), NT (0, 10, 30), and HT (30, 60, 60).
Create a MATLAB .m file in order to perform the following:
(a) Plot the fuzzy subsets on input universes water darkness and washing time.
(b) Assume that the darkness of water color is 60% and the washing time is
set to 20 min. Fuzzify these crisp inputs and obtain fuzzy values of them.
P4.10 Assume that the decision maker described in P4.9 is using the rule base
system given in Table P4.10(a) in order to determine the amount of deter-
gent to be filled in the detergent box of a washing machine.
Fuzzy logic controller (FLC) 235
Table P4.10(b) Preset time durations for water darkness in a washing machine
where the fuzzy subsets zero (ZE), one quarter (OQRT), half (HLF), three
quarter (TQRT), and full (FLL) are also represented by triangular-type fuzzy
subsets with the parameters given as
ZE (0%, 0%, 25%),
OQRT (0%, 25%, 50%),
HLF (25%, 50%, 75%),
TQRT (50%, 75%, 100%), and
FLL (75%, 100%, 100%)
Full means that the detergent box is full. Assume that the darkness of water
color is 60% and the washing time is set to 15 min.
(a) Apply Mamdani’s Fuzzy Reasoning algorithm to amount of the deter-
gent using hand calculation.
(b) Write a MATLAB .m file to simulate Mamdani’s Fuzzy Reasoning
algorithm and obtain the crisp decisions for data given in Table P4.10(b).
P4.11 In a water filling station, the tanks are filled manually such that the valve is
fully open (100%) when the tank is empty, half open (50%) when the tank is
half full, and closed (0%) when the tank is full. Representation of the valve
opening and water level in the tank by fuzzy membership functions are
described in Table P4.11(a).
(a) Partition the universe of water level into subsets using triangular mem-
bership functions as described in Table P4.11(a) and plot them in
MATLAB.
(b) Partition the universe of valve opening into subsets using triangular
membership functions as described in Table P4.11(a) and plot them in
MATLAB.
236 Fuzzy logic control in energy systems, 2nd edition
k 1 2 3 4 5 6 7 8 9 10 11 12
y(k) 0 0.1 0.3 0.6 0.9 1 1.1 1.05 0.98 1 1 1
(c) Write a single input–single output fuzzy reasoning algorithm (FRA) and
a set of rules for the operation of this system based upon the description
given in the question part.
(d) Construct a fuzzy processor and obtain the amount of the valve opening
if the tank is full about 20%. Use center of area method for defuzzifi-
cation when needed.
P4.12 An input signal of 100 units is applied to a physical system at the instant of
t = 0 s and the output is measured with a sampling period of 0.01 s.
The measured outputs at each sampling k are listed in Table P4.12.
(a) Obtain a rule-based system with 25 rules using the system behavior
given in Table P4.12(a).
(b) Design a fuzzy logic controller for this system.
(c) Obtain the change du(k) as the output from the FLC for k = 4 using the
rule base you have designed in (a).
Guidance: The following order of processes will be helpful for the solution. Find
e(k) and de(k) for every sampling and add them to Table P4.12 as two new
rows. Then use the approach described in Section 4.7.1.
P4.13 Fuzzy sets defined in the universes of error e and error change de in a
room temperature control system are given below. The room temperature
increases linearly with the inversing heater voltage and decreases linearly
with decreasing heater voltage. Assume that the error e has a response like
the one a second-order system has for 0 < z < 1.
(a) Develop a 3 3 = 9 rule base system.
(b) Define the control signal change du in an interval of {1, 1} and par-
tition this universe into three fuzzy subsets.
(c) Assume that the rules given below are the active rules for e(k) = 0 and de
(k) = 2, and obtain the crisp output du of an FLC using the COA method
for defuzzification.
Fuzzy logic controller (FLC) 237
k 1 2 3 4
e(k) 2.4 1.25 1.1 0
de(k) 1.3 0.2 0 0
238 Fuzzy logic control in energy systems, 2nd edition
e(k) de(k)
NBde NSde ZEde PSde PBde
PBe ZEdu PSdu PSdu PBdu PBdu
PSe NSdu ZEdu PSdu PSdu PBdu
ZEe NSdu NSdu ZEdu PSdu PSdu
NSe NBdu NSdu NSdu ZEdu PSdu
NBe NBdu NBdu NSdu NSdu ZEdu
References
[1] Zadeh L.A. ‘Fuzzy sets’, Information and Control. 1965;8(3):338–353.
[2] Mamdani E.H. ‘Application of fuzzy algorithms for control of simple
dynamic plant’, IEE Proceedings. 1974;121(12):1585–1588.
[3] Mamdani E.H. and Assilian S. ‘An experiment in linguistic synthesis with a
fuzzy logic controller’, International Journal Man–Machine Studies. 1975;7
(1): 1–13.
[4] Mamdani E.H. ‘Advances in the linguistic synthesis of fuzzy controllers’,
International Journal Man–Machine Studies. 1976;8(6):669–678.
[5] Bernard J.A. ‘Use of a rule based system for process control’, IEEE Control
Systems Magazine. 1988;8(5):3–13.
[6] Li Y.F. and Lau C.C. ‘Development of fuzzy algorithms for servo systems’,
IEEE Control Systems Magazine. 1989;9(3):65–72.
[7] Takagi T. and Sugeno M. ‘Fuzzy identification of systems and its applica-
tions to modeling and control’, IEEE Transactions on Systems, Man, and
Cybernetics. 1985;15(1):116–132.
[8] Wong L.K., Leung F.H.F. and Tam P.K.S. ‘Design of fuzzy logic controllers
for Takagi–Sugeno fuzzy model based system with guaranteed performance’,
International Journal of Approximate Reasoning. 2002;30(1):41–55.
[9] Tanaka K. and Sano M. ‘A robust stabilization problem of fuzzy control
systems and its application to backing up control of a truck-trailer’, IEEE
Transactions on Fuzzy Systems. 1994;2(2):119–134.
[10] Tanaka K., Ikeda T. and Wang H.O, ‘Robust stabilization of a class of
uncertain nonlinear systems via fuzzy control: quadratic stabilizability, H1
control theory, and linear matrix inequalities’, IEEE Transactions on Fuzzy
Systems. 1996;4(1):1–13.
240 Fuzzy logic control in energy systems, 2nd edition
[11] Wang H.O., Tanaka K. and Griffin M.F. ‘An approach to fuzzy control of
nonlinear systems: stability and design issues’, IEEE Transactions on Fuzzy
Systems. 1996;4(1):14–23.
[12] Zeng W., Zhao Y. and Yin Q. ‘Sugeno fuzzy inference algorithm and its
application in epicentral intensity prediction’, Applied Mathematical Mod-
elling. 2016;40(13):6501–6508.
[13] Roubos J.A., Mollov S., Babuska R. and Verbruggen H.B. ‘Fuzzy model-
based predictive control using Takagi–Sugeno models’, International Jour-
nal of Approximate Reasoning. 1999;22(1):3–30.
[14] Jang J.S.R. ‘ANFIS: Adaptive-network-based fuzzy inference system’, IEEE
Transactions on Systems, Man, and Cybernetics. 1993;23(3):665–685.
[15] Jang J.S.R., Sun C.T. and Mizutani E. Neuro-Fuzzy and Soft Computing: A
Computational Approach to Learning and Machine Intelligence. Englewood
Cliffs, NJ: Prentice-Hall; 1996.
[16] Tsukamoto Y. ‘An approach to fuzzy reasoning method’, in Gupta M.M.,
Ragade R.K. and Yager R.R. (eds.). Advances in Fuzzy Set Theory and
Application. Amsterdam: North-Holland; 1979. pp. 137–149.
[17] Maiers J. and Sherif Y.S. ‘Applications of fuzzy set theory’, IEEE Trans-
actions on Systems, Man, and Cybernetics. 1985;15 (1):175–189.
[18] Zadeh L.A. ‘Outline of a new approach to the analysis of complex systems
and decision processes’, IEEE Transactions on Systems, Man, and Cyber-
netics. 1973;3(1):28–44.
[19] Lee C.C. ‘Fuzzy logic in control systems: fuzzy logic controller I’ IEEE
Transactions on Systems, Man, and Cybernetics. 1990;20(2):404–418.
[20] Lee C.C. ‘Fuzzy logic in control systems: fuzzy logic controller II’ IEEE
Transactions on Systems, Man, and Cybernetics. 1990;20(2):419–435.
[21] Altas I. H. and Sharaf A.M. ‘A fuzzy logic power tracking controller for a
photovoltaic energy conversion scheme’, Electric Power Systems Research
Journal. 1992;25(3):227–238.
[22] Eminoglu I. and Altas I. H. ‘A method to form fuzzy logic control rules for a
PMDC motor drive system’, Electric Power Systems Research. 1996;39
(2):81–87.
[23] Altas I.H. ‘Stabilization of a two-link robot manipulator using fuzzy logic’,
The Proceedings of the 3rd International Mechatronic Design and Modeling
Workshop; Ankara, Turkey, September 1997. pp. 41–51.
[24] Altas I.H. and Sharaf A.M. ‘A novel fuzzy logic controller for maximum
power extraction from a PV array driving a three-phase induction motor’, 7th
Mediterranean Electrotechnical Conference (MELECON’94); Antalya,
Turkey, April 1994, pp. 853–856.
[25] Altas I.H. ‘The effects of fuzziness in fuzzy logic controllers’, 2nd Interna-
tional Symposium on Intelligent Manufacturing Systems; Sakarya, Turkey,
August 1998, pp. 211–220.
[26] Altas I. H. and Kruse R. ‘A Fuzzy Logic Controlled Tracking System For
Moving Targets’, 12th IEEE International Symposium on Intelligent Control,
ISIC’97, July 16–18 1997, Istanbul, Turkey, pp. 43–48.
Fuzzy logic controller (FLC) 241
[27] Herrera F., Lozano M. and Verdegay J. L. Generating fuzzy rules from
examples using genetic algorithms. Technical Report #DECSAI-93115,
Department of Computer Science and Artificial Intelligence, University of
Granada, Spain; 1993.
[28] Klawonn F. and Keller A. ‘Fuzzy clustering and fuzzy rules’, Proceedings of
the 7th International Fuzzy Systems Association World Congress; Prague,
Czech Republic, June 1997, vol.1, pp. 193–198.
[29] Gonzalez A. and Perez R. ‘A learning system of fuzzy control rules based on
genetic algorithms’, in Herrera F. and Verdegay J.L. (eds.). Genetic Algorithms
and Soft Computing. Heidelberg: Physica-Verlag. 1996;8:202–225.
[30] Hugo E.M. and Du Plessis J.J. ‘Automated multi-mode fuzzy logic controller
design’, Proceedings of the IEEE International Symposium on Intelligent
Control; Mexico City, September 2001, pp. 376–382.
[31] Lai Y.S. and Lin J.C. ‘New hybrid fuzzy controller for direct torque control
induction motor drives’, IEEE Transaction Power Electronics. 2003;18
(5):1211–1219.
[32] Soucy M. and Payeur P. ‘Flexible fuzzy logic control for collision-free
manipulator operation’, IEEE International Conference on Mechatronics
and Automation; 2005, vol. 2, pp. 723–728.
[33] Ren Y., Chai X., Xing T. and Chen X. ‘Fuzzy rule representation and
knowledge base construction in expert system’, International Conference on
Intelligent Systems and Knowledge Engineering (ISKE); Hangzhou, China,
November 2010. pp. 106–110.
[34] Taniguchi T., Tanaka K., Ohtake H. and Wang H.O. ‘Model construction,
rule reduction, and robust compensation for generalized form of Takagi–
Sugeno fuzzy systems’, IEEE Transactions on Fuzzy Systems. 2001;9
(4):525–538.
[35] Garcı́a D., González A. and Pérez R. ‘An iterative strategy for feature con-
struction on a fuzzy rule-based learning algorithm’, 11th International Con-
ference on Intelligent Systems Design and Applications (ISDA); Cordoba,
Spain, November 2011. pp. 1235–1240.
[36] Cervinka O. ‘Construction of fuzzy rule base using hinging hyperplanes
algorithm from training data’, 1996 Biennial Conference of the North
American Fuzzy Information Processing Society, NAFIPS; Berkeley, Cali-
fornia, June 1996. pp. 471–475.
[37] Murata T., Ishibuchi H. and Gen M. ‘Construction of fuzzy classification
systems using multiple fuzzy rule tables’, IEEE International Conference on
Systems, Man, and Cybernetics (SMC); Tokyo, Japan, October 1999, vol. 4,
pp. 875–880.
[38] Juang C.F. ‘Construction of dynamic fuzzy if-then rules through genetic
reinforcement learning for temporal problems solving’, Joint 9th IFSA World
Congress and 20th NAFIPS International Conference; Vancouver, BC, July
2001, vol. 4, pp. 2341–2346.
[39] Diaz-Robainas R.R., Huang M.Z. and Zilouchian A. ‘Fuzzy identification
with clustering methods of rules’ construction’, Proceedings of IEEE
242 Fuzzy logic control in energy systems, 2nd edition
5.1 Introduction
It was stated in the previous chapter that fuzzy logic controllers do not need
mathematical models of the systems to be controlled. That is correct. The design
process of FLCs does not require mathematical models of the physical systems
because the input–output relation is sufficient without knowing the interior
structure and mathematical models. However, in order to simulate the fuzzy
logic-controlled physical systems, their mathematical models are required. In the
simulation of an FLC-controlled system, the mathematical model of the plant is
combined with the FLC algorithm. Therefore, the mathematical model of the
physical systems is required not for designing FLCs but for simulating the FLC
combined physical systems. The mathematical model of a system is the basis for
all control system analysis and design methods in classical feedback control
systems. A detailed model allows some verification of the performance of the
control system through simulation before it is implemented in the actual system.
The system models appear either as physical models or mathematical models.
The physical models are usually scaled or analog types. The mathematical models are
obtained by using analytical or experimental-based methods and solved by proper
numerical solution methods such as Euler integration or Runge–Kutta algorithms
given in Section 5.6. During the modeling process the basic physical properties,
physical laws and input–output data relations are used. Some acceptable assumptions,
approximations, and model reductions are applied to get an accurate enough model.
The mathematical modeling of physical systems and solution methods for control
purposes is addressed in this chapter. Although there are many software such as
MATLAB/Simulink to obtain the solutions of the model equations, Euler’s
244 Fuzzy logic control in energy systems, 2nd edition
integration and Runge–Kutta algorithm are explained in the final section of this
chapter. This numerical solution method of linear time-invariant (LTI) differential
equations will be helpful to those who want to develop his/her own solution tool.
u(t) y(t)
where a is a constant gain, u is the input and y is the output. Block diagram
representations and input–output relations of linear, nonlinear, and integral gains
are shown graphically in Figures 5.3–5.5 assuming that a = 3, f(u) = sin(u) and the
inputs are assigned as u1 = t for t < 3 and u1 = 0 otherwise, u2 = 2p/20 and u3 = 1
for t < 1 and u3 = 0 otherwise.
Simulation diagram is one of the methods used to represent the mathematical
models of the systems. They give a clear and detailed pictorial view of the model.
They are looked over like a map to see the paths, blocks, intersections, joining in
and departing out nodes. The simplest elements of the simulation diagrams are the
gain blocks, connecting paths, summers, departing nodes, and input–output nodes.
The gain blocks are linear gain, nonlinear gain, and integral gain blocks as shown in
Figures 5.3–5.5. The paths are unidirectional lines with an arrow head showing the
signal flow direction.
Digital simulation of an integrator is done using different approaches such as
Euler’s method, trapezoid method, and Simpson’s rule. Due to its simple algorithm
u1(t) y1(t)
3u 1
y 1= =t
u1
u1=0
Figure 5.3 Simple block, .m file, and input–output response of linear gain
System modeling and control 247
Figure 5.4 Simple block, .m file, and input–output response of nonlinear gain
u3(t) y3(t)
Figure 5.5 Simple block, .m file, and input–output response of integral gain
and faster speed, Euler’s method given in (5.4) is preferred for the simulation of
control systems.
yðkÞ ¼ yðk 1Þ þ TuðkÞ (5.4)
where T is the sampling period, u(k) input signal to be integrated, y(k–1) is the
value of output y from the previous sample and it is called the initial value for k = 1,
and y(k) is the new value of the output y for the kth sample. Actually, an indefinite
integrator can be separated into two parts. Assume that the input signal u(t) is to be
integrated from any time in the past, such as from to ? a finite time t in the future
as written in (5.5).
ð ðt
yðtÞ ¼ uðtÞdt ¼ uðtÞdt (5.5)
1
248 Fuzzy logic control in energy systems, 2nd edition
Example 5.1
Simulate the series-connected RL circuit shown in Figure 5.9 in MATLAB/
Simulink and observe the responses of the signals at the input and output of the
static and dynamic elements. The numerical values are given as v(t) = 50 V, R = 5
Ohm, and L = 2 H.
Answer 5.1
Detailed simulation diagram shown in Figure 5.9 represents the mathematical model
of the series-connected RL circuit shown in Figure 5.7. The mathematical model
equation of this system is obtained as the first-order LTI differential equation given by
(5.13). Both Equation (5.13) and the simulation diagram in Figure 5.9 are two different
ways of representing the series RL circuit. The simulation diagram given in Figure 5.9
can be constructed in Simulink easily with the same look as shown in Figure E5.1(a).
The current flowing through the inductor in Figure 5.7 is equal to the signal at
the output of the integrator in Figures 5.9 and E5.1(a). The signal at the input side
of the integrator is the derivation of current. The input and output signals of the
integrator are given in Figure E5.1(b). As depicted in this figure, the integrator
output, which is the current, reaches a steady-state value of 10 A and remains
constant while the integrator input signal is zero. The integrator is a dynamic ele-
ment and keeps remembering the last output before the input becomes zero. The
magnitude of di(t)/dt is scaled down to half in Figure E5.1(b) in order to make the
graphs more visible. The gain blocks 1/L and R in Figures 5.9 and E5.1(a) are static
blocks and their inputs are multiplied by constant gains to yield the outputs. It is
clearly understood that zero inputs to these static blocks result in zero outputs.
L.(di/dt) di/dt
50 + i
– 1/2 1/s
v Summer Scope
Integrator
1/L
Current
Ri
5 To Workspace
R
15
10
0
0 1 2 3 4
Time (s)
Figure E5.1(b) The input and output signals of the integrator for Example 5.1
System modeling and control 251
This example shows that the integrator remembers the last output from the
nonzero input case and keeps giving it as long as the simulation continues. Due to its
memory, the integrator is considered as a dynamic element and very useful in
automatic control systems because of this property. Since a controller generates the
control input signal from the error, the integral controller keeps generating a constant
control input signal when the error becomes zero. Recall that the final control input
signal from the fuzzy logic controller is obtained by adding the change in control
signal to the control signal value from the previous sampling as given by (4.26).
diðtÞ
vL ðtÞ ¼ L (5.15)
dt
ð
1
vC ðtÞ ¼ R iðtÞdt (5.16)
C
These three basic equations are used to model the passive electrical networks
and systems. The individual equations of each component are combined depending
on the connection diagram. Kirchhoff’s voltage law is applied to write the mesh
equations if there are a series of connected elements. And Kirchhoff’s current law
is applied to write the node equations if there are parallel connections.
The representation of electrical system modeling in different forms will be
shown through examples.
Example 5.2
An RC electrical circuit is shown in Figure E5.2(a). Assume that vi(t) is the input
and vO(t) = vC(t) is the output in this circuit, which represent a low pass filter.
Answer 5.2
(a) Integro-differential equations
The circuit diagram is used to derive the integro-differential equations. Let
us write the mesh equations using Kirchhoff’s voltage law as
vi ðtÞ ¼ vR þ vC (E5.2a)
C
i
The left side of (E5.2c) is equal to the arithmetical sum of two separate
terms. Therefore, a summer is needed to add the terms on the right side so that
the output becomes equal to the term Ri(t) on the left. One of the terms to be
added is the input voltage vi(t) and it is there, ready to be added. The second
term on the right is a product of constant parameter 1/C and the integration of
the current i(t). Therefore, the current i(t) is separated from the term Ri(t) at the
output of the summer, and then integrated. The simulation diagram represent-
ing (E5.2c) is given in Figure E5.2(b).
The output variable of the electrical circuit given in Figure E5.2(a) is the
voltage across the capacitor and defined as
ð
1
vO ðtÞ ¼ iðtÞdt (E5.2d)
C
The output voltage vO(t) is shown at the right end of simulation diagram in
Figure E5.2(b).
(c) Transfer function
The Laplace transformation of (E5.2b) yields (E5.2e) for zero initial values.
1
Vi ðsÞ ¼ RIðsÞ þ IðsÞ (E5.2e)
Cs
Cs
IðsÞ ¼ Vi ðsÞ (E5.2f)
RCs þ 1
Ri idt
R C
Figure E5.2(b) Simulation diagram of the low pass filter given in Figure E5.2(a)
254 Fuzzy logic control in energy systems, 2nd edition
1
VO ðsÞ ¼ IðsÞ (E5.2g)
Cs
VO ðsÞ 1
¼ (E5.2i)
Vi ðsÞ RCs þ 1
VO ðsÞ 1
¼ (E5.2j)
Vi ðsÞ 2 10006 s þ 1
Vi(s) V0(s)
RCs+1
Figure E5.2(c) Transfer function block diagram of the low pass filter
Scope
50 + Ri i vo
– 1/2 1/s 1/1000e-6
vi Summer V0(s)
Integrator
1/R 1/C vo
To Workspace
R L C
v(t) i(t)
Example 5.3
A series-connected RLC circuit is shown in Figure E5.3(a). Assume that applied
voltage v(t) is input and current i(t) flowing through the circuit is the output.
Obtain the following mathematical models to represent input–output relation
of this circuit.
(a) Integro-differential equations
(b) Simulation diagram
(c) State-space equations
(d) Transfer function
(e) Block diagram
Answer 5.3
(a) Integro-differential equations
The circuit diagram is used to derive the integro-differential equations. Let
us write the mesh equations using Kirchhoff’s voltage law as
vðtÞ ¼ vR ðtÞ þ vL ðtÞ þ vC ðtÞ (E5.3a)
Resistance (R), inductance (L), and capacitance (C) are three basic elements
of this electrical circuit and their voltage equations are given in (5.14), (5.15),
256 Fuzzy logic control in energy systems, 2nd edition
L i(t) idt
v(t)
L
R
L i(t) idt
v(t)
L
R
It is an easy task to obtain the state-space model equations from the simu-
lation diagram. To do this, assign a variable at the output of each integrator.
The input side of the integrator will be the derivation of that variable. Then,
just write the state equation from the simulation diagram and put it in a
matrix form.
The following equations can be written directly from Figure E5.3(c):
1 R 1
x_ 1 ðtÞ ¼ vðtÞ x1 ðtÞ x2 ðtÞ (E5.3d)
L L LC
x_ 2 ðtÞ ¼ x1 ðtÞ (E5.3e)
where x1(t) = i(t) and x2(t) = integration of i(t). Then the state-space equations
can be written in matrix format.
" R #
1 "1#
x_ 1 ðtÞ x1 ðtÞ
¼ L LC x2 ðtÞ þ L uðtÞ (E5.3g)
x_ 2 ðtÞ 1 0 0
x ðtÞ
yðtÞ ¼ ½ 1 0 1 (E5.3h)
x2 ðtÞ
where u(t) = v(t). The state-space model equations have a well-known form of
abbreviation as given in (E5.3i), which is very useful to be used in MATLAB
and Simulink. The abbreviated form of the state-space equations is also useful
in additional manipulations
x_ ðtÞ ¼ AxðtÞ þ BuðtÞ
(E5.3i)
yðtÞ ¼ CxðtÞ þ DuðtÞ
where x_ ðtÞ is called a state vector, x(t) is a vector of state variables, y(t) is the
output variable and u(t) is the input variable. The other input variable w(t) a
disturbance input. A is an n n state matrix, B is the n m input matrix, and D
is the disturbance matrix.
Note that, if the places of x1(t) and x2(t) are switched in Figure E5.3(c), the
state-space equations will be changed. In fact, a physical system may have
many different simulation diagrams, but just one unique transfer function.
258 Fuzzy logic control in energy systems, 2nd edition
Ls Ls
R 1
R
1 Cs
Cs
Ls
C
Figure E5.3(e) The transfer function of series RLC circuit as a single block
diagram
After combining two parallel branches at the bottom of the block diagram on
the left in Figure E5.3(d), the one with negative feedback on the right is
obtained. With a last reduction, the final single block showing the relation
between input and output is obtained as given in Figure E5.3(e). Note that this
final block includes the transfer function of series connected RLC circuit as
given in (E5.3k).
Example 5.4
Use the numerical values v(t) = 50 V, R = 10 Ohm, L = 2 H, and C = 100 F and
simulate the series connected RLC circuit modeled in Example 5.3.
(a) In MATLAB and
(b) In Simulink.
(c) Repeat (a) and (b) by adding an FLC to keep the current constant at a
reference value.
Answer 5.4
a. and c. Simulation and FL control in MATLAB and Simulink
System simulation in MATLAB was given in Examples E4.7 and E4.8. The
same MATLAB codes can be modified and used in this example as well. First, the
system will be simulated without FLC, then the FLC will be added. The .m file
used for the simulation in this example is given in Figure E5.4(a). This simulation
is done without any controller and shows that the circuit current reaches its steady-
state value of 5 A in approximately 1 s. A controller can be designed to control the
circuit current at any reference value between 0 and 5 A. The FLC adapted from [6]
and used in Example E4.8 and the FLC block adapted from [7] and given in
Figure 4.25 are used to control the current of series RLC circuit in MATLAB and
in Simulink, respectively. These simulation codes and block diagram are shown in
Figures E5.4(c) and E5.4(d).
The function runge.m used in the first line of while . . . end loop, is a function
or a subprogram developed by the author using Runge–Kutta algorithm. The
details of the Runge–Kutta algorithm are given in Section 5.6 at the end of this
chapter.
The settling time of the controlled current is longer than it is in the uncontrolled
case. The response can be made faster with the controller. However, faster
response results in overshoot and oscillations in the response.
260 Fuzzy logic control in energy systems, 2nd edition
6
Current (A)
0
0 0.5 1 1.5 2
Time (s)
Figure E5.4(c) MATLAB .m file used to control the circuit current by FLC
262 Fuzzy logic control in energy systems, 2nd edition
1.5
Current (A)
1
0.5
0
0 1 2 3 4 5
Time (sec)
L.(di/dt) di/dt
1/s
1/L
VR=Ri
R
VC
1/s
1/C
4
Magnitude
0
0 0.5 1 1.5 2
Time (sec)
connected RLC circuit. The inside view of the RLC subsystem is depicted by
dashed rectangular in Figure E5.4(e). A DC chopper modeled by (4.27) is used as
an actuator in Figure E5.4(g). Since the output variable to be controlled is the
circuit current, it is used as a negative feedback signal.
System modeling and control 263
2.5
2
Magnitude
1.5
0.5
0
0 1 2 3 4 5
Time (sec)
R C C
R L
v i i v
v
Practice 5.1
Develop a simulation diagram and state-space model for the electrical circuit given
in Figure PRA5.1.
have an overall look at the system structure. As it is shown for the modeling of
electrical systems in the previous part.
The mathematical model of the mechanical systems is derived using the phy-
sical laws, as well. These physical laws are counted as the law of conservation of
mass, the law of conservation of energy, the law of conservation of momentum, and
theoretical laws such as Newton’s law.
The modeling of mechanical systems starts with the schematic diagram, which
is a representation of system’s operational structure showing the input–output
variables and interior parameters. Then the physical laws are applied to drive the
mathematical model equations in the same forms as mentioned in Section 5.3 for
electrical systems.
l Integro-differential equations,
l Simulation diagrams,
l Block diagrams,
l Signal flow graphs,
l Transfer functions, and
l State-space equations.
As mentioned in the previous section for electrical system modeling, simula-
tion diagrams are extensively used in the modeling process of physical systems
including mechanical systems as well. The simulation diagrams are an elegantly
visual way of describing differential equations and seeing or visualizing a problem,
which makes it more understandable. The simulation diagram model involving
only integrators, summers, and coefficient multipliers is called analog computer
representation since they are in a form suitable for analog computer simulation.
Simulation diagrams show how components of a system are connected together
physically without the complication of shafts, gears, dampers, and springs.
Mathematical modeling of mechanical systems for control is categorized into
three parts as linear motion models, rotational motion models, and transformation
models. Similar to the basic elements resistance (R), inductance (L), and capaci-
tance (C), translational mechanical systems also have three basic elements mass
(m), viscous friction (b), and spring (k). In rotational mechanical systems, the mass
(m) is replaced by inertia (J), and the spring is replaced by stiffness (s).
Mathematical modeling of mechanical systems will be discussed in two parts as
linear motion and rotational motion models. More information about the modeling
of mechanical systems can be found in [9–12].
external forces acting on a rigid body must be equal to the rate of change of
momentum, p(t).
dpðtÞ
¼ f ðtÞ (5.17)
dt
The momentum depends on the amount of change in displacement of the mass
m and is expressed as in (5.18)
_
pðtÞ ¼ m€x ðtÞ (5.20)
_
pðtÞ ¼ m_v ðtÞ (5.21)
where a dot over a variable indicates the first derivation and two dots indicate the
second derivation.
Mathematical model equation of a linear motion mechanical system is written
considering either force–displacement or force–velocity relations as given in (5.20)
and (5.21), respectively. Equating (5.17) and (5.20) yields the force–position rela-
tion of mass, m as given in (5.22).
f ðtÞ ¼ m€x ðtÞ (5.22)
where f(t) is the sum of all the forces affecting the mass m. A rigid body, the
mechanical mass, might be placed on a surface horizontally or vertically such that
viscous friction resists the motion by generation a force as long as the mass moves
with a nonzero velocity as shown in Figure 5.10. The viscous friction force always
has a negative effect on the motion and is expressed as in (5.23).
fb ðtÞ ¼ b_x ðtÞ (5.23)
As the mass might be placed on a surface, it might be tied to a fixed steady
point or to another mass horizontally or vertically using a connector that shows a
bj
m m m
b
b bi
mi xi
m
xj mj
mi
mj
spring-like behavior by resisting the motion of the mass as shown in Figure 5.11.
Therefore, this force is called as spring force as defined in (5.24) and always shows
a negative effect on the motion.
fs ðtÞ ¼ kxðtÞ (5.24)
The fixed steady points have a similar meaning as the ground in electrical
systems. They are shown by hashed lines in Figures 5.10 and 5.11.
Spring and viscous friction forces may exist alone or at the same time
depending upon the mechanical system structure and complexity. Figures 5.10
and 11 show some cases of how the viscous friction and spring might be repre-
sented in the schematic diagram of a mechanical system.
Mechanical systems and electrical systems both have three passive linear
components: R, L, and C in electrical and the mass m, the spring k, and friction b in
mechanical systems. Both systems are analogous. Two of the components namely
the mass and the spring are energy storage elements (like inductor L and capacitor
C) and the damper b is energy dissipater like the resistor.
Let us use the simple mechanical scheme given in Figure 5.12 to write the
differential equation for a mass, spring, and damper system. The mechanical sys-
tem scheme has two masses connected to each other by a spring and a damper,
which is considered as viscous friction force.
Let xi and xj be the motion of a bodies mi and mj, respectively. Let ki and bi be
the coefficients of the spring and damper attached to the mass mi.
Then the opposing spring force affecting the motion of mi is written as in (5.25)
and affecting the motion mj is written as in (5.26).
fsi ðtÞ ¼ k xi ðtÞ xj ðtÞ (5.25)
fsj ðtÞ ¼ k xj ðtÞ xi ðtÞ (5.26)
System modeling and control 267
Then the opposing damping force affecting the motions of mi and mj are
written as in (5.27) and (5.28), respectively.
fbi ðtÞ ¼ b x_ i ðtÞ x_ j ðtÞ (5.27)
fbj ðtÞ ¼ b x_ j ðtÞ x_ i ðtÞ (5.28)
Many mechanical systems are analogous to multi-loop and multi-node elec-
trical circuits. For example, assume that two loop currents ii(t) and ij(t) are passing
through a resistance R in the opposite direction. Then consider writing the voltage
across the resistance for loop i and for loop j. The resultant equations will be similar
to those given in (5.25) and (5.26) with k replaced by R, xi by ii, and xj by ij. If the
element is inductor L instead of resistor R, then the resultant equations become
similar to those in (5.27) and (5.28).
Both electrical and mechanical systems are modeled by a set of simultaneous
differential equations and a set of algebraic equations. The number of equations in
electrical systems is equal to the number of independent loops or nodes. In
mechanical systems, the number of equations of motion is equal to the number of
linearly independent motions. Linearly independent motion implies that a point of
motion in a system can still move if all other points of motion are held fixed. A
motion is said to be dependent if it can be expressed as a linear combination of the
other. Usually, the number of linearly independent motions is called the number of
degrees of freedom.
Note the degrees of freedom do not preclude motions that are coupled. For
example in multi-loop circuits, each loop current may depend upon other loop
currents, but if one of the loops is open-circuited, the other loop currents will still
exist if there is a voltage source in that loop. Similarly in a mechanical system with
multi-degrees of freedom, one point of motion can be held while another point of
motion moves under an applied force. Newton’s law of motion is applied to each
inertia element as long as the motion associated with the inertia element is inde-
pendent. In other words, Newton’s law of motion is not applied to an inertia ele-
ment if its motion is linearly dependent on the motion of other inertia elements. The
equation of motion may be obtained by using the principle of superposition.
Consider each mass and obtain its equation of motion using Newton’s law by
assuming all other motions are fixed. If the mass mi is considered, then the equation
of its motion is obtained by assuming that the motion associated with the mass mj is
fixed. Similarly, for the mass mj obtain the equation of its motion assuming that the
motion associated with the mass mi is fixed.
The following steps can be used to obtain a mathematical model of a
mechanical system:
(I) Label input–output and internal variables.
(II) Consider each mass separately.
(III) Identify the cause–effect relationship. The applied force is usually the cause
and motion is the resultant effect.
(IV) Choose a reference direction of motion.
268 Fuzzy logic control in energy systems, 2nd edition
(V) Recall that the spring and damping elements oppose the motion.
(VI) Write Newton’s law with acceleration term to the left and all external forces
to the right.
(VII) Sketch the simulation diagram.
Example 5.5
A single mass with a spring and viscous friction is given in Figure E5.5(a) and (b).
The input force is applied vertically dawn in Figure E5.5(a) and vertically up in
Figure E5.5(b).
Write the motion equations of this system for both figures assuming that
(a) The reference direction is vertically down
(b) The reference direction is vertically up
Answer 5.5
a.1 The reference direction is vertically down for Figure E5.5(a).
Let us follow the design steps given above.
l The input is the applied force fin(t) and the output is the position x(t) in this
system. There is another input force to this system due to gravity. The
gravity force mg occurs naturally and is considered as a disturbance input
to the system. The gravity force may be positive or negative depending on
the reference direction. Since both gravity and reference directions are
downward in this part, the gravity force becomes positive.
l There is only one mass. Therefore, this system has one degree of freedom.
l The applied force fin(t) causes the mass m to accelerate and move with a
displacement x in meters. Direction of the applied force is downward,
which is the reference direction. Therefore, the applied force is considered
positive according to the reference direction.
l The spring and damping elements always oppose to the motion. So, the
forces caused by the spring and damper will be negative.
fs ðtÞ ¼ kxðtÞ (E5.5a)
fb ðtÞ ¼ b_x ðtÞ (E5.5b)
b m b m
Figure E5.5 The single mass system for Example 5.5. (a) Applied force is
downward (b) applied force is upward.
System modeling and control 269
l The motion equation can be written as in (E5.5c) where Newton’s law with
acceleration term is written to the left and all external forces to the right
m€x ðtÞ ¼ þfin ðtÞ þ mg kxðtÞ b_x ðtÞ (E5.5c)
l The reference direction is vertically down for Figure E5.5(b).
The reference direction is still the same. However, the input force is
applied vertically up in the opposite direction of the reference. Therefore,
the sign of the applied force is negative now resulting in a motion equa-
tion as in (E5.5d).
m€x ðtÞ ¼ fin ðtÞ þ mg kxðtÞ b_x ðtÞ (E5.5d)
b.1 The reference direction is vertically up for Figure E5.5(a).
The reference direction is vertically up, the applied force is vertically
down, the gravity force is naturally vertically down and the forces caused
by the spring and damper are always negative. All forces in this condition
are opposing to the reference. Therefore, the motion equation is written as
in (E5.5e).
Example 5.6
A two-mass system is given in Figure E5.6. The input forces f1(t) and f2(t) are
applied vertically dawn. The direction of the applied forces is also assumed to be
the reference direction. Write the motion equations of this system.
Answer 5.6
The system in this example is a two-mass system with two degrees of freedom.
Therefore, two motion equations can be written for this system by applying
Newton’s law to both systems separately.
The motion equation of the mass m1:
m1€x 1 ¼ f1 þ m1 g k1 x1 b1 x_ 1 k2 ðx1 x2 Þ (E5.6a)
The motion equation of the mass m2:
m2€x 2 ¼ f2 þ m2 g k2 ðx2 x1 Þ (E5.6b)
270 Fuzzy logic control in energy systems, 2nd edition
b1
m1
b2 m2
Example 5.7
A linear motion system with one mass is given in Figure E5.7(a). The input force fin
is applied to move the system. The direction of the applied force is also assumed to
be the reference direction.
(a) Write the motion equations of this system.
(b) Draw a simulation diagram for this system, and
(c) Write state-space equations of this system.
Answer 5.7
In this system, a rigid body with a mass m is moved linearly by applying a force fin.
While the body m is moving a viscous friction b shows a resistance to the motion.
Therefore, the friction effect is considered as a resisting force with a negative effect
on the motion. Since one of the ends of the rotational shaft is fixed, this end has a
spring k, which also resists the motion. It is clear that both spring and frictional forces
are negative being independent from the reference and applied force directions.
(a) Let us write the motion equations of this system.
m€x ðtÞ ¼ þfin ðtÞ kxðtÞ b_x ðtÞ (E5.7a)
(b) Let us draw a simulation diagram for this system using the simulation diagram
drawing approach given in Example 5.3. The highest order differential term is
already written on the left in (E5.7a). Force fin (kg) is the input to the system
m
b
m
b
k
and linear displacement x (m) is the output. The first and the second derivations
of the position x are the internal variables and are used to complete the simu-
lation diagram as in Figure E5.7(b), so that (E5.7a) is represented completely.
(c) Let us write state-space equations of this system using the simulation diagram
obtained in Figure E5.7(b).
The following equations can be written directly from Figure E5.7(b).
1 b k
x_ 1 ðtÞ ¼ fin ðtÞ x1 ðtÞ x2 ðtÞ (E5.7b)
m m m
x_ 2 ðtÞ ¼ x1 ðtÞ (E5.7c)
yðtÞ ¼ x2 ðtÞ (E5.7d)
where x1(t) = dx(t)/dt, which is the velocity (m/s) of the system and x2(t) is the
linear displacement x(t) in meters. Then the state-space equations can be written in
matrix format.
" b #
k "1#
x_ 1 ðtÞ x1 ðtÞ
¼ m m x2 ðtÞ þ m uðtÞ (E5.7e)
x_ 2 ðtÞ 1 0 0
x1 ðtÞ
yðtÞ ¼ ½ 0 1 (E5.7f)
x2 ðtÞ
where u(t) = fin(t). A comparison of the simulation diagram and state-space model
equations of this example with those of Example 5.3 is suggested.
Example 5.8
A rotational system with one inertia is given in Figure E5.8(a). The input torque Tin
is applied to rotate the system. The direction of the applied torque is also assumed
to be the reference direction.
272 Fuzzy logic control in energy systems, 2nd edition
s J
b Tin
Tin(t)
J
b
s
Answer 5.8
In this system a rigid body with an inertia J is rotated around an axis by applying a
torque Tin. While body J is rotating viscous friction b shows a resistance to the
rotational motion. Therefore, the friction effect is considered as a resisting torque
with a negative effect on the motion. Since one of the ends of the rotational shaft is
fixed, this end has a stiffness s, which also resists the rotational motion similar to
the spring effect. It is clear that both stiffness and frictional torques are negatively
independent of the reference and applied torque directions.
(a) Let us write the motion equations of this system.
Under these comments, the motion equation for the system described in this
example is written as in (E5.8a).
€ ¼ Tin sq bq_
Jq (E5.8a)
(b) Let us draw a simulation diagram for this system using the simulation diagram
drawing approach given in Example 5.3. The highest order differential term is
already written on the left in (E5.8a). Torque Tin (Nm) is the input to the system
and angular position q (rad) is the output. The first and the second derivations
of the position angle q are the internal variables and are used to complete the
simulation diagram as in Figure E5.8(b), so that (E5.8a) is represented
correctly.
(c) Let us write state-space equations of this system using the simulation diagram
in Figure E5.8(b).
System modeling and control 273
where x1(t) = dq(t)/dt, which is the rotational speed (rad/s) of the system and x2(t) is
the rotational displacement q(t) in radians. Then the state-space equations can be
written in matrix format.
" b #
s "1#
x_ 1 ðtÞ x1 ðtÞ
¼ J J þ J uðtÞ (E5.8e)
x_ 2 ðtÞ 1 0 x2 ðtÞ 0
x1 ðtÞ
yðtÞ ¼ ½ 0 1 (E5.8f)
x2 ðtÞ
where u(t) = Tin(t). A comparison of the simulation diagram and state-space model
equations of this example with those of Examples 5.3 and 5.7 is suggested.
Example 5.9
A rotational system with two inertias is given in Figure E5.9. The input torque Tin is
applied to rotate the system. The direction of the applied torque is also assumed to
be the reference direction. Write the motion equations of this system.
Answer 5.9
In this system, two rigid body with the inertias J1 and J2 are rotated around an axis
by applying a torque Tin. While the bodies with the inertias J1 and J2 are rotating
two viscous frictions b1 and b2 show resistance to the rotational motion. Besides,
two stiffnesses affect the motion in the negative direction. The stiffness s2 is a
common element between two inertias and must be included in the equations of
both motions. Under these comments, the motion equation can be written as in
(E5.9a) and (E5.9b).
€ 1 ¼ b1 q_ 1 s1 q1 s2 ðq1 q2 Þ
J1 q (E5.9a)
€ 2 ¼ b2 q_ 2 s2 ðq2 q1 Þ
J2 q (E5.9b)
s1 J1 s2 J2
b1 b2 Tin
Practice 5.2
Compare the simulation diagrams and state-space model equations of the series-
connected RLC circuit in Example 5.3, the linear motion mechanical system in
Example 5.7, and the rotational system given in Example 5.8. Comment on the
similarities between the modeling of both systems, in terms of simulation diagrams
and state-space model equations. Identify the elements that are analogous to each
other. Is it possible to use equivalent electrical circuits to represent the mechanical
systems’ linear or rotational motion?
d
r
excited DC machine. If the field coil is connected parallel to the armature, then the
machine is called shunt excited DC machine. The properties of series and shunt-
connected field coils are different. In a series DC machine, the field coil is sup-
posed to carry the same current flowing through the armature current. Since the
armature current is usually a higher current required for excitation, the series-
connected field coil should be able to carry the armature current. Therefore, it has a
larger diameter and a smaller number of turns compared to the shunt or separately
excited field coils, which have a smaller diameter and higher number of turns.
Some DC machines have both series and shunt-connected coils. These machines
are called compound-excited DC machines.
Equations (5.31)–(5.34) can be adapted for DC machines considering both
armature and field coils along with electromechanical torque and speed.
A separately excited DC machine in motor operating conditions can be
represented with a general equivalent electromechanical system given in
Figure 5.16.
Va is the applied DC voltage to the armature. Because of Va, a current ia starts
flowing through the armature coil, which is represented by its resistance Ra and
inductance La in Figure 5.18. The magnetic field is generated by applying the field
voltage Vf to the field coil, which has a resistance Rf and inductance Lf. The voltage
Vf causes the field current if to flow in the field coil to generate the required
magnetic field B. Once the magnetic field is generated, the armature coil under the
J
R L
b
V
L R V
V i
effect of the magnetic field generates a torque Te due to current ia flowing through,
and the rotor where the armature coil is placed and represented by the inertia Jm,
starts rotating with an angular velocity wm. When the armature coil starts rotating in
the magnetic field, the back emf ea is induced in the armature coil opposing the
voltage Va, which is the reason ea is generated. The other parameters and variables
in Figure 5.16 are the viscous friction bm, rotor angle qm and TL is the load torque.
In generator operating mode, the direction of armature current, ia, and angular
velocity, wm, change. Therefore, the electromechanical diagram given in
Figure 5.16 can be used for both motor and generator operating conditions by
taking the related directions into consideration.
The mathematical model equations of a separately excited DC motor are going
to be written by developing a qualitative model based on the cause-and-effect
relationships of the subsystem variables [1]. A qualitative model can be developed
for DC motors based on Faraday’s and Ampere’s laws described above and given
by (5.32) and (5.34). The qualitative model can be shown by a digraph obtained
from cause-and-effect relationships. The state-space equations of a DC machine are
obtained using armature circuit and torque equations, generally. This method may
be a shorter approach going directly to the result. However, the use of cause-and-
effect relationships will make a significant contribution to the better understanding
of the subject instead of using the mathematical equations directly. Let us use the
cause-and-effect relationships of the subsystems in separately excited DC motors to
obtain a diagram representing the qualitative model.
Separately excited DC motor shown in Figure 5.16 can be represented by four
subsystems as field subsystem, armature subsystem, mechanical subsystem, and
electro-magnetic interaction subsystem.
Field subsystem
Assume that the motor is standstill and all initial conditions are zero. A field current if
starts flowing in the field coil as soon as a field voltage Vf is applied to the circuit.
The loop equation of the circuit is written as in (5.35) using Kirchhoff’s voltage law.
dif
Vf ¼ Rf if þ Lf (5.35)
dt
The field current if causes a magnetic field generation due to the magnetizing
characteristics of the core where the field coil is wounded. Due to the magnetic
field, a flux density B occurs between the poles. This cause-effect process is
depicted as a digraph in Figure 5.17.
The magnetic field density becomes constant if the field current is kept con-
stant. In this case, the separately excited DC motor operates as if it is a
PMDC motor.
Armature subsystem
Assume that the magnetic field density exists due to field voltage as shown in
Figure 5.17 and the motor is stand still. If the armature voltage Va is applied under
System modeling and control 279
these conditions, the armature current ia starts flowing due to Ohm’s law in arma-
ture circuit as represented by the digraph given in Figure 5.18.
When a voltage is applied to the armature of a DC motor at stand still, an
armature current occurs due to resistance and inductance of the armature coil such
that a loop equation is written as in (5.36) by applying Kirchhoff’s voltage law.
dia
Va ¼ R a ia þ L a þ ea (5.36)
dt
where ea is the back emf and it is equal to zero when the motor is stand still, i.e.,
when the speed is zero. Once the rotor starts rotating due to generated torque, ea
becomes nonzero and increases as the speed increases.
Mechanical subsystem
According to Ampere’s law, an electromagnetic torque Te is generated by the
armature coil when there is an armature current as shown by digraph in Figure 5.18.
The generated electromagnetic torque causes the rotor to rotate with an angular
velocity of wm, which is in rad/s. A digraph representing this process is shown in
Figure 5.19. Torque-speed equation of this mechanical subsystem is written as in
(5.37) by applying Newton’s second law.
dwm
Te ¼ bm wm þ Jm þ TL (5.37)
dt
Velocity
Velocity
V i T ω
ea ¼ km kf if wm (5.41)
where
km ¼ N‘d (5.42)
B
kf ¼ (5.43)
if
where kf is the slope of the linear portion of the magnetizing curve between mag-
netic field B and excitation current if. Since both km and kf are constants, they can
be combined under a new constant ke as in (5.44). Then (5.40) and (5.41) become as
in (5.45) and (5.46)
ke ¼ k m kf (5.44)
T e ¼ ke i f i a (5.45)
ea ¼ ke if wm (5.46)
If the field current is kept constant then the magnetic field becomes constant.
In this case, another constant parameter is defined as
k ¼ ke if (5.44)
Te ¼ kia (5.45)
ea ¼ kwm (5.46)
If the magnetic field is kept constant, then the cause and effect diagram
representing the field circuit can be removed from Figure 5.22 representing the
digraph of a PMDC motor.
If the field current is not kept constant to have a more flexible control action,
Figure 5.22 can be used for both armature and field-controlled separately excited
machines. It should be noted that the use of parameters km, ke, kf, and k depends on
the constancy of the field current. The cause-effect diagrams given in Figures 5.17
to 5.22 and equations from (5.35) to (5.46) can be used to model DC machines.
considering the control objective and these three control methods. The models of
DC motors given in this section are adapted from [13–16].
Armature-controlled DC motor
In this method, armature voltage is adjusted by keeping the magnetic flux density B
constant, which means the field current is kept constant. Therefore, the equivalent
electromechanical diagram of armature controlled DC motor becomes as in
Figure 5.23 by removing the field circuit from Figure 5.16.
The electromechanical model of armature-controlled DC motor given in
Figure 5.23 can be used for both armature-controlled separately excited DC motor
and PMDC motor. The mathematical equations of the armature-controlled DC
motor are obtained by considering the electrical system, electromechanical inter-
actions, and mechanic system given in Figure 5.23. The use of cause-and-effect
diagrams facilitates to obtain the mathematical equations. Given that excitation is
constant, the overall cause and effect digraph in Figure 5.22 is converted to the one
given in Figure 5.24. The mathematical model of the armature-controlled DC
motor can be obtained by using this digraph.
The only difference between digraphs in Figures 5.22 and 5.24 is the non-
existent of the field circuit and constant magnetic field. Therefore, armature circuit
and mechanical equations given in (5.36) and (5.37), respectively, can be used
L J
R
b
V
Velocity
V i T ω
Figure 5.24 The overall cause and effect diagram of the armature-controlled DC
motor
System modeling and control 283
directly for the armature-controlled DC motor. Since the magnetic field is kept
constant, Equations (5.45) and (5.46) should be used as electromechanical equa-
tions. Therefore, the mathematical model equations of an armature-controlled DC
motor can be written as in (5.36), (5.37), (5.45), and (5.46), which are repeated by
(5.47)–(5.50) in order to be used to obtain a simulation diagram for armature-
controlled DC motor.
dia
La ¼ V a R a i a ea (5.47)
dt
dwm
Jm ¼ Te bm wm TL (5.48)
dt
Te ¼ kia (5.49)
ea ¼ kwm (5.50)
L
a a
a a m m
a e m m m
a m
a m m m
Practice 5.3
Use the PMDC motor data given in Example 4.7 and simulate the simulation dia-
gram given in Figure 5.25 and state-space model of (5.51) for the following cases.
(a) Develop an FLC for the speed control of this system and analyze the perfor-
mance for step changes in reference signal.
(b) Repeat part (a) for ramp changes in the reference signal.
(c) Develop an FLC for the position control of this system and analyze the per-
formance for step changes in reference signal.
(d) Repeat part (a) for ramp changes in the reference signal.
(e) Develop a simulation diagram for both armature and field-controlled separately
excited DC motor.
Both armature and field controlled DC motor
In order to have more flexibility in controlling the speed, torque, and rotor position
of separately excited DC motors, armature and field voltages are altered. Contrary
to the just armature-controlled motor case, the field current is not constant any-
more. Therefore, the magnetic field is not constant and it is a function of the field
current if as shown in Figure 5.26 and given by (5.43) assuming that the relation-
ship between excitation current and magnetic field is linear as shown by the dotted
line with a slope of kf.
The field control is generally used when the motor has to run above its rated speed.
To understand the operation of field control, suppose that the DC motor is running at a
constant speed. If the field current is reduced by reducing the voltage across the field
coil, the flux density will be reduced. Reduction in flux will reduce the back emf
instantaneously and will cause armature current to increase resulting in an increased
motor speed. Consequently, the back emf will increase and a new equilibrium will be
established at a higher speed. With field control, one can achieve as high a speed as
three times the rated speed. A DC motor with both field and armature control finds
applications in traction systems. The inclusion of field control to the armature control
helps to achieve speed control over a wide range of load torque variations.
Since the magnetic field is not constant, the electromechanical interaction
equations given in (5.45) and (5.46) are used if both armature and field control are
considered. Both armature and field circuits must be included in the modeling since
the magnetic field is a function of the field current. The electromechanical circuit
diagram of this operating case becomes the one given in Figure 5.16. Thus, the
cause-and-effect diagram given in Figure 5.22 can be used to write mathematical
model equations of the DC motor for the operating case under discussion. The field
circuit, armature circuit, and mechanical torque equations can directly be written
from (5.35), (5.36), and (5.37), respectively. Adding (5.45) and (5.46) as the elec-
tromechanical interaction equations, the mathematical model of an armature and
field-controlled separately excited DC motor are obtained in the form of integro-
differential equations as given by (5.52) to (5.56).
dif
Lf ¼ V f R f if (5.52)
dt
dia
La ¼ V a R a i a ea (5.53)
dt
dwm
Jm ¼ Te bm wm TL (5.54)
dt
T e ¼ ke i f i a (5.55)
ea ¼ ke if wm (5.56)
where ke is given in (5.44) as ke ¼ km kf and km is given in (5.42) as km ¼ N ‘d. A
qualitative model of armature and field-controlled DC motor is already obtained
and shown in Figure 5.22 by a digraph, which is a macroscopic picture of the
system. A generalized armature-field combined simulation diagram of a separately
excited DC motor is obtained as shown in Figure 5.27 using (5.52)–(5.56).
A state-space model of the armature and field-controlled separately excited DC
motor can be written directly from Figure 5.27. Let x1, x2, x3, and x4 be the state
variables as shown in the output of each integrator in Figure 5.27. Since the inputs
are the states of each variable, then the state-space equations can be written easily
as given in (5.57).
2 3 2 3
Ra ke 1
2 3 6 L L x3 0 0 72 3 6 0 0 72 3
x_ 1 6 a a 7 x1 6 La 7 Va
6 x_ 2 7 6 6
Rf 76 7 6
7 x 6
1 76 7
76 V f 7
6 7¼6 0 0 0 6 27
7 þ 6
0
74 5
4 x_ 3 5 6 L 7 4 x3 5 6 L
1 7
f f T
6 ke bm 7 6 7 L
x_ 4 4 x2 0 0 5 x4 40 0 5 0
Jm Jm Jm
0 0 1 0 0 0 0
(5.57)
286 Fuzzy logic control in energy systems, 2nd edition
a e e f a L
a a
m m m
a a m m
a m
a
m m
b e f m
f k k k
f
f k
f f
f m
f
Figure 5.26 shows that there exists a nonlinear relationship between the flux
density B and the current if in the field coil. Actually, the combined field and
armature control system is nonlinear. This nonlinearity is depicted by multi-
plication blocks in Figure 5.27. The state matrix in (5.57) includes the variables x2
and x3 as multipliers. A DC motor with both field and armature control finds
applications in traction systems. The inclusion of field control to the armature
control helps to achieve speed control over a wide range of load torque variations.
Example 5.10
The unified armature and field-controlled DC motor can be modeled in
Simulink as given in Figure E5.10(a) as a single block, whose inside view is
shown in Figure E5.10(b). The inside view is categorized as armature circuit,
field circuit, mechanical system, and electromechanical interaction system.
Required data for the DC motor is given in the data subsystem as depicted in
Figure E5.10(c).
Obtain the following:
(a) Develop a Simulink model for each one of the subsystems shown in
Figure E5.10(b) as armature circuit, field circuit, mechanical subsystem, and
electromechanical interaction system.
(b) Use the FLC model developed in Chapter 4 for the speed control of the system
given in Figure E5.10(a).
Answer 5.10
(a) Simulink models of the subsystems given in Figure E5.10(b) as armature cir-
cuit, field circuit, mechanical subsystem, and electromechanical interaction
system are given below.
(b) The use of the Simulink model of the FLC for the speed control of armature
and field-controlled DC motor is shown in Figure E5.10(h).
System modeling and control 287
Ia
Va
If
Wm
Vf TETA
Armature and Field Controlled
DC Motor
1 TL
EA
Ia 10
Ia
DATA Va
Ia
Subsystem Armature Ea TL TETA 4
1 Circuit IfKe TETA
Va Te Te Wm 3
Wm Wm
Ifke Electromechanical Mechanical
2 Vf Subsystem
If 2 Interaction
Vf
If
Field Circuit
Figure E5.10(c) Inside view of the data subsystem shown in Figure E5.10(b)
The FLC block is used to control the speed of the motor. The control signal
generated by the FLC is used in both armature and field control of the motor.
Controlled speed response is shown in Figure E5.10(i). As shown in
Figure E5.10(h), the same control signal is used in both armature and field
control. Therefore, the same control signal results in the same voltage value in
both circuits as an equilibrium voltage point. This approach restricts the
288 Fuzzy logic control in energy systems, 2nd edition
2
Va 1
La(dia/dt) dia/dt 1
s
ia
1 Integrator
Add 1/La
ea
RaIa ia
Ral
1 + If
1
Vf LF(dif/dt) dif/dt if ifkf ifkf ifke 1
– s
Ifke
Add 1/Lf Int. Kf NLr
Rfif if 2
if
Rf
1 –
TL 1 wm 1
+ Jm(dw/dt) dw/dt 1
2 s s
TETA
Te – Int1 Int2
1/Jm
Summer
bmwm wm 2
wm
bm
1
ia × 2
Te
2 Product
ifKe
× 1
3
ea
wm Product1
200 Vmax Ia
Va Va
Ua u If
Reference Speed
(Rad/sec) CHOPPER1 Wm
350 REFERENCE Vf
u(k) TETA
Ref. wr
FEEDBACK Vmax
To Workspace Vf Armature and
FLC_Armature u Field Controlled
DC Motor
CHOPPER2
wm
Scope l To Workspace
400
300
Speed (rad/s)
200
100
0
0 5 10 15 20
Time (s)
T
S L
R
J
a
b
S
V R L
where ia > ifsh. If the controllable switches Sa and Sf in the armature and field
circuits, respectively, are controlled separately, the operation of the shunt-excited
DC motor becomes similar to that of a separately excited motor. Due to two
separate controlled switches, armature, and field voltages can be controlled inde-
pendently, resulting in different applied voltages for each circuit. Since lower field
current results in higher speed while higher armature current generates higher tor-
que and therefore higher speed, the control of the armature and field circuits
separately, enable the motor to run above the rated speed. Therefore, proper control
strategies should be developed for a more specific and flexible control action.
Series-excited DC motor
The field coil of a series-excited DC motor is different than separate or shunt-
excited field coils. Contrary to the others, the series excited coil is bigger in dia-
meter and has less number of turns with a smaller resistance. Since it is connected
in series with the armature coil, the armature current flows through both coils.
Therefore, the series-connected field coil should be able to carry the armature
current. This implies that the armature current is also the excitation current. The
changes in armature voltage affect both armature and field currents. The applied
voltage to the series-excited DC motor is equal to the sum of armature and series
field voltages as in (5.59).
vm ¼ va þ v f (5.59)
The series-excited DC motor is controlled through the input voltage vm by
using a control device such as the controlled switch Ss in Figure 5.29.
The armature circuit equations of the series excited motor were rewritten as
dia
ðL a þ L f Þ ¼ Va ðRa þ Rf Þia ea (5.60)
dt
dwm
Jm ¼ Te bm wm TL (5.61)
dt
Te ¼ ke if ia (5.62)
System modeling and control 291
T
R L
J
b
S
V R L
f
ea ¼ ke if wm (5.63)
if ¼ ia (5.64)
where ke is given in (5.44) as ke ¼ km kf and km is given in (5.42) as km ¼ N ‘d. It
should be noted that the field current is not constant and varies as the armature
current changes due to changes in load torque and applied voltage. The mathema-
tical model is nonlinear because of the terms Te ¼ ke i2a and ea ¼ ke if wm . Because of
the nonlinearity, the speed, torque, or position control of series-excited DC motor
require special designs.
Compound excited DC motor
The compound excited DC motor is a combination of the shunt and the series
excited machines. The series and shunt excited coils result in a more flexible speed
control by reducing the effect of the load torque changes. An electromechanical
schematic diagram is given in Figure 5.30 with two control switches in armature
and field circuits. The shunt excited coil is connected before the series coil in
Figure 5.30. The series coil may be connected before the shunt coil depending on
the use of purpose of the machine. The required magnetic field is generated both by
the series field current, which is equal to the armature current and by the shunt field
current. The polarity of the field coils must be taken into consideration during the
connection of the field circuits so that the magnetic fields generated by the two
coils do not conceal each other.
The mathematical model of the compound excited DC motor can be obtained
using the cause-effect relationships of the submodels. The main difference between
the compound excited machine and the others is the total effective magnetic field,
which is the vectorial sum of the magnetic fields generated by series and shunt coils
as in (5.65).
B ¼ Bs þ Bsh (5.65)
where
Bs ¼ kfs ifs (5.66)
292 Fuzzy logic control in energy systems, 2nd edition
T
S L
R
J
b
R L
V S
R L
y(n)
t(s)=nT
Figure 5.31 A comparison of the solution by Euler with the actual curve
294 Fuzzy logic control in energy systems, 2nd edition
y(n)
t(s)=nT
Figure 5.32 A comparison of the solution by trapezoid rule with the actual curve
z(t) z(t)
B
T
x(n-1)T X(nT)
curve until the (n–1)th sample, and Tz[(n–1)T] is the calculated area at the (n–1)th
sample, which is shown by letter A in Figure 5.33. n is called iteration counter and
T is the sampling period. Since T is a multiplier with all iteration instants, it can be
removed from the equation to make it simpler.
xðnÞ ¼ xðn 1Þ þ Tzðn 1Þ (5.73)
The second part of (5.73) is equal to the calculated area A during each sam-
pling. The analytic solution at each iteration is equal to the sum of the areas as A +
B. Therefore, area B is the calculation error of the Euler integration method. The
calculation error can be made smaller if area B is reduced by selecting a smaller
sampling time. However, the smaller sampling period results in more iteration and
longer simulation time. Since the calculated area A is rectangular, the Euler method
is also called rectangular integration.
Example 5.11
Use Euler integration to obtain a solution for (E5.11a). Assume that the initial
condition x(0) = 1 and the sampling period is 0.1 s.
x_ ðtÞ þ xðtÞ ¼ 0 (E5.11a)
P.S.: The analytical solution of this differential Equation is given as: x(t) = et.
Answer 5.11
Let us reorganize (E5.11a) as in (E5.11b) and write it in discrete form as in
(E5.11c)
zðtÞ ¼ x_ ðtÞ ¼ xðtÞ (E5.11b)
xðnT Þ ¼ x½ðn 1ÞT þ T fx½ðn 1ÞT g (E5.11c)
For T = 0.1 and n = 1, . . . , 10, the solution is obtained as follows:
n ¼ 1 ! xð0:1Þ ¼ xð0Þ þ Txð0Þ ¼ 1 ð0:1Þð1Þ ¼ 0:9
n ¼ 2 ! xð0:2Þ ¼ xð0:1Þ þ Txð0:1Þ ¼ 0:9 ð0:1Þð0:9Þ ¼ 0:81
n ¼ 3 ! xð0:3Þ ¼ xð0:2Þ þ Txð0:2Þ ¼ 0:81 ð0:1Þð0:81Þ ¼ 0:729
. . . . . . . . . . . . . . . ::
n ¼ 10 ! xð1:0Þ ¼ xð0:9Þ þ Txð0:9Þ ¼ 0:3487
(E5.11d)
Since the analytical solution is known, the accuracy can be checked for t = 1 s.
Example 5.12
Obtain a digital solution for the following state equations using Euler Integration.
Assume all initial conditions as zero, approximation tolerance e = 0.001 and use a
sampling period of 0.01 s.
x_ 1 3 1 x1 0
¼ þ u (E5.12a)
x_ 2 2 0 x2 1
x
½ y ¼ ½ 1 0 1 þ 0 (E5.12b)
x2
A, B, T, n
n=n+1
Answer 5.12
The MATLAB code given in Figure E5.12(a) can be used to solve the second-order
state equations. Figure E5.12(a) is a software-coded version of the flowchart given in
Figure 5.34. Any programming language can be used to realize the flowchart. The
code shown in Figure E5.12(a) results in the plots given in Figure E5.12(b), where x1
settles on 0.5 and x2 settles on 1.5. These results comply with the analytic solution.
1.5
x2
Variables x1 and x2
0.5 x1
0
0 1 2 3 4 5 6
Time (s)
Step 3 x13 ¼ x10 þ b21 ; x23 ¼ x20 þ b22 ; Initial values of x1 and x2 for the
c1 ¼ T ½ðA11 x13 þ A12 x23 Þ þ ðB11 u1 þ B12 u2 Þ step 2
c2 ¼ T ½ðA21 x13 þ A22 x23 Þ þ ðB21 u1 þ B22 u2 Þ Slope c1 for the variable x1
Slope c2 for the variable x2
Step 4 x14 ¼ x10 þ c1 ; x24 ¼ x20 þ c2 ; Initial values of x1 and x2 for the
d1 ¼ T ½ðA11 x14 þ A12 x24 Þ þ ðB11 u1 þ B12 u2 Þ step 2
d2 ¼ T ½ðA21 x14 þ A22 x24 Þ þ ðB21 u1 þ B22 u2 Þ Slope d1 for the variable x2
Slope d2 for the variable x2
Result x1 ðnÞ ¼ x10 þ ða1 þ 2b1 þ 2c1 þ d1 Þ=6 Value of x1 from the iteration (n)
x2 ðnÞ ¼ x20 þ ða2 þ 2b2 þ 2c2 þ d2 Þ=6 Value of x2 from the iteration (n)
Figure 5.35(a) Input and the first step of the four-step Runge–Kutta algorithm
Figure 5.35(d) The fourth step and the result of the four-step Runge–Kutta
algorithm
This algorithm has been written as a MATLAB function, which is called from
other MATLAB codes as if it is a subprogram. Example 5.13 shows how the runge.
m function is used.
Example 5.13
Use the same state-space equations given in Example 5.12 and obtain a digital
solution for a unity step input by using the four-step Runge–Kutta method. Assume
302 Fuzzy logic control in energy systems, 2nd edition
all initial conditions as zero, approximation tolerance e = 0.001 and use a sampling
period of 0.01 s.
x_ 1 3 1 x1 0
¼ þ u (E5.13a)
x_ 2 2 0 x2 1
x
½ y ¼ ½ 1 0 1 þ 0 (E5.13b)
x2
The analytical solution of this system was given in Example 5.12.
Answer 5.13
The MATLAB .m file code and resultant plots are given in Figures E5.13(a) and
E5.13(b). As can be seen from the resultant graphs are very similar to those
obtained from Euler integration for the same problem.
1.5
u, y, x1, x2
0.5
0
0 1 2 3 4 5 6
Time (s)
5.7 Problems
P.5.1 A LTI ordinary differential equation is given on the right. Assume all initial
conditions as zero and us(t) = 0 for t < 0 and us(t) = 1 for t 0.
d 2 xðtÞ dxðtÞ
þ 15 þ 100xðtÞ ¼ 100us ðtÞ
dt2 dt
(a) Obtain a simulation diagram (detailed block diagram) for his system.
(b) Obtain a state-space model for this system.
P.5.2 An operational amplifier circuit is given in Figure P5.2. The operational
amplifier is assumed to be ideal and the values of capacitors and resistors are
given as C = 1 mF, R1 = 150 kW, R2 = 250 kW, R3 = 1 kW, and R4 = 100 kW.
(a) Write integro-differential equations of this system.
(b) Draw a simulation diagram for this system.
(c) Obtain the transfer function V0(s)/Vi(s) for this system.
P.5.3 A single input–single output linear mechanical system is given in
Figure P5.3. The external force f(t) is the input and the displacement x(t) of
the mass is the output. The initial position of the displacement corresponds to
the equilibrium point when there is no external force.
(a) Apply Newton’s second law and write the change of momentum equa-
tion of this system.
v
v
k
f
m
x b
k b
m
V
k
m x
b
scope
(b) Draw the simulation diagram of the system from the equation in part (a).
(c) Obtain state-space model equations of this system from part (b).
(d) Obtain Laplace transformation of the differential equation you obtained
in part (a) and write it for X(s). Assume that initial conditions are
not zero.
(e) Obtain transfer function of this system from part (d). Assume that initial
conditions are zero.
P.5.4 The system given Figure P5.4 is used to detect earthquakes by generating
signals depending on the force F applied to mass m2 as shown. A voltage Vi
is applied to a potentiometer and the initial voltage to the scope is set to vx =
v0. If any force F occurs due to earthquake both masses m1 and m2 move
resulting in the displacements x1 and x2. k1 and k2 are spring constants, b1 and
b2 are the friction constants. The change in voltage vx is proportional to
displacement x1 as vx = v0 + Av x1.
System parameters are: m1 = 10 kg, m2 = 0.1 kg, g = 9.8 m/s2, b1 = 10 Ns/m,
b2 = 2 Ns/m, k1 = 10 N/m, k2 = 0.00205 N/m, Av = 0.2, V0 = 5 V, Vi = 10 V.
(a) Write integral-differential equations of this system.
(b) Draw a simulation diagram as F is input vx is the output.
(c) Write state-space equations of this system.
System modeling and control 305
(d) Design a fuzzy logic controller to decrease the effect of the force f while
keeping vx close to set value v0.
(e) Use an FLC to track the step changes in vx and obtain a relationship
between the steady-state values F and Vx of the force and displacement.
P.5.5 A basic block diagram and electromechanical connection diagram of a door
position control system driven by a permanent magnet DC motor (PMDCM)
are adapted from [14] and shown in Figures P5.5(a) and P5.5(b). The dif-
ference between the measured door position angle qD and reference position
qR is minimized by controller C to generate a control signal u, which is
amplified by amplifier A to drive the door system. The purpose of the con-
troller is to bring and keep the door at a reference position angle qR. A gear
system depicted by G in Figure P5.5a is used to match the position angles of
the motor and door shafts. All required data are given in [14] as Ra = 1.4 W,
La = 0.0805 H, k = 0.095, Jm = 0.0007432 kgm2, Bm = 0.000431 Vs/rad, Va =
36 V, and N = 2.67. Where k represents both torque and voltage constant
because of the constant magnetic field. Va is the rated motor voltage and N is
the turn ratio of the gear subsystem. The mathematical model of PMDCM is
the same one given in Figure 5.25 as the armature-controlled DC motor.
Figure P5.5(b) shows the details of the gear system and the use of a poten-
tiometer to detect the door position.
(a) Draw a control system block diagram for his door position system.
(b) Explain the purpose of using each block in detail.
(c) Show physical and informative parts of the block diagram.
D
R a G
C A
m P
D
D
G
(d) Use the FLC block developed in Chapter 4 and used in Example 5.10 to
control the door position system. Assume that the maximum door posi-
tion is p rad.
P.5.6 Develop an FLC-based control algorithm to control the speed of the DC
motor given in Figure 5.10 such that the controller should be able to detect
the changes in armature current, load torque, speed, and speed error. The
approach developed by A.M. Sharaf as the one in [17] may be helpful for this
problem.
P.5.7 Modify the FLC-controlled DC motor given in Example 5.10 such that the
motor speed can be increased up to twice the rated speed, which is 400 rad/s.
It should be remembered that the speed of a separately excited DC motor is
increased with increasing armature current and decreasing field current. The
effects of the armature and field currents should be taken into account while
designing the controller.
After designing the FLC, perform the following analysis:
(a) While the field current is kept constant at its rated value, run the
armature-controlled system simulation five times with 50 rad/s incre-
ments in reference speed starting at 100 rad/s, and record steady-state
values of speed and armature current from each simulation run.
(b) While the armature current is kept constant at its rated value, run the
field-controlled system simulation five times with 50 rad/s increments in
reference speed starting at 100 rad/s, and record steady-state values of
speed and field current from each simulation run.
(c) Plot speed versus armature current and speed versus field current. Then
comment on the plots.
P.5.8 Develop a Simulink model for the shunt-excited DC motor given in
Figure 5.28 by its electromechanical diagram. Assume that the parameters of
the shunt excited motor are the same as those given for the separately excited
motor in Example 5.10.
(a) Keep field current constant and control the speed of the motor through
armature circuit.
(b) Keep armature voltage constant and control the speed of the motor
through field circuit.
(c) Control the speed of the motor both through armature and field circuits.
(d) Repeat parts (a), (b), and (c) to control the rotor.
P.5.9 For the armature-controlled DC motor shown in Figure P5.9, the numerical
values are given as Ra = 20 W, La = 0.05 H, bm = 0.1 Nm s/rad, Jm = 2 Nm s2/
rad, ka = 1 V s/rad, kt = 1 Nm/A and TL = 0 Nm. Assume that the input
voltage v as input and motor speed as the output. Then simulate the system to
obtain the following:
(a) Write integro-differential equations of this DC motor.
(b) Obtain the simulation diagram using the equations in part (a).
System modeling and control 307
J
R L
b
V
L R V
J
i i L R L θ
R
b
V ω
V V e T
(c) Obtain the state-space equations of this DC motor using the simulation
diagram in part (b).
(d) Obtain the characteristic equation of this DC motor.
(e) Locate the poles of the DC motor in a complex plane.
(f) Obtain time constant, settling time, damping ratio, and percent overshoot
of this system.
P.5.10 A series excited DC motor circuit diagram is shown in figure. Where the
subscript s represents the parameters and variables of the series exited field
circuit and the subscript a represents the parameters and variables of the
armature circuit. The motor parameters are given as Ra = 0.1 W, La = 0.01
H, Rf = 0.05 W, Lf = 0.02 H, bm = 0.04 Nm s/rad, Jm = 0.6 Nm s2/rad,
kf = 0.1, km = Nlr = 6 and TL = 0 Nm.
The applied voltage V is the input and speed wm is the output. Determine
the following:
(a) Cause-and-effect diagram
(b) Differential equations
(c) Simulation diagram
(d) State-space equations
(e) Transfer function
P.5.11 Develop a fuzzy logic-based speed and position control algorithm for the
DC motor given in P5.9 and simulate the FL-controlled system in
MATLAB and Simulink.
308 Fuzzy logic control in energy systems, 2nd edition
P.5.12 Develop a fuzzy logic-based speed and position control algorithm for the
DC motor given in P5.10 and simulate the FL-controlled system in
MATLAB and Simulink.
P.5.13 Use the series DC motor given in P5.10 in the door position control system
described in P5.5 and repeat P5.5 for the series-excited DC motor.
P.5.14 Repeat P5.5 for a shunt-excited DC motor assuming that the motor para-
meters are the same as those given in Example 5.10.
P.5.15 Solve the following state-space equations using the four-step Runge–Kutta
algorithm. Assume that input u1(t) = 100, u2(t) = 0, iteration time step dt = T
= 0.01 s, and all initial conditions are zero. Simulate the system for 1 s
starting t = 0 s.
x_ 1 4 3 x1 1 0 u1
¼ þ (P5.15a)
x_ 2 1 8 x2 0 1 u2
x
½ y ¼ ½ 1 0 1 (P5.15b)
x2
P.5.16 Series-connected RLC circuit given in Figure P5.16(a) can be represented by
its simulation diagram shown in Figure 5.16(b) and state-space equations as
in (P5.16a) and (P5.16b). The circuit parameters are given as L = 2 H, R = 10
Ohm; C = 100 F, and v = 50 V. Assume that all initial conditions are zero and
use a sampling period of dt = 0.01 s to simulate this system as follows:
(a) Build Figure P5.16(b) in MATLAB/Simulink and simulate it to see and
analyze the variables x1(t) and x2(t) where x2(t) is the current flowing in
the circuit.
(b) Use runge.m function in MATLAB as in Example 5.13 and solve state-
space equations to see and analyze the variables x1(t) and x2(t) where x2
(t) is the current flowing in the circuit.
(c) Compare the results from parts (a) and (b).
R L C
v(t) i(t)
References
[1] Doraiswami R., Stevenson M. and Diduch C., Identification of Physical
Systems: Applications to Condition Monitoring, Fault Diagnosis, Soft Sensor
and Controller Design. New York: John Wiley & Sons, 2014.
[2] Wellstead P.E. Introduction to Physical System Modelling. New York:
Academic Press Ltd., 1979.
[3] Kailath T. Linear Systems. Englewood Cliffs, NJ: Prentice-Hall, 1980.
[4] Franklin G.F., Powell J.D. and Emani-Naemi A. Feedback Control of
Dynamic Systems. Englewood Cliffs, NJ: Prentice-Hall, 2006.
[5] Bishop R.H. Modern Control Systems Analysis and Design Using MATLAB
and Simulink. Reading, MA: Addison-Wesley, 1997.
[6] Altas I.H. and Sharaf A.M. ‘A fuzzy logic power tracking controller for a
photovoltaic energy conversion scheme’. Electric Power Systems Research
Journal. 1992;25(3):227–238.
[7] Altas I.H, ‘Bulanık Mantık Denetleyici: MATLAB/Simulink Ortamı için Bir
Modelleme’, Otomasyon, Bileşim Yayınları, İstanbul, Turkey, March 2007,
Sayfalar: pp. 58–62.
[8] Altas I.H. and Sharaf A.M. ‘A generalized direct approach for designing
fuzzy logic controllers in MATLAB/Simulink GUI environment’. Interna-
tional Journal of Information Technology and Intelligent Computing. 2007;
1(4).
[9] Ogata K., Modern Control Engineering. Englewood Cliffs, NJ: Prentice-
Hall, 1997.
[10] Kuo B.J. Automatic Control Systems. Englewood Cliffs, NJ: Prentice-Hall,
1995.
[11] Dorf R.C. and Bishop R.H. Modern Control Systems. Englewood Cliffs, NJ:
Prentice-Hall, 2001.
[12] Nise N. S. Control Systems Engineering, 4th edn. New York: John Wiley &
Sons, 2004.
[13] Altas I.H. ‘A fuzzy logic controlled tracking system for moving targets’. 12th
IEEE International Symposium on Intelligent Control; Istanbul, Turkey, July
1997. pp. 43–48.
[14] Altas I.H. ‘A fuzzy logic based door position control system’. The Proceed-
ings of the 3rd International Mechatronic Design and Modeling Workshop,
15–18 September 1997, Middle East Technical University, Ankara, Turkey,
pp. 107–116.
310 Fuzzy logic control in energy systems, 2nd edition
[15] Altas I.H. ‘A fuzzy logic controlled tracking system for moving targets’. 12th
IEEE International Symposium on Intelligent Control, ISIC’97, 16–18 July
1997, Istanbul, Turkey, pp. 43–48.
[16] Altas, I.H. ‘Endüvi Kontrollü DA Motorlarının Modellenmesinde Sebep-
Sonuç Yaklaşımı’. Otomasyon Dergisi, Bileşim yayınları, Ocak 2008, pp.
186–190.
[17] Altaş I.H. and Sharaf A. M. ‘Novel control strategies via load matching for
maximum energy utilization in photovoltaic energy systems’. 2007 IEEE
Canadian Conference on Electrical and Computer Engineering, Vancouver,
Canada.
[18] Tai-Ran Hsu T.-R. Applied Engineering Analysis. New York: John Wiley &
Sons, 2018.
[19] Karris, S.T. Numerical Analysis Using MATLAB and Excel, 3rd edn. London:
Orchard Publications, 2007.
Chapter 6
FLC in power systems
6.1 Introduction
Electrical power systems start with the generation of electrical power.
Transmission, distribution, and utilization are the other parts of conventional
electrical power networks. Each one of these four stages, generation, transmission,
distribution, and utilization, has its own problems and control approaches in order
to keep them in service. The synchronous generator driven by either a hydraulic or
a steam turbine is the main unit in electrical power generation and the control of
power systems means the control of a synchronous generator. However, the con-
cept of power system control has been changed since the introduction of micro-
grids. In conventional power networks, the generation is usually away from the
urban areas, and the distribution is either done by radial or ring networks. Due to
the impedances of transformers, distribution, and transmission lines, the power
network is considered as an infinite bus compared to the distribution networks and
power dissipation units. Small load changes and fault currents in distribution fee-
ders do not affect the rest of the power network due to the high impedances
between the generator and distribution. Therefore, the large power networks are
represented by infinite bus and power management is done in some specified
locations in power transmission networks, not everywhere in distribution systems.
As a result of the network structure, the equilibrium between generation and dis-
sipation is obtained by controlling the generating units, which are the synchronous
generators.
The power generation and dissipation in microgrids are side by side in various
locations in the network resulting in a structure called distributed generation. The
concept of microgrid and distributed generation has started with the increasing use
of photovoltaic (PV) and wind energy systems, which are installed right in dis-
tribution areas. Therefore, any change in either generation or dissipation affects
each other. When a large load is switched on or off the voltage of the bus where this
switched load is connected, drops down or goes up being dangerous for the other
312 Fuzzy logic control in energy systems, 2nd edition
loads connected to the same bus. The RMS voltage and the frequency of every load
bus must be kept constant at their nominal values in order to feed and operate the
other loads normally. Since the generation is distributed everywhere in the power
distribution network, the control and management problems become more difficult
and complicated in microgrids. The control of PV and wind systems are discussed
in separate chapters later as a part of microgrids. Note that the control of microgrids
with distributed generation requires measurement, transmission, and analysis of
data from everywhere in distribution systems. In order to manage and control the
generated and dissipated power, secure communication channels must be estab-
lished between units all over the network. The classical control and management
methods do not work for the microgrids. Thus, new methods are developed to deal
with the control and management problems in distributed power systems leading to
the concept of smart grids. The control of wind and PV energy systems are dis-
cussed in Chapters 10 and 11, respectively. FLCs are designed to control wind and
PV power generation and utilization schemes as a part of microgrids.
The voltage magnitude and frequency of power systems are controlled by
controlling the synchronous generators. It is well known that two types of con-
trollers are employed to control synchronous generators. Excitation control is used
for output voltage and governor control is used for load–frequency control. A
schematic diagram of the synchronous generator control system is shown in
Figure 6.1 including both excitation and load–frequency controls.
The excitation control of a synchronous generator is based on the magnitude
control of the output voltages. As the voltage magnitude changes due to over-
loading or light loadings, the excitation control is employed to keep it at the desired
reference value. Therefore, the output voltages are measured and fed back to the
controller. Various methods of excitation control have been discussed in the lit-
erature [1–7]. In Figure 6.1, three-phase terminal voltages at the output terminals of
the generator are converted to DC and used as the feedback signal. Then usually an
automatic voltage regulator (AVR) is used as the control device in the excitation
control process. The AVR control is combined with other methods such as power
system stabilizers [2,8–10] or replaced by other controllers [11–13]. Some exam-
ples of modeling and controlling the excitation systems are given in the next
section.
The governor (GOV) control is used to control the input of water or steam to
the turbine as shown in Figure 6.1. The steam or water input to the turbine affects
the speed and the mechanical power input of the generator. Therefore, the governor
control is used as power–frequency or load–frequency control. The loading con-
ditions of the synchronous generator affect the speed, which is directly related to
the frequency of the voltages generated by the synchronous machine. Therefore, the
speed, representing the frequency, is measured and used as the feedback signal in
the governor to control the power–frequency equilibrium of the system. Load–
frequency control is very important for power system stability and has been studied
well in the literature [14–23]. The use of FLC in load–frequency control is dis-
cussed in the coming sections of this chapter.
The use of fuzzy logic controllers has been increased rapidly in power systems,
such as in load–frequency control, bus bar voltage regulation, stability, load esti-
mation, power flow analysis, parameter estimation, protection systems, and many
other fields [11–14,24–33]. Fuzzy logic applications in power systems are given in
[34–38] with a detailed survey.
A tremendous amount of papers and books on the control of power systems can
be found in literature. Many of these papers and most of the books also cover the
modeling of excitation systems, automatic voltage controllers (AVR), power system
stabilizers (PSS), and load–frequency (L–F) controllers [39–43]. Although a mathe-
matical model of the physical systems is not required in fuzzy logic controllers for
real-time applications, it is necessary for digital simulation in the computer envir-
onment. Therefore, simulation models of excitation systems and L–F controllers are
needed. Since the modeling of excitation systems and L–F controllers in power sys-
tems are well studied in the literature [1–7], detailed modeling of these systems is not
going to be repeated here. Well-known excitation systems and L–F models from the
literature are preferred to be used instead. The modeling of the fuzzy logic controller
(FLC) used in this chapter is discussed and explained clearly in Chapter 7.
As it is well known, instantaneous load changes affect the bus voltage and its
frequency causing their values to oscillate around the nominal operating points.
When the magnitudes of these oscillations are large and natural damping takes a
long time, the stability of the power system may be lost resulting in damages and
power outages in the system. In order to overcome the effects of swinging fre-
quency and voltage oscillations, some precautions must be taken such as using L–F
controllers and PSS. Any load change in one of the L–F control areas affects the tie
line power flow causing other L–F control areas to generate the required power to
damp the power and frequency oscillations. The response time of the L–F con-
trollers is very important to have the power system to gain control with increased
stability margins. Therefore, the proposed L–F controller must reduce the response
time as well as reduce the magnitude of the oscillations.
314 Fuzzy logic control in energy systems, 2nd edition
The voltage oscillation may cause increased and decreased bus voltages over
the power system. If the durations of these higher or lower voltages are long
enough, they may cause damages, misoperations, and even instabilities. Therefore,
voltage controllers and power system stabilizers must be utilized to prevent these
problems for a reliable power system. In this chapter, the application of fuzzy logic
controllers to the excitation and load–frequency control systems is discussed.
G t
Figure 6.3 Phasor diagram of a synchronous generator with lagging power factor
FLC in power systems 315
EG Vt
Pe ¼ sin d (6.2)
Xs
If the losses are ignored, the generated electrical power Pe becomes equal to
mechanical input power Pm. Since mechanical input power is kept constant, the
generated electrical power becomes constant as well. This assumption is usually
considered correct and (6.3) is written.
Pe ¼ Pm ¼ constant (6.3)
Since the terminal voltage Vt and synchronous reactance Xs are constant, it is
obvious that (6.4) and (6.5) can be written from (6.1) and (6.2), respectively.
I cos q ¼ constant (6.4)
EG sin d ¼ constant (6.5)
The meanings of the constants (6.4) and (6.5) can be understood better from
Figure 6.4.
If the mechanical input power is kept constant and EG is increased by adjusting
the excitation voltage Ve, power factor angle q, load angle d, and current I are
changed from values q1, d1, and I1 to new values q2, d2, and I2, respectively, as
shown in Figure 6.5.
Figure 6.4 The phasor diagram with constant parameters and variables
Note that the constant parts represented by EGsind and Icosq are kept
unchanged while the power factor angle, the load angle, and the current are chan-
ged. However, while the magnitude of the current is changed, Icosq is kept
unchanged. This means that cosq gets smaller due to the increase in q. Therefore,
the power factor becomes smaller. Similarly, when EG is increased, sind gets
increased as well, because EGsind is constant. Therefore, d must be smaller if EG is
increased.
It can be concluded from the effects of the excitation depicted in Figure 6.5 if
the excitation is increased, then the following should be done in order to keep the
power system stable, while the terminal voltage and output power are constant.
(I) The load angle should be reduced,
(II) The current should be increased, and
(III) The power factor should be increased.
Similar conclusion can be made when the excitation is reduced. The operating
mode described in Figure 6.5 is done for a stable operation. When the machine is
operating at a stable point, the excitation is increased to operate the machine at a
new stable point. This change from one stable operating point to another
stable operating point causes some transients in the system variables such as fre-
quency and voltage. Therefore, the effects of transients must be considered if there
is a change in stable operation. Transient response of a step change in excitation
may be an oscillating response, damped response, overdamped response, or criti-
cally damped response. Overshoot and settling time in these responses must be
limited to maintain stability. In order to overcome these problems and maintain a
stable operation excitation control is required.
An excitation system consists of a power source a voltage regulator and aux-
iliary control elements. In high power generation, the power to the excitation coils
of the main generator is usually supplied from a DC or another synchronous gen-
erator coupled on the same shaft with the main generator as shown in Figure 6.1. In
this case, three-phase windings of the exciter and excitation coils of the main
generator are placed on the rotor of each machine so that the connection can be
made without using slip rings and brushes. If another synchronous generator is used
as the exciter, its three-phase voltages are converted to DC and applied to the
excitation coils of the main generator. Therefore, the excitation of the main gen-
erator is controlled through the exciter generators. In small-size power systems, the
excitation coils of the main generator are usually placed in the stator and the
required excitation power is supplied from an external controllable DC source.
A voltage regulator is used to adjust the output of the exciter so that the gen-
erated voltage and reactive power are kept inside the described limits. Therefore,
the voltage regulator is one of the important elements in excitation systems. As it is
understood, the voltage regulator is nothing but a controller used the control the
terminal voltage and reactive power generation of a synchronous generator through
the exciter system. The response time of a voltage regulator is very important for
the system stability. Due to the high impedance of the excitation coil, it is not
possible to change the excitation current suddenly. Therefore, a delay is always
FLC in power systems 317
voltage levels and converted to DC voltage, Vdc, which is the negative feedback
voltage representing the terminal voltages. The connection diagram of VTs and the
rectifier is given in Figure 6.7.
As shown in Figure 6.7, the DC voltage Vdc is proportional to the sum or
average value of the three-phase RMS voltages. If the average RMS voltages are
represented by Vt, then the DC voltage can be written as in (6.6).
Kdc
Vdc ¼ Vt (6.6)
1 þ tdc s
where Kdc is the rectifier gain constant, tdc is a time constant representing the delay
caused by VT and the rectifier. The time constant tdc in these systems usually has a
small value such as around or less than 0.06 s.
The difference amplifier in Figure 6.6 compares the terminal voltage in terms
of Vdc with the reference terminal voltage VREF and yields an amplified voltage
error Ve as in (6.7).
Ve ¼ KD ðVREF Vdc Þ (6.7)
The difference amplifier can be realized in different ways. If an electronic
difference amplifier is used, the time constant becomes very small and can be
ignored yielding (6.7) and the block diagram shown in Figure 6.8.
The voltage regulator and the power amplifier acting as an actuator in the
system can be a rotational, a magnetic, or an electronic amplifier. Assume that any
one of these amplifiers is represented by a proportional gain KA and time constant
tA as in (6.8).
KA
VR ¼ Ve (6.8)
1 þ tA s
The regulator amplifier has a transfer function similar to that of a low-pass
filter. Knowing that each amplifier, whatever the type is, saturates and the model-
ing includes a saturation element to limit the output between predefined minimum
VRmin and maximum VRmax values. The regulator and power amplifier with the
saturation effect are represented by a block diagram as given in Figure 6.9.
The output voltage VR of the regulator amplifier is the input voltage to the field
of the separately excited DC generator, which is the exciter generator in the system.
Since the exciter generator is coupled to the same shaft as the synchronous gen-
erator, the speed of both machines is constant. Therefore, the induced emf is a
function of the field voltage VR only. In order to show this relationship, let us write
the voltage equation of the field coil of the synchronous generator as in (6.9) using
Figure 6.10.
l_ E þ RE iE ¼ vE (6.9)
where lE is the flux (wb/turn) encircling the field coil and RE is the field coil
resistance of the exciter generator. The excitation current of the exciter generator is
represented by iE and the excitation voltage by vE.
Instead of encircling flux, let us rewrite (6.9) in terms of excitation field flux
fE as in (6.10), which will be more useful.
N f_ E þ RE iE ¼ vE (6.10)
where the voltage vE may be assumed to be constant. Thus (6.10) becomes a
function of fE and iE. The excitation current iE in (6.10) depends on the operating
point on magnetizing curve, which is not linearly related to the excitation voltage vE.
320 Fuzzy logic control in energy systems, 2nd edition
Due to the saturation of the magnetizing curve, the flux fE is separated into two parts
as leakage and air gap fluxes, fl and fa, respectively. Due to the saturation effect
(6.10) is not a linear equation. Since the magnetizing curve is a plot of vF versus iE,
the flux fE should be written in terms of vF or iE. If the main exciter runs at a constant
speed, its voltage becomes linearly proportional to air gap flux fa as in (6.11).
vF ¼ kfa (6.11)
Now a relationship between air gap flux fa and fE should be established. As it
was stated earlier, fE has two components. One of these components is called as
leakage flux fl , which is about 10%–20% of the total flux and proportional to the
air gap flux fa or the current iE flowing through the field coil of DC exciter gen-
erator. Assume that the leakage flux fl and air gap flux fa are related to each other
as in (6.12).
fl ¼ cfa (6.12)
where c is a constant parameter. Since the total flux can be written as in (6.13)
fE ¼ fa þ fl (6.13)
Then, (6.14) and (6.15) are obtained using (6.12).
fE ¼ ð1 þ cÞfa (6.14)
fE ¼ sfa (6.15)
where the s is known as the dispersion constant and has values between 1.1 and 1.2.
Substitution of (6.15) into (6.10) yields (6.16).
N sf_ a þ RE iE ¼ vE (6.16)
The airgap flux can be written as in (6.17) using (6.11).
1
fa ¼ v F (6.17)
k
Then its derivation becomes as in (6.18)
1
f_ a ¼ v_ F (6.18)
k
Thus (6.16) can be rewritten as in (6.19).
1
N s v_ F þ RE iE ¼ vE (6.19)
k
If (Ns/k) is defined as the exciter time constant in seconds as
Ns
tE ¼ (6.20)
k
FLC in power systems 321
in (6.25).
iE ¼ GvF þ GvF SE (6.25)
Substituting (6.25) into (6.21) yields (6.26).
tE v_ F ¼ vE RE GvF RE GvF SE (6.26)
It should be noted that the output voltage vF of the exciter is the field voltage of
the synchronous generator and it causes the induced emf voltage EFD in the stator
windings of the synchronous generator as described by (6.27).
LAD
EFD ¼ pffiffiffi vF (6.27)
3rF
where rF is the total resistance in the field circuit of the generator. Finally, the
exciter model is obtained as in Figure 6.12 using the last two Equations (6.26) and
(6.27).
A normalization of the exciter system equations results in (6.28).
1
EFD ¼ ðVE EFD SE Þ (6.28)
KE þ tE s
where KE ¼ RE G 1. Thus, the block diagram of the exciter will be as in
Figure 6.13.
The effect of the excitation voltage vF of the synchronous generator on the
terminal voltage is analyzed by Anderson and Fouad [1]. This analysis shows that
the operational behavior of the generator is similar to that of a linear amplifier with
a time constant tG having values between no load time constant t0d0 and short
circuit time constant t0d . Representing the generator amplifier gain by KG and
AD
including the saturation effect, the terminal voltage can be written as a function of
the induced voltage EFD as in (6.29).
KG
Vt ¼ EFD (6.29)
1 þ tG s
The overall block diagram of the complete exciter system is obtained by
combining the models of the subsystems included in the overall system. Therefore,
the model of the VTs and rectifier given by (6.6), the model of the difference
amplifier shown in Figure 6.8, the model of the regulator amplifier given in
Figure 6.10, the exciter model in Figure 6.14, and the generator model given in
(6.29) are combined in operational order to yield the complete model of the exciter
system shown in Figure 6.14.
ref e FD FD
dc dc
Figure 6.16 Simulation diagram of the overall exciter system with the regulator
If all of the transfer function blocks shown in Figure 6.14 are converted to their
simulation diagrams and combined together keeping the input and output signals
unchanged in order to obtain the complete simulation diagram given in Figure 6.16.
The state-space model equation of the excitation system with the regulator
amplifier can be written as in (6.32) directly from the simulation diagram given in
Figure 6.16.
2 3
1 Kdc
0 0
2 3 6 6 tdc tdc1
72
7 3 2 0 3
v_ dc 6 KG 7 vdc
6 v_ t 7 6 0 0 76 6 0 7
6 7¼6 tG tG 7 6 vt 77þ6 7
4 e_ FD 5 6 6 ðSE þ KE Þ 1 74 eFD 5 6
7 7vref
4 K0A 5
6 0 0 7
v_ R 6 tE tE 7 vR
4 K 1 5 tA
A
0 0
tA tA
(6.32)
The regulator amplifier included in Figure 6.19 is a first-order amplifier and
acts as a controller in the system. Therefore, the regulator amplifier is replaced by
any other applicable type of controller such as PID or FLC if needed. Therefore, a
simulation model without the regulator amplifier as given in Figure 6.17 may be
required to be used. The blocks representing the regulator amplifier have been
removed from Figure 6.16 to yield Figure 6.17, which includes rectifier and VTs,
comparator, exciter, and the generator.
The state-space model of the exciter system without the regulator amplifier is
given in (6.33), which can be written directly from Figure 6.17.
FLC in power systems 325
ref e FD FD
dc dc
Figure 6.17 Simulation diagram of the overall exciter system without the
regulator
2 1 Kdc 3
2 3 0 3 2 0 3
6 tdc tdc 72
v_ dc 6 7 v dc
4 v_ t 5 ¼ 6
6 0
1 KG 74 6 7
7 vt 5 þ 4 K0A 5vref (6.33)
6 tG tG 7
e_ FD 4 K ðSE þ KE Þ 5 eFD
A tE
0
tE tE
The simulation diagrams and state-space models of the excitation systems
given in this section are just the conventional models of rotational exciters used in
power systems. Static exciters are also used. The excitation system models dis-
cussed above are the models of the basic structures of these systems. They do not
include any compensators, controllers, or power system stabilizers. Only the reg-
ulator amplifier is included in (6.32) and in Figure 6.16.
Example 6.1
Develop a fuzzy logic controller for the system given in Figure 6.16 so that the
voltage oscillations are reduced. The system parameters are given as tdc = 0.015,
Kdc = 1.0, tA = 0.05, KA = 5, tE = 0.5, KE = 0.05, SE = 0.4, tG = 1.0, KG = 1.0.
326 Fuzzy logic control in energy systems, 2nd edition
Answer 6.1
In order to develop an FLC for the system in Figure 6.16, the structure of the
oscillations should be observed with only the regulator amplifier used as the con-
troller. Then the fuzzy rules should be created to generate the actions so that the
oscillations are reduced. Therefore, let us simulate the exciter system shown in
Figure 6.17 or given by (6.33) without a regulator and any other controller. The
response of unregulated and uncontrolled systems is given in Figure E6.1a. A
comparison of the voltage error Ve in Figure E6.1a with the error signal e(k) in
Figure 4.16 shows that both responses are similar and the fuzzy rules developed
using Figure 4.16 can be applied to the exciter systems as well.
As the next step, let us add an FLC to the exciter system as depicted in
Figure E6.1b, such that the regulator is not included. The FLC block includes a
MATLAB .m file representing the FLC code.
The effect of adding an FLC to the exciter as a regulator is given in Figure E6.1(c).
It is shown that the oscillations are reduced by the FLC. The new response does not
oscillate and reaches a steady state value with minimum error.
The FLC used in this system is developed as a MATLAB .m file using a 25-rule
table and sinusoidal membership functions. The fuzzy rule table used in this example
is given in Table E6.1(a) and the fuzzy subsets used in input spaces of error Ve and
error change dVe and in the output space du are given in Figure E6.1(d). The fuzzy
Figure E6.1(a) Responses of the exciter system without regulator and without
controller
tr dc
dc
e(k) de(k)
NBde NSde ZEde PSde PBde
NBe NBdu NBdu NBdu NBdu ZEdu
NSe NBdu NSdu NSdu ZEdu PSdu
ZEe NSdu NSdu ZEdu PSdu PSdu
NSe NSdu ZEdu PSdu PSdu PBdu
PBe ZEdu NSdu NSdu PBdu PBdu
subsets used in all input and output spaces are represented by sinusoid membership
functions. The difference comes only from the boundaries of the universes. Since the
terminal voltage of the synchronous generator is assumed to be 1.0 pu, the reference
voltage input is also selected as 1.0. Therefore, the voltage error Ve is defined in the
interval {1, 1}. Depending on the sampling period, the interval for the change in
error is much smaller than the interval of the universe of error Ve. In this example, the
328 Fuzzy logic control in energy systems, 2nd edition
interval for the change in error is set to {0.02, 0.02}. The boundaries of the change
in control signal are up to the control signal u. Since the control signal is defined in
the interval {0, 1}, than the change in control signal can be defined in {1, 1} same
as the error signal. Mamdani fuzzy reasoning algorithm with the center of area
defuzzification method is used as the fuzzy processor to control this system.
Example 6.2
Simulate the exciter system described in Example 6.1 in Simulink by using the FLC
model developed for Simulink in Chapter 4 and shown in Figure 4.25.
Answer 6.2
Simulation diagram of the exciter system given in Figure 6.16 can be represented in
Simulink as shown in Figure E6.2(a) with the FLC block added as a controller.
Each block named as regulator amplifier, exciter generator, generator, and VT and
rectifier shown in Figure E6.2(a) contains the related simulation models depicted in
Figure 6.15 by dashed lines. The numerical values used for the parameters in
Example 6.1 are also used in this example. A gain block used to scale the control
signal for magnitude adjustment is added to the block diagram. The resultant plot of
the exciter system in Simulink is given in Figure E6.2(b). The response of the
output DC voltage Vdc in this example is similar to the one obtained in Example 6.1.
Due to the numerical solution method and its algorithm used in Simulink being
different in Simulink, the response from the Simulink model is smoother.
REFERENCE
Vref u(k) 0.09 Ve VR VR EFD EFD Vt
FEEDBACK Vt
Uscale
REGULATOR EXCITER THE GENERATOR
Fuzzy Logic Controller1
AMPLIFIER GENERATOR
Vdc Vt
V T AND RECTIFIER
tr e FD t
R
dc
FPSS t
Figure DE6.1(a) A fuzzy PSS design diagram for Design Example 6.1
tr e FD t
R
dc
FC
Figure DE6.1(b) A fuzzy compensator design diagram for Design Example 6.1
330 Fuzzy logic control in energy systems, 2nd edition
Different types of models such as the one called small signal model have been
drawn for LFC systems [1–10].
The load on a power system is usually the sum of two separated parts: one is
the independent load required by devices such as the ones in lighting and heating,
and the other part is required by motor-type loads, which are sensitive to changes in
frequency. The degree of sensitivity to frequency changes depends on the total
combination of the speed–load characteristics of all driven devices. The speed–load
characteristic of a composite load is approximated as in (6.34).
DPe ¼ DPL þ DDw (6.34)
where DPL is the nonfrequency-sensitive load change, and DDw is the frequency-
sensitive load change. D is a constant, expressed as the percentage change in load
divided by percentage change in frequency. DPe is the generated electrical power
and is assumed to be equal to the total load power.
The Laplace transform of the generator model equation (the swing equation of
a synchronous machine in this case), applied on a small perturbation, leads to
(6.35).
DWðsÞ ¼ ½DPm ðsÞ DPe ðsÞ=ð2HsÞ (6.35)
Substitution of (6.34) into (6.35) yields (6.36).
DPm DPL
DW ¼ (6.36)
2Hs þ D
A linearized small signal model of LFC is shown in Figure 6.18 for a single
area system, where H is the machine inertia in seconds and all ts are time constants.
The combination of (6.34) and (6.36) results in the block Rotating mass and
load in Figure 6.18. The mechanical power generation, commonly known as the
prime mover, may be either by hydraulic or steam turbine. The mathematical model
of the turbine relates the changes in mechanical power output DPm to changes in
steam valve position DPV. The most simple prime mover model can be approxi-
mated with a single time constant as in (6.37).
1
DPm ¼ DPV (6.37)
1 þ tT s
The governor model is derived from Figure 6.19, which is called the frequency
drop curve. The frequency drops linearly with increasing demand power. A speed
changer is employed to keep the frequency constant at different operation power
values. For example, the speed changer is set to operate the system at nominal
values w = 1.0 and P = 1.0 pu as depicted by drop curve 1 (the solid line) in
Figure 6.19. If demand power is reduced to 0.75 pu, then the speed changer adjusts
the steam input to the turbine so that the generator operates at a new drop curve
maintaining the frequency at w = 1.0. This new drop curve is named as drop curve
2 (dashed line) in Figure 6.19.
As depicted in Figure 6.19, a change DP in power causes a change Dw in
frequency. The change in frequency due to the change in active power gives the
slope of the drop curve and is represented by letter R, which is also called governor
speed regulation. The slop R has a value around 5%–6% of a power change from no
load to full load condition. The speed regulator compares a reference power with
the frequency change due to the slope of the drop curve and yields a change in
triggering power signal DPg as given in (6.38) which is passed through an ampli-
fier, such as a hydraulic amplifier, to generate a change in the power to the turbine
valve opening as in (6.39). The amplifier is represented by a first-order block called
governor in Figure 6.18.
1
DPg ¼ DPref Dw (6.38)
R
1
DPV ¼ DPg (6.39)
1 þ tg s
When the electrical load of the generator is suddenly increased, the mechanical
power input cannot provide this electrical power instantly. At first, this extra energy
will be taken from the kinetic energy stored in the rotating system. Then, this
energy will moderate causing a decrease in the generator frequency. The change in
speed of the shaft will affect the governor, which will adjust the turbine input valve,
whereby a new steady-state will be reached. A mechanical construction, existing of
the governor and a hydraulic amplifier, tends to the feedback loop with gain 1/R,
FLC in power systems 333
which can be seen in Figure 6.18 where another feedback loop is considered as an
integral controller to reduce the frequency oscillations. By applying this integral
controller, the steady-state frequency deviation, caused by the governor speed
regulation, can be reduced to zero. This integral controller will be replaced by a
fuzzy logic controller associated with a fuzzy decision unit in this section.
A group of generators is said to be coherent if they are coupled internally,
swing in unison, and tend to have the same response characteristics. Such a group
of generators is included in a control area that can be represented by a load–
frequency control loop. As a simplification, a two-area system is considered here.
The generating units are interconnected by a lossless tie line as shown in Figure 6.20.
The active power transmission from generating unit 1 to generating unit 2 is
expressed as in (6.40).
E1 E2
P12 ¼ sin d12 (6.40)
X12
where E1 and E2 are the effective values of back emfs of generating units 1 and 2,
respectively. d12 is the power angle and is equal to the difference between d1 and
d2. X12 is the total reactance between the back emfs of both generating units. Since
the effective voltages E1, E2, and total reactance X12 are assumed to be constant
parameters, a plot of active power transmission versus the power angle is obtained
as in Figure 6.21. If there is a small change in transmitted active power from initial
power P120 to another power P12, there will be a small change in power angle from
the initial angle d120 to the new value d12 as shown in Figure 6.21.
Figure 6.20 Power transmission between two areas over a tie line
The change in the power flowing in the tie line is represented by DP12, which is
a function of the generated voltages in both generators and the phase angle dif-
ference, d12 = d1 d2. A small deviation in the tie line flow can be linearized as in
(6.41) and (6.42).
dP12
DP12 ¼ Dd12 (6.41)
dd12 d120
DP12 ¼ Ps Dd12 (6.42)
The last equation can be rewritten as in (6.43) considering the changes in d1
and d2.
DP12 ¼ Ps ðDd1 Dd2 Þ (6.43)
where Ps is the slope of power angle curve at the initial operating angle d120. The tie line
power flow begins whenever a load increment or decrement occurs in one of the areas.
An LFC system should be able to keep frequency approximately at the nominal
value, maintain the tie line flow at around the scheduled value and each area should
absorb its own load changes. In order to reach these goals, a controller should be
added to each area along with the frequency deviation feedbacks over frequency
bias factors, B1 and B2, as depicted in Figure 6.22. The power flow signal in the tie
line is called as the area control error (ACE) to be used by the applied controller.
The small signal simulation model of two-area power system given in Figure 6.22
uses a classical integral controller. In order to compare the results from the FL con-
troller with a decision maker, a classical integral controller is used to simulate the
system first. The parameters R, B, D, 1/H, Ps, and Kis are constant and defined earlier
in the text. All ts are time constants. The variables x1 to x9 are used for: x1 = Dw1, x2 =
Dw2, x3 = DPm1, x4 = DPm2, x5 = DPV1, x6 = DPV2, x7 = output from controller in area
1, x8 = output from controller in area 2, and x9 = DP12. Steady-space matrices can
easily be written from Figure 6.22.
2 3
D1 1 1
6 2H1 0
2H1
0 0 0 0 0
2H1 7
6 7
6 D2 1 1 7
6 0 0 0 0 0 0 7
6 2H2 2H2 2H2 7
6 7
6 1 1 7
6 0 0 0 0 0 0 0 7
6 tT1 tT1 7
6 1 1 7
6 0 0 7
6 0 0 0 0 0 7
A¼6 tT2 tT2 7
6 7
6 1 0 0 0
1
0
1
0 0 7
6 R t 7
6 1 1 tg1 tg1 7
6 1 1 1 7
6 0 0 7
6 0 0 0 0 7
6 R2 t2 tg2 tg2 7
6 B1 KI1 KI1 7
6 0 0 0 0 0 0 0 7
4 0 B2 KI2 0 0 0 0 0 0 K 5 I2
Ps Ps 0 0 0 0 0 0 0
(6.44)
FLC in power systems 335
Since there are two areas, the steady-state equation can be written with two
input matrices B1 and B2 as in (6.45).
2 3 2 3
1 0
6 0 7 617
6 7 6 7
6 0 7 607
6 7 6 7
6 0 7 607
6 7 6 7
B1 ¼ 6 0 7; B2 ¼ 6
6 7 7
6 0 7; x_ ¼ Ax þ B1 u1 þ B2 u2 (6.45)
6 0 7 607
6 7 6 7
6 0 7 607
6 7 6 7
4 0 5 405
0 0
The input variable vector, x, is a column vector with elements from x1 to x9.
The inputs u1 and u2 are the changes DPL1 and DPL2, respectively, in load powers
of each area.
336 Fuzzy logic control in energy systems, 2nd edition
The system contains two controllers, one for each plant. The input signals
to the controllers are called area-controlled errors (ACE), and are obtained as,
e1 = B1x1 x9 and e2 = B2x2 + x9.
The symbol D is used to represent the changes in actual signals. Since this is a
small signal model, all signals expressed by D are zero in the equilibrium point of
operation. Therefore, the system can be triggered by changes in any of the vari-
ables. Under normal operating conditions, the source of this triggering signal is the
change DPL in load demand in power systems. It is the fact that the triggering
signals here are not absolute values, but relative values according to a selected
reference level. In order not to lead to any confusion between this definition and the
more common one used in small signal modeling, in which the D refers to the
derivative. A visual representation of this notation is shown in Figure 6.23 where
DPL is presented to explain the way the symbol D is used. The coordinate system
with the origin 0 is the original one with the variables at stand-still. If a step change
occurs in DPL power demand at time t0, then the coordinates move to the one with
the origin marked as 00 .
As seen in Figure 6.23, the system load changes from PL0 to PL1 at the instant
t0. Therefore, a triggering signal is produced if the condition given by (6.47) exists.
if t < t0 ) P ¼ PL0 (6.46)
if t > t0 ) P ¼ PL1 (6.47)
In this case, the scale of the axis stays equal with the data being moved to the
coordinate system with the origin 00 . The process explained and given by (6.46) and
(6.47) shows how the changes in load power are represented as the triggering signal
of the system.
the frequency remains constant and its deviation becomes zero. Control action is
not needed under these operating cases. However, a control action is needed when
there are frequency oscillations, which means that the frequency deviation and its
change are not zero requiring control action. Any change in load powers PL1 and
PL2 in Figure 6.22 causes the frequency changes Dw¼Dw1¼x1 for area 1 and
Dw¼Dw2¼x2 for area 2. In order to damp the frequency oscillations, the generated
power is either increased or decreased. Therefore, a power change is added to the
previous value of the power to make the generation and dissipation equal to each
other. Then the question is how the amount of power change is determined and
generated. As shown in Figure 6.24, the amount of change D(DP(k)) in generated
power is determined by a fuzzy logic inference system and added to the previous
value D(DP(k1)) to yield the current output D(DP(k)). It should be noted that this
is nothing but the digital implementation of an integrator, using Euler integration.
In other words, the FLC acts as an integrator. The FL rules in the FLC are devel-
oped to yield a similar but more effective output than an integrator gives. The
difference between a fuzzy logic controller and an integral controller is the pro-
cedure used to calculate D(DP(k)). The fuzzy processor used in this procedure is
given next.
Fuzzy processor for load–frequency control
As shown in Figure 6.24, there are two inputs to the fuzzy processor. The first one
is the change in angular velocity, the other one is the change of it, D(Dw(k)). As the
angular velocity is supposed to be constant, the change of this velocity can be
considered as a disturbance in the system and should be reduced to zero as soon as
possible. These two inputs are fuzzified and converted to fuzzy membership values
that are used in the rule base in order to execute the related rules so that output can
be generated. The fuzzy rule base, or the fuzzy decision table, is the unit mapping
of two crisp inputs, the just mentioned ones, to the fuzzy output space defined on
the universe of D(DP(k)). To simplify the following text, the iteration counter, k,
will be omitted from now on.
The time response of the disturbed change in angular velocity for an impulse
input can be represented by the generalized impulse response error of a second-
order system. The impulse response is considered here for the reason that when a
uniform step in the angular velocity, w, appears, the derivative of w will be one for
a short time and then zero later on. Since the intention is to design a fuzzy logic
controller with a better performance (shorter settling time, less overshoot) than the
Fuzzy Processor
Defuzzifier
Fuzzifier
Rule
Base
Figure 6.24 The FLC system used to determine the change in generated power
338 Fuzzy logic control in energy systems, 2nd edition
× 10–4
1.5
Frequency Deviation (pu)
1
0.5
0
–0.5
–1
–1.5
–2
0 5 10 15 20 25
Time (s)
Operating regions
Dw + 0 0 + + 0
D(Dw) + + + 0 0 0
D(DP) + + + + 0
FLC in power systems 339
Dw D(Dw)
N Z P
N N N N
Z N Z P
P P P P
Dw D(Dw)
N Z P
N N N Z
Z N Z P
P Z P P
340 Fuzzy logic control in energy systems, 2nd edition
In Table 6.4, the negative and positive parts of the corresponding spaces are
portioned into additional subsections as negative large (NL), negative small (NS),
positive small (PS), and positive large (PL). The zero part in each universe is
represented by just a single fuzzy set zero. Now with the input sets extended to five
regions, a similar extension can be made for the output values of D(DP). The result
of this logical and symmetric extension is also shown in Table 6.4. This rule table is
the final one that is going to be used in the FLC for the problem discussed here.
Table 6.4 is the final fuzzy rule table constructed to be used. Both input spaces
in this table are partitioned into five subsections yielding a 25-rule table for the
output decision space, which is also portioned into five fuzzy subsections. As
suggested, the initial limits of the fuzzy sets will be derived from the impulse
response of the system without any controller given in Figure 6.25. The set values
can be derived immediately from Figure 6.25, but a plot of Dw versus D(Dw) is
preferred to identify the upper and lower limits of Dw and D(Dw), clearly. A
visualization of the definition of these fuzzy sets can be seen in Figure 6.26 where
Dw D(Dw)
NL NS ZE PS PL
NL NL NL NS NS ZE
NS NL NS NS ZE PS
ZE NS NS ZE PS PS
PS NS ZE PS PS PL
PL ZE PS PS PL PL
triangular fuzzy sets are used to partition the support sets of the input universes into
fuzzy sub categories.
As given in Figure 6.26, the upper and lower limits of the support sets are
different for Dw and D(Dw). The interval of the latter is much smaller yielding
different scaling for a proper operation of the controller. The fuzzy sets are
initially
defined in the intervals
1:5 104 ; 1:5 104 for Dw, and
6 6
1:5 10 ; 1:5 10 for D(Dw).
The combination of Table 6.4 and Figure 6.26 gives a well-defined summary
of the fuzzy sets and the rules that can be applied to problems similar to the one
being discussed here. The next step in the design process is fuzzy reasoning as
discussed below.
Fuzzy reasoning
The crisp universes of Dw, D(Dw), and D(DP) have been partitioned into five sub-
sections as NL, NS, ZE, PS, and PL as explained earlier. These five fuzzy sub-
sections in all three universes are represented by triangular fuzzy membership
functions as described by (2.7) in Chapter 2. The peaks of triangular fuzzy mem-
bership functions are placed evenly in all three universes. Referring to (2.7) and
Figure 2.4, the parameters of triangular fuzzy subsets used in simulations of FLC
controlled load–frequency problem are summarized in Table 6.5. The use of
Table 6.5 to define the fuzzy subsets in MATLAB or in Simulink is depicted in
Figure 6.27 where a generalized reference universe X is used to show the concept.
NL NS ZE PS PL
4 4 4
Dw 1.5 10 0.75 10 0.0 0.75 10 1.5 104
D(Dw) 1.5 106 0.75 106 0.0 0.75 106 1.5 106
D(DP) 1.0 0.5 0.0 0.5 1.0
The subscripts L, P, and R represent left, peak, and right, respectively. The
abbreviations such as NSL, NSP, and NSR used in Figure 6.27 represent the para-
meters of triangular fuzzy subset negative small (NS). Therefore, (2.7) can be
written as in (6.48) for the fuzzy subset NS.
x NSL NSR x
mNS ðxÞ ¼ max min ; ;0 (6.48)
NSP NSL NSR NSP
Besides the definition of triangular fuzzy membership function, it is required to
calculate the membership degree of D(DP). The following example is given to
clarify the method used to obtain the membership values in output space.
Example 6.3
The frequency change Dw and its change D(Dw) are measured as Dw = 0.45 104
and D(Dw) = 0.15 104 for a sampling instant. Obtain the required change D(DP)
in active power generation to damp the frequency oscillations by using a fuzzy
decision process with the rule Table 6.4. Assume that the input and output uni-
verses have the lower and upper limits as given in Figure 6.26.
Answer 6.3
The fuzzy subsets used to partition the input and output spaces into five sub cate-
gories are shown in Figure E6.3a. The same fuzzy subsets with different parameters
are used in three universes. The numerical values for each universe are given in
Figure E6.3(a).
When Dw = 0.9 104 it intercepts with the fuzzy sets NL and NS in the
input universe of Dw, and when D(Dw) = 0.45 106 it intercepts with the fuzzy
sets ZE and PS in the input universe of D(Dw) as shown in Figure E6.3(a). The
horizontal lines are drawn through the intercepting points of Dw on NL and NS in
Figure E6.3(a) gives the membership values of Dw on fuzzy sets NL and NS,
respectively, while the horizontal line passing through the intercepting points of
D(Dw) on ZE and PS gives the membership values of D(Dw) on these fuzzy sets,
Table E6.3(a) Weighting factors of each rule at the output space D(DP)
input universes of Table E6.3(a). Then the weighting factor for each rule is
obtained using (E6.3h) and written into the corresponding active rule cell of the
output universe D(DP). The final crisp decision is obtained by implementing the
center of area method for defuzzification as in (E6.3j).
Pn
mFS ðDðDPÞÞ ðFSP Þi
DðDPÞO ¼ i¼1 P n (E6.3j)
mFS ðDðDPÞÞ
i¼1
where the subscription FS corresponds to the fuzzy partition subsets defined in output
space. The abbreviation FSP is the crisp D(DP) corresponding to the peak of the tri-
angular membership function. Defuzzification for this problem is done as in (E6.3k).
mNS1 ðDðDPÞÞNSP þ mNS2 ðDðDPÞÞNSP þ mNS3 ðDðDPÞÞNSP þ mZE1 ðDðDPÞÞZEP
DðDPÞO ¼
mNS1 ðDðDPÞÞ þ mNS2 ðDðDPÞÞ þ mNS3 ðDðDPÞÞ þ mNS ðDðDPÞÞ
(E6.3k)
ð0:2Þð0:5Þ þ ð0:2Þð0:5Þ þ þð0:4Þð0:5Þ þ ð0:6Þð0:0Þ
DðDPÞO ¼
ð0:2Þ þ ð0:2Þ þ ð0:4Þ þ ð0:6Þ
DðDPÞO ¼ ð0:2Þð0:5Þþð0:2Þð0:5Þþþð0:4Þð0:5Þþð0:6Þð0:0Þ
ð0:2Þþð0:2Þþð0:4Þþð0:6Þ
DðDPÞO ¼ 0:4
1:4 ¼ 0:285
Example 6.4
A small signal state-space model of a two-area power system with integral control is given
in (6.40) and (6.41) and represented by the simulation diagram shown in Figure 6.22.
Reconsider the same two-area power system and obtain a new simulation diagram and
state-space model to be used with fuzzy logic controllers instead of integral control.
Answer 6.4
The state-space matrices of a two-area power system for the fuzzy logic controller are
obtained by replacing the integral controllers with the fuzzy ones as in Figure E6.4(a).
Since the variables x7 and x8 in Figure 6.22 are generated by integral controllers, they
will be eliminated after the replacement of integral controllers by FLC in each control
area. Therefore, the order of the system is reduced from 9 to 7 as in (E6.4a) and (E6.4b).
2 3
D1 1 1
0 0 0 0
6 2H1 2H1 2H1 7
6 1 7
6 D2 1 7
6 0 0 0 0 7
6 2H2 2H2 2H2 7
6 7
6 0
1 1
0 7
6 0 0 0 7
6 tT1 tT1 7
6 7
A¼6 0
1 1
0 7 (E6.4a)
6 0 0 0 7
6 tT2 tg1 7
6 7
6 1
1
0 7
6 0 0 0 0 7
6 R 1 t1 tg1 7
6 7
6 0
1
1
0 7
4 0 0 0 5
R2 t2 tg2
Ps Ps 0 0 0 0 0
FLC in power systems 345
Figure E6.4(a) Two-area power system block diagram wit fuzzy logic controller
The input matrix B and the input variable matrix U in state-space model
equations are split into submatrices as in (E6.4b) and (E6.4c) to be used in the
simulation with fuzzy logic controller. The submatrices B1, B2, U1, and U2 express
the influence of the fuzzy logic controller as B3, B4, U3, and U4 express the load
difference input.
2 3 2 3 2 1 3 2 3
0 0 0
6 0 7 6 0 7 6 2H1 7 6 1 7
6 7 6 7 6 0 7 6 7
6 0 7 6 0 7 6 7 6 2H2 7
6 7 6 7 6 0 7 6 0 7
6 7 6 7 6 7 6 7
B1 ¼ 6 10 7; B2 ¼ 6 0 7; B3 ¼ 6 0 7; B4 ¼ 6 0 7
6 7 6 0 7 6 7 6 7
6t 7 6 1 7 6 0 7 6 0 7
6 g1 7 6 7 6 7 6 7
4 0 5 4 5 4 0 5 4 0 5
tg2
0 0 0 0
(E6.4b)
346 Fuzzy logic control in energy systems, 2nd edition
Example 6.5
Develop a small signal Simulink model for the FLC-controlled two-area power
system described in Example 6.4 and perform a simulation using the parameters
given in Table E6.5(a). Assume that the slope of the power angle curve at the initial
operating point is Ps = 2.
Answer 6.5
The Simulink model of two-area power systems can be obtained by transferring the
simulation diagram in Figure E6.4(a) directly to Simulink with the parameters
given. Instead of a detailed simulation diagram of Figure E6.4(a), the block dia-
gram given in Figure 6.18 for a single-area power system can be expanded to a two-
area AGC power system model. A second copy of the block diagram given in
Figure 6.18 can be combined with the first one using the tie line power angle slope
Ps as the common element to obtain a unified two-area AGC power system as
shown by the Simulink diagram in Figure E6.5(a). A similar two-area AGC power
system model is given in [4] with integral controllers, which are replaced by the
FLCs here. In order to show the operating performance of the FLC developed in
Chapter 4 of this book, the data given in Table E6.5(a) is taken from [4] and used
here for comparison purposes. The PID controllers with the parameters KP = 0, KI =
0.3, and KD = 0 in [4] are replaced by the FLCs as shown in Figure E6.5(a). The
simulation results are given in Figure E6.5(b) where the FLC responses for both
areas have less oscillations and shorter settling time.
Actually, it should be noted that the comparison made here is not given to
show which controller is better. The comparison is given to show that the proposed
FLC model for the MATLAB/Simulink environment works and gives
acceptable results. The resultant responses from FLC- and PID-controlled systems
are given in Figures E6.5(b) and E6.5(c).
The FLCs used in this example and shown in Figure E6.5(a) by blocks FLC1
and FLC2 are identical and the detailed modelings are discussed in Chapter 4.
Table E6.5(a) Parameters for Example 6.5
Figure E6.5(a) Simulink model of two-area AGC power system with FLC
× 10–3
5
Frequency Change (pu)
–10
–15
0 10 20 30 40
Time (s)
demand power of area 1, its angular velocity will slow down earlier than the
angular velocity of area 2. Therefore, the prime movers in area 1 will act faster and
try to generate more mechanical power to supply the required change while the
prime movers in area 2 start later to supply the change in demand. Due to this
retardation, too much extra mechanical power will be delivered to both plants that
cause the large oscillations in the frequencies. The AGC systems shown in
Figure 6.22 with integral control and in Figure E6.4(a) with FLC use the frequency
change signals at the same time without considering the delay between the instant
the frequency deviations start.
In order to increase the two-area AGC system with FLC, design a fuzzy
decision unit (FDU) such that this unit should compare the angular velocity of areas
1 and 2, and then send extra control signals to the fuzzy logic controllers of both
areas [14]. If the velocity drop is bigger due to demand power increment in area 1,
an extra and larger control signal should be sent to area 1 to generate more
mechanical power than it is in area 2 where a smaller extra signal should be sent.
These additional signals are factors used to multiply the values in the universes of
the change in the control signal, which will result in a quicker change of extra
mechanical power for area 1 and only a small change in mechanical power for area
2 if the disturbance of area 1 is bigger at that moment. These two extra control
signals are also influenced by the value of the angular velocities of both areas in
such a way that if both frequency changes (Dws) are little, both factors will be very
small too.
Design a fuzzy decision unit for the system simulated in Example 6.5 to
improve the performance of the FLC-based AGC using the information
provided above.
Q1
and other electrical devices is called active power. An electrical heater, for exam-
ple, dissipates only active power. Electrical motors and devices with a coil require
another type of power called reactive power. Reactive power has a magnetizing
effect and is required to generate magnetic field for the electrical machines, which
do not have a magnetizing coil or permanent magnet. Especially asynchronous
machines, transformers, and coils require reactive power to operate. The complex
AC power is a combination of these active and reactive powers, which are the real
and imaginary components as given in (6.49).
S ¼ P þ jQ (6.49)
where S is the complex power in VA, P is the active power in W and Q is the
reactive power in VAr. Active power is generated by electrical generators in power
stations and transmitted to the user sites by overhead lines and distribution net-
works. Reactive power is also generated and transmitted to the user in the same
way. However, the reactive power can be generated by capacitors, too. Since it is
able to be generated by capacitors on the user site, then there is no need to transmit
all of the reactive power required by loads from power stations to the loads. Except
for a smaller part needed by transformers in transmission and distribution systems,
all of the reactive power dissipated by loads can be generated by capacitors right on
the load side of the power network as shown in Figure 6.28.
The reactive power compensation in power systems is done for different pur-
poses. It is done for power factor improvement, harmonic elimination, and bus
voltage control. Power factor improvement and bus voltage control applications of
reactive power compensation are discussed in this section.
supply a reactive power up to the amount of Q2 under the power factor cosf2 only.
In order to reduce the transmitted reactive power down to Q2, a reactive power QC
must be generated right on the power input bus of the factory as given in
Figure 6.28.
Using the power triangles before and after the compensation in Figure 6.29, the
following can be written.
Q1
tan f1 ¼ (6.50)
P1
Q1 QC
tan f2 ¼ (6.51)
P1
Required compensation power to increase the power factor up to cosf2 can be
obtained from (6.50) and (6.51) as in (6.52).
QC ¼ P1 ðtan f1 tan f2 Þ (6.52)
Required reactive power to be generated by capacitors for the power factor
cosf2 can be obtained by using (6.52). This is a practical equation to be used to
obtain capacitor power. As the active and reactive power dissipation change on the
load side, the power factor cosf1 of the load bus also changes requiring a change in
capacitor power QC so that the desired power factor cosf2 on the feeder side
remains unchanged. In order to add or remove capacitor groups from the com-
pensator unit to keep the feeder side power factor at cosf2 when there are load
changes, a power factor controller should be designed. A single-line diagram of a
power factor control system is given in Figure 6.30. Measured three-phase active
power, line current, and phase-to-phase voltages are used to calculate three-phase
apparent power, reactive power, and power factor on the feeder side. Calculated
power factor cosf2 is compared with the reference power factor cosfr to generate a
difference, which is called error. Magnitude and the sign of error are then used by a
fuzzy decision maker (FDM) to decide how much reactive power should be added
or removed from the capacitor groups.
The magnitude of feeder side apparent power, reactive power, and power
factor can be calculated from the measured current, voltage, and active power as in
FLC in power systems 351
The required voltage rise can be calculated as the difference between the
reference bus voltage and actual bus voltage as in (6.62).
Vreq ¼ Vref VLL (6.62)
The sign of resultant voltage rise may be positive or negative depending upon
the loading condition of the power line. Positive sign means a voltage increment is
necessary while negative sign means a decrement is required. In order to increase
or decrease the bus voltage, more capacitors should be connected to or dis-
connected from the capacitor groups. The required change in capacitor groups can
be calculated from (6.59) as in (6.63).
pffiffiffi
3
QCR ¼ VLL Vreq (6.63)
XL
where QCR is the required total reactive power to be generated by the capacitor
groups to raise the bus voltage by the amount of Vreq. Therefore, QCR is used with
the current QC to find out how many capacitor groups to be connected or dis-
connected to have a desired bus voltage.
Example 6.6
A three-phase short distribution line has a length of 10 km. The line impedance is
ZL = (0.149 + j0.289) Ohm/km. The line-to-line voltage at the receiving end is
expected to be 6 kV and plant powers are SP1 = (0.8 + j0.6) MVA and SP2 = (0.6 +
j0.4) MVA. A 5% voltage drop is allowed in this transmission system. The sending
end voltage is set to 6.3 kV.
(a) Find load bus voltage, line power flows, and line power factor when there is no
capacitor connected to the load bus b3. Check the voltage drop in line whether
it is less than 5%.
(b) Find the required capacitor power to be connected to bus b3 to increase the line
power factor to 0.98 lagging.
(c) Calculate the voltage rise at bus b3 after the capacitors calculated in part (b) are
connected. Check the voltage drop in line whether it is less than 5%.
Answer 6.6
The voltage at bus b2 can be written as in (E6.6.1)
V b2 ¼ V b3 þ ðRL þ jXL ÞI L (E6.6.1)
where the voltages are phase to neutral and IL is the line current and can be cal-
culated using three-phase apparent power and line-to-line voltage as in (E6.6.2)
SPT
I L ¼ pffiffiffi fT (E6.6.2)
3 Vb3LL
The line current can be calculated using per phase apparent power and line-to-
neutral voltage as in (E6.6.3)
SPT1f
IL ¼ fT (E6.6.3)
Vb3
Since the voltage at bus b3 is not known yet, the line current is expressed as a
function of the voltage at bus b3. Let the phase A to neutral voltage at bus b3 be the
reference to reduce the complexity of the problem. Then (E6.6.1) is written as in
(E6.6.4)
SPT1f
Vb2 jd¼Vb3 j0 þ ZL qZ
o o
fTo
(E6.6.4)
Vb3
Figure 6.34 The fuzzy subsets and the fuzzification of the power change
FLC in power systems 361
a ¼ mS ½DðPQÞki (6.68)
The same five fuzzy rules given for G–S algorithm can be used for N–R
algorithm as well. The fuzzy subset for input and the output spaces are also defined
362 Fuzzy logic control in energy systems, 2nd edition
Figure 6.36 Graphical representation of the fuzzy reasoning for the FLAF in N–R
PF algorithm
by the triangular membership function as given in Figure 6.36 where the FLDM
works in the same way as given in Figure 6.33.
1 DP
Dd ¼ abP ½B0 (6.72)
jV j
1 DQ
DjV j ¼ abQ ½B00 (6.73)
jV j
where B0 and B00 are the imaginary parts of the bus admittance matrix Ybus.
Each one of the FLAFs abP and abQ are generated using the FLDM process
depicted in Figure 6.33. In order to obtain abP , the absolute value of the active
power change DPi ðkÞ at bus i is used as the crisp input variable and to obtain abQ ,
the absolute value of the reactive power change DQi ðkÞ at bus i is used as the crisp
input variable. Therefore, the fuzzy reasoning described in Figure 6.36 is done
twice for abP and abQ by assigning the boundaries of jDPj from 0.0 to 1.2 and the
FLC in power systems 363
boundaries of jDQj from 0.0 to 3.5. The boundaries of the resultant acceleration
factors abP and abQ are chosen from 0.6 to 1.2 and from 0.45 to 1.25.
2.5
Gauss-Seidel
2
Acc. Factor=1.8
1.5
Error
Error
1
0.5
0
0 5 10 15 20 25 30 35
Number of Iterations
Figure 6.37 Convergence error change during the iteration of the classical
Gauss–Seidel algorithm with a = 1.8 constant
2.5
Gauss-Seidel
2
FLAF
1.5
Error
1
Error
0.5
0
0 5 10 15 20 25 30
Number of Iterations
Figure 6.38 Convergence error and the FLAF changes during the iteration of the
Gauss–Seidel algorithm
364 Fuzzy logic control in energy systems, 2nd edition
algorithm are shown in Figures 6.39 and 6.40 without and with the FLAF. Similar
results for FD algorithm are given in Figures 6.41 and 6.42. Figure 6.43 shows a
comparison of the results from G–S algorithm for the cases with and without the
use of FLAF. Results obtained when the FLAF is used give slightly less iteration
and better convergence than the results obtained with the constant acceleration
factor. There is no significant improvement in the result of N–R and FD algorithms.
Since both N–R and FD converge in a couple of iterations for the IEEE 30-bus test
system, the effect of using FLAF is not visible. In fact, the FLAF shows its
advantages if the number of busses is increased to over 100.
4
Newton-Raphson Classic
3.5
2.5
Error
2
Error
1.5
0.5
0
1 1.5 2 2.5 3 3.5 4
Number of Iterations
Figure 6.39 Convergence error change during the iteration of the classical
Newton–Raphson algorithm
4
Newton-Raphson with FL
3.5
2.5
Error
2 Error
1.5
0.5
0
0 1.2 1.4 1.6 1.8 2 2.2 2.4 2.6 2.8 3
Number of Iterations
Figure 6.40 Convergence error change during the iteration of the Newton–
Raphson algorithm with the injected FLAF
FLC in power systems 365
4
Fast Decoupled Classic
3.5
2.5
Error
2
Error
1.5
0.5
0
0 5 10 15
Number of Iterations
Figure 6.41 Convergence error change during the iteration of the classical Fast
Decoupled algorithm
4
Fast Decoupled with FL
3.5
2.5
Error
2
Error
1.5
0.5
0
1 2 3 4 5 6 7 8 9 10 11
Number of Iterations
Figure 6.42 Convergence error change during the iteration of the Fast Decoupled
algorithm with the injected FLAF
2.5
Gauss-Seidel
Convergence Error 2
1.5
With the
1 constant Acc. Factor
0.5
With the FLAF
0
0 5 10 15 20 25 30 35
Number of Iterations
Figure 6.43 Comparison of the G–S algorithm with and without the fuzzy logic
acceleration factor
6.6 Problems
P.6.1 Describe the two main control systems for synchronous generators used to
generate power in power systems. Write the names of the control approaches,
and describe them by sketching-related figure representations. Describe
power–power angle curves of round rotor synchronous machines, and
explain why small power angle values such as 30 are preferred in practice.
P.6.2 Design an FLC to replace the regulator amplifier of the exciter system given
in Figure 6.16 to regulate the output voltage of the system for the conditions
given below. Use the data given in Example 6.1.
(a) There are +5% step changes in reference voltage.
(b) There are 5% step changes in reference voltage.
(c) Repeat parts (a) and (b) for 10% step changes in reference voltage.
(d) Repeat the first three operating conditions for impulse changes in refer-
ence voltage instead of step changes.
P.6.3 A linear approach is used to model the saturation curve of the exciter in
Section 6.2.1. Develop a model to represent the non-linearity of the satura-
tion curve given in Figure 6.11 so that the excitation system modeling will be
more accurate.
P.6.4 Instead of a separately excited DC generator is used as the exciter in
Figure 6.10. Use a controlled rectifier as an exciter instead of a DC generator
and remodel the excitation system of the synchronous generator. Assume that
the field coil of the synchronous generator is in the stator and three-phase
windings are on the rotor. After the modeling is complete, use an FLC to
control this exciter system similar to the one described in Example 6.1.
FLC in power systems 367
P.6.5 An isolated power system exciter system is shown in Figure P6.5(a) where
the amplifier gain is set to 1. Neither a regulator amplifier nor any other
compensator is included. All system data are given in Figure P6.5a.
(a) Obtain a transfer function relating power system terminal voltage Vt to
reference voltage Vref.
(b) Check the stability of this exciter system using the Routh–Hurwitz
method and determine a proper numerical value for amplifier gain, K,
such that the system remains stable.
(c) Apply a unit step reference input and observe the time response of the
output voltage vt.
(d) Design a fuzzy logic controller for the given exciter to dampen the vol-
tage oscillations with zero steady-state error.
P.6.6 A single-area AGC power system is shown in Figure P6.6(a). All system data
are given in the figure.
(a) Obtain a transfer function relating the reference power change DPref to
the frequency change Dw.
(b) Apply a unit step change in power demand and observe the time
response of the frequency change Dw. Assume that the reference power
change is zero.
(c) Design a fuzzy logic controller for the given exciter to dampen the fre-
quency oscillations and keep the frequency unchanged.
Figure P6.5(a) Power system exciter model without any regulator or stabilizer
P.6.7 A two-area AGC power system is shown in Figure P6.7(a). All system data
are given in the figure.
(a) Assume that all mechanical power input changes are zero when a step
change of 0.2 pu occurs in demand power DPL1 and analyze the fre-
quency change responses by developing a Simulink model of the system.
(b) Develop a fuzzy logic controller or use the one developed in Chapter 7 in
this two-area AGC system to dampen the frequency oscillations and
control the mechanical power input changes of the units in both areas.
P.6.8 Design a fuzzy decision maker for the two-area AGC power system given in
Problem P.6.7 so that the units in both areas are activated to overcome the
frequency oscillations by adjusting the mechanical power inputs on time
when a change occurs in demand powers of any one of the areas.
P.6.9 A large manufacturing plant is operated at a voltage of 10 kV and a demand
power of 6 MW at a power factor of 0.75 lagging. The impedance of the
power line is 0.4 + j1.3 Ohm/phase.
(a) Calculate the apparent and reactive power driven by the load when the
load bus voltage is 10 kV.
(b) Calculate the voltage at the sending end of the power line. Assume that
this voltage at sending end is kept constant for the rest of the
operating cases.
(c) Calculate the required reactive power to improve the power factor to
0.98 lagging.
(d) Assume that the capacitors are to be connected in grounded wye and
there are only 100 kVAr increments in capacitor size. Write an order list
to buy the required capacitors.
(e) Also, calculate the power line current and line I2R losses before and after
adding the capacitors.
P.6.10 Assume the same power line and the manufacturing plant described in
Problem P.6.9. If the reactive power generated by the capacitors to improve
the power factor to 0.98 lagging is 4073.2 kVAr.
FLC in power systems 369
References
[1] Anderson P.M. and Fouad A.A. Power System Control and Stability. Pis-
cataway, NJ: IEEE Press, 1993.
[2] Sauer P.W. and Pai M.A. Power Systems Dynamics and Stability. Englewood
Cliffs, NJ: Prentice-Hall, 1998.
[3] Crenshaw M.L., Cutler J.F., Wright G.F. and Reid W.J. ‘Excitation system
models for power system stability studies’. IEEE Committee Report, IEEE
Transaction on Power Apparatus and Systems. 1981;PAS-100(2):494–509.
[4] Saadat H. Power System Analysis. New York: McGraw-Hill, pp. 556–566,
1999.
[5] IEEE Committee Report. ‘Excitation system models for power system sta-
bility studies’. IEEE Transaction on Power Apparatus and Systems. 1981;
PAS-100(2):494–509.
[6] IEEE Committee Report. ‘Computer representation of excitation systems’. IEEE
Transaction on Power Apparatus and Systems. 1968;PAS-87(6):1460–1464.
[7] Demello F.P. and Concordia C. ‘Concepts of synchronous machine stability
as affected by excitation control’. IEEE Transaction on Power Apparatus
and Systems. 1969;PAS-88(4):316–329.
[8] Larsen E.V. and Swann D.A. ‘Applying power system stabilizers. Part I:
general concepts’. IEEE Transaction on Power Apparatus and System. 1981;
PAS-100(6):3016–3024.
[9] Ekinci S. and Demirören A. ‘Modeling, simulation, and optimal design of
power system stabilizers using ABC algorithm’. Turkish Journal of Elec-
trical Engineering & Computer Sciences. 2016;24(3): 1532–1546.
[10] Kamwa I., Grondin R. and Trudel G. ‘IEEE PSS2B versus PSS4B: the limits
of performance of modern power system stabilizers’. IEEE Transactıons on
Power Systems. 2005;2(2):903–915.
[11] Corcau J.I. and Stoenescu E. ‘Fuzzy logic controller as a power system sta-
bilizer’. International Journal of Circuıts, Systems and Signal Processing.
2007;1(3):266–273.
370 Fuzzy logic control in energy systems, 2nd edition
[12] Chaturvedi D.K. and Malik O.P. ‘Neurofuzzy power system stabilizer’. IEEE
Transactions on Energy Conversion. 2008;23(3): 887–894.
[13] Hoang P. and Tomsovic K. ‘Design and analysis of an adaptive fuzzy power
system stabilizer’. IEEE Transactions on Energy Conversion. 1996;11
(2):455–461.
[14] Altas I.H. and Neyens J. ‘A fuzzy logic decision maker and controller for
reducing load frequency oscillations in multi-area power systems’. IEEE
Power Engineering Society General Meeting, Montreal, Canada, June 2006.
[15] Dimond H.M. and Lunge G.S. ‘Continuous load–frequency control for
interconnected power systems’. Transactions of the American Institute of
Electrical Engineers. 1948;67(2):1483–1490.
[16] Bengiamin N.N. and Chan W.C. ‘Multilevel load–frequency control of
interconnected power systems’. Proceedings of the Institution of Electrical
Engineers. 1978;125(6): 521–526.
[17] Rahmani M. and Sadati N. ‘Hierarchical optimal robust load–frequency
control for power systems’. IET Generation, Transmission & Distribution.
2012;6(4):303–312.
[18] Liu F., Song Y.H., Ma J., Mei S. and Lu Q. ‘Optimal load–frequency control
in restructured power systems’. IEE Proceedings-Generation, Transmission
and Distribution. 2003;150(1):87–95.
[19] Christie R.D. and Bose A. ‘Load frequency control issues in power system
operations after deregulation’. IEEE Transactions on Power Systems. 1996;
11(3):1191–1200.
[20] Pan C.T. and Liaw C.M. ‘An adaptive controller for power system load–
frequency control’. IEEE Power Engineering Review. 1989;9(2):45–46.
[21] Ersdal A.M., Imsland L. and Uhlen K. ‘Model predictive load–frequency
control’. IEEE Transactions on Power Systems. 2016;31(1):777–785.
[22] Eremia M. and Shahidehpour M. (eds.) ‘Active power and frequency con-
trol’. Handbook of Electrical Power System Dynamics: Modeling, Stability,
and Control. Wiley-IEEE Press, 2013, pp. 291–339. DOI: 10.1002/
9781118516072.ch3
[23] Feliachi A. ‘Optimal decentralized load frequency control’. IEEE Power
Engineering Review. 1987;PER-7(5): 44–45.
[24] Varma K.A., Mohanta D.K. and Reddy M.J.B. ‘Applications of type-2 fuzzy
logic in power systems: a literature survey’. 12th International Conference
on Environment and Electrical Engineering; 2013, pp. 282–286.
[25] Baysal Y.A. and Altas I.H. ‘A fuzzy reasoning approach for optimal location
and sizing of shunt capacitors in radial power systems’. IEEE Energy Con-
version Congress and Exposition (ECCE); Montreal, Canada, September
2015, pp. 5838–5842.
[26] Song Y.H. and Johns A.T. ‘Applications of fuzzy logic in power systems. I.
General introduction to fuzzy logic’. Power Engineering Journal. 1997;11
(5):219–222.
FLC in power systems 371
[27] Song Y.H. and Johns A.T. ‘Application of fuzzy logic in power systems. II.
Comparison and integration with expert systems, neural networks and
genetic algorithms’. Power Engineering Journal. 1998;12(4):185–190.
[28] Song Y.H. and Johns A.T. ‘Applications of fuzzy logic in power systems. III.
Example applications’. Power Engineering Journal. 1999;13(2): 97–103.
[29] Vlachogiannis J.G. ‘Fuzzy logic application in load flow studies’. IEE Pro-
ceedings—Generation, Transmission and Distribution. 2001;148(1):34–40.
[30] Lo K.L., Lin Y.J. and Siew W.H. ‘Fuzzy-logic method for adjustment of
variable parameters in load–flow calculation’. IEE Proceedings—Genera-
tion, Transmission and Distribution. 1999;146(3): 276–282.
[31] Gupta A., Jain D.K. and Dahiya S. ‘Management of power exchange
between hybrid microgrids using intelligent control’. IEEE 6th International
Conference on Power Systems (ICPS); 2016, pp. 1–6.
[32] Gajalakshmi P. and Rajesh S. ‘Fuzzy modeling of power flow solution’.
INTELEC 07—29th International Telecommunications Energy Conference;
2007, pp. 923–927.
[33] Dixit S., Srivastava L. and Agnihotri G. ‘Power flow analysis using fuzzy
logic’. IEEE Power India Conference; 2006, pp. 7.
[34] El-Hawary M.E. Electric Power Applications of Fuzzy Systems. Piscataway,
NJ: IEEE Press, 1998, pp. 112–146.
[35] Liu C.C., Pierce D.A. and Song H. ‘Intelligent system applications to power
systems’. in IEEE Computer Applications in Power. 1997;10(4):21–24. doi:
10.1109/67.625369.
[36] Ibrahim W.R.A. and Morcos M.M. ‘Artificial intelligence and advanced
mathematical tools for power quality applications: a survey’. IEEE Trans-
actions on Power Delivery. 2002;17(2):668–673.
[37] Pandey S.K., Mohanty S.R. and Kishor N. ‘A literature survey on load–
frequency control for conventional and distribution generation power sys-
tems’. Renewable and Sustainable Energy Reviews. 2013;25:318–334.
[38] Suganthi L., Iniyan S. and Samuel A.A. ‘Applications of fuzzy logic in
renewable energy systems—a review’. Renewable and Sustainable Energy
Reviews. 2015;48:585–607.
[39] Hiyama T., Miyazaki K. and Satoh H. ‘A fuzzy logic excitation system for
stability enhancement of power systems with multi-mode oscillations’. IEEE
Transactions on Energy Conversion. 1996;11(2):449–454.
[40] Guan X., Luh P.B. and Prasannan B. ‘Power system scheduling with fuzzy
reserve requirements’. IEEE Transactions on Power Systems. 1996;11
(2):864–869.
[41] Liu W.H.E. and Guan X. ‘Fuzzy constraint enforcement and control action
curtailment in an optimal power flow’. IEEE Transactions on Power Sys-
tems. 1996;11(2):639–645.
[42] Mori H. and Kobayashi H. ‘Optimal fuzzy inference for short-term load
forecasting’. IEEE Transactions on Power Systems. 1996;11(1):390–396.
372 Fuzzy logic control in energy systems, 2nd edition
[43] LaMeres B. and Nehrir M.H. ‘Fuzzy logic based voltage controller for a
synchronous generator’. IEEE Computer Applications in Power. 1999:
46–49.
[44] IEEE Recommended Practice for Excitation System Models for Power
System Stability Studies. IEEE Std 421.5-2005, IEEE Power Engineering
Society, 2006.
[45] Malik O.P., Kumar A. and Hope G.S. ‘A load frequency control algorithm
based on a generalized approach’, IEEE Transactions on Power Systems.
1988;3(2):375–382.
[46] Chan W.C. and Hsu Y.Y. ‘An optimal variable structure stabilizer for power
system stabilization’. IEEE Power Engineering Review. 1983;PER-3(6):49.
[47] Korelic J. and Jezernik K. ‘Predictive variable-structure system control of
unity power factor rectifiers’. IET Power Electronics. 2013;6(8):1608–1617.
[48] Bergen A.R. and Vittal V. Power Systems Analysis, 2nd ed. Englewood
Cliffs, NJ: Prentice-Hall, 2000.
[49] Ajjarapu V. and Christy C. ‘The continuation power flow: a tool for steady
state voltage stability analysis’. IEEE Transactions on Power Systems. 1992;
7(1):416–423.
[50] Shirmohammadi D., Hong H.W., Semlyen A. and Luo G.X. ‘Compensation-
based power flow method for weakly meshed distribution and transmission
networks’. IEEE Transactions on Power Systems. 1988;3(2):753–762.
[51] Carol S.C. and Shirmohammadi D. ‘Three-phase power flow method for
real-time distribution system analysis’. IEEE Transactions on Power Sys-
tems. 1995;10(2):671–679.
[52] Wang Z., Alvarado F.L. ‘Interval arithmetic in power flow analysis’. IEEE
Transactions on Power Systems. 1992;7(3):1341–1349.
[53] Satpathy P.K., Das D. and Gupta P.B.D. ‘Power flow analysis using fuzzy set
approach’. The Institution of Engineers (India) Publications. 2004;85(1):55–59.
[54] Bijwe P.R., Hanmandlu M. and Pande V.N., ‘Fuzzy power flow solutions
with reactive limits and multiple uncertainties’. Electric Power Systems
Research. 2005;76:145–152.
[55] Miranda V., Manuel M.A.C.C. and Saraiva J.T. ‘Fuzzy load flow—new
algorithms incorporating uncertain generation and load representation’,
Proceedings of PSCC’90—10th Power System Computation Conference,
August 1990, pp. 621–627.
[56] Altas I.H. ‘A fuzzy logic controlled tracking system for moving targets’, 12th
IEEE International Symposium on Intelligent Control, ISIC’97, July 16–18,
1997, Istanbul, Turkey, pp. 43–48.
Chapter 7
FLC in wind energy systems
7.1 Introduction
Wind is one of the renewable clean energy sources. It can be possibly operated
without producing carbon dioxide, sulfur dioxide, particulates, or any other type of
air pollution. Wind energy offers strong ecological concerns and advantages over
conventional energy solutions, especially in remote and isolated areas. Due to its
positive impacts on energy demand, the installations of wind energy systems
(WES) have been rapidly growing for the last decades.
A wind energy conversion (WEC) system converts the kinetic energy available
in the wind to mechanical energy that can be used as a prime mover to drive a
rotational electrical generator [1]. Generally, a WEC system consists of a wind
turbine, gearbox, generator, interfacing converter, required control systems, and of
course a tower. The WEC systems can be installed as either standalone schemes for
supplying power to locally isolated users in remote areas or installed as a part of the
electric grid system.
As the share of WEC systems in electrical power generation keeps increasing,
new challenging problems come to the present. Interfacing the WEC systems to the
utility grid is not an easy task as it is in conventional hydraulic or steam-based
electrical power generation systems. Changes in wind speed affect the amount of
generated power as well as the magnitude and frequency of the generated voltage.
Besides, the switchable loads in off-grid applications affect the voltage and the fre-
quency at the load bus. An analysis of the operational characteristics shows that the
WEC systems are very complicated and require high-level controllers to deal with
the problems. Fuzzy logic controllers are considered as one of the solution approa-
ches in these systems. Fuzzy logic decision-makers are also used as energy man-
agement tools in WEC interfacing systems. The pitch angle of the blades, excitation
of asynchronous generators, voltage and frequency of the interfacing units, and
maximum power extraction are the main tasks that are required to be controlled.
374 Fuzzy logic control in energy systems, 2nd edition
In addition to the control of the main operational process, the power quality
and security aspects could also be considered. Therefore, effective active filters
such as flexible AC transmission system (FACTS) devices are needed to be
designed and utilized. Energy management algorithms for energy sustainability and
economic system operation are applied. Fuzzy decision-based management sys-
tems can be used to develop effective and dynamic power management on both the
generation and user sides. The harmonics and power factor correction problems can
be solved easily and in the cheapest ways by employing the conventional passive
power filter (PPF) with the fixed AC power capacitor banks as described in
Chapter 6. However, the use of PPFs may pose hidden series and parallel resonance
risks in the AC grid system with harmonic sources. The power resonance condition
causes the harmonic voltage and current at a given bus to be increased and results in
damage to other equipment connected to the same bus.
Nowadays, FACTS devices are used in various sections of power systems for
power factor improvements and harmonic mitigation including those of renewable
energy systems, too. FACTS or other active power filters are realized either as
voltage source or current source devices. WEC systems require fast and reliable
power conditioners for reactive power requirements, harmonic eliminations, and
bus voltage stability. The power conditioners consisting of generation control,
interfacing control, dissipation control, and power quality control must be fast
enough to comply with any changes in wind speed and demand power.
Studies in the literature show that researchers are dealing with all problem
aspects in various ways. A literature search enlightens us to see which problems
are to be solved, which methods have been applied to solutions, and which
new methods can be applied for better solutions. Although there are so many
researches in pitch angle control [1–7], generator excitation control [8–12],
AC–DC–AC link control [13–15], inverter control [16–18], interfacing device
control [19–21], power quality and harmonic filtering control [22,23], and
power management [24–26]. Besides, the studies in electrical engineering point
of view, the blade size and structure, turbine and generator sizing, and blade
materials are important topics under study [27–29].
In this chapter, after the basic theory of electrical power generation by WEC
systems, some examples based on the author’s research and thesis done by his
graduate students are given.
Asynchronous
Blades
generator DC link b6
b1 T1 b2 Rectifier b3 b4 Inverter b5 T2
Load bus or
utility grid
R +j X
Excitation
capacitors Driver Driver
Gear train
PG α rec V DC α inv ω
Driver
Pitch angle
v nominal v cut-out
1 Pnominal
0.8
Power (pu)
0.6
0.4 v cut-in
0.2
0
0 5 10 15 20
Wind speed (m/s)
In an electrical power system, the frequency and voltage magnitudes are two
important system variables that are kept constant on the user side. The frequency
and voltage magnitude are two critical design parameters of commercial devices.
Every commercial device or appliance is designed to be operated at their rated
voltages with the rated frequencies. Therefore, either the speed of electrical gen-
erator has to be kept constant or additional interfacing converters have to be
employed and controlled to keep the voltage and the frequency constant. Since the
wind speed is variable due to its nature, it is not an easy task to keep it constant by
adjusting pitch angle or gear train. Therefore, power electronic converters must be
used to have a more stable, flexible, and easier-to-control voltage and frequency
profile.
A WEC system mainly has wind speed, voltage, and frequency controllers.
The wind speed is adjusted by controlling the pitch angle of the blades. This
method is usually applied to match the wind turbine speed with the electrical power
demand. The mechanical power from a wind turbine is determined by the wind
speed characteristics. The turbine generates more mechanical power at higher
speed and less power at lower speeds. A typical wind speed characteristic showing
the generated power is given in Figure 7.2.
376 Fuzzy logic control in energy systems, 2nd edition
Wind turbines convert wind power into mechanical power in terms of wind
speed. Due to its inertia a wind turbine is able to generate a mechanical output power
if the wind speed is greater than a value called cut-in speed as shown in Figure 7.2.
The mechanical structure and strength of the turbine are limited to stand up to a
speed called cut-out speed. The turbine can generate power at wind speeds between
cut-in and cut-out speeds. Output power from the turbine is zero if the wind speed is
below cut-in or above cut-out values. The speed above the cut-out value becomes
dangerous for the mechanical structure and rotating shaft. Therefore, the rotation of
the wind turbine blades and the shaft are mechanically locked to prevent damage.
The mechanical power output of the turbine is a cube of the wind speed and must be
limited at its rated value at higher speeds by stall control, active stall control, or pitch
angle control [30]. During stall control, the blade position is fixed to reduce the
speed of the blades. In active stall control, the blade angle is adjusted and a stall is
obtained along the blades. By pitch control, the blades are turned around the blade
axis so that the wind effect on the blades becomes minimal.
Wind power depends on the amount of air (volume), speed of air (velocity),
and mass of air (density) flowing through an area. The kinetic energy of a mass m
moving with a speed of v is expressed as in (7.1).
1
EK ¼ mv2 (7.1)
2
Since the energy per unit of time is defined as the power, the wind power can
be written as in (7.2).
1 dm 2
PW ¼ v (7.2)
2 dt
where m_ ¼ dm=dt is called mass flow rate and calculated using fluid flow equa-
tions as in (7.3).
dm
¼ rAv (7.3)
dt
where v is the wind speed (m/s), r is the air mass density (kg/m3) and A is the swept
area (m2) of the rotor blades and defined by the radius of the turbine rotor.
Substituting (7.3) into (7.2) yields the wind power equation as a function of air
density, rotor swept area, and cube of velocity as given in (7.4).
1
PW ¼ rAv3 (7.4)
2
Equation (7.4) gives theoretically available wind power to the turbine. This is
the ideal wind power available. The wind turbine can transfer only some part of this
available wind power to usable mechanical power at the output. Therefore, the
output power of a wind turbine is expressed as in (7.5).
1
PT ¼ rAv3 Cp (7.5)
2
FLC in wind energy systems 377
where Cp ¼ PT =PW is called the turbine power coefficient and represents the
power conversion efficiency of the wind turbine. A possible maximum value of Cp
= 16/27 is called the Betz limit and gives an efficiency of 59%, which is between
40% and 45% in practice [31]. The power coefficient Cp is defined as a function of
blade tip speed ratio, l, and blade pitch angle, b. It is obtained experimentally for
the turbine used. Various functions and approaches based on curve fitting techni-
ques to polynomial equations [32–38] have appeared in the literature. The function
given in (7.6), which is widely used in literature for simulation purposes, is sug-
gested in [39] to represent Cp(l,b).
C2
C3 b C4 eð l þC6 Þ
C5
Cp ðl; bÞ ¼ C1 (7.6)
l
where l is the blade tip speed ratio (TSR), which is defined as in (7.7).
nRwr
l¼ (7.7)
v
where n is the gear ratio, R is the radius of the turbine rotor, and wr is the angular
velocity of the rotor. The wind speed can be kept constant at turbine-rated speed as
depicted in Figure 7.2 or at other desired speeds by active stall control or pitch
angle control. At various constant wind speeds, the mechanical power or torque to
the electrical generator varies with the angular velocity of the rotor. Equations
(7.5)–(7.7) can be used to obtain turbine output power versus rotor angular speed
curves as shown in Figure 7.3, which are also called power curves of wind turbines.
The power–speed curves in Figure 7.3 are obtained using a MATLAB file as in
Figure 7.4 with a MATLAB function given in Figure 7.5.
The turbine output curves are used as a reference benchmark in order to
simulate WEC systems. As shown in Figure 7.3, the maximum power from the
wind turbine is increasing as the wind speed increases. Therefore, a maximum
power point tracking controller is required to get the maximum power available
when the wind speed changes. The output power from the wind turbine is the input
2
Maximum power curve Wind speed
1.5
14 m/s
Power (pu)
1
12 m/s
0.5
10 m/s
0
8 m/s
-0.5
0 10 20 30 40 50
Rotor speed (rad/s)
Figure 7.4 MATLAB file used to plot wind turbine power curves
mechanical power to the electrical generator. The driving torque of the electrical
generator is directly obtained from the mechanical power using (7.8).
PT
Tm ¼ (7.8)
wr
where Tm is the mechanical input torque of the electrical generator used in the WEC
system.
permanent magnet synchronous, and direct current (DC) generators are the most
used ones. Synchronous and DC generators require additional power sources for
their excitation units. Besides, their speed–torque characteristics show that they are
not suitable to generate the same electrical power at different speeds.
Generating the same power is an important task in power systems as long as
the power demand does not change. Therefore, electrical power generation should
not be affected by the wind speed changes easily. If the wind speed is kept constant
by pitch angle or stall control, then synchronous generators can be used to feed
variable loads at a constant frequency. However, wind speed is a variable quantity
and changes randomly. For small changes, its effect on the wind turbine may be
kept constant by stall and/or pitch angle control. However, during larger stepwise
changes in wind speed, the constant speed moves to a new level as depicted in
Figure 7.3. In this case, the same power should be generated at the new speed level
in order to keep feeding the loads.
Induction generators, which are also called asynchronous generators, are gen-
erally preferred to be used in WEC systems because they can generate the same
power at different speeds. Therefore, in order to have a constant power output from
the electrical generator at different speed levels, induction generators are the most
suitable generator types. As shown by speed–power characteristics in Figure 7.6, an
induction machine can generate the same electrical power under different speed
levels.
Although the same electrical power is to be generated at different speed levels,
the frequency of the generated voltage will be changed as the speed changes. Thus,
a DC link is placed between the induction generator and AC load bus for voltage
and frequency controls as shown in Figure 7.1. Since the electrical variables and
their control are the major topic in this book, an asynchronous generator with a DC
link interfacing equipment to the load bus or utility grid is considered as the elec-
trical generator in the WEC system here.
n (rpm)
n3
n2
n1
Generator Motor
where vs and vr are the subarrays containing three-phase stator and rotor voltages
va, vb, vc, and vd, ve, vf, respectively. Similarly, the subarrays is and ir contain three-
phase stator and rotor currents ia, ib, ic, and id, ie, if, respectively. The stator sub-
matrix Zss and rotor submatrix Zrr are 3 3 matrices which are independent of rotor
position angle and time. However, the matrices Zsr and Zrs include the mutual
inductances between stator and rotor windings which are not stationary with respect
to each other. Therefore, 3 3 submatrices Zsr and Zrs consist of time-dependent
mutual inductances that vary as the rotor position angle changes as a function of
time. These variable mutual inductances of the three-phase machine are defined as
382 Fuzzy logic control in energy systems, 2nd edition
follows:
Mad ¼ Mda ¼ Msr cos q (7.23)
2p
Mae ¼ Mea ¼ Msr cos q þ (7.24)
3
2p
Maf ¼ Mfa ¼ Msr cos q (7.25)
3
2p
Mbd ¼ Mdb ¼ Msr cos q (7.26)
3
Mbe ¼ Meb ¼ Msr cos q (7.27)
2p
Mbf ¼ Mfb ¼ Msr cos q þ (7.28)
3
2p
Mcd ¼ Mdc ¼ Msr cos q þ (7.29)
3
2p
Mce ¼ Mec ¼ Msr cos q (7.30)
3
Mcf ¼ Mfc ¼ Msr cos q (7.31)
where Msr = Mrs = M is the peak value of the mutual inductance between any pair of
stator and rotor windings. The mutual inductance equations given above show that
the impedance matrices Zsr = Zrs are equal and vary as the rotor rotates.
Since the stator and rotor windings are not stationary, the solution of Equation
(7.21) or (7.22) becomes difficult. Hence, this three-phase equation system is
transferred to a reference system such that all stator and rotor variables are repre-
sented in a two-phase stationary system, called the d–q axis system. The transfor-
mation process from the rotating three-phase system to the stationary two-phase
system can be found in [42,43]. After the transformation to a d–q axis model, the
circuit representation of the three-phase induction motor windings is changed from
Figures 7.7 and 7.8 resulting in d–q axis model equations as given in (7.32).
2 3 2 32 3
vds Rs þ Ls p 0 Mp 0 ids
6 vqs 7 6 0 R þ L p 0 Mp 76 iqs 7
6 7¼6 s s 76 7 (7.32)
4 vdr 5 4 Mp Mpq Rr þ Lr p Lr pq 54 idr 5
vqr Mpq Mp Lr pq Rr þ Lr p iqr
where p = d/dt is the derivative operator and q is the rotor angle which is the angle
between phase a of the stator and phase d of the rotor. Then, pq in equation (7.32) is
the first derivative, dq/dt, of the rotor angle.
The d–q axis model equations of the three-phase induction machine are solved
for the currents ids, iqs, idr, and iqr. The rotor speed wm = pq = dq/dt is another
unknown in equation (7.32) if the machine is operated as a motor. However, the
FLC in wind energy systems 383
c
ic
vc
Nc
f Nd d
if v
f
120o vd id Na
Reference
Nf θ a stationary axis
Reference
ia va stator axis
ve Ne
vb ie
ib Nb
b e
q axis
iqs
N qs
vqs
iqr
N qr vqr
N dr N ds
d axis
vdr idr vds ids
dwm d2q
Te ¼ Tm Jm ¼ Tm Jm 2 (7.33)
dt dt
where Te is developed generator torque (Nm), Tm is mechanical input torque (Nm)
from the turbine, Jm is rotational inertia (kg m2), q is rotor position angle (radius),
and wm is the rotor speed (radius/seconds). In this system, the rotor speed wm and
input torque Tm are known inputs from the wind turbine. It should be noted that the
developed torque Te is approximately equal to the mechanical input torque Tm
during steady-state operation. The developed torque Te can be written as a function
384 Fuzzy logic control in energy systems, 2nd edition
diqs 1
¼ Rs Mids þ wm Miqs Rr Lr idr þ wm Lr iqr Mvds þ Lr vdr (7.39)
dt Ls Lr M 2
didr 1
¼ Rs Mids þ wm Miqs Rr Ls idr þ wm Lr iqr Mvds þ Ls vdr (7.40)
dt Ls Lr M 2
diqr 1
¼ wm Mids þ Rs Miqs wm Lr idr Lr Ls iqr Mvqs þ Ls vqr (7.41)
dt Ls Lr M 2
dwm Tm P M
¼ ids idr iqr ids (7.42)
dt Jm 2 Jm
In order to solve the d–q model equations of the three-phase induction machine
given above, the voltages vds, vqs, vdr, and vqr must be known besides the machine
parameters. Since a squirrel cage induction machine is used, the rotor voltages vdr
and vqr become zero. Only the stator voltages vds and vqs are required to be known.
FLC in wind energy systems 385
Since excitation capacitors are used in self-excited induction generators the stator
voltages are equal to the excitation voltages of the capacitors. The d–q axis stator
voltages are obtained from the three-phase voltages va, vb, and vc by applying phase
conversion methods as described in [40–44].
Load bus
a
b
c
P3 I
Q3I Q3I
C C C
Tm Induction
generator
preferable due to line losses and distribution system performance. Therefore, the
required reactive power is generated by capacitor groups installed next to the WEC
system as depicted in Figure 7.9(b).
In utility-isolated WEC systems using induction generators, the reactive power must
be supplied from capacitors since there is no utility or other sources around as given in
Figure 7.10. In this case, capacitors are used for both excitation and for the reactive
power demand of the loads. It should be noted that Figures 7.9 and 7.10 are used to show
only the active and reactive power flow direction and sources. The interfacing devices,
such as rectifiers and inverters, are used to establish a DC link between the generator and
utility or the load bus for voltage and frequency control purposes.
As the above explanations show, an induction generator should be considered
with its excitation unit. Since the excitation unit requires a capacitor group to be
connected across the output terminals of the induction generator, this capacitor should
be considered in dynamic modeling. Since the bars in the rotor of squirrel cage
induction machines are short-circuited and the ends of three-phase rotor winding of
the wound rotor induction machines are assumed to be short-circuited for the dynamic
modeling process, then the circuit representation of induction machine in stationary
d–q frame becomes as in Figure 7.11, which yields the per phase equivalent circuit
representation of stationary d–q axis model of induction generator as in Figure 7.12.
The excitation capacitor per phase is placed across the per phase equivalent
stationary d–q axis circuit. They are initially charged by the remnant voltages of the
three-phase windings due to the magnetizing effects of the magnetic core. The
voltages across the capacitors in Figure 7.12 can be written as in (7.43) and (7.44).
ð
1
vqc ¼ iqc dt þ vqc0 (7.43)
C
ð
1
vdc ¼ idc dt þ vdc0 (7.44)
C
FLC in wind energy systems 387
q axis
iqL
iqs
N qs C
vqs
iqr vqr =0
N qr
N dr N ds
d axis
idr vds ids
vdr = 0
C idL
R L L R
(a)
R L L R
where during no load operating condition idc ¼ ids and iqc ¼ iqs . The voltages vqc0
and vdc0 are the initial capacitor voltages along q and d exes. It has been assumed
the capacitors are charged to these values initially. The rotor flux linkages lqr and
388 Fuzzy logic control in energy systems, 2nd edition
The solution of (7.52) yields d–q axis currents of the rotor and stator of the
induction machine using the initial capacitor and residual voltages. Since the
terminal voltages vqs and vds are equal to the capacitor voltages vqc and vdc,
respectively, (7.43) and (7.44) can be used to calculate terminal voltages, as well.
The d–q modeling of induction generator is given for no load condition in this
section. Under loading conditions, the stator current becomes equal to the sum of
load and capacitor currents.
A general schematic diagram of a WEC system is given in Figure 7.1 where control
blocks are also included. Stall and pitch angle are controlled on the wind turbine
side for demand power matching. The excitation capacitor switching is controlled
to adjust the reactive power, and therefore the terminal voltage of the induction
generator. Depending on the interfacing scheme to loads or to the utility additional
controllers are also used in WEC systems. Rectifier and inverter control in AC/DC/
AC interfacing units are also required for voltage magnitude and frequency control.
Besides the main operating components, there may be additional design criteria that
require controllers. For example, harmonic elimination, power conditioning, load
power matching, and maximum power tracking are some of these additional
designs that require controllers. Some examples of the control applications in WEC
systems are given in this section.
Example 7.1
A utility-isolated single-phase micro-WEC system has been adapted from [45] and
is shown in Figure E7.1(a). The WEC system is directly connected to a single-
phase load bus by a transmission line. In order to deliver improved quality power to
the load bus to feed linear, nonlinear, and motor-type loads, a dynamic voltage
regulator based on the works by Sharaf [46–49] is to be designed and controlled
using a fuzzy-tuned PI controller. Develop the required models and simulate the
system using the wind turbine model available in MATLAB/Simulink.
Answer 7.1
The wind turbine used in this example has 10 m/s wind speed and 10 kW power
output to derive a 10 kW, three-phase, 380 V, 50 Hz squirrel cage induction gen-
erator (SCIG). The dynamic voltage regulator (DVR) is a switched power filter
(SPF) type and is placed between bus b1 and bus b2 as shown by the single line
diagram in Figure E7.1(a). A detailed wiring diagram of DVR/SPF is given in
Figure E7.1(b).
Three-phase stator windings of the SCIG used in the WEC system of this
example are operated as a single-phase SCIG. Therefore, two capacitors, Cs, were
placed in series with the two of the wye-connected stator windings as depicted in
Figure E7.1(b). The capacitor group Ce across the output terminals of the SCIG is
used for the excitation.
390 Fuzzy logic control in energy systems, 2nd edition
b3 Linear load
Wind
b1 b2 Line
DVR /
SPF
Wind Nonlinear
turbine load
Motor
load
Figure E7.1(a) Single line diagram of the system for Example 7.1
S1
b1 b2 LS b3
Stator RS
A
C1
Wind Rotor iL
iCp C2
isa
Load
Cp
isb S2
isc
Cs Cs C2
C B
An open circuit diagram of the DVR/SPF is placed between buses b1 and b2.
DVR/SPF diagram has two filtering capacitors (C1, C2) and two switches (S1, S2).
A transmission line with the parameters RL = 1 W and LL = 1 mH is connected
between busses b2 and load bus b3. Since the modelings of wind turbines and
induction generators are given in previous sections, only the control of the DVR/
SPF is discussed in this section. However, the capacitors connected in series with
the wye-connected stator windings and depicted by Cs in Figure E7.1(b) must be
included in the voltage equations of the induction generator. Besides, the output
voltage of the generator is just a single-phase voltage and the excitation capacitors
are also single phase.
DVR/SPF is controlled in terms of the switching instants of the switches S1 and
S2, where S1 is the negation of S2 as S1 ¼ S 2 . The voltage magnitude of the load bus
or bus b2 is controlled by controlling the switching sequences of S1 and S2.
Therefore, voltage and current readings at bus b2 are used as input signals to the
control process of the DVR/SPF as shown in Figure E7.1(c).
FLC in wind energy systems 391
S1
et u
PI controller PW M
S2
et K
Fuzzy S1 = S2
det FLT Logic S1 = not S2
Delay Tuner
ref pu
b1pu
b1
V
BASE
loop
Delay
b1
P
Delay
b1 loop
I
BASE
b1pu
The output signal of the PI controller is employed to adjust the reference pulse
width modulation (PWM) voltage, to be compared with a fixed carrier signal to produce
two complementary pulses, which are used as the external control signals for the ideal
insulated gate bipolar transistor (IGBT) switches [45] as depicted in Figure E7.1(c).
The control subsystem includes a tri-loop dynamic error detector, which is based on
Sharaf’s ideas presented in [46–49]. The dynamic error detector uses instantaneous
current and voltage signals as inputs and generates their error signals as bus voltage
error ev, power change error eDP and current change error eDi, which are summed up to
yield a total error et as given in Figure E7.1(d). The voltage error is calculated as the
difference between the reference pu bus voltage and the pu value of the measured pu
RMS bus voltage. The voltage error loop is used for voltage stabilization. The instan-
taneous pu value of the power is calculated from the instantaneous pu values of the bus
voltage and current and then passed through a low pass filter. The power change error is
then obtained as the difference between two consecutive values of the filtered power.
The current change error is the difference between two consecutive RMS pu values of
392 Fuzzy logic control in energy systems, 2nd edition
the bus current and is used to detect any sudden electrical load excursions or wind
velocity variations. All the values of scaling and time delay of the tri-loop error collector
were selected by an offline guided trial and error method to ensure a fast response and
minimized total error, which is the sum of all three basic loops.
The total error et is used by a PI controller to drive a pulse width modulator in order
to generate the switching signals S1 and S2. As shown in Figure E7.1(c), the total error et
is also used by a fuzzy logic tuner (FLT) in order to tune the controller gains Kp and Ki.
The FLC described in Chapter 4 and given in Figures 4.24 and 4.25 can also be
modified and used in this system as a parameter tuner for the PI controller. A block
diagram showing the modification done to adapt the FLC in Figure 4.24 to the tuning
process in this example is given in Figure E7.1(e). The FLT is used to adjust a common
gain factor K so that the effects of the PI controller gains KP and KI are tuned.
The error et and its change det are used by the FLT to generate the required
change dK(k) for the common factor K of the PI controller. Two consecutive values
of the total error are used to generate the error change det so that a decision
table based on the error and the change in error can be generated to store infor-
mation about the effects of the changes in controller parameters. The decision
table includes implications in terms of fuzzy rules like the one given below.
If e is NE and de is ZE then dK is dKN
The output is the required change dK of the common factor K. The online
fuzzy tuning process of the controller gains for the changing operating conditions
gives a sort of adaptivity to the PI controller. The fuzzy logic gain tuner is repre-
sented by the block FLT in Figure E7.1(c).
The crisp universes of the error and change in error are partitioned into three
fuzzy subsets each using triangular fuzzy membership functions. Since the ampli-
tude of the change in error is affected by the sampling period, it is much smaller
than the error. Therefore, the maximum value of the change in error is selected as
10 times smaller than the error. The fuzzy subsets used to represent the sub-
categories of the universes e, de, and dK are defined as shown in Figures E7.1(f)–
E7.1(h).
NE ZE PE
1
μ(et )
0
–1 0 1
Universe of et
μ(det )
0
–0.1 0 0.1
Universe of det
μ (dK )
0
–0.1 0 0.1
Universe of dK
A nine-rule table is used in the fuzzy reasoning block of the FLT given in
Figure E7.1(e). The output is the change dK, which is added to the value of K from
the previous sampling in order to obtain the new value of the tuning factor. If the
change dK is zero, then the previous value of K remains unchanged. This action is
nothing but the digital representation of Euler’s integration. Therefore, the FLT
generates a change in the output signal to tune the gains KP and KI of the PI
controller.
394 Fuzzy logic control in energy systems, 2nd edition
235
230
225
Vb3eff (V)
220
215
210
205
200
5 6 7 8 9 10 11 12 13 14
Time (s)
60
50
Ib3eff (A)
40
30
20
10
0
0 5 10 15
Time (s)
14,000
12,000
Pb3 (W)
10,000
8000
6000
4000
2000
0
0 5 10 15
Time (s)
7000
6000
Qb3 (VAr)
5000
4000
3000
2000
1000
0
0 5 10 15
Time (s)
In this example, single-phase loads are fed from a wind turbine by operating a
three-phase induction generator in single-phase mode. A dynamic switched power
filter device with fuzzy logic tuned PI controller is used for dynamic load voltage
stabilization and clean energy.
Example 7.2
A wind-utility grid interface scheme is adapted from [46] and given in Figure E7.2(a).
A voltage source converter (VSC)-based hybrid power filter compensator
(HPFC) scheme is used for effective reactive power compensation and harmonic
reduction in distribution grid networks with the dispersed wind energy interface.
A multi-loop dynamic error-driven PI controller equipped with an auxiliary DC
side voltage tracking loop is used to ensure robust and fast control of the HPFC
connected to bus 4.
The wind turbine has a nominal speed of 15 m/s, nominal output power of 3.6
MW, and a rotational speed 1.2 pu of its synchronous speed. The induction gen-
erator used in Figure E7.2(a) has a base nominal power of 3.6 MVA and a nominal
voltage of 4160 V with a nominal frequency of 60 Hz. Stator and rotor resistances
are assumed to be equal and given as 0.019 pu. Similarly, stator and rotor induc-
tances are also equal and both are given as 0.06 pu. A 441 mF capacitor bank is used
for the self-excitation of the induction generator. Three transformers are installed in
the WEC-utility interface system operating at 60 Hz. Nominal power and voltages
of these transformers are given in Figure E7.2(a). The transformers marked as T1,
T2, and T3 are connected as Y/Y, Y/D, and Y/Y, respectively. The length of each
section of the distribution feeder is 3 km with a resistance of 0.25 W/km and an
inductance of 0.93 mH/km. Three linear type loads are connected to buses b2, b4,
and b5 with a power factor of 0.8 (lagging). The active and reactive powers of the
linear loads are 1.2 MW and 0.9 MVAr, respectively. A 1.6 MW and 1.2 MVAr
nonlinear load is connected at bus 7. Besides the linear and nonlinear loads, a
0.6 MVA, 4160 V, 60 Hz three-phase induction motor is also connected to bus 6 as
a motor type load with the same stator and rotor pu resistances and inductances
given for the induction generator.
396 Fuzzy logic control in energy systems, 2nd edition
Infinite bus
138 kV/60 Hz T1 NLL
138/11 kV LL1 LL2 LL3
5 MVA T3 T2
4.16/11 kV 11/4.6 kV
3.6 MVA 600 kVA
Rectifier Lf
AC
DC Cf Induction
DC Inverter
AC motor
DC link interface
Cself Wind
turbine
Induction
generator
Answer 7.2
(a) A Simulink model for the 11 kV distribution system described above can be
developed as the one given in Figure E7.2(c) with only 138 kV main feed-in
substation at bus 1 is connected as the power source. All system parameters
used in Simulink modeling shown in Figure E7.2(c) are given in the description
part of this example.
FLC in wind energy systems 397
Bus 5
if
11 kV /11 kV
3.6 MW
Co = 180 μF
6 pulse
Diode
S2
Lf =0.1 mH
R f = 0.15 Ω
S1 = S2
(b) The integration of the WEC system Simulink model to the utility at bus 3 as a
second power source is given in Figure E7.2(d). It should be noted that this
configuration is not the only choice. Many different types of utility integration
can be established.
The wind turbine equations given in (7.1)–(7.7) in Section 7.2 can be used
for Example 7.2 with the coefficients C1 = 0.5176, C2 = 116, C3 = 0.4, C4 = 5,
C5 = 21, and C6 = 0.0068. The pitch angle is assumed to be constant at the
value of 0. The base wind velocity is selected to be 12 m/s and the base shaft
rotational speed is set to be 1.2 times the generator’s synchronous speed. The
turbine power characteristics are similar to those given in Figure 7.3. The
induction generator is a self-excited low-cost squirrel cage type and is fully
employed for a wind energy scheme. Typical two-axis reference frame (d–q)
model can be used to represent the three-phase induction generator.
398 Fuzzy logic control in energy systems, 2nd edition
Figure E7.2(d) Integration of the WEC system Simulink model to the utility grid
Assuming that the rigid grid is an infinitely rich source of active and
reactive power, the connection of unlimited excitation capacitors can sta-
bilize the electrical grid resulting in almost constant voltage and frequency
operation at the point where the WEC system is interfaced. However, the
WEC systems are usually interfaced with distribution systems, which are
considered weak due to low short circuit levels [46]. Therefore, WEC sys-
tems connected to AC utility grids must meet the host utility integration
requirements and adhere to strict safety, isolation, and protection regula-
tions [47]. As a result, necessary interface interconnection apparatuses,
power conditioning devices, and grid protection gears should be employed
and fully utilized to guarantee the reliability of the grid system and high
power quality. A DC link with a rectifier and an inverter is used as the
interfacing unit between the WEC system and the utility grid. This
arrangement helps to reduce the required reactive power burden on the self-
excitation capacitor bank under low-speed conditions since the power factor
at the uncontrolled diode rectifier input is almost unity [46]. The inverter in
the DC link of the WEC system is controlled by a d–q–based PI controller as
explained in [46].
The wind speed model consists of four basic key components, namely the
mean wind speed, a wind speed ramp, a wind gust, and the turbulence com-
ponent. The eventual wind speed to be applied to the wind turbine is the
summation of all four key components, which are explained in [46]. The effects
of the WEC system added as a second power source to the 11 kV distribution
network are depicted in Figure E7.2(d).
(c) A Simulink model for DPFC is given in Figure E7.2(e) to be connected at bus 5.
In order to improve the power quality of the distribution network given in
Figure E7.2(a) the DPFC is connected to bus 5, which is located before motor
and nonlinear type loads. Figure E7.2(e) depicts a schematic diagram of the
DPFC, which consists of a six-pulse diode bridge, two switches, a series R–L
branch, and a capacitor (Co) connected in series with a three-phase coupling
transformer. The coupling transformer can help avoid any high frequency near
FLC in wind energy systems 399
Figure E7.2(e) Simulink model of the DPFC and integration to the utility grid
Figure E7.2(f) Simulink model of the DPFC and integration to the utility grid
The switching signals S1 and S2 are generated in a way that one of them is
turned off when the other one is on. Therefore, one switch is the negation of
the other one.
An FLC with 25 rules is used to control the DPFC by determining the
switching instants of the switches S1 and S2. The FLC rules used in Example
7.2 are the same rules given in Table 4.7, which is a generalized rule
table that can be applied to different problems. The FLC rules are developed
using the instantaneous error and its change over one sampling. Since the
rule table (Table 4.7) is also based upon the same approach of using the
error and its change, the same table is applicable to the problem in Example
7.2. A generalized Simulink block diagram of the FLC with the input
parameters is given in Figure E7.2(g). Triangular membership functions are
used to represent the fuzzy subsets in input spaces error (e) and its change
(de) besides the output space for the change du. The maximum boundary
values of the input and output universes are given in Figure E7.2(g). The
peaks of the fuzzy subsets in each universe are evenly distributed using
equal-sided and right-angle triangles. The output du from the fuzzy rea-
soning block is added to the previous value of the control signal u to obtain
the new value of the control signal. This procedure gives an integral action
to the FLC.
(e) The effect of the FLC-controlled DPFC scheme under electric load dis-
turbances is shown by the simulation results in Figures E7.2(h) and E7.2(i) for
voltage and power factor profiles at bus 5.
Figure E7.2(h) Voltage transients at bus 5 without and with the FLC-controlled
DPFC
Figure E7.2(i) Power factor at bus 5 without and with the FLC-controlled DPFC
The results without the FLC-controlled DPFC show that the voltage at
bus 5 is about 0.7 pu instead of the reference value of 1 pu. The power
factor is below 0.3 lagging instead of being 1.0. The linear load causes a
small increment in voltage at bus 5 when the additional loads are con-
nected. The additional active load power increases the active power to
reactive power ratio of the system resulting in more increment in the power
factor. Both voltage and power factor profiles are controlled and kept
around the reference values when the FLC-controlled DPFC is employed.
Especially the power factor control is done very effectively such that it
does not get affected by the changes in loads. Although there are some
oscillations in voltage during the switching instants, it remains at 1.0 pu in
a steady state.
(d) Assume that 10 wind turbine and generator units will be used and only
250 kVAr capacitors are available. Draw a three-phase detailed wiring circuit
diagram of capacitor groups for just one machine. Decide the connection type
of the capacitor groups. Should they be connected in delta or wye?
(e) Draw a single-line diagram of the wind energy and transmission system
including required capacitors, transformers, and transmission lines. Represent
the distribution system by a bus bar.
(f) Develop a Simulink model for this system and analyze the voltage, current, and
power profiles.
(g) Design a power compensator and a suitable controller to overcome the load-
switching effects as well as wind speed excursions.
(h) Design a power management algorithm for the system in this problem includ-
ing both generation and demand side requirements such that the energy utili-
zation is optimum.
7.5 Problems
P7.6 A farmhouse gets its electricity from a WEC system 2 km away. There are
two wind generators in the WEC system. Each generator requires 900 VAr for
excitation and capacitor groups used in each phase are built up with
100 VAr units.
The farmhouse requires 6 kW active power and 3 kVAr reactive power.
1 kVAr capacitor groups are used to supply this reactive power to the
loads.
(a) Draw a single-line diagram of this system showing the WEC system,
the bus where the WEC system is connected, a 2 km line causing 3%
voltage drop under full loading, a load bus, and loads connected to the
load bus.
(b) Add the single-line drawings of capacitor groups described above to your
drawing in part (a).
(c) Draw three-phase solidly grounded Wye connected diagrams of these
capacitor groups you draw in part (b).
(d) Develop a Simulink model for the system described above.
P7.7 Single-line diagram of a 10 kV power distribution system is shown in
Figure P7.7. The distribution system is powered by a 30 kV infinite bus. A
500 kW linear type load with a 0.8 lagging power factor is connected to bus
b3 and two other linear loads are connected to bus b4. One of these loads is
operating at 1500 kW with 0.90 lagging power factor, and the other one is
operating at 1000 kW with 0.85 lagging power factor. The lengths and
parameters of the power lines between the buses b2–b3 and busses b3–b4 are
given in Figure P7.7.
(a) Obtain an impedance diagram for this system.
(b) Develop a Simulink model for this system.
(c) Connect a 3 MW, 0.80 lagging, 10 kV, 50 Hz three-phase WEC system
using an induction generator to bus b2 and simulate the system.
(d) Design a dynamic power filter (DPF) to bus b2 and simulate the sys-
tem. Tune the DPF by designing an FLC so that the bus voltage
remains at 1.0 pu nominal value while the power factor is increased
above 0.95.
b4
b1 b2 b3
0.2+j0.098 Ω/km
0.56+j0.35 Ω/km
3 km
2 km 1500 kW
30 kV 30 kV/10 kV 10 kV 0.90 lagging
10 kV
Infinite bus 5 MVA 10 kV
500 kW 1000 kW
0.80 lagging 0.85 lagging
References
[1] Lin W.M., Hong C.M., Lee M.R., Huang C.H., Huang C.C. and Wu B.L.
‘Fuzzy sliding mode-based control for PMSG maximum wind energy capture
with compensated pitch angle’. 2010 International Symposium on Computer
Communication Control and Automation (3CA); May 2010, pp. 397–400.
[2] Senjyu T., Sakamoto R., Urasaki N., Funabashi T., Fujita H. and Sekine H.
‘Output power leveling of wind turbine generator for all operating regions by
pitch angle control’. IEEE Transactions on Energy Conversion. 2006; 21(2),
467–475.
[3] Luo Q., Yang Q., Han C. and Cheng P. ‘Pitch angle controller of variable-
speed wind turbine based on L1 adaptive control theory’. 2014 International
Conference on Mechatronics and Control (ICMC); July 2014, pp. 955–960.
[4] Buffoni M., Galletti B., Ferreau J., Fagiano L. and Mercangoez V. ‘Active
pitch control of tethered wings for airborne wind energy’. 2014 IEEE 53rd
Annual Conference on Decision and Control (CDC); December 2014, pp.
4893–4898.
[5] Imran R.M., Hussain D.A. and Soltani M. ‘DAC with LQR control design for
pitch regulated variable speed wind turbine’. 2014 IEEE 36th International
Telecommunications Energy Conference (INTELEC); 2014, pp. 1–6.
[6] Garasi P., Watanabe M. and Mitani Y. ‘Power smoothing of wind turbine
generator using fuzzy-PI pitch angle controller’. 2014 Australasian Uni-
versities Power Engineering Conference (AUPEC); 2014, pp. 1–5.
[7] Kumar H., Gupta A., Pachauri R.K. and Chauhan Y.K. ‘PI/FL based blade
pitch angle control for wind turbine used in wind energy conversion system’.
2015 International Conference on Recent Developments in Control, Auto-
mation and Power Engineering (RDCAPE); 2015, pp. 15–20.
[8] Chi S., Liang-Deng H. and Sheng A. ‘Research on a static excitation control
method for the high-power induction generator with a H-bridge cascaded
converter topology’. 17th International Conference on Electrical Machines
and Systems (ICEMS); 2014, pp. 107–113.
[9] Wang L. and Chen S.S. ‘Design of a DC excitation control for an autono-
mous wound-rotor induction generator’. IEEE Transactions on Industry
Applications. 2014;50(4):2807–2817.
[10] Liyanage D. and Rajakaruna S. ‘Transient analysis of a single-phase variable
speed cage induction generator with active excitation control’. 2013 Aus-
tralasian Universities Power Engineering Conference (AUPEC); 2013, pp. 1–6.
[11] Hazra S. and Sensarma P.S. ‘Self-excitation and control of an induction
generator in a stand-alone wind energy conversion system’. IET Renewable
Power Generation. 2010;4(4):383–393.
[12] Wekhande S. and Agarwal V. ‘Wind driven self-excited induction generator
with simple de-coupled excitation control’. Conference Record of the 1999
IEEE Industry Applications Conference. Thirty-Fourth IAS Annual Meeting;
1999, pp. 2077–2083.
408 Fuzzy logic control in energy systems, 2nd edition
[13] Cong W., Jun W., Guanglin S. and Liang Y. ‘Research on control strategy
for high power AC–DC–AC cascaded converter’. 2014 IEEE Conference and
Expo Transportation Electrification Asia-Pacific (ITEC Asia-Pacific); 2014,
pp. 1–5.
[14] Song P. and Lin J. ‘A hybrid AC–DC–AC matrix converter with a boost
circuit’. 9th International Conference on Electronic Measurement and
Instruments; 2009, pp. 2-416–2-421.
[15] Maol H., Zhang J., Lee F.C. and Boroyevich D. ‘Zero-voltage-transition DC-
link techniques for three-phase AC–DC–AC PWM converters’. Proceedings
of APEC 97—Applied Power Electronics Conference and Exposition; 1997,
pp. 692–698.
[16] Jabeen H.N., Nagarjuna G., Deepa S.N. and Anoop K. ‘A new control
strategy for grid interfacing inverter in wind energy applications’. Interna-
tional Conference on Energy Efficient Technologies for Sustainability; 2013,
pp. 1238–1242.
[17] Prutianu F. and Popescu V. ‘Control of single phase inverters for wind
energy conversion using PWM techniques’. 9th International Symposium on
Electronics and Telecommunications; 2010, pp. 95–98.
[18] Zhu N. and Liang H. ‘Implementation and control of dual grid connected
inverter for wind energy conversion system’. 32nd Annual Conference on
IEEE Industrial Electronics (IECON); 2006, pp. 2861–2866.
[19] Khan M.S. and Iravani M. R. ‘Hybrid control of a grid-interactive wind
energy conversion system’. IEEE Transactions on Energy Conversion. 2008;
23(3):895–902.
[20] Soderholm L.H. ‘Interfacing small wind systems to rural power distribution
systems’. IEEE Transactions on Industry Applications. 1984;IA-20(2):439–442.
[21] Wang L., Zhou L., Cheung H., Hamlyn A., Mander T., Lee I., et al.
‘Adaptive protection and control strategy for interfacing wind generators to
distribution grids’. International Conference on Electrical Machines and
Systems; 2008, pp. 2478–2483.
[22] Bhattacharjee C. and Roy B.K. ‘Advanced fuzzy power extraction control of
wind energy conversion system for power quality improvement in a grid tied
hybrid generation system’. IET Generation, Transmission and Distribution.
2016;10(5):1179–1189.
[23] Tourou P., Schael M. and Sourkounis C. ‘Power quality impact on grid-
connected wind energy conversion system’. MedPower 2014 Conference;
2014, pp. 1–5.
[24] Meng W. and Wang X. ‘Distributed energy management in smart grid with
wind power and temporally coupled constraints’. IEEE Transactions on
Industrial Electronics. 2017.
[25] Guo L., Liu W., Li X., Liu Y., Jiao B., Wang W., et al. ‘Energy management
system for stand-alone wind-powered-desalination microgrid’. IEEE Trans-
actions on Smart Grid. 2016;7(2):1079–1087.
FLC in wind energy systems 409
[26] Hui J., Bakhshai A. and Jain P. ‘Power management supervisory control
algorithm for standalone wind energy systems’. IEEE 36th International
Telecommunications Energy Conference (INTELEC); 2014, pp. 1–6.
[27] Omoware W.D., Maheri A. and Azimov U. ‘Aerodynamic analysis of
flapping-pitching flat plates’. 3rd International Symposium on Environ-
mental Friendly Energies and Applications (EFEA); 2014, pp. 1–5.
[28] Li N. and Balas M.J. ‘Adaptive flow control of wind turbine blade using
microtabs with unsteady aerodynamic loads’. IEEE Green Technologies
Conference (GreenTech); 2013, pp. 134–139.
[29] Merugula L.A., Khanna V. and Bakshi B.R. ‘Comparative life cycle
assessment: reinforcing wind turbine blades with carbon nanofibers’. Pro-
ceedings of the 2010 IEEE International Symposium on Sustainable Systems
and Technology; 2010, pp. 1–6.
[30] Chen Z. and Blaabjerg F. ‘Wind turbines—a cost effective power source’.
Przeglad Elektrotechniczny. 2004;80(5):464–469.
[31] Twidell J. ‘Wind turbines: technology fundamentals’. Renewable Energy
World. 2003;6(3):102–111.
[32] Raj M.S.M., Alexander M. and Lydia M., ‘Modeling of wind turbine power
curve’. IEEE PES Innovative Smart Grid Technologies; December 2011, pp.
144–148.
[33] Liu X. ‘An improved interpolation method for wind power curves’. IEEE
Transactions on Sustainable Energy. 2012;3(3):528–534.
[34] Lydia M., Selvakumar A.I., Kumar S.S. and Kumar G.E.P. ‘Advanced
algorithms for wind turbine power curve modeling’. IEEE Transactions on
Sustainable Energy. 2013;4(3): 827–835.
[35] De Kooning J.D., Gevaert L., Van de Vyver J., Vandoorn T.L. and
Vandevelde L. ‘Online estimation of the power coefficient versus tip-speed
ratio curve of wind turbines’. 39th Annual Conference of the IEEE Industrial
Electronics Society (IECON); 2013, pp. 1792–1797.
[36] Shokrzadeh S., Jozani M.J. and Bibeau E. ‘Wind turbine power curve mod-
eling using advanced parametric and nonparametric methods’. IEEE Trans-
actions on Sustainable Energy. 2014;5(4):1262–1269.
[37] Goudarzi A., Davidson I.E., Ahmadi A. and Venayagamoorthy G.K. ‘Intel-
ligent analysis of wind turbine power curve models’. IEEE Symposium on
Computational Intelligence Applications in Smart Grid (CIASG); 2014, pp.
1–7.
[38] Panahi D., Deilami S. and Masoum M.A.S. ‘Evaluation of parametric and
non-parametric methods for power curve modelling of wind turbines’. 9th
International Conference on Electrical and Electronics Engineering
(ELECO); 2015, pp. 996–1000.
[39] Heier S. Grid Integration of Wind Energy Conversion Systems. New York:
John Wiley & Sons; 1998.
[40] Park R.H. ‘Two-reaction theory of synchronous machines generalized
method of analysis—Part I’. Transactions of the American Institute of Elec-
trical Engineers. 1929;48(3):716–727.
410 Fuzzy logic control in energy systems, 2nd edition
8.1 Introduction
The use of photovoltaic (PV) cells has emerged as an important solution to the
growing energy crisis and the need for conservation and load management during
the last decades. Due to their high initial costs, solar PV cells were not a very
attractive alternative to electricity users until the early 2000s. However, the
installation costs have dropped tremendously during the last decade such that the
price of electricity from PV systems has been competitive with that of electricity
from conventional sources.
The use of PV cells started in the 1950s with the introduction of silicon cells in
1941 [1]. The capability of silicon cells to convert light directly to electricity sti-
mulated new research on solar PV cells, so the PV solar cell has become a power
source to be used in spacecraft since the late 1950s [1]. Unfortunately, the use of
PV solar cells in small-scale and special commercial applications gained impor-
tance only after the energy crisis started in the mid-1970s due to increasing oil and
natural gas prices [2]. Today, PV solar cells are being used in a wide range of
application areas from small power appliances to utility grid-connected large-scale
solar power stations [3–5].
Solar energy from the sun is provided in the form of solar irradiation and may
be converted to useful energy. The conversion process is done either by natural
means or by technical processes. With natural means, solar energy is expressed in
the forms of winds, renewable organic fossil fuels, and ocean temperature differ-
ences. The technological conversion process, on the other hand, involves manu-
factured devices and systems to convert solar energy into thermal or electrical
energy.
412 Fuzzy logic control in energy systems, 2nd edition
The main part of a PV energy system is the solar PV cell. The solar PV cell is
merely a P–N junction diode. Most of the commercially available solar cells today
are made of silicon which is the second most plentiful element on the earth [2].
Besides the silicon cells, copper–cadmium sulfide (Cu2S/CdS) and gallium
arsenide (GaAs) cells are two other types of solar cells used in early PV systems
[2]. The PV cell manufacturing technologies have been developed tremendously
during the last two decades affecting the efficiencies as well. Nowadays, PV cells
are manufactured in the form of crystalline, multi-crystalline, thin film, amorphous,
microcrystalline, organic, and multijunction device technologies. The efficiency of
crystalline Si cells has been increased up to 25.6%. Thin film and multi-crystalline
Si cells have an efficiency range from 10.5% to 21.2%. Gallium arsenide-based III-
and V-type cells have an efficiency of up to 28.8%. Amorphous and micro-
crystalline Si cells have an efficiency of around 11%. Organic thin-film cells have
been manufactured with an efficiency of about 11%. The highest efficiency of
applicable PV cells belongs to InGaP, GaAs, and InAs cells with an efficiency of
37.9%. A detailed list of solar PV cell types and efficiencies is given in [6].
The performance of a PV power system depends on the operating conditions as
well as the solar cell and panel design quality. The output voltage, current, and
power of a PV panel vary as functions of solar irradiation level, temperature, and
load current. Therefore, the effects of solar irradiation, temperature, and load cur-
rent must be considered in the design of PV panels so that any change in the
temperature and solar irradiation levels should not adversely affect the PV output
power to the load/utility which is either a power company utility grid or any stand-
alone electrical type load. To overcome the undesired effects of the variable tem-
perature and solar irradiation on the output power of PV systems, different control
strategies have been applied. These strategies are mainly divided into two groups:
(1) controlling the sun input to the PV panel and (2) controlling the power output
from the PV panel. The combination of these two groups also may be considered.
Both groups may include electric or thermal energy storage systems or auxiliary
power sources that supply electricity during the night or on cloudy days. Sun input
to the PV systems is kept as high as possible either by rearranging the solar panel
configurations of PV arrays with respect to the changes in weather conditions or by
designing and controlling the position of sun-tracking solar collectors. The sun
tracking method is generally used with concentrator arrays and is not within the
scope of this book. A literature list showing some projects and research related to
the sun-tracking systems is given in reference [7].
Studies related to the maximum output power tracking of PV panels deal
mostly with the isolation requirements and interfacing problems to the electrical
utility grid or with the problems of direct coupling to loads. Since the electricity
obtained from a PV system is DC and from a utility grid is AC, an inverter is
needed. A simple DC/AC conversion, however, is not sufficient to ensure effective
interfacing because the converters generate harmonics and cause additional voltage
distortions. Therefore, such a PV array–utility grid interface system should be
designed so that the integrity of the complete system is maintained and improved.
The maximum power utilization of a stand-alone PV array under varying
FLC in PV solar energy systems 413
reconfiguration of the solar cells to get an output power that can be controlled to
match that required by the load.
The main problems in PV energy systems are usually counted as sustainability,
changes in solar irradiation and ambient temperature, shading effects, positioning,
and sun-tracking, maximum power operating point tracking, cooling, cleaning, and
integrating to loads and utility grids. The modeling, maximum power point tracking
(MPPT), and power management of PV-powered systems are given here by
adapting from the previous works of the author [8–13]. The management of PV-
powered energy systems is important as is the modeling and MPP tracking. For the
sustainability of the PV energy systems, both load and generating side management
gain importance. Battery backup units are also used for sustainability. However, the
effects of the changes in solar irradiation level and temperature have to be tracked
for the MPPT and load matching. The MPPT always gets affected from whether
changes as well as from the load changes. Therefore, a load-matching control
algorithm is always required to extract the maximum power from the PV system.
Battery backups may be a solution for the MPPT tracking in stand-alone applica-
tions. The utility on the other hand can be used as a power pool to be filled up for
the maximum power operating and extracting all the available power from the PV
system.
Proper interface controllers for maximum power tracking and utility interfa-
cing of PV energy systems are discussed in this chapter. Therefore, after discussing
the modeling issues of the PV cells and arrays, some MPPT algorithms will be
explained and examples will be given using the MATLAB and Simulink mod-
eling of the PV cell and array. Some control and management approaches will also
be discussed.
PV solar cells are devices that convert solar energy directly to useful electrical
energy by creating equal numbers of positive and negative charges from the
absorbed solar photon energy. The negative and positive charges then are separated
to develop photovoltage and photocurrent. To separate the negative (electrons) and
positive (holes) charges, semiconductor materials such as silicon, copper–cadmium
sulfide, and gallium arsenide are the most suitable ones and are the ones that are
used widely to manufacture PV solar cells.
The operation of a PV solar cell is similar to that of a positive–negative (P–N)
junction diode where the electrons flow from the N layer to the P layer of the PV
cell via an external connection circuit and rejoin the holes. Since this book deals
with the utilization of PV cells and arrays rather than their structural properties,
the internal structures and physical properties of the PV solar cells are not going to
be given here. However, the equivalent circuit and mathematical modeling of the
PV cells and arrays are discussed and given in MATLAB and Simulink environ-
ments for the system simulation. A detailed modeling of the PV cells including the
effects of the weather conditions is given next.
FLC in PV solar energy systems 415
A solar cell converts solar energy to electric output power only if there is a
load connected across the P–N layers. Without any load or any connection between
P–N layers via an outside path, the electrons cannot flow, and therefore no photo-
current is generated. Output power generation is not achieved if the load resistance
is too small or the P–N layers are shorted via a wire with negligible resistance. In
this case, where P–N layers are shorted, the potential difference or the photovoltage
between P and N layers becomes zero while the photocurrent has its maximum
value. Contrary to the conventional dc power sources, the current–voltage rela-
tionship of PV solar cells shows a nonlinear behavior. Therefore, solar cell power
sources cannot be represented by classical DC current or voltage sources. Typical
current–voltage (I–V) and power–voltage (P–V) characteristics of a PV solar cell
are shown in Figure 8.1 where the values at the maximum power point are the base
values of the per-unit system. If the solar irradiation level and temperature change,
the maximum power point values will also change resulting in new base values for
the per-unit system.
In order to simulate a PV solar cell array, an equivalent circuit model is nee-
ded. Different circuit models of PV cells have been studied over the years [14,15].
A review of PV cell models used in steady-state and transient analysis is given in
[15]. In this reference, the authors reviewed seven different static PV cell models
based on the equivalent circuit and current equation given in Figure 8.2, and
equation (8.1), respectively.
e VC þ RS IC
IC ¼ Iph I0 exp ðVC þ RS IC Þ 1 (8.1)
kTC RSH
where IC: cell output current (A)
I–V
V
P–
R I
I I
D R V
S
T
Both k and TC should have the same temperature unit, either Kelvin or Celsius.
A polynomial equation representation of PV cell I–V characteristics is also
given in [14,15]. However, the comparison of a seventh-order polynomial equation
with the equations derived from (8.1) shows that the polynomial equation results in
the highest operating and maximum power point errors [15]. A static and dynamic
model comparison of the PV cells is also given in [15].
A PV cell dynamic model with a capacitor connected parallel to shunt resis-
tance or across the array output terminals [15] as shown in Figure 8.3 is compared
with the static models. The dynamic model equivalent circuit given in Figure 8.3
has a cell output current IC defined as in (8.2).
e dvC
IC ¼ Iph I0 exp ðV C Þ 1 C (8.2)
kTC dt
It is concluded that the time responses of the PV cell current and voltage from
both static and dynamic models are basically the same and there is no need to
incorporate the capacitance into the PV cell model. Therefore, instead of including
a derivative term in the PV cell modeling, a static equation with a similar response
is usually preferred. Much research has appeared in the literature using the static
models of the PV cell in place of the dynamic model [15–19]. Since the shunt
resistance RSH in Figure 8.2 is much greater than series resistance RS, the last term
in (8.1) becomes very small compared to the value of IC. Therefore, the last term in
FLC in PV solar energy systems 417
I
I I
(8.1) is usually ignored for simplicity resulting in (8.3) and the equivalent circuit
shown in Figure 8.4 which is one of the static models discussed in [15] and widely
used in literature. Figure 8.4 also includes the PV cell symbol, which is also used in
the literature.
e
IC ¼ Iph I0 exp ðVC þ RS IC Þ 1 (8.3)
kTC
The current ID in Figures 8.2–8.4 is the internal current and flows across the
cell’s semiconductor junction as a function of the cell’s absolute temperature,
terminal voltage, and external load current. The equation for ID is given as in (8.4).
e
ID ¼ I0 exp ðVC þ RS IC Þ I0 (8.4)
kTC
Using the nonlinear equation form VC = f (IC) instead of the form IC = f(VC) as
in (8.1) and (8.3) makes it easier for computer PV source emulation because the cell
current IC is determined from the load current and is used to calculate the corre-
sponding single cell output voltage VC as in (8.5).
AkTC Iph þ I0 IC
VC ¼ ln R S IC (8.5)
e I0
The curve fitting factor A is used to adjust the I–V characteristics obtained
from (8.5) to the tested I–V characteristics of the PV cell. Equation (8.5) gives the
voltage of a single solar cell which is then multiplied by the number of the cells
connected in series to calculate the full panel voltage. It should be mentioned that
problems would occur if the short circuit currents of the PV cells in series are not
identical or very close. If the differences between these short circuit currents are
great, the PV cell with the smaller short circuit current will break down and act as a
diode load resulting in a reverse voltage across its terminals [2]. To protect the cell
with a smaller short circuit current from the reverse voltage, a bypass diode is
connected across that cell as an alternative path for the current [2]. In this book, the
breakdown problems are not considered since the cells connected in series and in
parallel are assumed to be identical and there are no shading effects.
Before being used in (8.5), the cell current IC in a single panel system is
obtained by dividing the full panel current, which is effectively equal to the electric
load current, by the number of the cells connected in parallel. It should be noted
that (8.5) is valid only for a certain cell junction operating temperature TC at a
certain solar irradiation level SC. If the temperature and solar irradiation levels
418 Fuzzy logic control in energy systems, 2nd edition
change, the voltage and current outputs of the PV cell will vary following this
change. Therefore, the effects of the changes in cell temperature and solar irra-
diation levels should also be included in the final PV cell modeling. A method to
include these effects in the PV cell modeling is given by Buresch [2]. According to
this method, a reference solar cell model is obtained for a known temperature at a
known solar irradiation level, and then this model is modified to include the
changing solar irradiation level and temperature effects. The procedure for
obtaining the reference PV cell model is given in the next section.
Example 8.1
Current and voltage readings from a PV panel testing are listed in Table E8.1(a). The
panel power is also calculated and listed in the same table. Solar irradiation level and
Answer 8.1
(a) Selected three data points are listed in Table E8.1(b). Since the PV panels are
preferred to be operated around their maximum power points, current and
voltage data corresponding to the maximum power will be the most usable
values. Therefore, data given in Table E8.1(b) are selected at and around the
maximum power point of the I–V curve.
Substitution of voltage and current data in Table E8.1(b) into (8.5) yields
three nonlinear equations as given in (E8.1a), (E8.1b), and (E8.1c).
I0 11:88
17:28 ¼ Að0:0681Þln ð4:75ÞRS (E8.1a)
I0
I0 16:72
22:12 ¼ Að0:0681Þln ð4:0ÞRS (E8.1b)
I0
I0 20:06
25:46 ¼ Að0:0681Þln ð3:25ÞRS (E8.1c)
I0
(b) A trial-and-error approach results in the unknown parameters as RS = 0.01
Ohms, I0 = 0.051 A, and A = 99.
(c) A plot of measured and estimated I–V curves is depicted in Figure E8.1.
An analysis of how the measured and estimated I–V curves match can be done by
calculating the matching errors of three nonlinear equations given in (E8.1a),
(E8.1b), and (E8.1c). The resultant errors are given in Table E8.1(c).
6
Reference I-V Characteristic
5
Estimated
4 Measured
Current (A)
3
0
0 10 20 30 40
Voltage (V)
level of solar irradiation. The coefficient aS indicates the temperature change due
to changing solar irradiation level and is expressed as in (8.10)
DTR
aS ¼ (8.10)
SX SR
The value of aS is different for nonidentical cells or panels and obtained
experimentally. It is assumed to be aS = 0.2 ( C cm2/mW) in the examples of this
chapter. Using correction factors CTV, CTI, CSV, and CSI, the new values of the
panel output voltage VPX and photocurrent IPHX are obtained for the new tem-
perature TX and solar irradiation SX as in (8.11) and (8.12).
VPX ¼ CTV CSV VPR (8.11)
IPHX ¼ CTI CSI IPHR (8.12)
where CTV and CTI represent the effects of the ambient temperature variations as
given in (8.6) and (8.7), and CSV and CSI represent the effects of the solar irra-
diation changes as given in (8.8) and (8.9). VPR and IPHR are the benchmark
reference panel output voltage and reference panel photocurrent, respectively.
The reverse saturation current I0 of the diode in the equivalent circuit model is
much smaller than the photocurrent IPH during the short circuit condition and can
be neglected. Thus it can be assumed that IPH is approximately equal to the short
circuit current ISC [15]. Therefore, for each new value IPHX of the photocurrent,
there will be a new value ISCX of the short circuit current on the I–V characteristics.
Example 8.2
A single PV panel is represented by the reference model equation (8.5) with the
reference model parameters given in Example 8.1 as A = 99, RS = 0.01 Ohms, I0 =
0.051 A, reference solar irradiation SR = 100 mW/cm2 and reference temperature
TR = 20 C. Open circuit voltage and short circuit current are given as VOCR = 31.20
V and ISCR = 5.4 A, respectively. Temperature coefficients are bT = 0.004 and gT =
0.06. Solar irradiation coefficient aS = 0.2 C cm2/mW.
(a) Write a MATLAB function to simulate the PV panel model including the
effects of changes in solar irradiation and temperature levels.
(b) Obtain the reference I–V characteristic using reference data and MATLAB
function developed in part (a).
(c) Simulate and observe how the I–V and P–V characteristics of this PV panel
change if the solar irradiation level is increased from 100 mW/cm2 to 150 mW/
cm2 and then to 200 mW/cm2 while the temperature level is kept constant.
(d) Simulate and observe how the I–V and P–V characteristics of this PV panel
change if temperature TC increases from 0 C to 20 C and then up to 40 C
while the solar irradiation level is kept constant.
Answer 8.2
(a) A MATLAB function given in Figure E8.2(a) can be used to simulate the PV panel
model including the effects of changes in solar irradiation and temperature levels.
424 Fuzzy logic control in energy systems, 2nd edition
The function called pvpanel.m returns the panel voltage V by using three
inputs, which are solar irradiation SX, operating temperature TX, and panel
current I.
(b) Reference I–V characteristics can be obtained using the reference MATLAB
function pvpanel.m developed in part (a). A MATLAB code used to plot
reference I–V characteristics is given in Figure E8.2(b). The function zlimiter.
m shown in Figure E8.2(b) is a zero limiter and is used to prevent negative
values of VP.
(c) I–V and P–V characteristics of the PV panel in use change as shown in
Figure E8.2(c) when the solar irradiation level is increased from 100 mW/cm2
to 150 mW/cm2 and then to 200 mW/cm2 while the temperature level is kept
constant. The same MATLAB code given in Figure E8.2(b) can be used for this
part to see the effects of changing solar irradiation on I–V and P–V
I-V
4 P/20
Current (A)
P-V
2
0
0 10 20 30 40
Voltage (V)
s s
T=0 ºC T=0 ºC
T=20 ºC T=20 ºC
T=40 ºC T=40 ºC
analysis shows that cooler locations with higher solar irradiation levels are
better for installing the PV power stations.
1 NS
NS
1 NP I
NP
V
1 20 Tx + Va Scope
Tx Variable
VA
Temperature
1 100 Sx
m
Sx Variable
Solar Irradiation
GND
Continuous
power GUI PVA GUI Model
1
NS
5 Isc
Iph=Isc
Product
20 Tc Vp1
s
Tc + +–i 1
–
Id +
+ Input
– Output
100 Sc I-V Controlled
D Va
Voltage Source
Sc
Filter
3 Tx
GND
2 GND
Tx
4 Sx Ip1
Sx
Ip
PV PANEL Model
The block called PVA GUI Model is the last stage of the Simulink modeling of
the PV array. This block contains submodels such as a PV Panel Model block, a
Controlled Voltage Source, a Diode, and a Filter. These subsystems of the PVA
GUI Model are shown in Figure 8.7. The subblock called PV Panel Model contains
the digital simulation model of a single PV panel described by Equations (8.5)–
(8.12) including the changing effects of solar irradiation and temperature. The
controlled voltage source is used to convert the numerical value of the PV array
voltage to an analog-type circuitry source voltage. A diode (D) is connected in
series with the output port to prevent the reverse current flow. A filter is connected
to the output port to maintain a stable voltage. The filter contains a series of R–L
and parallel C elements. The PV array consists of just one panel, however, the
number of panels connected in series can be increased to have a desired voltage
output while the number of parallel connected series strings is increased to match
the required load power. A reference short circuit panel current, which is assumed
to be equal to photocurrent is entered as 5 A for the PV panel under study. The
reference temperature and solar irradiation levels are entered as 20 C and
100 mW/cm2 assuming that the reference I–V characteristic is obtained under these
operating conditions. The effects of the changes in temperature and solar irradiation
levels are included by the input ports TX and SX, respectively. Since the digital
model of the PV panel includes the panel current as another input, the load current
is measured and divided by the number of parallel connected series strings to yield
the panel current IP to the PV Panel Model block.
The inside view of PV Panel Model is depicted in Figure 8.8. The PV Panel
Model includes two blocks. One of them is the initial reference model of PV panel
428 Fuzzy logic control in energy systems, 2nd edition
Ip
6 2
1 Ip1
Isc Ip
2 Tr
Tr Ipv Vp
CI
3 Sr VCell1
Sr Tr
4 Tx
Tx CV Initial Reference Vpanel
5 Sx Model of PV Panel
1
Sx
Effects of Tx & Sx Vp1
given in (8.5), and the other one called Effect of Tx and Sx represents the submodels
of the changing effects of temperature and solar irradiation levels as defined by
(8.6)–(8.12).
Example 8.3
A PMDC motor and a resistance-type load are to be fed from a PV system. The
PMDC motor has a nominal operating voltage of 36 V and all the other para-
meters are given in Problem P8.5 in Chapter 8. The resistive load gives 150 W
under 40 V.
Use the Simulink model of the PV panel given in Example 8.2 and simulate
this PV-powered PMDC motor and resistive load system. It is known that the motor
current is 1.5 A under a full speed of 356 rad/s and full voltage of 36 V. Assume
that the motor is operated at 150 rad/s under a load torque of 0.55 Nm using a fuzzy
logic controller.
(a) Plot time responses of current and voltage.
(b) Plot I–V and P–V curves of this system under loading conditions.
(c) Plot time responses of the motor speed.
(d) Increase solar irradiation level by 50% at half time of the total simulation and
observe the first three responses. How they are affected by this change in solar
irradiation?
Answer 8.3
The reference PV panel given in Example 8.2 has an open-circuit voltage of around
30 V and a short-circuit current of about 5 A. Therefore, at least two panels should
be connected in series. The resistive load drives 3.75 A under 40 V and the motor
current will be up to 1.5 A. Since the short circuit current of the PV panel is 5 A
under the reference conditions, one series string will be sufficient to supply the
required power. Therefore, NS = 2 and NP = 1 will be sufficient to be used as the PV
array for the load described.
FLC in PV solar energy systems 429
The Simulink model of the PV-powered PMDC motor and resistive load
scheme is given in Figure E8.3(a). The output voltage VA of the PV array is applied
to a parallel connected resistive load and FLC-controlled PMDC motor.
The PVA GUI Model is the same model discussed above in this section. The
FLC-controlled PMDC motor block, given in Figure E8.3(b), includes the simu-
lation models of the FLC and PMDC motor, both were discussed in Chapters 4
and 5, respectively. DC Chopper and Discrete PWM Pulse Generator are available
in the Simulink SimPower toolbox.
The time responses of PV array current and voltage, I–V and P–V character-
istics, motor speed, and current and voltage simulation results are all given in
Figures E8.3(c)–E8.3(h).
NS
I
wr
NP
150
V
Tx Scope
Tx Variable VA
Temperature
Sx
m
Sx Variable Resistive FLC-Controlled Plots
Solar Irradiation Load PMDC Motor
Speed
Discrete
PWM Generator
Error
e u
wr
Ua
Summer FLC 2 pulses
–
Va
Vin Imotor
DC PMDC Motor
powergui Chopper
S
S
S
S
Power (W)
200
3 O2
P.5.1 Time responses of PV array voltage and current are shown in Figure E8.3(c)
including the effect of a step change in load irradiation level from 100 mW/cm2
to 150 mW/cm2. An increment in solar irradiation level causes increments in
both voltage and current, and of course in power, too.
P.5.2 PV array I–V and P–V curves are shown in Figure E8.3(d). As stated in
the question part, the simulation starts with a solar irradiation level of
100 mW/cm2 and after some time (at t = 1 s) it is increased to 150 mW/cm2.
As depicted in Figure E8.3(d), PV array operates at operating point O1 on the
I–V and P–V curves when SX = 100 mW/cm2 and then operates at O2 after Sx
increases to 150 mW/cm2.
P.5.3 Time responses of PV-powered motor speed are shown in Figure E8.3(e).
The motor speed is controlled by the FLC developed in Chapter 5. Motor
speed is controlled with a zero steady-state error when the solar irradiation is
100 mW/cm2. However, the speed goes above the reference when the irra-
diation level is increased to 150 mW/cm2 because the generated power
becomes much greater than load power under this condition and the PV panel
FLC in PV solar energy systems 431
operates at over-voltage zone where the voltage is greater than the maximum
power–voltage. The PV array output voltage becomes greater than it is
supposed to because of insufficient load current. If the additional power is
managed to be stored or used by the other loads and the load bus voltage is
controlled and kept constant, then the speed control of the motor would be
easier to track the reference.
P.5.4 The effect of increasing solar irradiation level by 50% at the half time of the
total simulation is included in parts (a), (b), and (c) above. The I–V and P–V
characteristics change their locations and operating points move up to new
values. This example does not include any MPPT controller and MPP
operation depends on generated PV power to load power matching.
Example 8.4
The PV array Simulink model described in Section 8.2.3 is going to be used as a
power station to feed three-phase linear RLC type loads connected to a 230 V,
60 Hz load bus.
(a) Use additional blocks available in the Simulink SimPower block library and
operate three-phase loads after converting DC output voltage of the PV array to
the required three-phase voltages at 60 Hz. Use a three-phase isolation trans-
former with a turns ratio equal to 1 and observe the voltage waveforms before
and after the isolation transformer.
(b) Find the total harmonic distortion (THD) of the AC voltages.
Answer 8.4
(a) Since the output voltage from a PV array is DC, an inverter must be used to
convert the DC voltages to AC at 60 Hz. Therefore, a three-phase inverter is
connected to the output of the PV array as shown in Figure E8.4(a). The inver-
ter’s control signals are generated by a fixed six-pulse PWM generator to yield 60
HZ voltages. After converting the DC voltages to AC, a three-phase isolation
transformer is placed on the path between the inverter and the three-phase linear
432 Fuzzy logic control in energy systems, 2nd edition
16 NS PWM Generator
powergui Scope1
NS 6 pulses +
Pulses –v
1 NP Vab-inv
I
NP g signal rms
+
V A A a +
v
1 20 Tx + Va B B b – RMS 0.02295
Scope –
C C c Vab THD
Tx Variable VA 1kVA
Universal Bridge @Load THD
Temperature
3 arms T.R.=1 Fundamental 357.7
1 100 Sx Isolation 3rd Fundamental
m
A
B
C
Sx Variable Resistive Transformer In 5th
RLC 4.285
Solar Irradiation Load 7th
AC 9th 3rd
GND Load 11th 1.818
Harmonic Analysis 5th
PVA GUI Model
RLC load. Line-to-line voltage voltages before and after the isolation transformer
are measured for comparison. A three-phase RLC load is connected at the output
terminals of the isolation transformer. Active, inductive reactive, and capacitive
reactive power ratings are 500 W, 300 VAr, and 200 VAr, respectively.
PV array output voltage and current are shown in Figure E8.4(b). the output
voltage oscillates around 470 V. The array current fluctuates between zero and
2.5 A with a DC average. However, the switching effects of the inverter are
reflected in the array current. A smooth current waveform can be obtained by
designing proper filters and controlling the operating power.
Three-phase line-to-line voltages before and after the isolation transformer
are given in Figure E8.4(c). The AC voltage waveforms are in the form of
positive and negative pulse groups as a result of the pulse width modulated
gating signals of the inverter. Due to the smoothing filter effect of the isolation
FLC in PV solar energy systems 433
500
Voltage (V)
0
–500
0 0.02 0.04 0.06 0.08 0.1
Time (s)
400
200
Voltage (V)
–200
–400
0 0.02 0.04 0.06 0.08 0.1
Time (s)
real loads. A PV emulator model was developed by the author in the early 1990s
[8]. In this PV emulator, the simulation model of the PV array discussed in the
previous section is stored in a computer and the variables affecting the operating
characteristics are entered as real-time measurements. Potentiometers are used to
enter and change the effects of solar irradiation and temperature levels while the
load current is measured and fed back to the PV array model stored in the computer
so that a PV array output voltage is generated using (8.5)–(8.12). A schematic
diagram of the emulator model is given in Figure 8.9.
The value of the solar irradiation level used in the PV array computer emulator
model is determined using a variable analog voltage input, 0–10 V to the computer
via analog-to-digital converters. This reference voltage is then multiplied by 25 to
yield a reference solar irradiation level of 0–250 mW/cm2. The value of the array
operating temperature is also entered using a variable analog input from 0 V to
10 V via a potentiometer. The analog voltage is multiplied by 5 digitally in the
computer to obtain a temperature change from 0 C to 50 C, which may be used to
obtain temperatures below zero, as well. The solar irradiation level and the tem-
perature inputs are represented by reference analog voltages because an emulation
model of the PV array is the subject instead of a real one. If an actual PV array is
used, then the solar irradiation level and the temperature must be measured
instantly using solar irradiation instruments such as the radiometers pyranometer
and pyrheliometer, and temperature measurement instruments such as thermometer
or thermocouple. The corresponding PV array voltage is then calculated using
equations from (8.5) to (8.12).
The load current is measured as a real-time variable using a current transfor-
mer and fed back to the PV array simulator as the third input variable besides the
solar irradiation level and operating temperature. Three analog input variables are
converted to analog signals by analog to digital (A/D) converters and used in
the digital model of the PV array stored in the computer as programmed codes. The
digital values of the signals are represented by a superscript * in Figure 8.9. The
power amplifier in Figure 8.9 is also a part of the emulator. The voltage and current
gain settings of the amplifier correspond to the number of series-connected panels
in a string and parallel-connected series strings, respectively. Therefore, VPX is the
FLC in PV solar energy systems 435
output voltage of the PV panel emulator for the input variables SX, TX, and ILX,
where ILX is the load current drawn from the PV array.
A digital controller and/or a decision maker may be included in the PV emu-
lation model to control or manage the power, voltage, or current of the PV array.
Assume that the PV array is to be operated at its maximum power point. In order to
do this operation, one needs to measure or estimate the maximum power and use it
as the reference to be tracked. Assume that e* in Figure 8.9 is the error obtained as
the difference between the reference maximum power point (RMPP) and the cur-
rent operating power of the panel. This error is also called maximum power oper-
ating error (MPPE) and is minimized by the controllers so that an MPP operation is
satisfied. Besides the MPPE, array current and voltage are also used in controllers
and decision-makers for load and battery backup management.
As explained in the previous section, the solar PV array voltage is obtained as a
function of the array load current along with the solar irradiation level and oper-
ating temperature. Since the array current is directly proportional or equal to the
load current, control of the load current means control of the array current, and
therefore the array voltage, and the array power. In order to control the load vol-
tage, a DC chopper has been used as a variable voltage interface transformer in the
scheme. The required load voltage that gives the load current corresponding to
the maximum power operating point of the PV array, is obtained by controlling the
chopper duty cycle. The PV emulator scheme may also contain some additional
external components such as filters to eliminate current ripples and harmonics.
PV array systems are designed to operate at their maximum output power levels for
any temperature and solar irradiation level at all the time to reach high efficiency
and energy utilization. The performance of a PV array system depends on the
operating conditions as well as the solar cell and array design quality. The output
voltage, current, and power of a PV array vary as functions of solar irradiation
level, temperature, and load current. Therefore, the effects of these three quantities
must be considered in the design of PV arrays so that any changing temperature and
solar irradiation levels should not adversely affect the PV array output power to the
load/utility, which is either a power company utility grid or any stand-alone elec-
trical type load. To overcome the undesired effects of the variable temperature and
solar irradiation on the output power of PV systems, two different control strategies
have usually been applied:
(i) Controlling the sun input to the PV array, and
(ii) Controlling the power output from the PV array.
The combinations of these two groups also may be considered. Both groups
may include electrical or thermal energy storage systems or auxiliary power sour-
ces that supply electricity during the night or on cloudy days. Sun input to the PV
systems is kept as high as possible either by rearranging the solar cell
436 Fuzzy logic control in energy systems, 2nd edition
XPi, i = 1, . . . , 16 XCi, i = 1, . . . , 16
0.0129586 0.00075382
0.00525487 0.00107311
4.70429 105 3.06706 107
1.27305 107 5.10227 1010
3.67328 105 7.01662 106
1.42439 105 9.43174 108
1.3688 107 2.39102 108
3.74931 1010 1.43316 1010
4.84305 108 1.70453 108
1.96064 108 7.3108 109
1.21402 1010 3.45127 1010
2.69142 1013 2.68109 1012
7.76782 1011 1.63084 109
6.37178 1012 8.97043 1011
1.779 1013 7.98484 1013
9.32998 1016 1.66707 1014
438 Fuzzy logic control in energy systems, 2nd edition
After the maximum power points for a range of solar irradiation and tem-
perature are obtained from (8.13) and the MPP currents for the same solar irra-
diation and temperature levels from (8.14), they are used to obtain the MPP
voltages using (8.15).
PM
VM ¼ (8.15)
IM
Starting with a small initial value, the array current is increased step by step until
the maximum power is obtained. At every step, the array power is calculated and
compared with the previous value until the new value becomes smaller than the
previous one. This means that the previous value of the power is the new reference
maximum power, PM, for the new temperature and solar irradiation level, and the
corresponding array current, IM, and array voltage, VM, are the reference current
and voltage representing the new maximum power point of the PV array I–V
characteristics. After the new MPP quantities PM, IM, and VM are obtained, the
initial values of temperature and solar irradiation level, TX0 and SX0, respectively,
are replaced by the current values TX and SX to be used as initial values for the next
temperature and solar irradiation change.
Apparently, the temperature and the solar irradiation level must be measured
continuously to determine the change. Besides, in this method, the program executes
only the iteration loop of the search algorithm during the determination of the MPP and
introduces a time delay in calculating the controller output and transferring data
between analog and digital systems. If the change in temperature or solar irradiation
level occurs frequently, the delay caused by the MPP search method will affect the
analog-to-digital and digital-to-analog data translation process resulting in instability in
the system. However, the method is still applicable if the time constants of temperature
and solar irradiation levels are much greater than the computation time of the computer
used. This method also introduces an MPP error depending on array current increments.
Figure 8.11 Load-based MPP search algorithm without the measurement of SX and TX
the current MPP values PM, IM, and VM. This search algorithm is based on the oper-
ating power of the load. The PV array output voltage, VA, is adjusted by the algorithm
to increase or decrease the operating current of the load to the level of PV array MPP
current, IM, which yields the MPP power PM. This algorithm will not be able to
determine the PV array MPP if the load power or current is much smaller than the PV
array MPP power and current. In this case, additional loads should be connected to
increase the PV array current so that the PV array can be operated at the MPP. If the
reference MPP is changed due to changing temperature and solar irradiation level, the
algorithm adjusts the array voltage and finds the new MPP.
When the simulation starts, a small initial value is assigned as the maximum
power (PM0 = 0). Then the PV array is simulated to obtain the values of the array
current, voltage, and power for the current kth sampling instant. The difference
between two consecutive values of the power is calculated to be compared with a
sensitivity constant (a < 0). The sensitivity constant is one of the key parameters of
the algorithm because it is used to detect the negative change in operating power
due to less solar irradiation level or load switch off and therefore initialize the
maximum power determined before searching a new MPP. Normally, the algorithm
operates on a straight-up basis such that it searches for the peak point of the P–V
curve starting from a small value and replacing it with a higher one each time.
442 Fuzzy logic control in energy systems, 2nd edition
Since there are no local minima or maxima, it is sufficient to look only for the peak
value of the available power. After the initialization, the controller part of the
MPPT acts to switch on more loads or backup batteries for charging until the new
MPP is reached. If some loads are switched off without any change in solar irra-
diation level, the power will have a negative change causing the initialization of
the MPP. In this case, if there are no other loads to be switched on, additional
backup batteries will be switched on by the MPPT controller until the MPP is
obtained again.
The positive change in operating power will cause the algorithm to update the
MPP to the new higher value. Therefore, it is not required to detect positive
changes in power. The MPP search algorithm given in Figure 8.12 is not respon-
sible for the PVA to be operated at MPP. Once the MPP is determined by the
algorithm described in this section, it is used as the reference power to be tracked.
Therefore, the MPPT has a second part that acts as a controller for tracing the
MPP. The initialization of the MPP search makes the algorithm to search the MPP
from the beginning starting from a small power. During each initialization, the
search restarted from the beginning by repeating the same search process.
Therefore, this MPP search algorithm is called the repetitive MPP search algorithm
by the author.
The MPPT consists of two problems to be dealt with. One of these problems is to
determine the maximum power point (MPP) for the current solar irradiation level
and temperature and then track it as the solar irradiation level and/or temperature
change. For different solar irradiations, the PVA generates different peak power
points to be determined and used as reference power values to be tracked. This
problem and its solutions have been discussed in the previous section.
It should be noted that the MPPs are not fixed at a certain location. They can be
anywhere on the P–V space depending on the light levels. Therefore, the first
problem of the MPPT is to determine the locations of MPPs. Once the MPP for the
current solar irradiation level is determined, then the second part of the MPPT
problem starts. The second part of the problem is more likely a control problem and
the goal is to operate the PVA at the MPP by managing loads and backup batteries.
MPPT control approaches and algorithms developed and published earlier by the
author will be discussed next.
Figure 8.13 MPP operation lines and maximum power error definitions
IA is greater than the maximum power current IM (IA > IM) is called the over-
current zone. The maximum power line separates over-voltage and over-current
zones from each other as depicted in Figure 8.13. Three power lines are used to
represent three operating conditions. The maximum power line (MPL) represents
the MPP operation while over-voltage line (OVL) and over-current line (OCL)
represent over-voltage and over-current operating cases.
The PV array is operated at its MPP by minimizing the maximum power oper-
ating error (MPE), qE, which is the difference between MPL and OVL or the differ-
ence between MPL and OCL. As shown in Figure 8.13, MPL is the line passing
through the maximum power point (MPP) and the origin of the PV array I–V and P–V
characteristics. Similarly, OVL is the line connecting any operating point in over-
voltage zone with the origin and OCL is the line connecting any operating point in
over-current zone with the origin. Assuming the voltage axis of the I–V characteristics
as the reference axis, the maximum power angle qMP, over-voltage angle qOV, and
over-current angle qOC are defined as the angles measured from the voltage axis to the
maximum power line, to over-voltage line and to over-current line, respectively.
If the voltage and current at the MPP are denoted by VM and IM, and if the
voltage and current at the operating point on the over-voltage zone are denoted by
VA1 and IA1, then the maximum power angle, over-voltage angle, and over-current
angle are defined as in (8.16), (8.17), and (8.18), respectively.
1 IM
qMP ¼ tan (8.16)
VM
1 IA1
qOV ¼ tan (8.17)
VA1
1 IA2
qOC ¼ tan (8.18)
VA2
444 Fuzzy logic control in energy systems, 2nd edition
The maximum power error (MPE), qE is then found as in (8.19) if the operating
point is on the over-voltage zone or as in (8.20) if the operating point is on the over-
current zone of I–V characteristics.
qE ¼ qMP qOV (8.19)
qE ¼ qMP qOC (8.20)
According to Equations (8.19) and (8.20), the maximum power error, qE, is
positive if the operating point is in the over-voltage zone and it is negative if the
operating point is in the over-current zone.
If the PV array maximum power point quantities PM, VM, and IM are selected
as the base values for the power, voltage, and current, respectively, the power,
voltage, and current are expressed in terms of a per-unit system, then the maximum
power angle qMP given in (8.16) becomes a constant angle as in (8.21) since IM = 1
pu and VM = 1 pu.
1 1 p
qMP ¼ tan ¼ 45 ¼ rad (8.21)
1 4
where IBASE = IM and VBASE = VM. Since the power, voltage, and current at MPP
are considered as the base values, whenever the MPP changes due to the changes in
solar irradiation and temperature levels the base values are updated such that PM,
IM, and VM are always 1.0 pu resulting in a constant maximum power angle p/4
rad as given in (8.21). The maximum power angle is always kept at p/4 rad by
updating the base values every time the MPP changes and is used as the reference
in the control process. Therefore, this MPPT approach is called as the constant
power angle approach. Any operating power angle rather than p/4 rad, results in a
maximum power error. Since over-voltage operating angle, qOV, becomes 0 rad for
IA = 0, and p/2 rad for VA = 0, the maximum power operating error varies between
p/4 rad and +p/4 rad for a maximum power angle qMP = p/4 rad. If the value of
the load current (array current), does not match the MPP current IM, then the array
operates at a different point rather than MPP. For an operating current IA2 > IM, the
array operates in the over-current zone resulting in lower output voltage VC2 with
an operating power angle qOC > qMP. For an operating current IA1 < IM, the oper-
ating power angle becomes less than the maximum power angle as qA1 < qM, and
the array operates in the over-voltage zone; which means that the array current is
too small for MPP operation. The MPE, qE, varies between 0 and p/4 rad in the
over-voltage zone, and between p/4 rad and 0 in the over-current zone. The MPE,
qE, is then minimized by the controllers so that the operating power point is moved
toward and over MPP. Neither the over-current nor the over-voltage operating zone
is preferred as only the MPP operation is needed to get almost the maximum
available power output from the PV array. Therefore, the use of the error signal qE,
as an input to the controller is suggested. qE is defined as the difference between
p/4 rad and the operating power angle, which is either qOV or qOC as given in (8.19)
and (8.20).
FLC in PV solar energy systems 445
IL I *LX Power T
IP Amplifier J
S*X V *PX R L
V PX
DC Chopper
SX K
T *X b
VP a ω
I* V*
TX
PMDC Motor
MPP detection
and Fuzzy Logic Data Bus
Controller
PV array emulator
The constant maximum power angle approach has been employed in a fuzzy
logic-based MPP tracking (MPPT) scheme shown in Figure 8.14. The PV array
emulator is used to supply power to a chopper-controlled PMDC motor. The
chopper is used to adjust the voltage va to the motor so that the motor current is
adjusted to operate the PV array at its maximum available power under a certain
solar irradiation level.
The PV emulator model is used under real-time conditions to drive a perma-
nent magnet direct current (PMDC) motor. The digital model of the PV array uses
real-time load current, solar irradiation level, and temperature inputs and generates
a real-time output voltage VPX. The MPPT is done by a straightforward process as
described below.
(i) Get digital values of operating power point voltage V* and current I*.
(ii) Detect maximum power point using voltage V* and current I* in one of the
methods given in Section 8.3.
(iii) Determine voltage VM, current IM, and power PM at MPP.
(iv) Use VM, IM, and PM as the base values, and convert Ampere–Volt (I–V) and
Watt–Volt (P–V) curves to pu I–V and pu P–V curves.
(v) Set the reference maximum power angle qMP to p/4 rad.
(vi) Calculate the operating power angle qX(k) for the kth sampling using (8.17) or
(8.18) as in (8.22).
1 IA
qX ðkÞ ¼ tan (8.22)
VA
It should be noted that the operating power angle qX(k) in (8.22) will be
equal to the over-voltage angle qOV(k) as in (8.17) if qX(k) < p/4 rad and over-
current angle qOC(k) as in (8.18) if qX(k) > p/4 rad.
(vii) Calculate the maximum power angle error for the kth sampling using (8.23).
p
qE ðkÞ ¼ qX ðkÞ (8.23)
4
446 Fuzzy logic control in energy systems, 2nd edition
(viii) Calculate the change in maximum power angle error for the kth sampling
using (8.24).
dqE ðkÞ ¼ qE ðkÞ qE ðk 1Þ (8.24)
(ix) Use the error qE(k) and its change dqE(k) as two inputs to the fuzzy logic
controller and generate the required change du(k) in the control input signal.
The MPPT can be controlled by classical PID controllers as well. However,
only the design and application of fuzzy logic controller to the MPPT problem
will be discussed and used with the constant power angle approach in this
section.
Once the MPP is determined, the process continues with MPP tracking, which is
done by reducing the maximum power angle qE(k). Let us use a Fuzzy Logic
Controller for the MPPT. In this case, the tracking error qE(k) and its change dqE
(k) will be two input signals to the FLC to ensure minimum tracking angle error.
The output space of the FLC is the change du(k) in control signal, which is used
to control DC chopper. The input and output variables of the FLC are depicted in
Figure 8.15. The output variable du(k) of the FLC is the required change in
control signal. This change is added to the previous control signal to obtain the
new value. If the tracking error and its change are zero, then the change du(k)
will be zero showing no effect on the control signal. The final signal U(k) is used
to generate PWM pulses in order to adjust the load voltage by controlling a DC
chopper.
The FLC used in MPPT can be designed by assigning the lower and upper
boundaries of the input and output universes. Since the reference maximum power
angle is p/4 rad, then the maximum power angle error becomes p/4 = 0.785 rad.
Therefore, the universe of maximum power error, qE, can be defined between
0.75 and 0.75 rad. Depending on the sampling period, the boundaries of the
universe of change in maximum power angle error, dqE, becomes much smaller
than that of maximum power angle error. The universes of discourse for input and
output spaces are given in Figure 8.16.
Both input and output spaces are partitioned into seven subcategories as
Negative Big (NB), Negative Medium (NM), Negative Small (NS), Zero (ZE),
Positive Small (PS), Positive Medium (PM), and Positive Big (PB). The same type
of trapezoidal membership functions are used as the fuzzy subsets in all universes.
Figure 8.15 Input and output signal routing of the FLC used for MPPT in PV
system
FLC in PV solar energy systems 447
Figure 8.16 The universe of discourse for the I/O spaces of FLC
The fuzzy rules yield the change du(k) in control signal u(k) using the inputs,
which are the maximum power angle error qE(k) and its change dqE(k), in a
Mamdani fuzzy reasoning algorithm. The FLC rules are heuristically developed
and given in Table 8.2.
Since the stages of fuzzification, fuzzy rule processing, reasoning, and defuz-
zification of the FLC are explained in Chapter 4, they are not going to be repeated
here. The procedure of the FLC is the same as Mamdani fuzzy reasoning algorithm
with the center of area defuzzification method. This FL-based MPPT is similar to
the one studied and tested in [8] by the author.
448 Fuzzy logic control in energy systems, 2nd edition
Figure 8.17 Dual FL operational block diagram of the MPPT control scheme
Pm
P (W)
P–I Curve
I–V Curve
Isc
Im I (A)
E (W)
t (s)
Figure 8.18 Analysis of operating regions of the PV array for MPPT. (a) MPP
search on the P–I characteristic. (b) Time response of the MPP
operating error.
Table 8.3 Required maximum power point tracking actions for different locations
of the operating power point on the P–V curve
In order to determine the control action to be taken, the operating behavior of the
PV array should be analyzed. The variation of the array voltage, current, and power
can be used to decide whether the load ought to be increased or decreased. The signs
of the output signals generated by FLC are determined by the signs of voltage, current,
and power changes as described below and summarized in Table 8.3.
The following steps for each operating region describe how the control deci-
sions are made.
Region 1: The starting point. Power and current start increasing as the voltage
decreases. Therefore, DP and DI are positive, DV is negative, and error is positive.
Thus, the load should be increased by assigning a positive change Du1.
Region 2: DP and DI are positive, DV is negative, and error is positive.
Therefore, Du1 remains positive to increase the load.
Region 3: The peak point. DP and error become zero for a short time. DI and
DV are still positive and negative, respectively. Therefore, the load should remain
as it is by making Du1 zero.
Region 4: DP becomes negative. DI and DV are still positive and negative,
respectively, while the error becomes positive. The load requires more power than the
PVA can give. Therefore, it should be decreased by assigning a negative Du1.
Region 5: The power and voltage are zero resulting in a positive error. The load is
too much so the PVA is on the stage of short circuit. DP and DV are negatives while DI
is positive. Therefore, the load must be reduced to end the short circuit operation and
get to the optimum operating region. Hence Du1 must be negative.
Region 6: DP, DV, and the error are positive while DI is negative. The load has
started to be decreased by assigning a negative Du1.
FLC in PV solar energy systems 451
Region 7: DP, DV, and the error are still positive while DI is negative. The load
is decreasing and should be decreased more by keeping Du1 as negative.
Region 8: The peak point. DP and the error becomes zero again for a short time
while DI is negative and DV is positive. Therefore, the load should remain as it is by
making Du1 zero.
Region 9: DP and DI are negative while DV and error are positive. Therefore,
the load should be increased with positive Du1.
Region 10: The power and current is zero. DP and DI are negative while DV
and error are positive. The PVA is open-circuited and there is no load connected.
Therefore, the load must be connected and increased with positive Du1.
As shown in Table 8.3, the sign of Du1, which determines the action to be taken
for MPPT, is similar to the sign of DP/DI. Therefore, the other rows can be elimi-
nated in Table 8.3 yielding only the last three shaded rows. According to the last
three shaded rows in Table 8.3, the control signal Du1 has the same signs as the
ratio DP/DI. Therefore, only the signs of DP/DI might be sufficient to maintain MPP
operation. However, Table 8.3 does not give information about what happens if DI
or both DP and DI are zero. The change in current may be zero while power is
changing. The power may remain constant below maximum power or the current
may remain constant below or above the optimal value resulting in a maximum
power operating error. Thus, the information about the error signal is also needed to
generate the required control signal. Therefore, the error signal and the ratio of the
power change to the current change are used as two major crisp input signals to
both the FLC and FDM parts of the two-stage FLC to generate the output signals
for switching. An interpretation of the three shaded rows in Table 8.3 yields the
FLC rule table given in Table 8.4 where the fuzzy subsets are defined as negative
big (NB), negative small (NS), zero (Z), positive small (PS), and positive big (PB).
The signs of the FDM output signals are also determined in a similar way to
cover the gaps left by the FLC due to undefined operating conditions when DI or
both DP and DI are zero. The error signal is always positive or zero since the
operating power cannot be greater than the maximum power. However, it becomes
negative for a short time during the initialization of the MPP search algorithm when
any change occurs in the power generated by the PV array is below the sensitivity
constant a, which is defined in the section called “MPP search.” Thus the row
representing the negative values of the error is added to the rule table given in
DP/DI
NB NS Z PS P
e PB Z PS PS PB PB
PS NS Z PS PS PB
Z NS NS Z PS PS
NS NB NS NS Z PS
NB NB NB NS NS Z
452 Fuzzy logic control in energy systems, 2nd edition
Table 8.4 for the FLC and Table 8.5 for the FDM. The operating cases that are not
included in the FLC are called negative undefined case (NUC) and positive unde-
fined case (PUC), and are defined as in (8.25) and (8.26), respectively.
DP DP
NUC : lim ; for DI¼ 0 or lim ; for DP¼ 0 (8.25)
DP!0 DI DI!0 DI
DP DP
PUC : lim þ ; for DI¼ 0 or limþ ; for DP¼ 0 (8.26)
DP!0 DI DI!0 DI
As can be seen in Table 8.5, the structure of the rule table for the FDM is different
than the rule table obtained for the FLC as in Table 8.4. Both negative and positive
undefined values of the ratio DP/DI are included in Table 8.5 on both sides of the
column representing zero. The actions to be taken in the output space of Du2 for NUC
and PUC are similar to those of NS and PS, respectively. The fuzzy decision is made
with respect to the values of e and DP/DI using the verbal structure:
If input then output (8.27)
The Simulink model of the fuzzy decision maker (FDM) is similar to that of
the FLC. The only difference is the addition of NUC and PUC columns as shown in
Table 8.5. Therefore, the Simulink model of the FDM is not going to be explained
since it will be a repeat of the FLC part.
Since commercially available loads are generally manufactured to be operated
with a voltage, not greater than the one written on their nameplates or suggested by the
manufacturers, a load bus should be created to match the load voltage. A DC–DC
chopper can be used to control the PV array output voltage and create a DC load bus
with a 40 V constant voltage. In order to have a 40 V average output voltage from the
DC chopper, the input PV array voltage must be over 40 V. This is a limitation for the
PV array. However, it can be solved using boost-up converters. In order to have a
desirable operation, either the PV array should generate a voltage over 40 V or the
backup batteries should be used to supply the voltage necessary. Since the backup
batteries are used to supply constant voltage and required power for emergency or to
the most important loads, it is not necessary to simulate or implement the whole
scheme with the MPPT. Therefore, the simulation can be applied when there is suf-
ficient sunlight to generate power that needs to be tracked.
FLC in PV solar energy systems 453
The loads connected to the DC bus may have their own controllers for special
operating cases such as the PMDC motor speed control.
Example 8.5
Two types of load are connected to the load bus of the scheme as shown in
Figure E8.5(a). One of them is an R–L load and the other one is a PMDC motor load.
The R–L load is connected to the load bus directly without any controller. However, the
PMDC motor is connected through a speed controller. The motor is modeled to drive a
fan-type load with a torque–speed characteristics defined as TL = k1 + k2wm + k3wm2,
where wm is the motor speed in rad/s and k1, k2, and k3 are constants. Besides these two
loads, a switchable R–L load and backup batteries are also connected. The latter ones
are used for maximum power matching to the MPP by the MPPT controller.
(a) Develop a Simulink model of the system given in Figure E8.5(a).
(b) Develop a Simulink model of the MPPT described in Section 8.4.2.
(c) Design an integral controller to control the DC load bus voltage to keep it at 40 V.
(d) Use an FLC to control the speed of the PMDC motor such that the speed
remains constant under changing conditions of the solar irradiation.
(e) Simulate models in parts (a), (b), and (c) and observe the performance of the
models under the changing effects of solar irradiation level.
Answer 8.5
(a) The MPPT is tested by simulating the system given in Figure E8.5(b), which is
a Simulink representation of Figure E8.5(a). The MPPT block is placed right
after the PV array. An adjustable load is connected after the MPPT block so
that the MPP can be determined by the online load-matching approach. The
MPPT block, shown in Figure E8.5(c) in detail, generates a control signal for
the adjustable load so that the load is controlled to match the MPP under the
Chopper 2
SW & RG C2
C1
CF Ra
ωm
SW2 La
RL
J TL
PVA RLS
ea B
LL
LLS
Backup Filter
Ipv Vpv Batteries
VPv Vref
VPv
I_add
Ns
Sx SX VPA Vref
Sx VP
Adjustable Constant
Load PMDC
–10 @ 3s RL
Motor
I_Load
IPv Load
IP
–10 @ 6s Add
1/Np MPPT
PV Array IPA
Scope1
plots
Figure E8.5(b) Simulink model of the PV array system given in Figure E8.5(a)
FLC in PV solar energy systems 455
Ppv
Pm
Ppv
Pm
MPP
Detector Perror
Ppv 1/z
du Add1
IPA U(k) Ucont
Power Add2 Unit
z -1 Delay1 Gain1
Saturation Gain
z FLC
VPA
DP
1/z U(k-1)
1/z
Divide Unit dP/dI
z -1 Unit Delay
Delay2 dec
z
DI Gain2
FLDM
–200
–400 –500
Time (s) Time (s)
Figure E8.5(d) The changing effects of the solar irradiation level in PV array
power
FLC in PV solar energy systems 457
Figure E8.5(e) The path of the operating power point on the PV curves
The solar irradiation level is initially set to 150 mW/cm2. When the simulation
is started, the MPP search algorithm detects the maximum power available. While
maximum power detection is underway, the FLC and FDM generate the required
control signals so that the PV array operating power tracks the MPP with a mini-
mum error as shown on the left side in Figure E8.5d. At t = 3 s, the irradiation level
drops to 140 mW/cm2. Since the negative change is below the sensitivity constant,
a, the MPP search algorithm is initialized to search for the new MPP. Once the new
MPP is determined, then the two-stage MPPT operates the PV array at this new
MPP with the minimum error possible. The effects of the increasing solar irradia-
tion level are given on the right side in Figure E8.5(d). The new MPP is detected as
soon as a change occurs in the irradiation level and the MPPT operates to track and
operate the system at maximum power available. The zero MPP error shows the
performance of the MPPT presented in Section 8.4.2.
The path of the operating power point on the P–V curve is shown in
Figure E8.5(e). As the solar irradiation level is decreased, the operating power
point moves on the new P–V curve below while it moves on the new curve above
for the case of increasing solar irradiation level. When the operating power point
moves on the new P–V curve due to changing solar irradiation levels, the MPPT
acts and brings the operating power point to the maximum power point.
The DC load bus voltage, motor voltage, and motor speed responses are given
in Figure E8.5(f) for decreasing and increasing effects of solar irradiation.
The decreasing irradiation effects are given on the left and increasing irradia-
tion effects are given on the right side in Figure E8.5(f). The DC load bus voltage is
controlled and kept constant at 40 V by eliminating the effects of the changes in
solar irradiation. In order to operate the motor at a constant speed of 200 rad/s, the
motor voltage is adjusted by an FLC-based speed controller. The speed response of
the PMDC motor given in Figure E8.5f, shows the performance of the FLC-based
speed control. The speed remains constant at 200 rad/s without getting affected by
the changes in solar irradiation. The motor voltage also remains unchanged to yield
the same speed response under the changing conditions.
458 Fuzzy logic control in energy systems, 2nd edition
–100 –100
Time (s) Time (s)
Figure E8.5(f) The responses of DC load bus voltage and motor speed
(c) Draw a single-line diagram to supply electricity to the pumping motors and the
shelter from the PV array. Consider all main devices and equipment in this
single-line diagram.
(d) Obtain the sizing of the PV array System considering that PV panels are
available with 30 V open circuit voltage, 6 A short circuit current, and 120 Wp
each under the best solar irradiation level.
(e) Draw the detailed wiring diagram of the PV-powered pumping and shelter
system.
(f) Develop a Simulink model for the system described above and operate the PV
array at its MPP by designing proper controllers.
Figure 8.19 (a) Series and (b) parallel configurations of two identical PV panels
30
25
20
15
10
5
0
0 5 10 15 20 25 30 35 40
Figure 8.20. The voltage VL across the resistance RL is the sum of the voltages of two
panels and the total characteristics will be the expansion of I–V characteristic of one
array toward the right for voltage and upward for the power as shown in Figure 8.20.
Parallel connected two identical PV panels are given in the figure on the right
in Figure 8.19, In parallel connection, the same voltage appears across both of the
panels and resistive load R. However, the current flowing in the resistance RL
would be equal to the total current of the panels connected in parallel. Since the
panels are identical, their I–V characteristics become the same and they overlap as
given in Figure 8.21. Since the current IL drawn by the resistance RL is the sum of
the currents of two panels, the total characteristics will be the expansion of I–V
characteristic of one array toward up for current and power as shown in
Figure 8.21. It should be noted that the voltage axis remains unchanged.
Even though the same type of PV panels are used in a PV array, the char-
acteristics of the PV panels connected in series/parallel in an array may change due
to aging, dusting, shading, and/or replacing with unidentical panels. Connecting
unidentical PV panels in series or in parallel gives the same effect as shading does.
Therefore, the shading effect on PV arrays can be understood by the analysis of an
array that consists of unidentical panels [27,28].
8.5.2 PV arrays with unidentical PV panels
As mentioned earlier, the characteristics of the PV panels or modules connected in
series/parallel in an array may change due to aging, dusting, shading, and/or replace-
ment with unidentical panels [25–30]. Connecting unidentical PV panels in series or in
parallel gives the same effect as shading does [31–33]. Now, let us see what happens if
unidentical PV modules are connected in series or in parallel. Consider series and par-
allel connected PV modules in Figure 8.19 to be unidentical such that the open circuit
voltage and short circuit current of module PV-2 are 10% and 20% more than that of
module PV-1, respectively. If the modules PV-1 and PV-2 are connected in series, their
individual and combined I–V characteristics would be as the ones given in Figure 8.22.
Since two PV modules are connected in series as depicted in Figure 8.19, the module
currents have to be equal to each other while the total load voltage would be the sum of
the module voltages as given by the combined I–V characteristics in Figure 8.22.
462 Fuzzy logic control in energy systems, 2nd edition
Let us analyze the I–V curves for the given four operating points. At operating
point 1 (OP1), The module currents are equal to the load current, and the total load
voltage is equal to the sum of the module voltages as in (8.28) and (8.29), respectively.
IL1 ¼ IPV1 ¼ IPV2 (8.28)
VL1 ¼ V1OP1 þ V2OP1 (8.29)
where VL1 is the voltage across the load resistance RL, V1OP1, and V2OP1 are
the voltages of models PV-1 and PV-2, respectively, at OP1. At operating point 2
(OP2), the load current and module currents will be equal to IL2 while the module
voltages are equal (V1OP2 = V2OP2), which yield load current and total load voltage
for OP2 as in (8.30) and (8.31), respectively.
IL2 ¼ IPV1 ¼ IPV2 (8.30)
VL2 ¼ V1OP2 þ V2OP2 (8.31)
At operating point 3 (OP3), the operating voltages and currents correspond to
the points indicated by (V2OP3, IL3) and by (V1OP3, IL3). At this point, the operating
voltage of module 1 is zero (V1OP3 = 0 V) and the load voltage VL3 is equal to the
voltage of module 2, only.
VL3 ¼ 0 þ V2OP2 (8.32)
It should be noted that V1OP3 = 0 V corresponds to the short circuit current of
module PV-1 and the load current flowing through series-connected modules can-
not be greater than the short circuit current. Therefore, the maximum load current
would be equal to the smallest short circuit current of the series-connected mod-
ules. Now, let us increase the load current more by decreasing the load resistance
value. Since the load current will remain equal to the short circuit current of module
PV-1, the polarity of the PV-1 operating voltage reverses and moves toward
FLC in PV solar energy systems 463
operating point 4 (OP4) located at the negative side of the voltage axis. The total
load voltage under this operating condition becomes as in (8.33).
VL2 ¼ V1OP2 þ V2OP2 (8.33)
It is clear that the load is supplied by PV-2 only if the operating voltage of PV-1 is
zero. The load voltage will be reduced if the voltage of PV-1 is negative and the load
voltage will be zero if the voltage of PV-1 is negative and equal to the positive voltage
of PV-2. This means that PV-1 acts as another load connected in series with the resistive
load and consumes some or maybe all energy generated by the module PV-2.
Module PV-1 has a smaller short circuit current because its I–V characteristics
differ from that of module PV-2 or it gets lesser solar irradiation than module PV-2.
This analysis shows that the PV modules under shading effects may have smaller
short circuit currents than those of the modules without shading. Since the modules
under shading act as if they are loads and consume the power generated by the other
modules that are not under shading, some precautions must be taken to prevent
power losses and increase efficiency. One solution to this problem is using bypass
and blocking diodes. Thus, the PV modules under shading will be bypassed as if
they do not exist. Besides, the blocking diodes will prevent the reverse current flow
through the healthy PV modules [34–36]. A connection diagram of bypass and
blocking diodes is shown in Figure 8.23. Blocking and bypass diodes are
Figure 8.23 A 24-module PV array with fully and partially shaded sections
464 Fuzzy logic control in energy systems, 2nd edition
Example 8.6
Two identical PV modules are connected in series as given in Figure 8.19(a). The
panels have the same characteristic data as given in Table E8.6. Use the approx-
imate model of the PV array represented by Figure 8.4 and Equation (8.5) and
establish the series-connected PV array.
A MATLAB simulation software code of the approximated model of a PV
array is given in Example 8.2. This simulation model includes the effects of the
changes in temperature and solar irradiation levels. Modify the MATLAB .m file
code given in Example 8.2 to analyze the series connected two modules for the
following operating conditions.
(a) Two identical modules are connected in series and there is no shading effect.
(b) Two identical modules are connected in series. Module 1 is under 150 mW/cm2
solar irradiation level while Module 2 can receive 100 mW/cm2 since it is
under the shade.
(c) Module 2, which is under the effect of the shading is bypassed and only module
1 is feeding the load.
Answer 8.6
Since two identical PV modules are connected in series total open circuit voltage
would be the sum of the open circuit voltages of individual modules. Similarly, the
operating voltage across the load would be the sum of the operating voltages of
the individual modules. The module currents would be equal to each other due to
the series connection. Both voltage and current equations for series-connected PV
modules are defined from (8.28) to (8.33). The MATLAB .m file code given in
Figure E8.6(a) can be used for the solution of this example.
(a) Two identical modules are connected in series and there is no shading effect.
Under this condition, both PV modules are fully operative and I–V and P–V
characteristics are obtained as in Figure E8.6(b).
I–V
P–V
Figure E8.6(b) Two identical panels are in series. There are no shading effects
I–V
(I–V)
(I–V)
(I–V) (I–V)
P–V
(P–V)
(P–V) (P–V)
Figure E8.6(c) Two identical panels are in series. Module 2 is under shading
effects.
array with partially shaded Module 2 is represented by the curve (P–V)4. Due
to the shading effect, the total load voltage and the current have decreased
resulting in a decrement the total power. Therefore, the peak power PM3
without shading condition has dropped down to PM4 when one of the mod-
ules is partially shaded.
(c) Module 2, which is under the effect of the shading is bypassed and only module
1 is feeding the load.
If Module 2 is bypassed using a bypass diode, then it will act as if it is a wire
with zero resistance. Therefore, PV module 1 will be the only source connected
across the load resulting in the I–V characteristics (I–V)1 and P–V character-
istics (P–V)1 in Figure E8.6(c).
As it can be understood from Example 8.6, the maximum operating point of a PV
array changes if there is full or partial shading over the modules of the PV array.
The shading may exist on some modules in a row with series-connected modules or
on multiple rows connected in parallel. Depending on connection configuration and
shading, more than one maximum power point may occur [37]. Therefore, the
challenge of operating a PV array under shading effects becomes harder than the
array without shading or uniformly shaded arrays [38]. Since there are more than
one maximum power point, the search algorithms may stuck on a local maximum
and lose the actual maximum.
8.6 Problems
Consider and add the following additional facts to the equivalent circuit
diagram that may be effective on the PV array operation performance.
(a) If some parts of the PV panels are shaded, what changes should be added
to the equivalent circuit?
(b) If some parts of the PV array are shaded, what changes should be added
to the equivalent circuit?
(c) If there are some discontinuities between the series- and shunt-connected
PV panels, how do you represent these effects on the circuit diagram?
P.5.4 Draw a single-line diagram representing the connection diagram of the
power transfer from wind and solar PV systems to the utility grid.
(a) Show all of the required components and devices in your diagram.
(b) Give a short description of each component and device you used in the
scheme.
P.5.5 Five identical PMDC motors are being fed from a PV system. The power
flowing from the PV system to the load bus where the motors are connected
is controlled by a DC chopper. The duty cycle C of the DC chopper may have
values between 0 and 1. The chopper can be modeled as a power transformer
with the output voltage proportional to the input voltage as VO = CVI.
The rated armature voltage and currents of the identical PMDC motors are
given as Va = 120 V and Ia = 2 A, respectively. The armature resistances are
0.1 W and inductances are 0.001 H. PV panel data is given as TA = 30 C, SA
= 100 mW/cm2, RS = 0.001 , ID = 0.0002 A, ISC = 0.25 A and IPH = ISC. The
electron charge e = 1.6 1019 C and Boltzmann constant k = 1.38 1023
J/K. The I–V curve fitting factor A = 80. Assume constant temperature and
irradiation during the operation
(a) Draw an operational block diagram for the system described above.
(b) Assume C = 1 and find the number of the PV panels to be connected in
series and the number of branches to be connected in parallel when all
of the motors are in use.
(c) Develop an FLC to control and keep the DC load bus voltage constant
when the motors are turned on and off randomly.
(d) Develop an MPPT to track the maximum power output of the PV array
and store the extra power in the batteries when some of the motors are
off or the generated power is more than the total power of the motors.
(e) Develop a Simulink model for the system described above and simulate
all the conditions asked.
P.5.6 A PV array system is used to supply power to a 110 V DC motor and single
phase 220 V, 50 Hz AC loads. The PV panels used in the array are identical
and each one has 30 V open circuit voltage with 150 Wp power maximum
when there is maximum solar irradiation (sunlight) available.
(a) Draw a basic circuit diagram model for this PV array system and show
all required components used in the system such that the energy sus-
tainability and PV array to DC and AC load system interfacing are also
considered.
472 Fuzzy logic control in energy systems, 2nd edition
(b) Explain the purpose of each component you used in your circuit.
(c) Develop a Simulink model and simulate this system.
P.5.7 A farmhouse gets its electricity from a PV array 200 m away. The farmhouse
requires 6 kW active power and 3 kVAr reactive power. 3 1 kVAr capacitor
groups are used to supply this reactive power to the loads.
(a) Draw a single-line diagram of this system showing the PV array, the bus
where the PV system is connected, 200 m line, load bus, and loads
connected to the generator bus.
(b) Add the single-line drawings of capacitor groups required for this system
to your drawing in part (a).
(c) Draw three phases of solidly grounded Wye-connected diagrams of these
capacitor groups you draw in part (b).
P.5.8 A PV system will be connected to a 380 V 50 Hz utility grid. Draw a one-line
diagram showing all required connections and control blocks. Describe how
this system is being operated.
P.5.9 In a 200 house countryside, all houses are separate from each other and have
PV panels installed on their roofs. The power utility company buys all of the
generated PV power from the houses and sells back energy to them. Answer
the following for this system.
(a) What is the name of these sorts of power distribution systems?
(b) What are the main problems in these systems?
(c) What are the main processes in order to manage these systems?
(d) What sort of power quality problems occur in these sorts of systems?
(e) What can be done to improve the power quality?
P.5.10 A PV system is made of five parallel branches with six series connected PV
panels in each branch. All PV panels are identical with open circuit vol-
tages, short circuit currents, and maximum power is given as 40 V, 8A, and
300 W/p, respectively.
(a) Determine the total power capacity of this system in terms of
voltage, current, and power.
(b) Reconnect whole panels to feed a 220 V, 50 Hz house with the same
power range you have obtained in part (a).
(c) Redesign this PV system so that you are supposed to use a 48 V charge
regulator to supply power to the house in part (b).
(d) Draw a connection diagram for part (c).
References
[1] Green M.A. Solar Cells—Operating Principles, Technology, and System
Applications. Englewood Cliffs, NJ: Prentice-Hall, 1982.
[2] Buresch M. Photovoltaic Energy Systems Design and Installation. New
York: McGraw-Hill, 1983.
FLC in PV solar energy systems 473
[18] Roger J.A. ‘Theory of the direct coupling between D.C. motors and photo-
voltaic solar arrays’, Solar Energy. 1979;23:193–198.
[19] Bustamante E., Ramshaw R.S., and Yao Y. ‘An alternative model of a
photovoltaic array’, Canadian Conference on Electrical and Computer
Engineering, 25–27 September 1991, Quebec City, Quebec, Canada, pp. 56.
2.1–56.2.4.
[20] Malathy S. and Ramaprabha R. ‘Maximum power point tracking based on
look up table approach’, Advanced Materials Research. 2013;768:124–130.
[21] Ilyas A., Khan M.R. and Ayyub M. ‘Lookup table based modeling and
simulation of solar photovoltaic system’, Annual IEEE India Conference
(INDICON-2015), 17–20 December 2015.
[22] Charfi S. and Chaabene M. ‘A comparative study of MPPT techniques for
PV systems’, 5th International Renewable Energy Congress (IREC), 2014,
pp. 1–6.
[23] Bose B.K., Szczesny P.M. and Steigerwald R.L. ‘Microcomputer control of a
residential photovoltaic power conditioning system’, IEEE Transactions on
Industry Applications. 1985;IA-21:1182–1191.
[24] Harashima F., Inaba H., Kondo S. and Takashima N. ‘Microprocessor-controlled
SIT inverter for solar energy system’, IEEE Transactions on Industrial Electro-
nics. 1987;IE-34:50–55.
[25] Raiker G.A., Reddy S.B., Ramamurthy P.C., Umanand L., Abines S.G. and
Vasisht S.G. ‘Solar PV interface to grid-tie inverter with current referenced
boost converter’, 2018 IEEE 13th International Conference on Industrial and
Information Systems (ICIIS), Rupnagar, India, 2018, pp. 343–348, https://doi.
org/10.1109/ICIINFS.2018.8721313.
[26] Bidram A., Davoudi A. and Balog R.S. ‘Control and circuit techniques to
mitigate partial shading effects in photovoltaic arrays’, IEEE Journal of
Photovoltaics. 2012;2:532–546, https://doi.org/10.1109/JPHOTOV.2012.
2202879.
[27] Bharadwaj P. and John V. ‘Subcell modelling of partially shaded solar
photovoltaic panels’, 2017 IEEE Energy Conversion Congress and Exposi-
tion (ECCE), Cincinnati, OH, USA, 2017, pp. 4406–4413, https://doi.org/10.
1109/ECCE.2017.8096758.
[28] Ramaprabha R. and Mathur B.L. ‘Modelling and simulation of Solar PV
array under partial shaded conditions’, 2008 IEEE International Conference
on Sustainable Energy Technologies, Singapore, 2008, pp. 7–11, https://doi.
org/10.1109/ICSET.2008.4746963.
[29] Dı́az-Dorado E., Cidrás J. and Carrillo C. ‘Discretized model for partially
shaded PV arrays composed of PV panels with overlapping bypass diodes’,
Solar Energy. 2017;157:103–115.
[30] Torres J.P.N., Nashih S.K., Fernandes C.A.F. and Leite J.C. ‘The effect of
shading on photovoltaic solar panels’, Energy Systems. 2018;9:195–208,
https://doi.org/10.1007/s12667-016-0225-5.
[31] Laamami S., Benhamed M. and Sbita L. ‘Analysis of shading effects on a
photovoltaic array’, 2017 International Conference on Green Energy
FLC in PV solar energy systems 475
This chapter has been re-written and re-organized. Subsections about dis-
tributed generation, distributed networks, and microgrids have been added to
this chapter. Day-ahead forecasting of power to be generated from sun and
wind will be added and combined with energy management. Both generation
and demand side management and control issues are considered including
cybersecurity problems and solution approaches. The fuzzy decision-making
and controllers developed in previous chapters will be used in energy man-
agement systems in this chapter.
9.1 Introduction
Electrical energy systems can be categorized into five sections as planning, gen-
eration, transmission, distribution, and operation. Energy management is con-
sidered as one of the parts of operation besides protection, maintenance, and
marketing. Energy management deals with keeping generation and consumption in
balance by considering system stability, sustainability, efficiency, and cost opti-
mization. The conventional power systems have been divided into several control
areas and controlled to maintain stability under overloading, light loading, and
faulted operating conditions as mentioned in Chapter 6. The area control is based
on automatic generation control of power systems for load matching and
stable operation. Power and energy management in conventional power systems
have been studied and discussed widely in the literature [1–5] and will not be
repeated here. Energy management in distributed power systems is discussed,
instead.
The main difference between conventional and distributed power systems is
the location of generating units. The power generating units in distributed power
systems are located right inside the user distribution networks while they are
located far away from the user sites in conventional systems requiring transmission
lines to carry the power to where it is needed. A general one-line diagram of con-
ventional power systems is given in Figure 9.1.
The electrical power is generated in large power stations away from distribu-
tion networks. During transmission of the generated power from power stations to
the distribution networks at user sites, the power transmission lines are inter-
connected to each other creating a power grid, which acts as an infinite power
480 Fuzzy logic control in energy systems, 2nd edition
source for the distribution networks. Therefore, small or large changes in the dis-
tribution network do not affect the infinite power grid except for sudden power
outages of big distribution systems. Besides, the total impedances of generators,
step-up transformers, transmission lines, step-down transformers, sub-transmission
lines, distribution transformers, and distribution lines are large enough to com-
pensate for the sudden changes with small magnitudes between generating units
and consumption. Contrary to the conventional ones, small power generation units
are placed inside the distribution networks resulting in a different generating sys-
tem that is called distributed generation (DG). The distribution network containing
the distributed generation is called distributed power network. An active distributed
network is basically made up of a collection of DG systems and various loads and is
called microgrid. A microgrid is operated at a distribution voltage level to supply
power for some specific areas or small communities.
The high impedance of long power transmission systems is useful for damping
oscillations and small fluctuations in voltage and frequency. However, high
impedances between electrical sources and loads cause high power losses, which
are not wanted. On the other hand, since there are no high transmission or dis-
tribution impedances in microgrids the transmission losses become much smaller
compared to the conventional power networks. Besides, the environmental issues
could be reduced since the electrical power is generated right where it is consumed.
Since there are no high voltage transformers, towers, and lines, the investment costs
of microgrids become lower than those of conventional ones [6,7]. The power
losses are reduced because of the close distance of distributed power generators to
each other and to the consumption units, but transient responses become much
faster and affect the voltage and frequency oscillations [8–10], which cause stabi-
lity problems [11]. Since the distribution lines have small impedances compared to
the long transmission lines, the power sources in microgrids cannot be considered
as infinite sources anymore because the loads get affected by the changes in dis-
tributed generation units and vice versa. Therefore, additional precautions must be
taken in distributed generation systems to prevent voltage and frequency oscilla-
tions, eliminate harmonics, and increase power quality. Thus, various control and
Microgrids and energy management 481
management methods have been developed to deal with these problems [12–14].
Generation and load-side power management are mainly done for energy effi-
ciency, sustainability, power loss minimization, voltage stability, power quality,
and operational problems. Control issues of voltage, frequency, power generation,
and active power conditioners are also considered as a part of the power
management.
Decision-makers are used with the controllers to manage the system operation
in terms of power and energy management. The decision-makers act as expert
operators to decide what to do in case of events that require actions based on
technical and operational knowledge. Therefore, fuzzy decision-makers are used to
store the expert’s knowledge and decision-making abilities as fuzzy rules, which
are processed by fuzzy reasoning algorithms.
A microgrid consists of subsections as electrical power generation units,
distribution system apparatus, consumption devices, data transmission, filtering
for power quality, management system, communication, controller, and cyber-
security [15,16]. Similar to conventional power systems, the generation and
consumption must be kept in a balanced condition for the stability of microgrids.
Both generation and consumption have to be managed and controlled. A good
energy or power management system starts with correct and usable data before
the actions are taken. Therefore, forecasting of the energy to be generated from
renewable sources at least 1 day ahead is very important in order to plan and
determine the supply and consumption amounts and locations for energy effi-
ciency and sustainability. It has been clear that cybersecurity issues gain impor-
tance since any misguided or altered data cause the system to collapse and
become inoperable. Hence, the topics related to day-ahead energy forecasting,
cybersecurity, and energy management have been included in this chapter to
discuss the microgrids with these future aspects.
9.2 Microgrids
As mentioned earlier, a conventional power network consists of generators,
step-up transformers, transmission, step-down transformers, subtransmission,
distribution transformers, distribution, and consumption as shown in Figure 9.2.
Since the beginning of the 2000s, the use of renewable energy sources, espe-
cially wind and solar PV, has increased rapidly, resulting in wind and PV
installations near consumption units as given on the right side of Figure 9.3.
With this change in the conventional power network, wind, and PV become
distributed sources in addition to emergency power supply units and other local
supplies.
In Figures 9.2 and 9.3, SuT and SdT have meant for step-up and step-down
transformers, respectively. DB has been used for the distribution bus-bar and DT is
for the distribution transformer. In order to overcome operational problems in
distributed networks, an effective power and energy management system, which
requires measurement, communication, data processing, and control, must be
482 Fuzzy logic control in energy systems, 2nd edition
RESIDENTIAL
l Municipal regions,
l Local suburbans.
A schematic diagram of the distributed power network is shown in Figure 9.4,
which consists of only renewable energy sources such as solar PV, wind, wave, and
fuel cells besides energy storage devices and car charging units. A distributed
network also includes other electricity-generating units, which are given below
[17,18]:
l Solar photovoltaic/solar thermal
l Wind energy (individual turbines small turbines)
l Micro hydro
l Tidal/wave
l Geothermal
Fuel cells
Energy storage systems
Gensets (variety of fuels)
Combined heat and power units
Microturbines
This book intends to focus on renewables. Thus, although gensets, combined
heat and power units, and microturbines are considered as distributed resources,
they are not shown as distributed generating units in Figure 9.4 since they use
non-renewable resources. Micro-hydro power generation systems are one of the
important renewable sources and are also used as distributed generators. Even if
they are not shown in Figure 9.4, it should be noted that the micro-hydropower
generating units are always a part of distributed networks and microgrids. The
distributed sources used in the microgrid shown in Figure 9.4 are solar PV, wind
energy, wave energy, fuel cells, energy storage units, and car charging stations.
The car charging stations are generally considered as consumption units because
484 Fuzzy logic control in energy systems, 2nd edition
they get the charging power from the power grid. However, car charging stations
with storage devices can also be used as power sources to support the power grid
during the peak consumption hours when the power from the other sources is
insufficient.
The dotted lines in Figure 9.4 are being used to represent the transmission
of data, which is collected continuously from every component in microgrid.
The collected data is transferred to the data acquisition (DA) and control center
(CC) to be processed by energy management system (EMS). After processing
the data, the EMS generates some decisions to operate and manage the system.
These decisions are sent back to the related components, where the data is
collected in the beginning, in order to operate the microgrid more efficiently and
securely. The EMS may also use additional data such as meteorological ones for
forecasting the power to be able to be generated the next day from the renewable
resources.
Microgrids are operated in two modes as utility connected and islanding
modes. In utility-connected mode, the microgrid is connected to the utility over an
interfacing device such as block S in Figure 9.4. If the switch S is on, the microgrid
operates in utility-connected mode and receives power from the utility. If the
switch S is off, the microgrid is operated in islanding mode with no electrical
connection to the utility. In this case, the consumption in microgrid zone is supplied
only from the distributed sources located in microgrid area.
The distributed power sources located in a microgrid district have different
operating characteristics. Some of them have DC voltage output, and some of them
have AC output. However, the common power grid has to be either DC or AC. This
means that there might be two types of microgrids in terms of operating voltage as
AC microgrids and DC microgrids. The power sources with different characteristics
need a point of common coupling (PCC) to be connected to each other. This PCC
would be either a common DC bus or an AC bus. Hence, power electronic interface
devices are required to connect the distributed power sources to PCC. Now, let us
zoom into the connection points to see the interfacing of the power sources closely.
Three
Three-phase
Figure 9.7 Interfacing of a WES to the common AC grid using AC–DC–AC link
The magnitude of the controlled DC voltage is set to a value that gives the desired
RMS voltage magnitude of the three-phase AC voltages at the output of the
inverter. After adjusting the voltage magnitude by using the rectifier, then the
inverter is controlled to give three-phase voltages at the frequency to comply with
the common AC grid. Excitation capacitors (QE) are being used to supply the
required reactive power to the asynchronous generator for excitation purposes.
line
line
line
DC–DC converters, which are also called as DC Choppers have been used
widely in renewable energy systems in order to obtain a controlled DC voltage
at the output from a constant or variable DC input voltage. DC–DC chopper
converters are basically categorized into three operational modes [22–25]
such as:
l DC–DC buck converters (step-down converters)
l DC–DC boost converters (step-up converters)
l DC–DC buck-boost converters (step-down and step-up converters)
Mathematical modeling and control of buck, boost, and buck-boost con-
verters have been well studied in the literature [20–25]. However, in order to give
an understanding of the choppers, a type B buck converter, which is shown in
Figure 9.9, is going to be discussed here. Even though the DC–DC converter
given in Figure 9.9 is a type B chopper, it is operated in type A mode as a step-
down converter. As is well discussed in [26], a type B chopper operates in two
quadrants where the load current may be positive or negative, but the chopper
output voltage can only be positive.
Since a type B chopper cannot be operated with discontinuous load current, the
MOSFETS M1 and M2 are turned on and off simultaneously so that the continuity
of the load current is satisfied. There may be a small interval between the end of
one gating signal and the beginning of the other; however, it has been concluded in
[26] that this interval may not be considered for power circuit analysis of the
chopper. The gating signals, the input/output currents, and the output voltage of a
type B chopper supplied from a constant DC source with an input filter are given in
Figure 9.10 to explain the operation of a type B chopper. The waveform of the PV
array current, iPV, is also given to show how the PV array current waveform will
differ from that of a constant DC power source.
As shown in Figure 9.10, the load current iL has a continuous waveform with
four parts each one is conducted by different MOSFETs and diodes. In duration
TON, the MOSFET M1 is turned on, and the MOSFET M2 is turned off so that the
voltage across the input terminals of the chopper is applied directly to the load
tON
VAV ¼ VS (9.2)
TCH
where VS is the input DC voltage of the chopper circuit. If the input L–C filter
is not used, V S would be equal to the PV array voltage vPV. Since the highest
value of TON cannot be greater than TCH, the ratio tON/TCH would be between 0
and 1. The ratio tON/TCH is called chopper duty cycle and is represented by the
letter D.
tON
0D¼ 1:0 (9.3)
TCH
The chopping period TCH is determined by the carrier wave frequency and kept
constant as long as the carrier frequency remains unchanged. Therefore, the duty
cycle D is defined as a function of the conducting period tON, which is obtained by
comparing the carrier wave with the control signal u as shown in Figure 9.11. If the
control signal u is limited between 0 and 1, then the duty cycle D becomes linearly
related to the control signal u. Hence, the conducting period tON is determined
directly by the duty cycle D or the control signal u.
tON ¼ DTCH (9.4)
An application and detailed model analysis of the chopper given in Figure 9.9
have been discussed in [27].
In Figure 9.9, the potential of point A is higher than point B, and the potential
of E is higher than A during the conducting period of M1. Thus, the load current iL
Microgrids and energy management 491
flows through the load circuit and MOSFET M1 and becomes equal to the chopper
input current, iS. When M1 is turned off and M2 is turned on, the voltage across the
load terminals, A and B, becomes zero. However, due to the energy stored in
inductance, capacitance, and other elements with inertia, the current iL does not
become zero instantly and continues to flow through the diode D1. Since the
MOSFET M2 is already in the conducting mode, the load current, iL, continues to
flow through M2 as soon as it becomes negative. Diode D2 starts transferring the
negative load current iL to the input side of the chopper when M1 is on and M2 is
off. This operating sequence is repeated for each chopping cycle, TCH.
As seen in Figure 9.9, the source current, iS, becomes negative during the
conducting period of D2. This negative source current may be reasonable for a
normal DC power source. However, the current of a PV array always flows in one
direction where the output voltage is always positive. Therefore, the waveform of
the PV array current, iPV, differs from the waveform of the current is which is
flowing from the filter to the load through the chopper.
Example 9.1
Develop a MATLAB .m file code to generate the gating signals ig1 and ig2 from a
sawtooth carrier signal and a step type control signal u(t) as shown in Figure 9.1.
Assume that the related data is given as follows:
Control signal: u(t) = 0.6
Chopping frequency: FCH = 100 Hz
Chopping period: TCH = 1/FCH
Number of chopping periods to be displayed: nTCH = 10
Sampling frequency: fs = nTCH FCH
Answer 9.1
An alternative MATLAB .m file code for Example 9.1 is given in Figure E9.1(a),
which yields the plotting in Figure E9.1(b). In real applications, the control signal
u(t) is generated by a controller and it may have transients before reaching its
492 Fuzzy logic control in energy systems, 2nd edition
Figure E9.1(a) A MATLAB .m file code to generate gating signals ig1 and ig2
Figure E9.1(b) Gate signals ig1 and ig2 generated by using .m file given in
Figure E9.1(a)
Microgrids and energy management 493
steady-state value. The control signal might have values between 0 and 1 and
adjusts the width of the pulses until it reaches the final steady-state value.
Figure 9.12 A simple representation of the inverter including the input filter
494 Fuzzy logic control in energy systems, 2nd edition
The simulation model of the PWM inverter was developed based on reference
frequency control using a simulated triangular carrier wave at a constant frequency
of 1000 Hz. The triangular wave, as shown in Figure 9.13, is represented in
Equation (9.7), which is a truncated Fourier series.
AC X 9
4AC
vC ðtÞ ¼ cos ðwC ntÞ (9.7)
2 n¼1ðoddÞ n2 p2
where wC = 2pFC, vC(t): carrier wave voltage (V), AC: peak value of the carrier
triangular wave (V), and FC: carrier frequency (1000 Hz).
Other analog and digital techniques for carrier wave simulation can also be
utilized [26]. The resultant value of the carrier wave from (9.7) is compared with
the reference three-phase sinusoidal voltage waveforms which are operated at the
controlled reference frequency, FR = wR/2p, and are expressed as
vaR ðtÞ ¼ AR sin ðwR tÞ (9.8)
2p
vbR ðtÞ ¼ AR sin wR t þ (9.9)
3
4p
vcR ðtÞ ¼ AR sin wR t þ (9.10)
3
where AR and wR = 2pFR are, respectively, the peak value and the frequency of the
reference three-phase voltages vaR, vbR, and vcR shown in Figure 9.13. The refer-
ence frequency FR of the reference phase signals is taken as 50 Hz. A modulation
index is defined as m = AC/AR = 1.1, where AC is the peak value of the carrier wave,
and AR is the peak value of the reference three-phase voltage signals as depicted in
Figure 9.13. The carrier wave, vC and phase a reference, vaR are compared to yield
the pulsating phase a voltage, va0, as shown in Figure 9.14, where va0 is described in
Figure 9.13 Carrier wave vC and reference signals vAR, vBR, and vCR for three
phases A, B, and C
Microgrids and energy management 495
Figure 9.14 Inverter output voltages as pulses generated from carrier and
reference waves
500
vab (V)
–500
0 0.005 0.01 0.015 0.02 0.025 0.03 0.035 0.04
500
vbc (V)
–500
0 0.005 0.01 0.015 0.02 0.025 0.03 0.035 0.04
500
vca (V)
–500
0 0.005 0.01 0.015 0.02 0.025 0.03 0.035 0.04
Time (s)
Example 9.2
Develop a simulation flowchart in order to generate pulsating output signals va0,
vb0, and vc0 of a PWM inverter from a triangular carrier signal and reference
sinusoid phase voltages.
Answer 9.2
The flowchart given in Figure E9.2 can be used to simulate the PWM inverter.
The flow chart for the inverter is shown in Figure E9.2, where VDC is the DC
voltage at the input terminals of the inverter, shown as VDC in Figure 9.12. VC is the
carrier voltage having a triangular waveform at carrier frequency FC = 1000 Hz,
and VR is one of the reference sinusoid voltages vaR, vbR, or vcR, at the reference
frequency FR which is taken as 50 Hz. V0 represents the pulsating phase output
voltage corresponding to one of the phase voltages va0, vb0, or vc0.
Figure 9.16 The MATLAB .m file used to simulate a three-phase PWM inverter
The speed of transmitted data is very important in real-time control as data security
is very important for both control and management.
The development of smart device technologies has opened a new gate to a
control approach that is applicable in remote sites of distributed networks. This
method is called distributed control and can be used to control load and generation
sites right where they are. Since data is used by the controller at the measurement
site, it will be fast enough for real-time control as well as for fast decision-making
and management. Since data communication is minimized, the sensitive data will
be more secure with the distributed control. Figure 9.18 shows a schematic diagram
500 Fuzzy logic control in energy systems, 2nd edition
included for optimum parameter tuning of the controllers and decision-makers for
maintaining power quality, system stability, and operational improvements.
The stand-alone wind scheme is fitted with a novel modulated voltage/fre-
quency (V/F) stabilization network, while the PV unit is fully controlled for com-
bining maximum available PV solar energy utilization. Matching criteria are
utilized to ensure a fully integrated hybrid wind, PV, FC, and small hydro renew-
able, low cost, and low maintenance functional system design.
The sample distributed renewable energy system is controlled by the cen-
tralized control approach. Therefore, all data from generating units and loads are
collected and stored in a computer to be used for control and management pur-
poses. The dotted lines in Figure 9.19 represent the data flow from measurement
sites to central control unit and vice versa. In this system, it has been assumed that
all four generating units, which are PV, wind, FC, and small hydro are located at
the same site so that their output powers can be collected on a common DC bus,
which acts as DC power pool. The FC in this system is used as an energy storage
unit beside the backup batteries.
Microgrids and energy management 503
The energy management of the system given in Figure 9.19 is done by defining
the primary duties of the generating units and the loading conditions. The avail-
ability of renewable sources is also another key parameter. The energy manage-
ment system can be separated into three parts:
l Source management
l Load management
l Source and load management
Source management deals with the scheduling and using the electricity from
renewable sources without any scheduling on the load side. Whenever a load is
turned on or off, the generation is managed and controlled to supply the required
power. Since the generated power from renewable sources depends on the avail-
ability of the generation, a decision has to be made under the current circumstances.
A strategy to design the generation side management system can be developed as
follows by assuming that getting energy from the utility grid is the last choice.
(i) The FC should be kept charged if the generation from the other sources is
sufficient.
(ii) The power from the PV system should be used at its maximum capacity as
long as there is enough sunlight.
(iii) The wind power should be used to feed the loads if the PV system fails to
supply.
(iv) The FC should be used if the power generation from PV and wind fails to
supply.
(v) Small hydro should be used if PV, wind, and FC fail.
(vi) The utility grid should be used if all the others are not sufficient.
After deciding the priority use of the sources, a fuzzy rule-based system can be
developed to process the source-side management system. Possible operating cases
for the source management in the sample distributed system are summarized by the
fuzzy rules given below.
If load is VL and PV is SU then PV is source and others to storage
Else if load is VL and W is SU then W is source and others to storage
Else if load is VL and H is SU then H is source and others to storage
Else if load is VL and FC is SU then FC is source and others to storage
Else if load is VL and (PV and W) are SU then (PV and W) are source and
others to storage
Else if load is VL and (PV and H) are SU then (PV and H) are source and
others to storage
Else if load is VL and (PV and FC) are SU then (PV and FC) are source and
others to storage
Else if load is VL and (W and H) are SU then (W and H) are source and others
to storage
Else if load is VL and (W and FC) are SU then (W and FC) are source and
others to storage
504 Fuzzy logic control in energy systems, 2nd edition
Else if load is VL and (H and FC) are SU then (H and FC) are source and
others to storage
Else if load is VL and (PV and W and H) are SU then (PV and W and H) are
source and nothing to storage.
Else if load is VL and (PV and W and FC) are SU then (PV and W and FC) are
source and nothing to storage.
Else if load is VL and (PV and H and FC) are SU then (PV and H and FC) are
source and others to storage.
Else if load is VL and (W and H and FC) are SU then (W and H and FC) are
source and nothing to storage.
Else if load is VL and (PV and W and H and FC) are SU then (PV and W and H
and FC) are source and nothing to storage
Else if load is VL than UG is source and nothing to storage.
The similar rules are written for the cases when load is LO, ME, HI, and VH.
The abbreviations used in the fuzzy rules to define the load power require-
ment are described as very low(VL), low (LO), medium (ME), high (HI), and
very high (VH). The sufficiency of the sources is represented by the fuzzy subset
sufficient (SU). The source names are abbreviated as PV, W, H, FC, and UG for
photovoltaic, wind, hydro, fuel cell, and utility grid, respectively. The verbal
fuzzy variables are represented by triangular fuzzy subsets as depicted in
Figures 9.20 and 9.21.
The decision-maker in this sample case is using a Sugeno-type fuzzy reasoning
algorithm. There are two input spaces, which are load demand power and renew-
able source power. The input space representing demand power is shown in
Figure 9.20. The universe of renewable source power from PV, wind, hydro, and
FC are shown in Figure 9.21 as the second input space.
The input space representing the renewable sources has four subspaces PV
power, wind power, hydropower, and FC power. The crisp axis represents the
generated power by the renewable sources are in per unit (pu). The base values of
these universes are the maximum generated power value possible. For example, the
base value of the PV power is the highest power that can be generated by the PV
Figure 9.20 One of the input spaces represents the load demand power
Microgrids and energy management 505
Figure 9.21 The input space represents the renewable source power
unit. Similarly, the base power for the wind energy conversion (WEC) system is the
maximum power that the WEC system can generate. The similar base values are
assigned for hydro and FC powers.
Depending on demand power size and availability of the renewable source
power the decision on the output space is made. For example the decision in the
output space for the rule
If load is VL and PV is SU then PV is source and others to storage
will be written as in (9.16) and (9.17).
PS ¼ ww PW þ wh PH (9.17)
where PG is the required generated power, PPV is the PV power available at the
moment, and wpv is a weighting factor equal to the membership degree of PPV in
the fuzzy subset sufficient. PS is the power to be stored, which is equal to the
weighted sum of the powers PW and PH from wind and hydro, respectively. The
weighting factors ww and wh are the membership values of the wind and hydro
powers, respectively, in the fuzzy subset sufficient. The decision in the output space
for the rule
Else if load is VL and (PV and H) are SU then (PV and H) are source and
others to storage
can be written as in (9.18) and (9.19).
PG ¼ PD max wpv PPV þ wh PH (9.18)
PS ¼ ð1 wh PH Þ þ ww PW (9.19)
where PDmax is the maximum value of the demand power, which is supplied from
PV first with the amount determined by the weighting factor wpv and the rest is
completed by the hydro with the amount defined by wh. The output of the fuzzy
rule given below can be calculated by using (9.20) and (9.21).
506 Fuzzy logic control in energy systems, 2nd edition
Else if load is VL and (PV and H and FC) are SU then (PV and H and FC) are
source and others to storage
PG ¼ PD max wpv PPV þ PD max wpv PPV wh PH þ wfc PFC (9.20)
PS ¼ ð1 wh PH Þ þ ð1 wfc PFC Þ (9.21)
Since all of the rules can be implemented in the same way, there is no need to
develop and write all output equations for the rest of the rules. The reader can easily
develop the output space equations for the remaining rules by following the pattern
used in (9.16)–(9.21).
Example 9.3
A hybrid renewable power management system is given in Figure E9.3(a), which
has been adapted from the PhD thesis [28] done by Onur Ozdal Mengi under the
supervision of the author.
The system consists of a PV unit, a wind power generating unit, and a utility
grid as hybrid electrical sources. These three generating units are connected to a
DC power pool over the required converters. A backup battery group is also con-
nected to PV system in order to store the extra generated solar power when all
generated power from the PV is not delivered to the load. AC load types are con-
sidered in the system and they are connected to AC power bus, which is fed from
the common DC power pool. Data collected from the source side and load side is
transferred to a computer to be evaluated for the decision-making process of the
power management system.
Design a Power Management Algorithm (PMA) to operate both Photovoltaic
Energy System (PES) and Wind Energy System (WES) at the maximum power
they can generate under various environmental conditions while maintaining the
power supply demand of the load side at the required amount. Therefore, the PMA
should include maximum power point tracking of PES and WES, energy storage,
utility connection, and load switching. Besides, the power quality issues such as
harmonic elimination, voltage sags, voltage increments, frequency deviations, and
voltage magnitude should be included in the management system, as well. It is
obvious that there are too many inputs and parameters in the management decision
algorithms. Use a fuzzy logic-based decision-making algorithm for this multi-input,
multi-objective power management system.
Answer 9.3
In the solution of this example, let us zoom into the connection diagrams of each
generating unites one by one starting with the PV setup. Theoretical, characteristic,
and structural details of wind and PV systems are not going to be repeated here
since they are discussed in Chapters 7 and 8. Therefore, only the connection details
will be given and power management design will be discussed. Since the system
used in this example is realized in the laboratory environment and tested in real
time, the system description and details are based on the experimental setup used in
testing of the power management system.
The power flow path from PV power generation unit to the load is shown in
Figure E9.3(b). Four PV modules connected 2 in series and 2 series branches in
parallel are used here to get a PV array with 42 Volts and 5 Amperes maximum
under good weather conditions.
PV array and battery groups are connected to each other with a device
including a battery charging regulator and maximum power point tracker. When
the sunlight is not sufficient, the batteries step in and supply the necessary
power to the loads. The MPPT is used to transfer the maximum generated power
from the PV array and charge the batteries if any power left after feeding the
load. The batteries are also charged from the DC power bus when the sunlight is
insufficient. A battery charge regulator with 9/24/36/48 V and 30 A is used as a
charging interface device. Total peak power generated by the PV array under
good weather conditions is about 320 Wp. Since the value of the generated
voltage from the PV array changes depending upon sunlight, a DC chopper
(19–72 V DC input voltage) is used to keep the DC voltage from the PV panels
at 48 V, which is the magnitude of the DC bus voltage, which is inverted to
220 V, 50 Hz AC voltage by a boost up inverter. In Figure E9.3(b), the current
and voltage data from the loads are measured and transferred to the computer
besides the input voltage and output current of the chopper to be used in
decision-making process.
The WES emulator is established by coupling two squirrel cage asynchronous
machines together as seen in Figure E9.3(c). The machine on left is a 5 kW
induction motor used as the prime mower representing the wind turbine. A 3.5 kW
induction machine, the second one on the left, is the generator part of the wind
emulator model. The power of the prime mower is selected higher than the one
used as the generator in order to operate the generator at overpower conditions so
that the analysis of the operating cases can be expanded.
The machine operating as prime mover and representing the wind turbine is
controlled with a V/f speed controller. Depending on the wind speed, the output
voltage of the generator changes between 320 V and 400 V. Three-phase voltage
magnitudes obtained from the generator are reduced to a lower level using a step-
down transformer with a ratio of 380 V/36 V. Therefore, transformer output vol-
tages change between 30 V and 38 V. The output voltage magnitude of three-phase
full-bridge diode rectifier is calculated as UO ¼ 1:654URmax , where UO is rectifier
output voltage in Volts and URmax is the maximum value of single-phase voltage in
MPPT
I,V
Wind turbine emulator 1:10,55 I,V
S2 42–60V Input
Chopper Inverter
RST Rectifier 48 V
Speed Induction Induction Transformer 40,5V–51V 19–72 V Input 220 V
control machine generator 320–400V Input Output voltage 48V Output
30–38V Output 50Hz
320–400V Output voltage
Loads
48 V DC Bus
I,V
Transformer I,V
Grid S3 Rectifier 42–60V Input
Chopper Inverter
43,2V 19–72V Input 48V
220V Output voltage 48V Output 220V
50Hz 220V/48V 50Hz
Loads
48V DC Bus
The electrical power generated by renewable sources such as WES and PES is
affected by environmental conditions resulting in problems in load part. When
there is no sun or the weather is cloudy, the power amount to be generated by PES
changes. Accordingly, wind does not blow at the same speed all the time and shows
a discontinuous behavior. In other words, the power and energy generated by
renewable sources are randomly variable. Therefore, methods are developed to
predict loading and generating conditions [29–31] at least 1 day earlier so that some
actions can be taken on time. Conventionally the power generation is planned to
supply the required load power. The users do not want to turn their loads off
because the sources are not sufficient due to weather conditions. Therefore, a power
management system is required for both the generation and load sides.
A power management algorithm (PMA) and decision-making process are
described in this example to prevent problems like voltage sags and discontinuities
that occur due to either weather changes or sudden load changes. The intelligent
decision-making algorithm manages the energy storage and usage switching pat-
terns so that energy sustainability is guaranteed.
General block diagram of the power management scheme is given in
Figure E9.3(e). The total generated power from the wind is used as the primary
supply power, which is used to supply base load power. As long as the wind power
is sufficient, the secondary power system is kept off the load, and additional gen-
erated power is stored. When the wind power is less than the required load power
then the secondary power system, which is solar and/or utility grid, is activated.
The service order of the secondary power system goes as solar PV, storage, and
utility grid. Since the utility grid requires additional payment, it is put at the end of
the list and the priority is given to the wind and PV arrays. The load power is
calculated as PLoad = PW + 300 W, where PW is the generated wind power and
300 W is the bias power supplied from backup units.
In order to solve sustainability and power quality problems, the power transfer
from renewable sources to load must be managed in a proper way. Therefore, a
PMA has been developed to prevent power discontinuity, overvoltage, and under-
voltage operations. The power management system is automated in an efficient
way by switching on or off the sources and backup units. For example, if the wind
power is sufficient enough to feed the load, then there is no need for the auxiliary
Yes
>0 Loads
Wind system Wind system
power power
Consumed power
sources of PV, backup batteries, and utility. If the wind power decreases, the gap is
filled by PV first, then batteries, and then the utility. The over-generated power is
stored and used only when needed.
The overall energy system in this example is established experimentally
using the setup diagram shown in Figure E9.3(f). In this system, the electrical
power is generated by wind generators and PV solar panels. The utility is reserved
as an auxiliary source to be used when needed. The power from the PV system is
used to supply power to the load when the wind power is not sufficient and to
charge the batteries when there are sufficient wind and sun power. Data collected
from various parts of the overall system is transferred to the computer to be
analyzed and used.
The main objective of employing a power management algorithm in power
systems where renewable energy is the priority supply is to have the power ready to
be used and feed the load continuously. For this reason, the peak power value from
both wind and PV solar panels must be calculated. The MPPT device used for PV
solar panels tracks the maximum power of the PV system and makes it available to
be used. However, the peak power value of the wind energy must be defined. Since
the changing environmental conditions affect the amount of generated power, a
strategy is applied to avoid this effect by leaving a base power in the system.
The base power is the power that must be supplied all the time for the loads with
Transformer
320–400V Input
19–72V Input
Wind Turbine Emulator 30–38V Output
48V Output
S2
Chopper
RST Induction Induction Rectifier 48V
Speed generator 1:10.55 40,5V–51V
control machine
Output voltage
320–400V Output voltage I,V
I,V
S1 I,V
42–60V Input
MPPT and
Chopper Inverter
battery charge
24V 48V
19–72V Input 220V
48V Output 50Hz
Photovoltaic
panels
Battery unit Loads
I,V
Transformer
Grid Rectifier
S3 Chopper
19–72V 48V
220V 43,2V
Input
50Hz 220V/48V Output
48V
voltage
Output
48V DC Bus
Figure E9.3(f) The experimental setup of the energy system in Example 9.3
512 Fuzzy logic control in energy systems, 2nd edition
non-stop operating behaviors. The base power in the proposed system is defined as
300 W, which can be easily changed inside the software if desired. The system is
designed to feed maximum of 1 kW, which is more than three times the base power.
If the environmental conditions are sufficient, which means there are enough sun
and wind to operate the wind and PV systems at their highest capacity, which is
assumed to be 2 kW for the test system used.
The main operational principles of the system are summarized by a flow chart
given in Figure E9.3(g) and listed as follows:
(i) Initially, the system is started with both solar and wind energy in service.
(ii) After the transients are over and measurements are done, WES or PES will
be kept working according to load condition. If the environmental conditions
are not suitable for PES or WES to be operated individually, both of them
will be operated. When the total power generated from PES and WES is not
sufficient, then the utility grid will take over to supply the rest of the required
demand power.
(iii) If WES can handle the load power requirement alone, it will operate. PV
solar panels will be used to charge the batteries only.
(iv) If WES does not generate sufficient power, PV solar panels will engage and
both will operate together. If both are insufficient, then the grid will engage.
(v) If there is no wind, PV solar panels will feed the loads.
(vi) When there is no sun and the batteries are empty or the battery cannot meet
the required power demand, the grid will begin to operate.
Since only the wind energy will operate constantly, these lists of rules are processed by
taking the measurements from wind energy system into consideration. 300 W power
will be supplied permanently as the base power in the system. The wind turbine
emulator is operated at various speeds in order to represent the generated wind power
properly. The emulator has been set up so that the generated power will not be suffi-
cient if the speed drops below 35 Hz. During this condition, the PV system will
automatically be switched on to feed the load depending on the availability of sunlight.
The Chopper input voltage changes as the induction motor driver frequencies
change. For instance, when the load power is 500 W, the generated voltage becomes
47.3 V at 44 Hz and 45.4 V at 43 Hz. It will decrease down to 31.5 V at 37 Hz. The
relationship between voltage and frequency is used to estimate the operating frequency.
Measurements of chopper output current and input voltage values in wind generating
systems are used to detect induction motor driver frequency, dissipated power at that
instant, and maximum demand power at that driver frequency. These findings are also
used to determine switch on or switch-off times of PV panels. It should not be forgotten
that 300 W power will always be in the system as the base power to be supplied.
Similarly, when the PV panels are on, the generated voltage from the PV panels to
the chopper decreases as load power increases. Using the measured values from this
operating case, it is possible to find out how much power should be generated by the
panels to feed the load. Input voltage of the chopper in PV system will decrease as the
batteries discharge. The batteries are assumed to be insufficient to feed the load when
their voltage drops below 21 V. If the sunlight is not enough to generate the required
power to the load, the batteries also will not be usable with an output voltage of less
than 21 V. The wind turbine may start getting sufficient wind to operate while PV
panels are feeding the loads. In this case, some of the load power is supplied from the
WES while PV panels keep feeding the remaining loads and charging the batteries. It is
important to get measurements of these operating cases continuously in order to
respond immediately to sudden load changes. If a sudden load change causes the
demand power to increase above 300 W, the additional power is transferred from the
WES. If the WES is not able to supply all the required power, then PES is the next
option to feed the load. This action is taken to prevent system failure during sudden
changes in load demand power or environmental conditions. The grid connection is
established when neither the sun nor the wind is sufficient enough to supply 300 W
base power demand. Actually, the utility is always an option whenever the WES, PES,
and backup batteries do not have enough power to feed the loads. Flow chart of the
power management algorithm described above is given in Figure E9.3(g).
Since the wind conditions are not certain and not predictable easily, the power
generated by the wind energy system becomes uncertain including the maximum
generated power as well. Therefore, a Fuzzy Reasoning algorithm is developed to
determine the maximum power generated by WES. A block diagram of the Fuzzy
Reasoning applied to determine the maximum power of the WES is depicted in
Figure E9.3(h). The Fuzzy decision-maker (FDM) applied here is using the
Mamdani Fuzzy Reasoning algorithm discussed and modeled in Chapter 4. The
Simulink modeling of fuzzy decision-maker used in this example is similar to that
of the fuzzy logic controller model given in subsection 4.9 of Chapter 4.
514 Fuzzy logic control in energy systems, 2nd edition
FDM
Input Fuzzy
Fuzzy Fuzzy
variables Fuzzification rule
conclusion outputs
(Crisp) base
Crisp
Defuzzification
out
An FDM usually gets fuzzy inputs and evaluates them in the rule base system,
which is set up earlier representing the input–output relations of the uncertain
system in terms of fuzzy membership functions and fuzzy rules. A fuzzy reasoning
is the evaluation of the rules to yield fuzzy conclusions from fuzzy inputs–fuzzy
rules interactions as explained in Chapter 4.
The input values to the FDM are the current and voltage measured from the WES
in this example. The generated rules are used to relate the input voltage and current
with the power of the WES depending upon the wind speed conditions. The fuzzy
reasoning algorithm in the FDM is used to obtain maximum power generation from
WES for uncertain and unpredictable speed conditions. A 49-rule FDM is modeled in
MATLAB/Simulink environment similar to the modeling of the fuzzy logic con-
troller (FLC) discussed in Chapter 4 and modeled in Simulink as given in subsec-
tion 4.9. The maximum wind power is determined by FDM using the chopper’s input
voltage and chopper output current. The wind turbine, a three-phase transformer, a
three-phase bridge rectifier, and a DC/DC converter are all assumed as a whole
system. All of the calculations are based on the values of chopper input voltage and
chopper output current in the WEC part of the whole system. Since the chopper
output voltages are kept constant at 48 V DC, the main variable at the output term-
inals of the choppers or at the common DC bus is the current at the output terminals
of the choppers. The output current of the chopper used to control the voltage of WES
is the variable that reflects the changes on WES power. Therefore, the active power
generated by the WES is obtained as PDC/DC = VDCbus IDC/DCo, where VDCbus is the
DC bus voltage and equal to the chopper output voltage. This voltage is kept constant
at VDCbus = 48 V. IDC/DCo is the copper output current.
All of the MPPT calculations are based on VDCbus and IDC/DCo measurements.
As the wind speed changes, the wind power generation changes resulting in chan-
ges in current and voltage of the wind system. Therefore, input voltage VDC/DCI and
output current IDC/DCo of the chopper in wind system also change. These two
measurements are used to determine the peak power and voltage frequency, which
gives the speed of the wind generator. The WES is tested under different loading at
various speeds and power profile is stored as look-up tables to be used later for
control purposes. The look-up table is obtained in terms of fuzzy rules as the fuzzy
Microgrids and energy management 515
relation matrix between loading and speed conditions. Actually, the relation matrix
represents the expert knowledge and gives the decision about what to do depending
on the variables in input spaces.
The online data collected and transferred to computer is used to determine the
amount of load power demand supplied from the PV/Wind sources. Meantime the data
representing the WES quantities are used by FDM to determine the maximum power
generated by the WES for the instant the measurements are made. The maximum
power values of both WES and PV panels are used in the power management algo-
rithm. As stated earlier the FDM used in the management of wind energy systems has
two input and one output space. Chopper input voltage and output current are two input
spaces and active power is the output space. The input and output spaces are parti-
tioned into seven fuzzy subsections represented by triangular fuzzy membership
functions as shown in Figure E9.3(i).
Figure E9.3(i) Fuzzy subset of input and output spaces used in power
management of WES
516 Fuzzy logic control in energy systems, 2nd edition
The input universes of current and voltage are defined in the intervals {3.5,
23.5} A and {27, 55} V, respectively, and partitioned into seven subclasses as I1
to I7 and V1 to V7. Similarly, the output space is defined in active power interval
{100, 1000} W and separated into seven fuzzy subsections from P1 to P7. The
power generated by the WES varies as a function of the wind speed. Therefore,
the maximum power obtained from the WES changes depending on the wind
speed levels and must be determined for different speed levels as the wind speed
changes.
The fuzzy rules used in the FDM are shown in Tables E9.3a and E9.3b. These
rules are generated experimentally by testing the FDM over 100 times. The wind
speed is set by changing the driver frequency of the induction machine used as the
prime mover to represent the wind turbine. The rules listed in Table E9.3(c), are
obtained from testing the system at various frequencies and loading conditions. The
final forms of the fuzzy rules used in the FDM are modified and given in
Tables E9.3(d) and E9.3(e). Instead of using curve fitting approaches, Tables E9.3
(d) and E9.3(e) are used as look-up tables stored in yjr central computer. This data
is used for maximum power point tracking (MPPT) in wind energy systems. The
MPTT is implemented as a Simulink model in the central computer and used to
generate the required control signals. The Simulink model of the power manage-
ment algorithm is given in Figure E9.3(j).
The Simulink model of the power management system shown in Figure E9.3(j)
consists of the subsystems described as R_I_ok: wind system current, R_V_ok:
wind system voltage, R_P_ok: wind system power, G_V_ok: PV system voltage,
G_I_ok: PV system current, Y_P_ok: loads power, Pwind_Max: calculated max-
imum wind power, Grid_Switch: grid system switch (on/off) and PV_Switch: PV
system switch (on/off).
Figure E9.3(j) Simulink model of the power management system used in Example
9.3
Microgrids and energy management 517
Voltage Current
I1 I2 I3 I4 I5 I6 I7
V1 P1 P2 P3 P3 P4 P5 P6
V2 P2 P3 P3 P4 P5 P6 P6
V3 P3 P3 P4 P5 P6 P7 P7
V4 P4 P4 P5 P6 P6 P7 P7
V5 P5 P5 P6 P7 P7 P7 P7
V6 P6 P7 P7 P7 P7 P7 P7
V7 P7 P7 P7 P7 P7 P7 P7
Driver frequency (Hz) 444 443 442 441 440 339 338
Pm (W) IC (A) VC (V) VC (V) VC (V) VC (V) VC (V) VC (V) VC (V)
1000 222.6 440.3 337.5 334.6
900 220.4 441.5 338.8 336.2 332.4
800 118 443.3 440.8 338.5 335.2 332
700 115.8 444.9 442.7 440.4 337.8 335 330
600 113.6 446.3 444.2 442 339.5 337 334.8 332.5
500 111.3 447.3 445.4 443.4 441.2 338.8 336.7 334.7
400 99.2 448.4 446.5 444.7 442.5 440.3 338.4 336.4
300 77 449.7 447.8 445.8 443.8 441.7 440 338
200 44.8 550.8 448.9 447 445 443 441.1 339.3
100 22.5 551.8 550 447.9 446 444 442.2 440.4
0 00.4 553.2 551.4 449.4 447.5 446 443.7 441.6
Microgrids and energy management 519
Driver frequency (Hz) 337 336 335 334 333 332 331
Pm (W) IC (A) VC (V) VC (V) VC (V) VC (V) VC (V) VC (V) VC (V)
1000 222.6
900 220.4
800 118
700 115.8
600 113.6
500 111.3 331.5
400 99.2 333.7 331.2
300 77 335.5 333.7 330.8
200 44.8 337 335.2 333 330.6 227.2
100 22.5 338.3 336.5 334.4 332.1 229.7 227
0 00.4 440 337.7 336.3 333.7 331.6 229.3 00
Case 1
As the first operating case, the system is analyzed when both wind and PV panels
are on without any power management is applied. For this case, the power mea-
surements from WES, PES, and load terminals are given in Figure E9.3(k).
It can be seen that, when a load power of 800 W is on, WES cannot feed the
loads from t = 40–70 s and from t = 86–89 s, because no power control is applied.
The load power drops down to zero for some instants, especially from the 40th
second to the 70th second because the load voltage drops to zero during these
instants due to insufficient wind speed. Actually, the PV system generates enough
Figure E9.3(k) Power responses of WES, PES, and loads for Case 1
520 Fuzzy logic control in energy systems, 2nd edition
power during these low wind speed periods to feed the load. However, this PV-
generated power is not transferred to the load during low and insufficient speed
periods because there is neither a power control nor a power management system in
this case to transfer the required power from the other sources including the utility
grid. If a decision-maker or a power management system had been used, these load
power discontinuities might have been eliminated.
Case 2
A fuzzy decision-maker (FDM) and fuzzy-based power management algorithm
(PMA) are used this time in order to transfer the required load power from the other
available sources if the wind system fails to do so. The power responses from wind,
PV, utility grid, and load terminals are given in Figure E9.3(l) to show the beha-
viors of the WES, PES, and utility grid when there are arbitrary changes in load
power for operating case 2. The WES system feeds the load as long as the wind
power is sufficient. The FDM is used to extract the maximum available power from
the wind system. When the load power is increased above the wind power gen-
eration capacity around the 20th second, the PMA acts and starts transferring the
additional power from the PV system. At the instant of 45th seconds, the WES and
PES become insufficient to feed the load due to the weather conditions. At this
instant, the PMA decided to transfer the required power from the utility grid. The
wind power comes back at 68th seconds and starts feeding the load. Since the load
power demand is not higher than the generated wind power, all requirements are
supplied only from the WES. When the time is around 88th seconds, the load power
demand increases while there is a decrement in wind power. The PMA decides to
get the required power from the PV system again for this operation case.
Figure E9.3(l) Power responses of WES, PES, grid, and loads with FDM for
Case 2
Microgrids and energy management 521
Figure E9.3(m) Power responses of WES, PES, grid, and loads with FDM for
Case 3
Case 3
Both FDM and PMA are active in this case too. The power responses from sources
and load terminals are plotted in Figure E9.3(m) for loading conditions different
than those of Case 2. Both resistive and motorized loads are considered in this case.
The active power responses are measured at the WES, PES, utility grid, and load
terminals showing the performance of the power management algorithm.
The load power is high at startup in Figure E9.3(m). So is the wind power.
Therefore, the load is fed from the WES. From the 20th second to the 50th second,
the wind power decreases and drops below the 300 W bias power. Since the load
also decreases following a similar decrement pattern as the load, the powers from
PV and utility are not used. However, once the wind power drops below the 300 W
bias power, which must be supplied continuously for permanent loads, this 300 W
is supplied from PV and grid so that the bias power is maintained. After the 70th
second, the wind power starts increasing and feeding the load. As long as the load
demand power is supplied by the WES, no power is transferred from PV and grid to
the load. When the generated power from the PES is not needed by the load, then it
is used to charge the batteries, which is not discussed here.
power management and control purposes. Transferring all the data from far away
points to a center and sending the decisions back to where the measurements are
made and actions to be taken, cause delay and misoperation of the system besides
cyber data security and danger of data loss. In order to reduce operational diffi-
culties and take faster decisions and actions on time, distributed control algorithms
are developed and applied [32–34].
Distributed power systems require not only generating side management but
also load side management, as well. The generation side management is applied to
supply the required load power from various sources or units in the same source site
while load-side management deals with energy efficiency, energy saving, loss
reduction, and optimum use of available power. Therefore, load-side management
is an important task in distributed networks and smart grids. Since the loads are
distributed in all parts of the power distribution network, distributed control gains
importance. Since the generating units are also distributed along with the loads in
distributed power networks, distributed control becomes a powerful alternative
approach for generation and load-side management systems.
Let us consider the distributed generating network shown in Figure 9.22. The
network is connected to the utility grid and consists of residential loads. The houses
in the residential areas have PV panels installed on their roofs and they get their
electricity from the distributed generating network. The power distribution com-
pany buys the PV-generated electricity from the houses and sells it back to the
houses in the frame of an agreed management and a pricing plan. The priority
source in this network is the PV system. The utility grid is used only when the PV
power is not sufficient.
Each house in the network has a different load demand curve (LDC) and they
may dissipate the higher power at different instants. The load demand curve of the
Utility grid
transformer (LDCT) depends on the availability of the PV power. The LDCT may
be zero or very low if the PV power is sufficient to supply all the load demand
power. Therefore, the LDCT also represents the availability of PV power
generation.
In order to use the generated PV power more efficiently with minimum dis-
tribution losses, both generating side load side management algorithms must be
applied. One of the methods for minimizing the losses is moving the loads at peak
times to the lowest dissipation periods. This approach is called load shifting, which
is done by classifying the loads according to their importance. Some household
appliances may not be so important and they may be postponed to be used later. For
example, ironing, vacuuming, dishwashing, cloth washing, and driers may be
postponed and operated during low power demand hours of the network. Some
loads must be operated at certain times and cannot be postponed or delayed. Some
loads may be operated all the time without any other options. Therefore, the load
management goes as far as to the plug where the loads are connected to get power.
Actually, one can say that this load control and management approach leads us to
intelligent loads, in which all management algorithms are stored in a processor
mounted on the device itself. Since each smart device includes its own energy
management algorithms by generating user options for energy savings, distributed
control becomes an important alternative in energy management systems.
Example 9.4
This example is adapted from PhD thesis [35] of Recep Cakmak, who was a PhD
student of the author. In a distributed power system, the network is overloaded
during some hours of the day while the loading is very low during other times.
Therefore, the power company wants to design a decision-maker so that the oper-
ating times of some loads can be shifted from heavy loading hours to light
loading hours.
Design a fuzzy decision-maker (FDM), such that the shifting or delay time
should be generated when a load demand is entered. For example, if the predicted
loading in a time ahead is lower than the current load power, then some loadings
should be postponed to be operated during these light loading hours.
Consider the following in your design:
1. The inputs to the fuzzy decision-maker should be current demand power and
the difference between current load and estimated future load demand.
2. Partition the output space into their fuzzy subsets as low, medium, and high.
Answer 9.4
The FDM uses demand power and the difference between demand power and
predicted future power as two inputs. Demand power may be categorized as low
(LW), average (AV), and high (HI). Since the difference may be positive, negative,
and zero depending on demand and predicted power values, the universe of power
difference can be portioned into five fuzzy subsets as negative high (NH), negative
low (NL), zero (ZE), positive low (PL) and positive high (PH). The output space
524 Fuzzy logic control in energy systems, 2nd edition
representing the delay time is divided into three fuzzy subsets as short (SH),
medium (ME), and long (LN). A block diagram of the FDM is given in Figure E9.4(a).
The FDM block includes the fuzzy rule table given in Table E9.4(a), which includes
15 fuzzy rules for decision-making.
The fuzzy decision-maker given in Figure E9.4(a) uses the Mamdani fuzzy
reasoning algorithm with two crisp inputs and one crisp output. The current power
demand (PD) is represented by variable x and the difference (DP) between current
load power and predicted future depend power is represented by variable y in
Figure E9.4(a). The output is the delay time tD is represented by variable z.
If the current demand power is low (LW) and the difference power DP is
negative high (NH) then this load demand can be delayed for a long time (LN)
because negative DP means that the future power demand will be smaller than the
current power dissipation so that the operating time of this power demand can be
shifted ahead with a long delay. If the current power demand is high (HI) and
difference power DP is positive high (PH) then this load demand should not be
delayed because the predicted future power demand will already be high. If this
high power demand is postponed to a later time ahead the load demand will be
DP
PD NH NL ZE PL PH
LW LN ME SH ZE ZE
AV LN ME SH ZE ZE
HI LN SH ZE ZE ZE
Microgrids and energy management 525
much higher such that the generated power might be insufficient as the network
faces overloading operating conditions, which cause overheating and higher losses.
The other fuzzy rules are generated with a similar point of view to represent the
experience of a power network operator.
Let us assume that the current power demand is 2300 W and the difference
power DP is negative 400 W and try to find the decision about how long the load
demand can be delayed.
The fuzzy decision process for this example is depicted in Figure E9.4(b).
A Mamdani fuzzy reasoning algorithm is applied for this example. The final crisp
conclusion is obtained using the center of area defuzzification method as follows:
ð0:3Þð20Þ þ ð0:7Þð40Þ þ ð0:2Þð0Þ þ ð0:2Þð20Þ
tD ¼ ¼ 27:14
0:3 þ 0:7 þ 0:2 þ 0:2
The MATLAB .m file code of the fuzzy decision process depicted in
Figures E9.4(a), E9.4(b), and E9.4(c) is given in Figure E9.4(d).
where Pwind is the wind power, r (kg/m3) is the air density, A (m2) is the swept area by
the wings of the wind turbine, v (m/s) is the wind speed in, and C is Betz limit (0.59) [45].
The power produced from renewable energy sources is affected by meteor-
ological parameters such as temperature, humidity, cloud cover, and precipitation.
In the literature, forecasting of renewable energy generation is done using uni-
variate or multivariate features. The multivariate approach also uses some variables
(temperature, cloud cover, etc.) that are correlated with the main predictor variable
[46–50], while the univariate approach uses only historical data [51–55].
On the other hand, the forecasting can be carried out using either a direct or an
indirect model. Direct methods use solar or wind power data directly. Other vari-
ables associated with solar or wind power may also be included in this method. In
the indirect method, the forecasting is done with forecasted data or variables. For
example, PV power predictions use predicted solar irradiance data and wind power
predictions use predicted wind speed data.
Data such as historical load, seasonal information, whether the day of the week
is a working day or a holiday, and temperature information for the forecast day are
used to forecast the electricity load [56–61].
Input
Input Dendrites
Axo
n
Dendrites
Synapse
Output
Input
w
w
f w
w
w
Each neuron can take one or more input values. For example, x1, x2, . . . and xn
values shown in Figure 9.24 represent the inputs to the neuron. The connections
between all the neurons in the neural network are made by means of weights, which
are coefficients that store the information of the neural network. In Figure 9.24, the
weights are represented by w1, w2, . . . and wn. These weights can be positive and/or
negative real numbers. The iterative sum value refers to the scalar product of the
weight and the input vectors. The net value of the cell is the summation of the
iterative sum and bias, b, values as given in (9.24) and shown in Figure 9.24.
X
net ¼ wi xi þ b (9.24)
i
By processing the net value of the neuron, the activation function calculates an
output value for the neuron. The output value of a neuron cell can be the input value
of other cells or terminates as the output of the current cell. The neuron’s output is
limited to certain values by the activation function, which can be linear or nonlinear.
In particular, nonlinear activation functions have allowed artificial neural networks to
tackle complex problems. The activation function that is most commonly used in
multi-layer perceptron models is the sigmoid function. Using the sigmoid activation
function, the output value o of a neuron can be calculated as in (9.25).
1
o ¼ f ðnetÞ ¼ (9.25)
1 þ enet
where a is the learning constant and d is the error of the related neuron. Equations
(9.26) and (9.27) can be combined and written for a multi-layer ANN as in (9.28).
where i is a layer number, j is the jth neuron in layer i and k is the kth neuron in
layer (i + 1). Therefore, wijk represents the weighting factor that is connecting
neuron j of layer i to the neuron k of the layer (i + 1). The learning algorithms such
as perceptron, delta, or back propagation might be used to train the weightings.
k=1
k=k+1
k k
Example 9.5
Design a three-hidden layer neural network for forecasting day-ahead (24 h) solar
irradiation in the province of Trabzon (latitude: 40.991150, longitude: 39.784964)
for the total number of days on the horizontal plane [74]. Consider relative
humidity and temperature data, which is adapted from [75]. Use data from the year
2015 to train ANN and use randomly selected sunny, cloudy, and rainy day data
from 2016 to test the ANN.
Answer 9.5
This example and its solution are adapted from the conference paper [76], which
belongs to the author and his PhD student Sibel Çevik Bektaş.
The designed model has two stages: (1) selecting the most similar day with
similar day selection algorithm and (2) forecasting. The flowchart of the
designed model is given in Figure E9.5(a). A similar day selection algorithm is
used to determine the inputs of the neural network. The current temperature,
humidity, and a 24-h solar irradiation data of the day, which is similar to the day
whose solar irradiation is to be forecasted are used as the inputs to the network.
The next 24-h solar irradiation data is the output of the network as the fore-
casted data. Using the temperature and humidity data for each day, the
Euclidean norm (Euclidean distance) is calculated to find the day that is most
similar to the day whose solar irradiation is to be forecasted. For each day, the
similar day selection algorithm calculates the Euclidean norm with respect to all
days. The day that gives the minimum distance is determined as the similar day
of the relevant day. The Euclidean norm relation is used as in (9.26) to calculate
Figure E9.5(b) The forecasting and real value for test samples
where Y1, Y2, . . . , YT is the vector expressing hourly temperature, and humidity
values of the days; X1, X2, . . . , XT is the vector expressing hourly temperature and
humidity values of another day. The distance vector calculated for all days and the
day that gives the minimum value in D = [d1, d2, . . . , dn] represents the most
similar day among all the days where n is the day number.
As can be seen in Figure E9.5(b), hourly temperature and humidity data for the
forecasting day, and hourly temperature, humidity, and irradiation data for the
similar day are used as inputs of the ANN. The outputs are the hourly solar irra-
diation data. A total of 120 inputs and 24 outputs are used in this model. In addi-
tion, the ANN has three hidden layers. Sigmoid-type activation functions are used
in the backpropagation learning algorithm The results are obtained after 20,000
iteration. Figure E9.5(b) shows that the algorithm gives better forecasting results,
especially in sunny days. However, in cloudy days, the results are not as accurate as
in sunny days. The forecasting result for 12 samples in mean absolute percentage
error (MAPE) criteria is 10.94%.
a random signal is fed continuously. The signal can also be modified by a reso-
nance source in terms of frequency as a template attack.
Location Attack is related to the structure of cyberphysical systems (CBS).
The attack can be injected at various load–frequency control system parts such as
sensors, controllers, actuators, and loads. The attack on the load side is usually done
by affecting the amount of change in load by false signals.
Example 9.6
A two-area load–frequency control system simulation was given in Examples 6.4
and 6.5. Assume that the measured data is passing through a communication net-
work before being used by automatic generation control (AGC) units as shown in
Figure E9.6(a). Analyze the effects of the data integrity cyberattacks on the FLC-
controlled two-area load–frequency control system, which was simulated in
Example 6.5.
Answer 9.6
Data integrity attack: The attackers modify the data by adding a constant or a
variable to the measured signal such as described in (E9.6.1)
e1 ðtÞ ¼ AGC1 ðtÞ þ d (E9.6.1)
where d is a disturbance added by the attacker. Without d, the LFC system operates
normally resulting in the plots given in Figure E9.5(b). Let the change in demand
power be DPL = 0.188 pu and inject a disturbance d = 2 at the 30th second of the
operation, which lasts 50 s, and analyze the system operating without any controller
as seen in Figure E9.6(b).
Cyberattacks
Cyberattacks
Cyberattacks
Cyber
attack
Figure E9.6(b) A data integrity attack on a two-area LFC without any controllers
The response of the LFC under attack when there is no controller is given in
Figure E9.6(c). A data integrity attack, d, has been injected into ACE1 when data
passes through the data network at the instant of t = 20 s. Before the attack, the
steady-state values of the frequency changes are measured as 4.729 103 at
t = 15.00 s. If a disturbance d = 20 is injected into the system at the cyberattack
point at t = 20 s as given in Figure E9.6(c), the steady-state response drops down to
5.316 102 rad/s and remains at this value. Due to the injected disturbance, the
LFC system keeps operating at stable conditions as if everything is normal.
However, a large frequency drop will occur causing frequency-sensitive loads to
operate under their nominal performances. The higher values of disturbance d
cause more frequency drop in the system that the standard conditions might not be
544 Fuzzy logic control in energy systems, 2nd edition
Cyber
attack
satisfied. Under the attack conditions, the system operator tries to prevent any
frequency changes by taking some precautions that may not needed normally.
Let us see what happens if this two-area LFC system is controlled by a fuzzy
logic controller (FLC) when there is the same data integrity attack at the same point
of the system. The Simulink simulation block diagram of the described system is
given in Figure E9.6(d) where two FLCs are located in both areas in order to
optimize the ACE from both areas.
The response of the FLC-controlled LFC under attack is given in Figure E9.6(e).
A data integrity attack, d, has been injected into ACE1 when data passes through
the data network at the instant of t = 20 s. Before the attack the steady-state values of
Microgrids and energy management 545
the frequency changes are going toward zero, If a disturbance d = 20 is injected into
the system at the cyberattack point at t = 20 s as given in Figure E9.6 (e), the steady-
state response does not change and remains around zero. The FLC controls the two
load–frequency control systems under data integration cyberattack and keeps the
system operating as if there is no infection. The higher values of disturbance d may
cause the controller to fail resulting in more frequency changes in the system that the
standard conditions might not be satisfied. Under the attack conditions, the system
operator tries to prevent any frequency changes by taking some precautions that may
not needed normally.
In Example 9.6, the FLC was able to compensate for the effects of the infected data
and keep the frequency changes around zero. However, the controller may not be able
to stop or eliminate the effects of the cyberattacks. Therefore, the detection of cyber-
attacks is an important topic in power systems and microgrids to be studied [87–89].
9.11 Problems
P9.1 A residential site with 50 houses gets the electrical power from photovoltaic (PV)
arrays installed on the roofs. The distribution system does not have any other
sources except PV arrays and backup batteries. Each house has an installed power
capacity of 5 kW and a demand power of 3 kW. Assume that the PV power is
sufficient enough when they operate with 80% capacity during sunny days.
Develop a power management algorithm for this system so that the houses
always get the required power for their priority loads.
P9.2 Assume that the residential site described in P.9.1 is also connected to a
utility grid and gets its required power from the utility when the PV power is
not sufficient. Develop a power management algorithm for this system so that
the houses always get the required power for all their loads.
P9.3 A residential site with 100 houses gets the electrical power from wind, PV,
and utility grid. There are no backup batteries installed. Develop a PMA for
this distributed system for energy sustainability. Assume that the priority use
of the sources are PV, wind, and utility.
P9.4 The installed loads in a house are listed as refrigerator, air-conditioner, the
dishwashing machine, washing machine, drier, iron, vacuum cleaner, TV,
lights, house heating, water heating, computer, and other low-power electro-
nic devices. This house gets its electricity from PV and the utility grid.
(a) Categorize the loads in this house as shiftable, non-shiftable, and
postponable.
(b) Develop a PMA so that the use of power from the utility grid is mini-
mized while the user comfort is maintained.
(c) Make suggestions for the user to reduce the bill paid for electricity
dissipation.
P9.5 Consider the distributed power system given in Figure 9.7. When this system
is operated without any power management and controller, the power demand
curves are obtained arbitrarily such that the difference between the lowest and
highest demand points becomes large. As a result of this, the power trans-
mitted in the distribution power lines is very light sometimes while it is very
high sometimes. During the higher peak hours, the power line is overloaded
and gets overheated causing high power losses and fast aging of the line.
In order to reduce the power losses and increase the life of the power lines,
the company decided to reduce the gap between the highest and lowest
demand points and operate the power lines with a power transmission around
the planned rated value.
Microgrids and energy management 547
References
[1] Wood A.J. and Wollenberg B.F. Power Generation, Operation and Control.
New York: John Wiley & Sons, 1984.
[2] Benini L. and De Micheli G. Dynamic Power Management: Design Tech-
niques and CAD Tools. Dordrecht: Kluwer, 1998.
[3] Maghsoodlou F., Masiello R. and Ray T. ‘Energy management systems’,
IEEE Power Energy. 2004, 2(5), pp. 49–57.
[4] Miller R.H. Power System Operation. New York: McGraw-Hill, 1983.
[5] Zhu J. Optimization of Power System Operation. Piscataway, NJ: Wiley-
IEEE Press, 2015.
[6] U.S. Department of Energy Office of Energy Efficiency and Renewable
Energy, ‘Using distributed energy resources: a how-to guide for federal
facility managers’—Distributed energy resources: a how-to guide, www.
eren.doe.gov/femp/
[7] Lasseter R.H. ‘Micro-grids’, IEEE Power Engineering Society Winter
Meeting. Conference Proceedings (Cat. No. 02CH37309), New York, NY,
USA, 2002, Vol. 1, pp. 305–308, https://doi.org/10.1109/PESW.2002.
985003.
[8] Moudud M., Meegahapola L., Vahidnia A. and Datta M. ‘Analysis and
mitigation of low-frequency oscillations in hybrid AC/DC microgrids with
dynamic loads’, IET Generation, Transmission & Distribution. 2019; 13
(9):1477–1488.
Microgrids and energy management 549
[9] Soni N., Doolla S. and Chandorkar M.C. ‘Analysis of frequency transients in
isolated microgrids’, IEEE Transactions on Industry Applications. 2017; 53
(6):5940–5951, https://doi.org/10.1109/TIA.2017.2746619.
[10] Hamzeh M., Ghafouri M., Karimi H., Sheshyekani K. and Guerrero J.M.
‘Power oscillations damping in DC microgrids’, IEEE Transactions on
Energy Conversion. 2016; 31(3):970–980, https://doi.org/10.1109/TEC.
2016.2542266.
[11] Guo J., Chen T., Chaudhuri B. and Hui S.Y.R. ‘Stability of isolated micro-
grids with renewable generation and smart loads’, IEEE Transactions on
Sustainable Energy. 2020; 11(4):2845–2854, https://doi.org/10.1109/TSTE.
2020.2980276.
[12] Zhao Z., Xi J., Xu J., et al. ‘Assessment and mitigation of multi-mode oscil-
lations in wind-solar hybrid multi-microgrids’, in IEEE Transactions on Smart
Grid. 2024;15(2):1330–1345, https://doi.org/10.1109/TSG.2023.3307178.
[13] Saghafi H., Karshenas H. and Bakhshai A. ‘Application of integrated series
compensator in damping power oscillations in standalone microgrids’,
Canadian Journal of Electrical and Computer Engineering. 2015; 38(1):2–9.
[14] Ahmed M., Vahidnia A., Datta M. and Meegahapola L. ‘Adaptive power
oscillation damping controller for a hybrid AC/DC microgrid’, IEEE Access.
2020; 8:69482–69495, https://doi.org/10.1109/ACCESS.2020.2985978.
[15] Colson C.M. and Nehrir M.H. ‘A review of challenges to real-time power
management of microgrids’, 2009 IEEE Power & Energy Society General
Meeting, Calgary, AB, Canada, 2009, pp. 1–8, https://doi.org/10.1109/PES.
2009.5275343.
[16] Sarker P.S., Venkataramanan V., Sebastian Cardenas D., et al. ‘Cyber-phy-
sical security and resiliency analysis testbed for critical microgrids with
IEEE 2030.5,’ 2020 8th Workshop on Modeling and Simulation of Cyber-
Physical Energy Systems, Sydney, NSW, Australia, 2020, pp. 1–6, https://
doi.org/10.1109/MSCPES49613.2020.9133689.
[17] Driesen J. and Belmans R. ‘Distributed generation: challenges and possible
solutions’, IEEE Power Engineering Society General Meeting, Montreal,
QC, Canada, 18–22 June 2006.
[18] Dondi P., Bayoumi D., Haederli C., Julian D. and Suter M. ‘Network inte-
gration of distributed power generation’, Journal of Power Sources. 2002;
106:1–9.
[19] Bacha, S., Picault D., Burger B., Etxeberria-Otadui I. and Martins J. ‘Pho-
tovoltaics in microgrids: an overview of grid integration and energy man-
agement aspects,’ IEEE Industrial Electronics Magazine. 2015; 9(1):33–46,
https://doi.org/10.1109/MIE.2014.2366499.
[20] Zubieta L.E. ‘Are microgrids the future of energy? DC microgrids from
concept to demonstration to deployment,’ IEEE Electrification Magazine.
2016; 4(2):37–44, https://doi.org/10.1109/MELE.2016.2544238.
[21] Bollen M. and Hassan F. Integration of Distributed Generation in the Power
System. New York: John Wiley & Sons, 2011.
550 Fuzzy logic control in energy systems, 2nd edition
[22] Andleeb M., Lateef Khan K., Hussain S. and Javed Iqbal S. ‘Non-linear
modeling and control of DC-DC buck and boost converters for EV applica-
tion,’ 1st International Conference on Sustainable Technology for Power and
Energy Systems (STPES), Srinagar, India, 2022, pp. 1–6, https://doi.org/10.
1109/STPES54845.2022.10006486.
[23] Azer P. and Emadi A., ‘Generalized state space average model for multi-
phase interleaved buck, boost and buck-boost DC–DC converters: transient,
steady-state and switching dynamics,’ IEEE Access. 2020; 8:77735–77745,
https://doi.org/10.1109/ACCESS.2020.2987277.
[24] Rao A.V. and Guruswamy K.P. ‘Analysis, design and simulation of non-
inverting buck-boost DC–DC converter for battery charging’, International
Conference on Disruptive Technologies for Multi-Disciplinary Research and
Applications (CENTCON), Bengaluru, India, 2021, pp. 79–84, https://doi.
org/10.1109/CENTCON52345.2021.9688165.
[25] Kaye R. and Kalam A. ‘Non-isolated DC/DC buck/boost converters for off-
grid hybrid renewable system’, 29th Australasian Universities Power Engi-
neering Conference (AUPEC), Nadi, Fiji, 2019, pp. 1–5, https://doi.org/10.
1109/AUPEC48547.2019.211787.
[26] Dewan S.B. and Straughen A. Power Semiconductor Circuits. New York:
John Wiley & Sons, 1975.
[27] Altas I.H. ‘A simplified dynamic model for the control of PV array-PMDC
motor scheme’, International Conference on Electrical Machines—
ICEM’98, 2–4 September 1998, İstanbul, Turkey, pp. 1190–1195.
[28] Mengi O.O. ‘An intelligent energy management system for sustainability in
renewable energy systems’, PhD Thesis, Printed in Turkish as ‘Yenilenebilir
Enerji Sistemlerinde Süreklilik İçin Akıllı Bir Enerji Yönetim Sistemi’,
Karadeniz Technical University, 2011.
[29] Trudnowski D.J., McReynolds W.L. and Johnson M. ‘Real-time very short-
term load prediction for power-system automatic generation control’, IEEE
Transactions on Control Systems Technology. 2001; 9(2):254–260.
[30] Sinha A.K. and Mondal J.K. ‘Dynamic state estimator using ANN based bus
load prediction’, IEEE Transactions on Power Systems. 1999; 14(4):1219–
1225.
[31] Matthewman P.D. and Nicholson H. ‘Techniques for load prediction in the
electricity-supply industry’, Proceedings of the Institution of Electrical
Engineering. 1968; 115(10):1451–1457.
[32] De Brabandere K., Vanthournout K., Driesen J., Deconinck G. and Belmans
R. ‘Control of microgrids’, IEEE Power Engineering Society General
Meeting, Tampa, FL, USA, 24–28 June 2007.
[33] Lopes J.A.P., Moreira C.L. and Madureira A.G. ‘Defining control strategies
for microgrids islanded operation’, IEEE Transactions on Power Systems.
2006; 21(2):916–924.
[34] Xiang J., Hill D.J. and Ma J. ‘Distributed power control for transient stability
of multimachine power systems’, IEEE Journal on Emerging and Selected
Topics in Circuits and Systems. 2017; 7(3):383–392.
Microgrids and energy management 551
[49] Gigoni L., Betti A., Crisostom E., et al. ‘Day-ahead hourly forecasting of
power generation from photovoltaic plants’, IEEE Transactions on Sustain-
able Energy. 2017; 9(2):831–842.
[50] Ogliari E., Dolara A., Manzolini G. and Leva S. ‘Physical and hybrid
methods comparison for the day ahead PV output power forecast’, Renew-
able Energy. 2017; 113:11–21.
[51] Hong Y.Y., Martinez J.J.F. and Fajardo A.C. ‘Day-ahead solar irradiation
forecasting utilizing gramian angular field and convolutional long short-term
memory’, IEEE Access. 2020; 8:18741–18753.
[52] Zhang C.Y., Chen C.P., Gan M. and Chen L. ‘Predictive deep Boltzmann
machine for multiperiod wind speed forecasting’, IEEE Transactions on
Sustainable Energy. 2015; 6(4):1416–1425.
[53] Karakuş O., Kuruoğlu E.E. and Altınkaya M.A. ‘One-day ahead wind speed/
power prediction based on polynomial autoregressive model’, IET Renew-
able Power Generation. 2017; 11(11):1430–1439.
[54] Khodayar M., Wang J. and Manthouri M. ‘Interval deep generative neural
network for wind speed forecasting’, IEEE Transactions on Smart Grid.
2018; 10(4):3974–3989.
[55] Zhang Y., Sun H. and Guo Y. ‘Wind power prediction based on PSO-SVR
and grey combination model’, IEEE Access. 2019; 7:136254–136267.
[56] Tong C., Li J., Lang C., et al. ‘An efficient deep model for day-ahead elec-
tricity load forecasting with stacked denoising auto-encoders’, Journal of
Parallel and Distributed Computing. 2018; 117:267–273.
[57] Lahouar A. and Slama J.B.H. ‘Day-ahead load forecast using random forest
and expert input selection’, Energy Conversion and Management. 2015;
103:1040–1051.
[58] Cai M., Pipattanasomporn M. and Rahman S. ‘Day-ahead building-level
load forecasts using deep learning vs. traditional time-series techniques’,
Applied Energy. 2019; 236:1078–1088.
[59] Chen H., Wang S., Wang S. and Li Y. ‘Day-ahead aggregated load fore-
casting based on two-terminal sparse coding and deep neural network
fusion’, Electric Power Systems Research. 2019; 177:105987.
[60] Liu X., Zhang Z. and Song Z. ‘A comparative study of the data-driven day-
ahead hourly provincial load forecasting methods: from classical data mining
to deep learning’, Renewable and Sustainable Energy Reviews. 2020;
119:109632.
[61] Park K., Yoon S. and Hwang E. ‘Hybrid load forecasting for mixed-use
complex based on the characteristic load decomposition by pilot signals’,
IEEE Access. 2019; 7:12297–12306.
[62] Chang W.Y. ‘A literature review of wind forecasting methods’, Journal of
Power and Energy Engineering. 2014; 2(4):161.
[63] Zang H., Cheng L., Ding T., et al. ‘Hybrid method for short-term photo-
voltaic power forecasting based on deep convolutional neural network’, IET
Generation, Transmission & Distribution. 2018; 12(20):4557–4567.
Microgrids and energy management 553
[64] Qing X. and Niu Y. ‘Hourly day-ahead solar irradiance prediction using
weather forecasts by LSTM’, Energy. 2018; 148:461–468.
[65] Srivastava S. and Lessmann S. ‘A comparative study of LSTM neural net-
works in forecasting day-ahead global horizontal irradiance with satellite
data’, Solar Energy. 2018; 162:232–247.
[66] Zhou H., Zhang Y., Yang L., et al. ‘Short-term photovoltaic power fore-
casting based on long short term memory neural network and attention
mechanism’, IEEE Access. 2019; 7:78063–78074.
[67] Shi H., Xu M. and Li R. ‘Deep learning for household load forecasting—a
novel pooling deep RNN’, IEEE Transactions on Smart Grid. 2017; 9
(5):5271–5280.
[68] Raza M.Q., Mithulananthan N., Li J., Lee K.Y. and Gooi H.B. ‘An ensemble
framework for day-ahead forecast of PV output power in smart grids’, IEEE
Transactions on Industrial Informatics. 2018; 15(8):4624–4634.
[69] Liu H., Mi X.W. and Li Y.F. ‘Wind speed forecasting method based on deep
learning strategy using empirical wavelet transform, long short term memory
neural network and Elman neural network’, Energy Conversion and Man-
agement. 2018; 156:498–514.
[70] Shi X., Lei X., Huang Q., et al. ‘Hourly day-ahead wind power prediction
using the hybrid model of variational model decomposition and long short-
term memory’, Energies. 2018; 11(11):3227.
[71] He X., Nie Y., Guo H. and Wang J. ‘Research on a novel combination system
on the basis of deep learning and swarm intelligence optimization algorithm
for wind speed forecasting’, IEEE Access. 2020; 8:51482–51499.
[72] Öztemel E., Yapay Sinir Ağları. İstanbul: Papatya Yayıncılık, 2003.
[73] MERRA-2 Meteorological Re-Analysis. Available at http://www.soda-pro.
com/web-services/meteo-data/merra.
[74] Copernicus Atmosphere Monitoring Service (CAMS) Radiation Service,
Available at http://www.soda-pro.com/web-services/radiation/camsradiation-
service.
[75] Çevik S., Çakmak R. and Altaş İ.H. ‘A day ahead hourly solar radiation
forecasting by artificial neural networks: a case study for Trabzon province’,
2017 International Artificial Intelligence and Data Processing Symposium
(IDAP), Malatya, Turkey, 2017, pp. 1–6, https://doi.org/10.1109/IDAP.2017.
8090223
[76] Anderson J. ‘Computer security planning study’, Technical Report ESD-TR-
73-51. Air Force Electronic System Division, 1972.
[77] Vanderham J. ‘Toward a better understanding of cybersecurity’, Digital
Threats: Research and Practice. 2021; 2(3):Article 18.
[78] Styczynski J. and Beach-Westmoreland N. ‘When the lights went out’, Booz
Allen Hamilton, 2019. C.07.031.19. Available at www.boozallen.com/ICS
(accessed 28 January 2024).
[79] Karnouskos S. ‘Stuxnet worm impact on industrial cyber-physical system
security,’ IECON 2011—37th Annual Conference of the IEEE Industrial
554 Fuzzy logic control in energy systems, 2nd edition
power factor (PF) 63, 233 power system stabilizers (PSS) 313,
power factor improvement 349–52 325, 329
power flow (PF) analysis 357 premise 123
power–frequency control 313 prime mover 331
power grid 479 probability logic 3
power quality control 374 problem-solving 59
power system compensator projection rule 107, 125
(PSC) 329 proportional integral derivative (PID)
power systems 311, 537 controller 187
excitation control 314 pulse width modulation (PWM) 391
excitation system modeling PVA GUI Model 427
317–23 pvpanel.m returns 424
fuzzy logic control of excitation
systems 325–9 radar tracking system 207–8, 226
state-space model of excitation Ransomware 538
systems 323–5 reactive power 62, 349
FLC in load flow analysis 357 real-time fuzzy logic-based control
effect of FLAF 363–6 systems 208
FL accelerated fast decoupled rectangular integration 295
algorithm 362–3 rectifier 389
FL accelerated Gauss–Seidel recurrent neural network (RNN) 530
algorithm 358–61 reference frame 292
FL accelerated Newton–Raphson reference maximum power point
algorithm 361–2 (RMPP) 435
power system modeling for power reflexivity 87
flow 358
regulator amplifier 319
FLC in power compensation 348
relation matrix 88
bus voltage control 352–7
membership values of 91, 97
power factor improvement 349–52 as three-dimensional surface 92
load–frequency control 330
relation matrix PM 159
fuzzy logic controller design for
relative cardinality 40
336–48
repetitive MPP search
small-signal modeling of power
algorithm 442
systems 330–6
Reset and Find (RSF) algorithm 468
oscillatory transient durations in 93
rotational motion models 264
oscillatory voltage
magnitude in 93 rotor 276
voltage magnitude and frequency of rule-based system 127
312 rule matrix 212–13
Index 565