0% found this document useful (0 votes)
67 views

Fuzzy Logic Control in Energy Systems With Design Examples

Uploaded by

sebastian bogdan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
67 views

Fuzzy Logic Control in Energy Systems With Design Examples

Uploaded by

sebastian bogdan
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 597

IET ENERGY ENGINEERING SERIES 254

Fuzzy Logic Control


in Energy Systems,
2nd Edition
Other volumes in this series:
Volume 1 Power Circuit Breaker Theory and Design C.H. Flurscheim (Editor)
Volume 4 Industrial Microwave Heating A.C. Metaxas and R.J. Meredith
Volume 7 Insulators for High Voltages J.S.T. Looms
Volume 8 Variable Frequency AC Motor Drive Systems D. Finney
Volume 10 SF6 Switchgear H.M. Ryan and G.R. Jones
Volume 11 Conduction and Induction Heating E.J. Davies
Volume 13 Statistical Techniques for High Voltage Engineering
W. Hauschild and W. Mosch
Volume 14 Uninterruptible Power Supplies J. Platts and J.D. St Aubyn (Editors)
Volume 15 Digital Protection for Power Systems A.T. Johns and S.K. Salman
Volume 16 Electricity Economics and Planning T.W. Berrie
Volume 18 Vacuum Switchgear A. Greenwood
Volume 19 Electrical Safety: A guide to causes and prevention of hazards J. Maxwell
Adams
Volume 21 Electricity Distribution Network Design, 2nd Edition E. Lakervi and
E.J. Holmes
Volume 22 Artificial Intelligence Techniques in Power Systems K. Warwick, A.O. Ekwue
and R. Aggarwal (Editors)
Volume 24 Power System Commissioning and Maintenance Practice K. Harker
Volume 25 Engineers’ Handbook of Industrial Microwave Heating R.J. Meredith
Volume 26 Small Electric Motors H. Moczala et al.
Volume 27 AC–DC Power System Analysis J. Arrillaga and B.C. Smith
Volume 29 High Voltage Direct Current Transmission, 2nd Edition J. Arrillaga
Volume 30 Flexible AC Transmission Systems (FACTS) Y.-H. Song (Editor)
Volume 31 Embedded Generation N. Jenkins et al.
Volume 32 High Voltage Engineering and Testing, 2nd Edition H.M. Ryan (Editor)
Volume 33 Overvoltage Protection of Low-Voltage Systems, Revised Edition P. Hasse
Volume 36 Voltage Quality in Electrical Power Systems J. Schlabbach et al.
Volume 37 Electrical Steels for Rotating Machines P. Beckley
Volume 38 The Electric Car: Development and future of battery, hybrid and fuel-cell
cars M. Westbrook
Volume 39 Power Systems Electromagnetic Transients Simulation J. Arrillaga and
N. Watson
Volume 40 Advances in High Voltage Engineering M. Haddad and D. Warne
Volume 41 Electrical Operation of Electrostatic Precipitators K. Parker
Volume 43 Thermal Power Plant Simulation and Control D. Flynn
Volume 44 Economic Evaluation of Projects in the Electricity Supply Industry
H. Khatib
Volume 45 Propulsion Systems for Hybrid Vehicles J. Miller
Volume 46 Distribution Switchgear S. Stewart
Volume 47 Protection of Electricity Distribution Networks, 2nd Edition J. Gers and
E. Holmes
Volume 48 Wood Pole Overhead Lines B. Wareing
Volume 49 Electric Fuses, 3rd Edition A. Wright and G. Newbery
Volume 50 Wind Power Integration: Connection and system operational aspects
B. Fox et al.
Volume 51 Short Circuit Currents J. Schlabbach
Volume 52 Nuclear Power J. Wood
Volume 53 Condition Assessment of High Voltage Insulation in Power System
Equipment R.E. James and Q. Su
Volume 55 Local Energy: Distributed generation of heat and power J. Wood
Volume 56 Condition Monitoring of Rotating Electrical Machines P. Tavner, L. Ran,
J. Penman and H. Sedding
Volume 57 The Control Techniques Drives and Controls Handbook, 2nd Edition
B. Drury
Volume 58 Lightning Protection V. Cooray (Editor)
Volume 59 Ultracapacitor Applications J.M. Miller
Volume 62 Lightning Electromagnetics V. Cooray
Volume 63 Energy Storage for Power Systems, 2nd Edition A. Ter-Gazarian
Volume 65 Protection of Electricity Distribution Networks, 3rd Edition J. Gers
Volume 66 High Voltage Engineering Testing, 3rd Edition H. Ryan (Editor)
Volume 67 Multicore Simulation of Power System Transients F.M. Uriate
Volume 68 Distribution System Analysis and Automation J. Gers
Volume 69 The Lightening Flash, 2nd Edition V. Cooray (Editor)
Volume 70 Economic Evaluation of Projects in the Electricity Supply Industry,
3rd Edition H. Khatib
Volume 72 Control Circuits in Power Electronics: Practical issues in design and
implementation M. Castilla (Editor)
Volume 73 Wide Area Monitoring, Protection and Control Systems: The enabler for
smarter grids A. Vaccaro and A. Zobaa (Editors)
Volume 74 Power Electronic Converters and Systems: Frontiers and applications
A.M. Trzynadlowski (Editor)
Volume 75 Power Distribution Automation B. Das (Editor)
Volume 76 Power System Stability: Modelling, analysis and control A.A. Sallam and
B. Om P. Malik
Volume 78 Numerical Analysis of Power System Transients and Dynamics A. Ametani
(Editor)
Volume 79 Vehicle-to-Grid: Linking electric vehicles to the smart grid J. Lu and
J. Hossain (Editors)
Volume 81 Cyber-Physical-Social Systems and Constructs in Electric Power
Engineering S. Suryanarayanan, R. Roche and T.M. Hansen (Editors)
Volume 82 Periodic Control of Power Electronic Converters F. Blaabjerg, K. Zhou,
D. Wang and Y. Yang
Volume 86 Advances in Power System Modelling, Control and Stability Analysis
F. Milano (Editor)
Volume 87 Cogeneration: Technologies, optimisation and implementation
C.A. Frangopoulos (Editor)
Volume 88 Smarter Energy: From smart metering to the smart grid H. Sun,
N. Hatziargyriou, H.V. Poor, L. Carpanini and M.A. Sánchez Fornié (Editors)
Volume 89 Hydrogen Production, Separation and Purification for Energy A. Basile,
F. Dalena, J. Tong and T.N. Veziroğlu (Editors)
Volume 90 Clean Energy Microgrids S. Obara and J. Morel (Editors)
Volume 91 Fuzzy Logic Control in Energy Systems with Design Applications in
MATLAB‡/Simulink‡ İ.H. Altaş
Volume 92 Power Quality in Future Electrical Power Systems A.F. Zobaa and
S.H.E.A. Aleem (Editors)
Volume 93 Cogeneration and District Energy Systems: Modelling, analysis and
optimization M.A. Rosen and S. Koohi-Fayegh
Volume 94 Introduction to the Smart Grid: Concepts, technologies and evolution
S.K. Salman
Volume 95 Communication, Control and Security Challenges for the Smart Grid
S.M. Muyeen and S. Rahman (Editors)
Volume 96 Industrial Power Systems with Distributed and Embedded Generation
R. Belu
Volume 97 Synchronized Phasor Measurements for Smart Grids M.J.B. Reddy and
D.K. Mohanta (Editors)
Volume 98 Large Scale Grid Integration of Renewable Energy Sources A. Moreno-
Munoz (Editor)
Volume 100 Modeling and Dynamic Behaviour of Hydropower Plants N. Kishor and
J. Fraile-Ardanuy (Editors)
Volume 101 Methane and Hydrogen for Energy Storage R. Carriveau and D.S-K. Ting
Volume 104 Power Transformer Condition Monitoring and Diagnosis A. Abu-Siada
(Editor)
Volume 106 Surface Passivation of Industrial Crystalline Silicon Solar Cells J. John
(Editor)
Volume 107 Bifacial Photovoltaics: Technology, applications and economics J. Libal
and R. Kopecek (Editors)
Volume 108 Fault Diagnosis of Induction Motors J. Faiz, V. Ghorbanian and G. Joksimović
Volume 109 Cooling of Rotating Electrical Machines: Fundamentals, modelling,
testing and design D. Staton, E. Chong, S. Pickering and A. Boglietti
Volume 110 High Voltage Power Network Construction K. Harker
Volume 111 Energy Storage at Different Voltage Levels: Technology, integration, and
market aspects A.F. Zobaa, P.F. Ribeiro, S.H.A. Aleem and S.N. Afifi (Editors)
Volume 112 Wireless Power Transfer: Theory, technology and application N. Shinohara
Volume 114 Lightning-Induced Effects in Electrical and Telecommunication Systems
Y. Baba and V.A. Rakov
Volume 115 DC Distribution Systems and Microgrids T. Dragičević, F. Blaabjerg and
P. Wheeler
Volume 116 Modelling and Simulation of HVDC Transmission M. Han (Editor)
Volume 117 Structural Control and Fault Detection of Wind Turbine Systems
H.R. Karimi
Volume 118 Modelling and Simulation of Complex Power Systems A. Monti and
A. Benigni
Volume 119 Thermal Power Plant Control and Instrumentation: The control of boilers
and HRSGs, 2nd Edition D. Lindsley, J. Grist and D. Parker
Volume 120 Fault Diagnosis for Robust Inverter Power Drives A. Ginart (Editor)
Volume 121 Monitoring and Control Using Synchrophasors in Power Systems with
Renewables I. Kamwa and C. Lu (Editors)
Volume 123 Power Systems Electromagnetic Transients Simulation, 2nd Edition
N. Watson and J. Arrillaga
Volume 124 Power Market Transformation B. Murray
Volume 125 Wind Energy Modeling and Simulation, Volume 1: Atmosphere and plant
P. Veers (Editor)
Volume 126 Diagnosis and Fault Tolerance of Electrical Machines, Power electronics
and drives A.J.M. Cardoso
Volume 127 Lightning Electromagnetics, Volume 1: Return stroke modelling and
electromagnetic radiation, 2nd Edition V. Cooray, F. Rachidi and M.
Rubinstein (Editors)
Volume 127 Lightning Electromagnetics, Volume 2: Electrical processes and effects,
2nd Edition V. Cooray, F. Rachidi and
M. Rubinstein (Editors)
Volume 128 Characterization of Wide Bandgap Power Semiconductor Devices F. Wang,
Z. Zhang and E.A. Jones
Volume 129 Renewable Energy from the Oceans: From wave, tidal and gradient
systems to offshore wind and solar D. Coiro and T. Sant (Editors)
Volume 130 Wind and Solar Based Energy Systems for Communities R. Carriveau and
D.S-K. Ting (Editors)
Volume 131 Metaheuristic Optimization in Power Engineering J. Radosavljević
Volume 132 Power Line Communication Systems for Smart Grids I.R.S. Casella and
A. Anpalagan
Volume 134 Hydrogen Passivation and Laser Doping for Silicon Solar Cells B. Hallam
and C. Chan (Editors)
Volume 139 Variability, Scalability and Stability of Microgrids S.M. Muyeen, S.M. Islam
and F. Blaabjerg (Editors)
Volume 142A Wind Turbine System Design, Volume 1: Nacelles, drive trains and
verification J. Wenske (Editor)
Volume 142B Wind Turbine System Design, Volume 2: Electrical systems, grid
integration, control and monitoring J. Wenske (Editor)
Volume 143 Medium Voltage DC System Architectures B. Grainger and R.D. Doncker
(Editors)
Volume 145 Condition Monitoring of Rotating Electrical Machines P. Tavner, L. Ran and
C. Crabtree
Volume 146 Energy Storage for Power Systems, 3rd Edition A.G. Ter-Gazarian
Volume 147 Distribution Systems Analysis and Automation, 2nd Edition J. Gers
Volume 151 SiC Power Module Design: Performance, robustness and reliability
A. Castellazzi and A. Irace (Editors)
Volume 152 Power Electronic Devices: Applications, failure mechanisms and
reliability F. Iannuzzo (Editor)
Volume 153 Signal Processing for Fault Detection and Diagnosis in Electric Machines
and Systems M. Benbouzid (Editor)
Volume 155 Energy Generation and Efficiency Technologies for Green Residential
Buildings D. Ting and R. Carriveau (Editors)
Volume 156 Lithium-Ion Batteries Enabled by Silicon Anodes C. Ban and K. Xu (Editors)
Volume 157 Electrical Steels, 2 Volumes A. Moses, K. Jenkins, P. Anderson and H. Stanbury
Volume 158 Advanced Dielectric Materials for Electrostatic Capacitors Q Li (Editor)
Volume 159 Transforming the Grid Towards Fully Renewable Energy O. Probst,
S. Castellanos and R. Palacios (Editors)
Volume 160 Microgrids for Rural Areas: Research and case studies R.K. Chauhan, K.
Chauhan and S.N. Singh (Editors)
Volume 161 Artificial Intelligence for Smarter Power Systems: Fuzzy logic and neural
networks M.G. Simoes
Volume 165 Digital Protection for Power Systems, 2nd Edition Salman K Salman
Volume 166 Advanced Characterization of Thin Film Solar Cells N. Haegel and
M. Al-Jassim (Editors)
Volume 167 Power Grids with Renewable Energy: Storage, integration and
digitalization A.A. Sallam and B.O.P. Malik
Volume 169 Small Wind and Hydrokinetic Turbines P. Clausen, J. Whale and D. Wood
(Editors)
Volume 170 Reliability of Power Electronics Converters for Solar Photovoltaic
Applications F. Blaabjerg, A.L. Haque, H. Wang, Z. Abdin Jaffery and Y. Yang
(Editors)
Volume 171 Utility-scale Wind Turbines and Wind Farms A. Vasel-Be-Hagh and
D.S.-K. Ting
Volume 172 Lightning Interaction with Power Systems, 2 Volumes A. Piantini (Editor)
Volume 174 Silicon Solar Cell Metallization and Module Technology T. Dullweber
(Editor)
Volume 175 n-Type Crystalline Silicon Photovoltaics: Technology, applications and
economics D. Munoz and R. Kopecek (Editors)
Volume 178 Integrated Motor Drives Xu Deng and B. Mecrow (Editors)
Volume 180 Protection of Electricity Distribution Networks, 4th Edition J. Gers and
E. Holmes
Volume 182 Surge Protection for Low Voltage Systems A. Rousseau (Editor)
Volume 184 Compressed Air Energy Storage: Types, systems and applications D. Ting
and J. Stagner
Volume 186 Synchronous Reluctance Machines: Analysis, optimization and
applications N. Bianchi, C. Babetto and G. Bacco
Volume 190 Synchrophasor Technology: Real-time operation of power networks
N. Kishor and S.R. Mohanty (Editors)
Volume 191 Electric Fuses: Fundamentals and new applications, 4th Edition N. Nurse,
A. Wright and P.G. Newbery
Volume 193 Overhead Electric Power Lines: Theory and practice S. Chattopadhyay and
A. Das
Volume 194 Offshore Wind Power Reliability, Availability and Maintenance,
2nd Edition P. Tavner
Volume 196 Cyber Security for Microgrids S. Sahoo, F. Blaabjerg and T. Dragicevic
Volume 198 Battery Management Systems and Inductive Balancing A. Van den Bossche
and A. Farzan Moghaddam
Volume 199 Model Predictive Control for Microgrids: From power electronic
converters to energy management J. Hu, J.M. Guerrero and S. Islam
Volume 201 Design, Control and Monitoring of Tidal Stream Turbine Systems
M. Benbouzid (Editor)
Volume 202 Hydrogen from Seawater Splitting: Technology and outlook A. Ray and
M. Patel (Editors)
Volume 204 Electromagnetic Transients in Large HV Cable Networks: Modeling and
calculations A. Ametani, H. Xue, T. Ohno and H. Khalilnezhad
Volume 208 Nanogrids and Picogrids and Their Integration with Electric Vehicles
S. Chattopadhyay
Volume 210 Superconducting Magnetic Energy Storage in Power Grids M.H. Ali
Volume 211 Blockchain Technology for Smart Grids: Implementation, management
and security H.L. Gururaj, K.V. Ravi, F. Flammini, H. Lin, B. Goutham, K.B.R. Sunil
and C. Sivapragash
Volume 212 Battery State Estimation: Methods and models S. Wang
Volume 215 Industrial Demand Response: Methods, best practices, case studies, and
applications H.H. Alhelou, A. Moreno-Muñoz and P. Siano (Editors)
Volume 213 Wide Area Monitoring of Interconnected Power Systems, 2nd Edition
A.R. Messina
Volume 214 Distributed Energy Storage in Urban Smart Grids P.F. Ribeiro and R.S. Salles
(Editors)
Volume 217 Advances in Power System Modelling, Control and Stability Analysis,
2nd Edition F. Milano (Editor)
Volume 222 Large Scale Grid Integration of Renewable Energy Sources, 2nd Edition:
Solutions and technologies A. Moreno-Munoz
Volume 225 Fusion–Fission Hybrid Nuclear Reactors: For enhanced nuclear fuel
utilization and radioactive waste reduction W.M. Stacey
Volume 227 Processing and Manufacturing of Electrodes for Lithium-Ion Batteries J. Li
and C. Jin (Editors)
Volume 228 Digital Technologies for Solar Photovoltaic Systems: From general to
rural and remote installations S. Motahhir (Editor)
Volume 230 Self-Organizing Dynamic Agents for the Operation of Decentralized Smart
Grids A. Vaccaro
Volume 235 Clean Energy Past and Future P. Tavner
Volume 236 Green HV Switching Technologies for Modern Power Networks K. Niayesh
(Editor)
Volume 237 High Voltage Power Transformers: State of the art and technological
innovations M. Sforna, S. Zunino and F. Ferrari
Volume 238 AI for Status Monitoring of Utility Scale Batteries S. Wang, K. Liu, Y. Wang,
D. Stroe, C. Fernandez and J.M. Guerrero
Volume 239 Intelligent Control of Medium and High Power Converters M. Bendaoud,
Y. Maleh and S. Padmanaban (Editors)
Volume 241A Power Electronic Converters and Systems, 2nd Edition, Volume 1:
Converters and machine drives M. Simões and T. Busarello (Editors)
Volume 241B Power Electronic Converters and Systems, 2nd Edition, Volume 2:
Applications M. Simões and T. Busarello (Editors)
Volume 242 AI for Power Electronics and Renewable Energy Systems F. Blaabjerg,
W. Hu, G. Zhang, Z. Zhang and S. Abulanwar
Volume 245 Agrivoltaics: Technical, ecological, commercial and legal aspects C. Klyk
and S. Schindele (Editors)
Volume 247 Power System Strength Evaluation Methods, Best Practice, Case Studies,
and Applications H. Alhelou, N. Hosseinzadeh and B. Bahrani (Editors)
Volume 250 Interactions of Wind Turbines with Aviation Radio and Radar Systems
Alan Collinson
Volume 256 Wireless Power Transfer Technologies: Theory and technologies,
2nd Edition N. Shinohara (Editor)
Volume 905 Power system Protection, 4 Volumes
Fuzzy Logic Control
in Energy Systems,
2nd Edition
With design examples in MATLAB‡/Simulink‡

İsmail Hakkı Altaş

The Institution of Engineering and Technology


Published by The Institution of Engineering and Technology, London, United Kingdom
The Institution of Engineering and Technology is registered as a Charity in England &
Wales (no. 211014) and Scotland (no. SC038698).
† The Institution of Engineering and Technology 2024
First published 2016, second Edition 2024

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:

The Institution of Engineering and Technology


Futures Place
Kings Way, Stevenage
Hertfordshire SG1 2UA, United Kingdom
www.theiet.org

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.

British Library Cataloguing in Publication Data


A catalogue record for this product is available from the British Library
ISBN: 978-1-83953-882-7 (hardback)
ISBN: 978-1-83953-883-4 (PDF)
Typeset in India by MPS Limited
Printed in the UK by CPI Group (UK) Ltd, Croydon
Cover image: jia yu/Moment via Getty Images
This book is dedicated to my be loved family,
my wife Mualla and my beautiful daughters Hilal, Elif, and Candan Sıla,
for their patience and understanding
during the preparation of the manuscript,
and of course to my mom and dad who loved me so much.
This page intentionally left blank
Contents

About the author xvii


Preface to 1st edition xix
Preface to 2nd edition xxiii
Acknowledgments xxvii

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

2 Fuzzy sets and fuzzy partitioning 9


2.1 Introduction 9
2.2 Fuzzy sets and fuzzy membership functions 15
2.2.1 Triangular membership function 16
2.2.2 Trapezoid membership function 20
2.2.3 Gaussian membership function 24
2.2.4 Bell membership function 25
2.2.5 Sinusoid membership function 27
2.2.6 Sigmoid membership function 31
2.3 Properties of fuzzy membership functions 38
2.4 Fuzzy set operations 44
2.4.1 Intersection: t-norm 44
2.4.2 Union: t-conorm 46
2.4.3 Complement 50
2.5 Adjustment of fuzziness 53
2.6 Fuzzy partitioning 56
2.6.1 Theoretical approaches for fuzzy partitioning 59
2.6.2 Fuzzy partition examples in energy systems 60
2.7 Problems 75
References 83

3 Fuzzy decision-making 87
3.1 Introduction 87
xii Fuzzy logic control in energy systems, 2nd edition

3.2 Fuzzy relation 88


3.3 Operation with fuzzy relations 97
3.3.1 Intersection of two fuzzy relations 97
3.3.2 Union of two fuzzy relations 97
3.3.3 Negation of a fuzzy relation 98
3.3.4 Inverse of a fuzzy relation 99
3.3.5 Composition of fuzzy relations 100
3.3.6 The compositional rule of inference 104
3.4 The extension principle 106
3.5 Fuzzy mapping 111
3.6 Fuzzy implications 116
3.7 Approximate reasoning 123
3.8 Inference rules of approximate reasoning 125
3.8.1 Generalized modus ponens rule of inference 125
3.8.2 Compositional rule of inference 126
3.9 Fuzzy reasoning 127
3.9.1 Inference engine with single input–single rule 128
3.9.2 Inference engine with multiple input–single rule 130
3.9.3 Inference engine with multiple input–multiple rule 133
3.10 Human decision-making process 142
3.11 Problems 148
References 154

4 Fuzzy logic controller (FLC) 157


4.1 Introduction 157
4.2 Mamdani fuzzy reasoning 157
4.2.1 Fuzzification 162
4.2.2 Fuzz rule base 164
4.2.3 Fuzzy conclusion 166
4.2.4 Defuzzification 167
4.3 Takagi–Sugeno fuzzy reasoning 174
4.4 Tsukamoto fuzzy reasoning 181
4.5 Introduction to fuzzy logic control 184
4.6 Physical system behaviors and control 185
4.7 Fuzzy processor for control 195
4.7.1 Fuzzy rules: the modeling of thoughts and abilities 197
4.7.2 The input–output interaction 203
4.8 Modeling the FLC in MATLAB 207
4.9 Modeling the FLC in Simulink 216
4.10 Problems 229
References 239

5 System modeling and control 243


5.1 Introduction 243
5.2 System modeling 244
Contents xiii

5.3 Modeling electrical systems 251


5.4 Modeling mechanical systems 263
5.4.1 Mechanical systems with linear motion 264
5.4.2 Mechanical systems with rotational motion 271
5.5 Modeling electromechanical systems 274
5.5.1 Modeling DC motors 281
5.5.2 Modeling AC motors 292
5.6 Numerical solution of model equations 292
5.6.1 Euler digital integration 293
5.6.2 Euler integration for state-space equations 296
5.6.3 Runge–Kutta algorithm 298
5.6.4 Runge–Kutta algorithm for state-space equations 299
5.7 Problems 303
References 309

6 FLC in power systems 311


6.1 Introduction 311
6.2 Excitation control 314
6.2.1 Excitation system modeling 317
6.2.2 State-space model of excitation systems 323
6.2.3 Fuzzy logic control of excitation systems 325
6.3 Load–frequency control 330
6.3.1 Small-signal modeling of power systems 330
6.3.2 Fuzzy logic controller design for LFC 336
6.4 FLC in power compensation 348
6.4.1 Power factor improvement 349
6.4.2 Bus voltage control 352
6.5 FLC in load flow analysis 357
6.5.1 Power system modeling for power flow 358
6.5.2 FL accelerated Gauss–Seidel algorithm 358
6.5.3 FL accelerated Newton–Raphson algorithm 361
6.5.4 FL accelerated fast decoupled algorithm 362
6.5.5 Evaluations of the effect of FLAF 363
6.6 Problems 366
References 369

7 FLC in wind energy systems 373


7.1 Introduction 373
7.2 Wind turbine 374
7.3 Electrical generator 378
7.3.1 Dynamic modeling of induction generator 380
7.3.2 Self-excited induction generator 385
7.4 FLC examples in WEC systems 389
7.5 Problems 404
References 407
xiv Fuzzy logic control in energy systems, 2nd edition

8 FLC in PV solar energy systems 411


8.1 Introduction 411
8.2 PV cell models 414
8.2.1 Reference I–V characteristics of a PV panel 418
8.2.2 The effects of changes in solar irradiation and temperature 421
8.2.3 PV panel modeling in Simulink 426
8.2.4 A PV array emulator 433
8.3 Maximum power point (MPP) search in PV arrays 435
8.3.1 MPP by lookup tables 437
8.3.2 MPP search algorithm based on measurements of SX and TX 438
8.3.3 MPP search algorithm based on voltage and current
measurements 439
8.3.4 MPP search algorithm based on online repetitive method 440
8.4 Maximum power point tracking of PV arrays 442
8.4.1 Constant maximum power angle approach 442
8.4.2 Online load-matching approach 448
8.5 Shading effects in PV arrays 459
8.5.1 PV arrays with identical PV panels 460
8.5.2 PV arrays with unidentical PV panels 461
8.5.3 MPPT in PV arrays under shading 467
8.5.4 MPPT optimization methods for PV arrays under shading 468
8.6 Problems 470
References 472

9 Microgrids and energy management 479


9.1 Introduction 479
9.2 Microgrids 481
9.3 Interfacing distributed sources to AC microgrids 484
9.3.1 Solar PV systems 485
9.3.2 Fuel cells and storage devices 486
9.3.3 Wind energy systems 486
9.4 Interfacing with DC microgrids 487
9.5 Modeling DC–DC converters (choppers) 488
9.6 Modeling DC–AC converters (inverters) 493
9.7 Distributed generation and control 498
9.8 Energy management in a renewable integration system 500
9.8.1 Centralized control of distributed renewable energy systems 501
9.8.2 Distributed control of renewable energy systems 521
9.9 Day-ahead forecasting in energy management systems 528
9.9.1 Data using for renewable energy source power and demand
forecasting 529
9.9.2 Methods for renewable energy source power and demand
forecasting 530
9.9.3 Artificial neural network (ANN) 530
9.9.4 Multi-layer artificial neural network 532
Contents xv

9.9.5 Learning process in a neural network 533


9.9.6 Training an artificial neural network for forecasting 534
9.10 Cybersecurity in microgrids 536
9.10.1 Fundamentals of cybersecurity 537
9.10.2 Cybersecurity threats 538
9.10.3 Cybersecurity for power systems 540
9.10.4 Future trends in cybersecurity for power systems 545
9.11 Problems 546
References 548

Index 555
This page intentionally left blank
About the author

İsmail Hakkı Altaş is a professor at the Department of Electrical and Electronics


Engineering of Karadeniz Technical University, Türkiye. He obtained his PhD
degree from the University of New Brunswick, Canada. He is a Senior member of
the IEEE and member of the IEEE Power & Energy, Industrial Electronics,
Industry Applications, Power Electronics, Control Systems and Systems, Man, and
Cybernetics Societies. His research interests include intelligent control of power
systems, utilization of renewable energy and electrical microgrids.
This page intentionally left blank
Preface to 1st edition

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

The book addresses undergraduate and graduate students as well as practicing


engineers in electrical power, energy, and control systems. They will be able to get
sufficient knowledge of fuzzy logic theory, and then a clear understanding of
designing fuzzy decision-makers and controller in MATLAB and Simulink. Those
who study the book will be able to develop their own fuzzy processor library and
design their own fuzzy logic toolbox for the special problems they study. With the
given examples, the readers will also get to know the modeling and simulation of
electrical power and energy systems.
A novel fuzzy logic controller (FLC) design approach in both MATLAB and
Simulink is given in the book such that the user can see every step of the fuzzy
logic processor with the ability to interfere with the code in MATLAB .m files and
also in operational Simulink blocks. The FLC design approach will make the
readers not just as software users but also as software developers.
xx Fuzzy logic control in energy systems, 2nd edition

Chapters 1–7 can be used as an accompanying textbook for teaching Fuzzy


Logic and Fuzzy Decision-Making as an undergraduate course. Chapters 1–8 can be
used as a textbook for teaching Fuzzy Logic Control at undergraduate or graduate
levels. Chapters 5–9 can be used in a graduate course about FLC in Power System
Control assuming that students have a basic knowledge of fuzzy set theory and
fuzzy logic. Chapters 5, 6, 7, 10, 11, and 12 can be used as an advanced graduate
course about FLC in Renewable Energy and Distributed Generation. Chapters
10–12 can also be used in an advanced graduate course to teach Fuzzy Logic
Controlled Wind and PV Energy Conversion Systems.
The book is organized into 12 chapters with the following contents.
Chapter 1. Introduction: A brief history of fuzzy set theory and its application
areas are summarized in this chapter. The concepts of fuzziness, fuzzy membership
functions, and fuzzy subsets are introduced.
Chapter 2. Fuzzy sets: Types and properties of fuzzy sets are studied. Modeling
of fuzzy sets in MATLAB and MATLAB/Simulink are shown and MATLAB
function files are developed to be used as a part of a user-defined toolbox library.
Fuzzy intersection, union, and complement are also studied in this chapter.
Chapter 3. Fuzzy partitioning: Fuzzy subclasses and partitioning of the uni-
verses into fuzzy subsets are studied in this chapter. The importance and meaning
of the portioning are discussed with examples.
Chapter 4. Fuzzy relation: The concepts of fuzzy relation, two-dimensional
fuzzy sets, fuzzy extension principle, fuzzy projection, and binary and n-ary fuzzy
relations are discussed in this chapter. Representing verbal terms and expressions as
fuzzy relations are also introduced in this chapter.
Chapter 5. Fuzzy reasoning and fuzzy decision-making: Approximate reason-
ing, fuzzy reasoning, and fuzzy decision-making processes are given in this chap-
ter. Single input single rule, single input multiple rules, and multiple input multiple
rule base systems are studied and examples are given. The concept of fuzzy rea-
soning is studied and user-defined MATLAB files are used to support the opera-
tional behaviors of fuzzy decision-making.
Chapter 6. Fuzzy processor: Fuzzy reasoning and fuzzy decision-making pro-
cesses are carried ahead with multiple inputs, multiple rules, and multiple decisions
as the fuzzy processor. Known fuzzy reasoning algorithms such as Mamdani Fuzzy
Reasoning, Sugeno Fuzzy reasoning, and Tsukomoto Fuzzy reasoning are dis-
cussed and steps toward fuzzy logic controllers are given.
Chapter 7. Fuzzy logic controller (FLC): Fuzzy logic controller (FLC) is given
in this chapter. 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 rea-
soning, and crisp output after defuzzification are explained. User-developed FLC
examples are given.
Chapter 8. System modeling and control: Mathematical modeling of physical
systems is given in this chapter. The methods of obtaining differential equations,
simulation diagrams, and state-space models of physical systems are studied. The
Runge–Kutta numerical solution method is discussed and user-based MATLAB
Preface to 1st edition xxi

software is developed to show the meaning of controlling physical systems as one


of the application areas of fuzzy logic. The reader will be able to develop his/her
own FLC code in MATLAB and in MATLAB/Simulink. Examples of controlling
electrical, mechanical, and electromechanical systems will be given.
Chapter 9. FLC in power systems: Application of fuzzy logic controller and
decision-maker to excitation control, load-frequency control, and power compen-
sation are discussed in this chapter. Single- and multi-area control of power systems
are also studied as examples in the chapter.
Chapter 10. FLC in wind energy systems: Application of fuzzy logic control
and decision-making processes to wind energy conversion systems are given in this
chapter. After giving the problems and control issues in wind energy conversion
systems, the utilization of fuzzy logic in solving these problems is shown.
Chapter 11. FLC in PV solar energy systems: Application of fuzzy logic
control and decision-making processes in PV solar systems are given in this
chapter. Maximum power point tracking, sun tracking, voltage control, battery
charging, and management of the generated power are studied.
Chapter 12. Energy management and fuzzy decision-making: The use of fuzzy
decision-making and control processes in energy management systems is studied in
this chapter. Energy management in PV solar and wind energy systems are dis-
cussed and examples are given.
I would like to express my appreciation and thanks to my PhD supervisor
Professor Adel M. Sharaf at the Department of Electrical and Computer
Engineering at the University of New Brunswick, Canada. He allowed me to use
some of his designs in the book.
I wish to thank my graduate students, Onur Ozdal Mengi, Recep Çakmak,
Kenan Yanmaz, Yeşim Aysel Baysal, Serhat Duman, Yahya Danayiyen, and Ömer
Aydemir at the Department of Electrical and Electronics Engineering in Karadeniz
Technical University, Turkey. They were so patient and understanding during the
preparation of the manuscript besides providing me with examples from their
studies.
I want to thank IET editorial assistants Jennifer Grace and Olivia Wilkins for
their understanding and guidance during the process.
Last, but not least, I thank my mom Firdevs, my wife Mualla, and my children
Hilal, Elif, and Candan Sıla, who were great supporters and my energy sources
throughout this work. I am also sending my love and sincere thoughts to my dad,
Lütfü Altaş, whom I lost when I started writing this book.

İ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

Chapter 9. Microgrids and energy management


New subsection: Interfacing distributed sources to common power grid
New subsection: Day ahead forecasting in energy management systems
New subsection: Data using for renewable energy source power and demand
forecasting
New subsection: Methods for renewable energy source power and demand
forecasting
New subsection: Artificial neural network (ANN)
New subsection: Multi-layer artificial neural network
New subsection: Learning process in a neural network
New subsection: Training an artificial neural network for forecasting
New subsection: Cybersecurity in microgrids
New subsection: Fundamentals of cybersecurity
New subsection: Cybersecurity threats
New subsection: Cybersecurity for power systems
New subsection: Future trends in cybersecurity for power systems
With the revised new edition, the book aims to give an insight into clear
understanding and design approaches of fuzzy logic applications 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
decision-making, fuzzy optimization, and fuzzy logic control, which are required
for designing fuzzy logic-based application tools. A fuzzy unit called a fuzzy
processor is developed and designed to be used as a fuzzy decision-maker, a fuzzy
optimizer, and a fuzzy logic controller depending on the application problem type.
Energy and control systems are the main application areas of fuzzy logic
control and decision-making in this book. The FL is used to manage, control, and
operate electrical energy systems. Examples in the book are related to the control,
optimization, management, and operation of electrical energy utilization.
This book addresses undergraduate and graduate students in engineering as
well as researchers and practicing engineers in electrical power, energy, and control
systems. They will be able to get sufficient knowledge of fuzzy logic theory, and
then a clear understanding of designing fuzzy decision-makers, fuzzy optimizers,
fuzzy logic controllers, and fuzzy logic-based management systems in MATLAB
and MATLAB/Simulink. Those who study the book will be able to model physical
systems develop their own fuzzy processor library and design their own fuzzy logic
toolbox for the special problems they study. Except for examples on some special
research applications, the MATLAB/Simulink codes and simulation files of most of
the examples will be stored by the publisher and will be provided to the readers
upon their request. With the given examples, the readers will also get to know the
modeling and simulation of electrical power and energy systems.
The book will include a novel fuzzy logic controller design approach in both
MATLAB and in MATLAB/Simulink such that the user can see every step of the
Preface to 2nd edition xxv

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

I would like to express my appreciation and thanks to my PhD supervisor Professor


Adel M. Sharaf at the Department of Electrical and Computer Engineering at The
University of New Brunswick, Canada. He allowed me to use some of his designs
in the book.
I wish to thank my graduate students Sibel Çevik Bektaş and Büşra Özgenç
who made a great contribution to the second edition on the day ahead forecasting of
solar power and shading effects in PV modeling, respectively. I also wish to send
my appreciation to my colleague Associate Professor Dr. M. Şinasi Ayas at the
Department of Electrical and Electronics Engineering at Karadeniz Technical
University, Turkiye for his support on cyber security issues.
I want to thank to IET editorial office people for their understanding and
guidance during the process.
Last but not least, I thank my family, my wife, and my lovely daughters, who
gave me their energy and great support throughout this work. I am also sending my
love and sincere gratitude to my dad and mom, whom I lost after I started writing
this book.
This page intentionally left blank
Chapter 1
Introduction

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)

Figure 1.1 Blended colors in the universe of colors


4 Fuzzy logic control in energy systems, 2nd edition

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.

1.3 Fuzzy membership functions

Fuzzy membership functions can be considered as a bridge between uncertain data


and fuzzy world. The crisp universe of muddy data is partitioned into subsections
and represented by fuzzy membership functions. For example, the crisp universe of
gray colors can be partitioned into subsections as white, light gray, gray, dark gray,
and black as shown in Figure 1.2. The shades of gray become darker as we move
from left to right or from white to black. The shades of gray color have been
categorized into subsections as white, light gray, gray, dark gray, and black defined
by triangular-type fuzzy membership functions.
Fuzzy membership functions are defined in an interval [0, 1]. The lowest value
0 means that there is no inclusion in the related fuzzy set while the highest value
1 means full inclusion. Five triangular-type membership functions representing five
fuzzy subsets are used in Figure 1.2 to define the shades of gray. Right triangles are
used as boundary membership functions to represent lower (white) and upper
(black) limits of the shades of gray. Equilateral triangles are used as membership
functions for the other shades that vary from white to black. It is not clear to say
where light gray ends and gray starts. Similarly, one cannot see a clear starting and
ending for gray and dark gray. Therefore, there is a fuzzy transition region from
one color to the other. Fuzzy membership functions show how much the color in
the universe of discourse belongs to each fuzzy subset, which represents the sub-
categories of gray. As stated earlier, fuzzy membership functions are used as a tool
to represent the fuzzy sets. Various geometrical and pictorial shapes can be used to
represent fuzzy sets. However, known mathematical functions are preferred to be
used as membership functions due to their simplicity. A detailed analysis of fuzzy
membership functions is discussed in Chapter 2.

Universe of discourse (colors)

Figure 1.2 Blended colors in the universe of gray colors


Introduction 5

1.4 Fuzzy sets


Fuzzy sets are used to categorize the subclasses of uncertainty. Similarly to crisp
sets, fuzzy sets represent the inclusion of objects in a categorized group. However,
the boundaries of fuzzy sets are not as sharp as they are in crisp sets. As described
earlier, an object belongs to a crisp set or not. If an object belongs to a crisp set, its
membership degree becomes 1, or 0 otherwise. There is no other choice, just 1 or 0.
That is where the difference between crisp and fuzzy sets occurs. The boundaries of
fuzzy sets change gradually from 0 to 1 or from 1 to 0 showing how much the
object belongs to the set. Therefore, the membership degrees are not just 0 or 1 in
fuzzy sets. They are varied between 0 and 1.

1.5 Latest developments in energy systems


Electrical power systems have a very complicated structure including hundreds of
generators, transmission lines, bus bars, step-up transformers, step-down transfor-
mers, and loads. The generators used in conventional power systems are usually
synchronous generators, which require load-frequency and excitation control. The
relations both between power and frequency and between excitation and induced
voltages are nonlinear and the dynamic model equations are required to be linear-
ized in order to apply PID controllers. Therefore, after the invention of FL, the
application of FL controllers in power system control has gained importance since a
dynamic model is not required by FL controllers in real-time applications [8].
FL controllers, just like human operators, get information from system output and
adjust the input until reaching a desired output. A human operator controls the input
variables of the machine by looking at the output variables without knowing or
implementing the dynamic model of the machine [5–7]. Since FL can be used to model
human thoughts and experienced knowledge, it has been applied in many decision-
making processes [9] such as the ones applied to energy management systems [10,11].
Integration of wind and photovoltaic solar-type renewable energy sources into
conventional distribution networks has been increasing rapidly [12,13]. As the
number of these integrations increases, the structure of electrical distribution net-
works has changed toward distributed generation networks, microgrids, and smart
electrical networks [14,15]. While the power generation units in conventional
power networks are far away from the consumption sites, the generation, and
consumption are side by side in distributed networks and microgrids. Since gen-
eration and consumption are located in the same area with lower tie impedances
between the connection points, the dynamic responses of distributed generation
networks are different than those of conventional distribution grids [14]. Besides,
distributed and microgrids having renewable energy sources carry harmonics,
which cause distortions in voltage and current, and additional losses in distributed
power. Therefore, additional precautions such as dynamic filters must be employed
to clear out the harmonic effects for efficiency and power quality [16]. All new
developments in power distribution networks, power electronics, computers, and
6 Fuzzy logic control in energy systems, 2nd edition

communication technologies have led intelligent methods such as FL and artificial


neural networks to be utilized in solutions to various power system problems [17].
With the integration of renewable energy sources into distributed networks,
control, estimation, and management problems have gained more importance in
order to operate those systems smoothly. Since measurement, knowledge, infor-
mation, and data transmission are non-separable parts of microgrids, cybersecurity
issues have become another problem in energy systems [18]. Day-ahead estimation
of the power to be generated from renewable sources, day-ahead estimation of the
power to be consumed on the demand side [19,20], control of generated and con-
sumed power, control of bus voltages and frequencies, generation, and demand side
management are all novel topics as well as cybersecurity in microgrids utilizing
FL-based solution algorithms [21].

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

(ICoPESA), Singapore, 2022, pp. 424–429, http://dx.doi.org/10.1109/ICo-


PESA54515.2022.9754406.
[12] Tareen W.U., Mekhilef S., Seyedmahmoudian M. and Horan B., ‘Active
power filter (APF) for mitigation of power quality issues in grid integration
of wind and photovoltaic energy conversion system’, Renewable and Sus-
tainable Energy Reviews. 2017;70:635–655.
[13] Rahman S.A., Varma R.K. and Litzenberger W.H., ‘Bibliography of FACTS
applications for grid integration of wind and PV solar power systems:
1995–2010 IEEE working group report’, 2011 IEEE Power and Energy
Society General Meeting, Detroit, MI, USA, 2011, pp. 1–17, http://dx.doi.
org/10.1109/PES.2011.6039861.
[14] Lede A.M.R., Molina M.G., Martinez M. and Mercado P.E., ‘Microgrid
architectures for distributed generation: a brief review’, 2017 IEEE PES
Innovative Smart Grid Technologies Conference—Latin America (ISGT
Latin America), Quito, Ecuador, 2017, pp. 1–6, http://dx.doi.org/10.1109/
ISGT-LA.2017.8126746.
[15] Shayeghi H. and Alilou M., ‘Distributed generation and microgrids’, Editor:
Ersan K., Hybrid Renewable Energy Systems and Microgrids. New York:
Academic Press, 2021, pp. 73–102, ISBN 9780128217245, https://doi.org/
10.1016/B978-0-12-821724-5.00006-4.
[16] Guerrero J.M., Loh P.C., Lee T.-L. and Chandorkar M., ‘Advanced control
architectures for intelligent microgrids—Part II: power quality, energy sto-
rage, and AC/DC microgrids’, IEEE Transactions on Industrial Electronics.
2013;60(4):1263–1270, http://dx.doi.org/10.1109/TIE.2012.2196889.
[17] Daryani M.J., Karkevandi A.E. and Usta O., ‘A hybrid approach for microgrid
protection system based on neural network and fuzzy logic’, 2019 IEEE PES
Innovative Smart Grid Technologies Europe (ISGT-Europe), Bucharest,
Romania, 2019, pp. 1–5, http://dx.doi.org/10.1109/ISGTEurope.2019.8905476.
[18] Li Z., Shahidehpour M. and Aminifar F., ‘Cybersecurity in distributed power
systems’, Proceedings of the IEEE. 2017;105(7):1367–1388, http://dx.doi.
org/10.1109/JPROC.2017.2687865.
[19] Ulutas A., Cakmak R. and Altaş İ.H., ‘Hourly solar irradiation prediction by
artificial neural network based on similarity analysis of time series’, Inno-
vations in Intelligent Systems and Applications Conference (ASYU), Adana,
Turkey, 4–6 October 2018, pp. 140–145.
[20] Çevik Bektaş S., Çakmak R. and Altaş İ.H., ‘Design of a MATLAB GUI for
day ahead forecasting of PV panel power’, Akıllı Sistemlerde Yenilikler ve
Uygulamaları (ASYU), İzmir, Turkey, 31 October–2 November 2019, pp. 1–6.
[21] Alsuwian T., Shahid Butt A. and Amin A.A. ‘Smart grid cyber security
enhancement: challenges and solutions—a review’. Sustainability. 2022;
14:14226. http://dx.doi.org/10.3390/su142114226.
This page intentionally left blank
Chapter 2
Fuzzy sets and fuzzy partitioning

The concept of fuzziness, types, and properties of fuzzy sets, modeling of


fuzzy sets in MATLAB and MATLAB/Simulink are shown and
MATLAB function files are developed to be used as a part of a user-defined
toolbox library. Fuzzy intersection, union, and complement have also been
studied in this chapter. Besides, fuzzy subclasses and partitioning of the
universes into fuzzy subsets are also studied in this chapter.

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.

Table 2.1 Survey results show the upper limit of


fuzzy subset Young

Students Upper limit for Young


Student 1 35
Student 2 40
Student 3 25
Student 4 33
Student 5 30
Student 6 28
Student 7 35
Student 8 30
Student 9 25
Student 10 32
Average 31.3

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

Child Young Old

0
2 10 15 20 30 40 50 60
Universe of ages
(a)
Membership value, μ

1 Infant Child Young Old

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 Þ

i¼1
xi

0 0:2 0:4 0:6 0:8 1 0:8 0:6 0:4 0:2 0


¼ þ þ þ þ þ þ þ þ þ þ :
0 1 2 3 4 5 6 7 8 9 10
Plot the membership function mC(x) in a discrete graphical form.

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.

Figure E2.2 MATLAB code for plotting discrete subset C


14 Fuzzy logic control in energy systems, 2nd edition

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.3 A plot of the continuous fuzzy subset in MATLAB


Fuzzy sets and fuzzy partitioning 15

Figure E2.4 MATLAB code for plotting continuous fuzzy membership function
Young

2.2 Fuzzy sets and fuzzy membership functions

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

determined and adjusted by learning algorithms that require derivations such as in


artificial neural networks. In this case, functions with easy derivatives are
preferred.

2.2.1 Triangular membership function


Triangular membership functions are made of lines as shown in Figure 2.4 and
realized by the combination of line equations as given in Equation (2.4).
8
>
> j xj  j x1 j
>
> ; for x1  x  x2
>
< jx2 j  jx1 j
mA ðxÞ ¼ j x3 j  j xj (2.4)
> ; for x2  x  x3
>
> jx j  j x j
>
>
3 2
:
0; otherwise
where the parameters x1, x2, and x3 give the location of fuzzy membership function
A in the universe of X as shown in Figure 2.4. Actually, the parameters x1, x2, and x3
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. That’s why parametrized formulas are
important to represent membership functions. Equation (2.4) can be used as a
parametrized membership function representing triangular-type fuzzy subsets.
However, it seems to be a long equation with conditional statements. Therefore, let
us convert it to a simpler form so that it will be more suitable to be used in
MATLAB.
Equation (2.4) shows that x2 is a convergence point and equation
   
x  x1 x3  x
mA ðxÞ ¼ < (2.5)
x2  x1 x3  x2
can be satisfied as long as x1  x2 and x  x2. Similarly,
   
x3  x x  x1
mA ðxÞ ¼ < (2.6)
x3  x2 x2  x1

Figure 2.4 A triangular fuzzy membership function


Fuzzy sets and fuzzy partitioning 17

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.

Figure 2.5 A MATLAB function for simulating triangular fuzzy membership


function

Figure 2.6 A Simulink function for simulating triangular fuzzy membership


function. (a) Closed form of the Simulink block and (b) inside view of
the block in (a).
18 Fuzzy logic control in energy systems, 2nd edition

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

Figure E2.3(a) Modeling and simulating triangular fuzzy subsets in Simulink


Fuzzy sets and fuzzy partitioning 19

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.

Figure E2.3(b) Modeling and simulating triangular fuzzy subsets in MATLAB

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

Figure E2.3(c) Triangular fuzzy subsets as a result of simulations given in


Figures 2.3(a) and 2.3(b)
20 Fuzzy logic control in energy systems, 2nd edition

Table E2.3 Using function triangle01m.m for the Example 2.3

Function file: triangle01m.m x = 1.5 x = 1.0


mA (k) = triangle01m (4, 2, 0, x); mA (x1) = 0.75 mA (x2) = 0
mB (k) = triangle01m (2, 0, 2, x); mB (x1) = 0.25 mB (x2) = 0.50
mC (k) = triangle01m (0, 2, 4, x); mC (x1) = 0 mC (x2) = 0.50

(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.

2.2.2 Trapezoid membership function


Trapezoid type membership functions are obtained as the combination of line
equations as it is in triangular type. The trapezoidal membership functions differ
from the triangular types with its crisp region on the top. Trapezoidal membership
functions have a flat top that is not fuzzy while triangular membership functions
have a sharp peak.
A parametrized general view of the trapezoid fuzzy membership function is given
in Figure 2.7, which is used to draw Equation (2.8). A MATLAB function for trape-
zoidal fuzzy subset can be developed using Figure 2.7 and Equation (2.8), in which it
can easily be seen that, the same line equations used in the triangular membership
function can also be used here with the addition of a flat line on the top.
8
> j xj  j x1 j
>
> ; if x1  x  x2
> jx2 j  jx1 j
>
<
1 if x2  x  x3
mA ðxÞ ¼ (2.8)
> jx4 j  jxj ; if x  x  x
>
>
> 3 4
: jx4 j  jx3 j
>
0 Otherwise

Figure 2.7 A trapezoid fuzzy membership function


Fuzzy sets and fuzzy partitioning 21

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.8 Function trapezo1m.m for simulating trapezoidal fuzzy subset


22 Fuzzy logic control in energy systems, 2nd edition

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.

Figure E2.4(a) Modeling and simulating trapezoid fuzzy subsets in MATLAB

Figure E2.4(b) Modeling and simulating trapezoid fuzzy subsets in Simulink


24 Fuzzy logic control in energy systems, 2nd edition

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

Figure E2.4(c) Trapezoid fuzzy subsets as a result of simulations given in


Figures 2.4(a) and 2.4(b)

Table E2.4 Using function trapez01m.m for the Example 2.4

Function file: trapez01m.m Membership values

x = 3.5 x = 2 x = 2.5 x=4


mA = trapez01m (5, 4, 3, 1, x); 0.5 0.5 0.25 0.0
mB = trapez01m (3, 1, 1, 3, x); 0.0 0.5 0.75 0.0
mC = trapez01m (1, 3, 4, 5, x1); 0.0 0.0 0.0 1.0

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.

2.2.3 Gaussian membership function


As stated in previous sections, the triangular fuzzy membership function has a
sharp peak, which makes it very sensitive to the changes in crisp variable. Due to
this high sensitivity property, triangular-type membership functions are not pre-
ferred in some applications that require soft transition responses to the changes in
crisp variables. Since the Gaussian function has a soft peak, it is less sensitive to the
changes in crisp variables when compared to triangular-type membership func-
tions. A Gaussian membership function can be defined as in (2.13).

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

Figure 2.10 Gaussian membership function

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.

2.2.4 Bell membership function


A bell-type membership function can be described by Equation (2.15), which is a
generalized Cauchy distribution used in probability theory. Equation (2.15) yields
Figure 2.12 for the parametric values xP = 0, w = 2, and m = 4.
1
mA ðxÞ ¼ xx 2m (2.15)
1þ  P
w

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

Figure 2.11 A comparison of Equations (2.13) and (2.14)

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

Figure 2.12 Bell membership function

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

2.2.5 Sinusoid membership function


A sinusoid function is used to simulate this membership function. It is defined along
the half cycle of a full period. The function should be formulated carefully so that the
properties of a fuzzy membership function are satisfied along the full period. Since a
sinewave includes both positive and negative alternates, its absolute value will have
two positive half cycles with a doubled frequency. In order to develop a parametrized
sinewave function similar to the ones given earlier, let us define a parameter xP, which
is the crisp value corresponding to the peak point of the sinewave function as shown in
Figure 2.14. It should be kept in mind that the peak point is the address of a function
and is determined by delayed phase angles, which will be addressed later in this
section. The length of the universe and the number of fuzzy subsets to be represented
are important parameters when designing the sinewave function.
Let us assume that four fuzzy subsets need to be defined in the interval [x1, x2]
as shown in Figure 2.14. Then the length of the universe X and the parameter a are
calculated as
X ¼ x 2  x1 (2.16)
X
a¼ (2.17)
n1
where X is the length of the universe, and n is the number of fuzzy subsets. It is
obvious from Figure 2.14 that
T
¼ 2a ! T ¼ 4a (2.18)
2
The delayed phase distance b can be written as
X
b¼ a (2.19)
2
28 Fuzzy logic control in energy systems, 2nd edition

Figure 2.14 Sinusoid membership function defined in X

In order to be used in a sine function, delayed phase distance b should be


written in radians. Since the distance a is equal to p/2 radians as seen in
Figure 2.14, a comparison yields the delayed phase angle in radians as
bp
q1 ¼ (2.20)
a2
The phase angle q1 determines the locations of membership functions A and C
in Figure 2.14 as x = 0 is the reference point. Therefore, the delated phase angle of
the membership functions B and D are written as
p
q2 ¼ q1 þ (2.21)
2
Thus, the sinusoid membership function is obtained as
 p 
 
mA ðxÞ ¼ sin tþq  (2.22)
2a
where q is the delayed phase angle in radians, and it is equal to either q1 or q2. The
peak point of each sinusoid membership function can be calculated as
xP ðmÞ ¼ x1 þ ðm  1Þa; m ¼ 1; 2; . . .; n (2.23)
where n is the number of fuzzy subsets, x1 is the first element in the universe of X
and equal to 4 in Figure 2.14 and, a is given by (2.17). The point xP corresponds
Fuzzy sets and fuzzy partitioning 29

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

Figure E2.5(a) Sinusoid functions A, B, and C


30 Fuzzy logic control in energy systems, 2nd edition

So, the peak points from (2.23) will be:


xP ðmÞ ¼ 4 þ ðm  1Þ4 for m ¼ 1; 2; 3
xPA ¼ 4; xPB ¼ 0; xPC ¼ 4:
Then from (2.18) the delayed phase angle is calculated as
X
b¼ a¼0
2

bp
q1 ¼ ¼0
a2

which yields that


p p
q2 ¼ q1 þ ¼
2 2
Thus, the sinewave membership functions are defined as
 p 
 
mA ðxÞ ¼ sin x þ q2  for  4  x  0
2a
 p 
 
mC ðxÞ ¼ sin x þ q2  for 0  x  4
2a
and
 p 
 
mB ðxÞ ¼ sin x þ q1  for  4  x  4
2a

(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].

2.2.6 Sigmoid membership function


When a crisp universe is portioned into subcategories, there are always lower and
upper categories. If the subcategories of a crisp universe of X are represented by
fuzzy subsets, there will be a starting fuzzy subset at the lowest end and an ending
fuzzy subset set at the highest end as shown by fuzzy subsets A and D in
Figure 2.14. Right triangle, half trapezoid, and sinusoid type membership functions
can be used as lower and upper boundary fuzzy sets. In addition to those mentioned
above, the sigmoid functions are the alternatives for the boundary sets used at lower
and upper limits. The sigmoid fuzzy membership functions are also called S-curves
since they look alike the letter S. The membership values tend to decrease in a
sigmoid fuzzy subset if it is used as a starting set at the lower boundary and to
increase if it is used at the upper boundary as given in Figure 2.15. Therefore, the
sigmoid functions are also called as decreasing sigmoid and increasing sigmoid.
Right triangles can be used for decreasing or increasing fuzzy subsets, too.
32 Fuzzy logic control in energy systems, 2nd edition

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)

However, sigmoid membership functions are usually preferred in applications that


require nonlinearity such as learning process in artificial neural network.
A sigmoid function is defined as in (2.24)
1
mA ðxÞ ¼ (2.24)
1 þ eaðxcÞ
where the sign of the parameter a indicates the direction of the sigmoid function
whether it is decreasing or increasing. If the sing is negative than the sigmoid
function shows a decreasing behavior while it has an increasing one for the positive
sign. The parameter a defines the slope of the sigmoid curve at m(x) = 0.5 where
x = c. Higher absolute values of a increase the slope, whereas lower values
decrease it. Such that the function gives a straight line with a zero slope at the
membership value of m(x) = 0.5 for a = 0.
Fuzzy sets and fuzzy partitioning 33

Figure E2.5(d) The use of sinusoid function for specific x’s in Example 2.5(c)

The range of sigmoid function in the universe of X is adjusted by the para-


meters a and c. The parameter c is equal to x when m(x) = 0.5 and a gives the slope
of the curve at mA(x) = 0.5. However, these two parameters do not give any infor-
mation about the crisp numbers (x1 and x2) where the membership degree is 0 or
1 such as mA(x1) = 0.0 mA(x2) = 1.0. On the contrary, these two crisp values are
required to be known in applications. Therefore, Equation (2.24) should be extended
to include these two limits with the membership values of mA(x1) = 0.0, mA(x2) = 1.0
as in (2.25).
8
>  0 2 for x  x1
>
>
>
> x  x
> 2
<
1
for x1  x  c
x2  x1
mA ðxÞ ¼  2 (2.25)
>
> x  x2
>
> 12 for c  x  x2
>
> x2  x1
:
1 for x  x2
Although Equation (2.25) includes more information, Equation (2.24) is more
practical and more preferable.
34 Fuzzy logic control in energy systems, 2nd edition

Table E2.5(c) Using function sinus02m.m for the Example 2.5

Function file: sinus02m.m Membership values

x = 3.5 x = 2 x = 2.5 x=4


mA = sinus02m (3.5); 0.95 0.29 0.0 0.0
mB = trapez01m (2); 0.38 0.92 0.0 0.0
mC = trapez01m (2.5); 0.0 0.0 0.77 0.63
mD = trapez01m (4); 0.0 0.0 0.0 1.0

1 Slope at μ(x) = 0.5


0.9
Membership degrees

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

Figure 2.15 Sigmoid membership functions

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

Figure E2.6 The use of sigmoid function to plot Figure 2.15

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 (%)

Figure E2.7(b) The use of sinusoid and triangular functions together

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 (%)

Figure E2.7(c) The use of trapezoid and bell functions together

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.

2.3 Properties of fuzzy membership functions


Different types of fuzzy membership functions have been introduced in Section 2.2
focusing on usability and fuzziness of the sets. Besides their shapes, fuzzy mem-
bership functions have some other characteristic properties. Typical properties of
fuzzy sets and membership functions representing them are covered in this section.
The bell-type membership function shown in Figure 2.16 includes most of the
characteristic properties of fuzzy subsets and is used as a reference to give the
details.
The major properties of fuzzy subsets are summarized in Figure 2.16. Every
fuzzy subset may not include all of these properties. Depending upon function type,
the properties of the fuzzy subsets may vary. The meaning of these characteristic
properties is explained below.
The core of a fuzzy set is a crisp set whose elements have a membership
degree of 1.0 in the fuzzy set A. The core of a fuzzy set A is defined as in (2.26).
coreðAÞ ¼ fx; such that mA ðxÞ ¼ 1g (2.26)
height

core
crossover points
boundary bandwidth boundary
α-cut
support

Figure 2.16 Characteristic properties of a fuzzy subset


Fuzzy sets and fuzzy partitioning 39

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

Figure E2.8(a) Properties of sinusoid membership function

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

Figure E2.8(b) Cardinality of fuzzy set A

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

a-cuts of the fuzzy set A for a = 0.2 and 0.6.


a ¼ 0:2  cutðAÞ ¼ A0:2 ¼ fx; such that mA ðxÞ  0:2g
a ¼ 0:6  cutðAÞ ¼ A0:6 ¼ fx; such that mA ðxÞ  0:6g
The numerical results are summarized in Table E2.8(a) where the universe of X
is varied from 10 to 10 with an incremental step of 1. Therefore, the steps in
membership values are also large and such that the continues function became a
discrete one. The first column in Table E2.8(a) represents the universe of X. The
second column represents the membership values corresponding to the core set and
column three contains the membership values of the crossover points. Similarly, the
membership values of the bandwidth are given in column four.
Sinusoid function also satisfies the convexity property, since all of the crisp
points between x1 and x2 have membership values in fuzzy set A and they are
greater than the line connecting mA(x1) and mA(x2) each other. The convexity line in
Figure E2.8(a) clearly shows the sinusoid membership function is convex.
Cardinality of the fuzzy set A can be obtained by assuming a discrete universe
of X in the interval {6, 5, 4, 3, 2, 1, 0, 1, 2, 3, 4, 5, 6} and fuzzy subset A
as in Table E2.8(b). The cardinalities of the universe of X and fuzzy subset A are
calculated and given in the bottom rows of Table E2.8(b). It should be noted that
the cardinality of crisp universe of X is equal to the number of elements in X and the

Table E2.8(a) Properties of sinusoid function in Example 2.8

X mA (x) mA (core) mA (co) mA (bw) mA (bdr) mA (sup) mA (Aa)

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

cardinality of fuzzy subset A is the sum of the membership values mA(x) of A.


Discrete sinusoid representation of the fuzzy subset A and calculation of its car-
dinality in MATLAB are given in Figure E2.8(b).

(b) Properties of Gaussian function


The properties of the Gaussian function can be obtained as it is done for the sinusoid
function. Similar but the same results may be obtained. The main difference between
sinusoid and Gaussian functions is the convexity property. The Gaussian function is not
convex as seen in Figure E2.8(c), while sinusoid function is convex as stated earlier.

Table E2.8(b) Cardinality calculation for Example 2.8(a)

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

Figure E2.8(c) Properties of Gaussian membership function


44 Fuzzy logic control in energy systems, 2nd edition

As shown in Figure E2.8(c), membership degrees of the crisp points between


x1 and x2 are smaller than the line connecting mA(x1) and mA(x2). The convexity line
in Figure E2.8(c) clearly shows that the Gaussian membership function is not
convex.

2.4 Fuzzy set operations

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

2.4.1 Intersection: t-norm


The intersection of two or more fuzzy subsets is also called t-norm. Intersection
corresponds to the operator and in Boolean algebra. Therefore, the verbal term and
in fuzzy systems has the same meaning as intersection and are processed by the
intersection operator. Let A and B be two fuzzy subsets and C is the intersection 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 intersection C is written as
C ¼A\B (2.36)
where A[[0, 1], B[[0, 1], and C[[0, 1]. Equation (2.36) can be written in terms of
membership functions, too.
mC ðxÞ ¼ mA \ mB ðxÞ (2.37)
mC ðxÞ ¼ mA ðxÞ \ mB ðxÞ (2.38)
mC ðxÞ ¼ minðmA ðxÞ; mB ðxÞÞ (2.39)
where x [ X. As Equation (2.39) shows, the intersection of two fuzzy subsets can be
obtained as the minimum of these subsets. The intersection process using the min
operator is called the Zadeh intersection [3]. Researchers on fuzzy sets and systems
have developed various equations that can be used to process intersection operators
[3]. Due to its simplicity, Zadeh minimum is preferred to be used in this book.
Fuzzy sets and fuzzy partitioning 45

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

Figure E2.9 Fuzzy subsets represent the percentage of fullness


46 Fuzzy logic control in energy systems, 2nd edition
Membership degrees

Percentage of fullness

Figure E2.9(a) Intersection of the fuzzy subsets OQ and HF


Membership degrees

Percentage of fullness

Figure E2.9(b) Intersection of the fuzzy subsets HF and TQ

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.

2.4.2 Union: t-conorm


The union of two or more fuzzy subsets is also called t-conorm or s-norm and
corresponds to the operator or in Boolean algebra. Therefore, the verbal term or in
fuzzy systems has the same meaning as union and is processed by the union
Fuzzy sets and fuzzy partitioning 47

Table 2.2 Conditions of intersection operator

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

Figure E2.10(a) Union of the fuzzy subsets OQ and HF

Figure E2.10(b) Union of the fuzzy subsets HF and TQ


Fuzzy sets and fuzzy partitioning 49

(e) Comment on the meanings of the above results.


As mentioned earlier, union or t-conorm operator is used to process the word
or in Boolean algebra.
Union operator in (a) represents the expression “the battery charging unit is
either full of a quarter (OQ) or HF.” This means that the charging capacity of the
battery charging unit falls into both categories with full membership degrees.
Union operator in (b) represents the expression “the battery charging unit is
either HF or full of three quarter (TQ).” In this case, the charging capacity of
the battery charging unit represents both HF and full of three quarters with full
membership degrees.
In part (c), the union is not an EM set anymore since the union of the sets OQ
and TQ are themselves because they do not have a common area. This means
that “the charging capacity of the battery charging unit is either full of a quarter
or full of three quarter.” In this case, the water thank may be exactly FU of a
quarter or exactly FU of three quarters.

Figure E2.10(c) Union of the fuzzy subsets HF and TQ

Table 2.3 Conditions of union (s-norm) operator

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

Percentage of fullness Percentage of fullness


(i) (ii)

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.

Table 2.4 Conditions of complement operator

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.

2.5 Adjustment of fuzziness


Some fuzzy subset properties such as bandwidth, crossover points, and a-cuts can
be changed after some processes on the related set. Changes in these properties
affect the fuzziness of the fuzzy subsets. The adjustment of fuzziness is done by
using some fuzzy verbal terms that are used frequently in daily life. Many fuzzy
verbal expressions adjusting the fuzziness are used unknowingly in daily dialo-
gues. These fuzzy verbal terms and their effects on the fuzziness are discussed in
this section.
Verbal terms are the basis of fuzzy modeling techniques because a verbal
variable is actually nothing but a fuzzy set name. The verbal expressions empty, full
54 Fuzzy logic control in energy systems, 2nd edition

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

maximum membership value of 1, the other membership values of a fuzzy subset A


will be smaller and get closer to its core set when it is squared as shown in
Figure 2.18. Lowering the membership value means lowering the fuzziness.
Therefore, subset A is fuzzier than the square of subset A. The fuzzy adjective very
makes a fuzzy subset less fuzzy. Following these descriptions, the following are
written:
good ¼ mA ðxÞ (2.49)
verygood ¼ ½mA ðxÞ2 (2.50)
h i2
veryverygood ¼ ½mA ðxÞ2 (2.51)

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.

lessgood ¼ ½mA ðxÞ1=2 (2.52)

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

The effects and differences of concentration, dilation, and contrast intensifi-


cation are given in Figure 2.19.
56 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
–6 –5 –4 –3 –2 –1 0 1 2 3 4 5 6
Universe of X

Figure 2.19 Adjustment of fuzziness by the operators con, dil, and ci

2.6 Fuzzy partitioning

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.20 Survey results of ending age for infant

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

Figure 2.24 Survey results of starting age for old

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

Figure E2.12 A partition of the universe of ages into fuzzy subsets

2.6.1 Theoretical approaches for fuzzy partitioning


Fuzzy sets are used to represent uncertain, vogue, and muddy data in the processing
of reasoning, decision-making, optimization, and problem-solving. Fuzzy sets are
also used with fuzzy logic in order to model and process the thoughts, ideas, tricks,
and knowledge in a way similar to those of a human. When we make a decision, we
put our thoughts, ideas, and knowledge to work without processing any math
functions such as differentiation, integration, trigonometric functions, etc. Fuzzy
logic has the ability to be used to model human decision-making processes. That is
one of the main reasons fuzzy logic has become attractive and preferable for
problem-solving in the areas of social sciences medicine and engineering [4].
Therefore, it is not intended to draw the readers into heavy math of fuzzy sets and
fuzzy logic. Although it is impossible to ignore the importance of math, a stan-
dardized method for fuzzy partition does not exist. Usually, expert ideas or trial-
and-error methods are applied to establish an initial partition space. Then some
algorithms are used for tuning the fuzzy subsets [5–11].
Let X be the finite crisp universe to be partitioned into subclasses and A1, A2,
. . . , An are the normal fuzzy subsets that represent these subclasses. For the fuzzy
subsets and A1, A2, . . . , An to be finite fuzzy partition sets of the universe X, the
following condition should be satisfied for all x[X
X
n
Ai ðxÞ ¼ 1 (2.61)
i¼1
60 Fuzzy logic control in energy systems, 2nd edition

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.

2.6.2 Fuzzy partition examples in energy systems


Some universes and partitions are given in this section in order to start thinking
fuzzy logic with the energy systems problems. Examples given in this section will
guide the readers on how to formulate the basic problems in power and energy
systems by using fuzzy sets and fuzzy logic. Problem formulation by fuzzy sets at
this stage will be the basis for more generalized and hard project topics in the latter
chapters.

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:

Figure E2.13(b) A partition of the universe of temperature into 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(b) A partition of the universe of voltage 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

The increment or decrement in the number of capacitors is determined by the


operator’s switching. Assuming that a capacitor group is added to the network
when the switch is turned on and a capacitor group is disconnected when the
switch is turned off. Therefore, +1 can be used to represent the increment while
1 can be used to represent the decrement. As a result, zero,0, will be used for
no change. These comments lead us to define a universe of discourse for
capacitor change in the interval of {1, 1} as given in Figure E2.15(c).
(b) Let us use triangular membership functions to represent fuzzy verbal terms
high, normal, and low in the universe of PF assuming a PF of 0.95 is normal.
As depicted in Figure E2.15(a), the universe of PF is not partitioned evenly
among the fuzzy subsets. Since the normal value of PF is assumed to be 0.95,
which is closer to the upper boundary of 1.0, fuzzy subset density is more than
it is in the lower boundary.
(c) Let us place the nominal voltage 1.0 pu, which corresponds to the verbal term
normal, at the center of the universe. Then low representing the bus voltages
below the normal value will be placed to left and high representing the bus
voltages above the normal value to the right as shown in Figure E2.15(b).
(d) The universe of discourse for the capacitor change is defined as the interval
{1, 1}. Since the steps of changes in capacitor values are either positive for
increment, negative for decrement, or zero for no change, the universe can be
partitioned into three subsets called increase, decrease, and no change as
shown in Figure E2.15(c).

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

interpretation of PF = 0.88 with the fuzzy subsets. Using MATLAB function


triangle01m (xL, xP, xR, PF) with the parameters of the fuzzy sets Low and
Good, the membership values of PF = 0.88 are obtained as
mLow ðPFÞ ¼ 0:2
mGood ðPFÞ ¼ 0:8

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)

Table E2.17 Voltage distortion limits [20]

Bus voltage at PCC Individual Total harmonic


harmonic (%) distortion (THD) (%)
V  1.0 kV 5.0 8.0
1 kV < V  69 kV 3.0 5.0
69 kV < V  161 kV 1.5 2.5
161 kV < V 1.0 1.5
68 Fuzzy logic control in energy systems, 2nd edition

MV (k) = triangle01m (0, 1, 69, v)


HV (k) = triangle01m (1, 69, 161, v)
EHV (k) = triangle01m (69, 161, 161
where triangle01m.m is a MATLAB function used for the examples in this
book. LV, MV, HV, and EHV are described in question.
Since the parameters of the fuzzy subset low voltage (LV) are much smaller
than the parameters of MV, HV, and EHV, the plot of LV is not visible in
Figure E2.17(a1). A zoom-in to the voltage range 0–1 kV shows the partition
area of LV and MV as given in Figure E2.17(a2).
(b) Partition of 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) are shown in Figure E2.17(b).
The parameters of triangular membership functions are selected as
ELH (k) = triangle01m (0, 0, 1, h)
LH (k) = triangle01m (0, 1, 1.5, h)
MH (k) = triangle01m (1, 1.5, 3, h)
HH (k) = triangle01m (1.5, 3, 5, h)
EHH (k) = triangle01m (3, 5, 5, h)

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

Figure E2.17(b) Partition of individual harmonics into fuzzy subsets

Figure E2.17(c) Partition of total harmonic distortion into fuzzy subsets

(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

polarity quickly. It is described by its spectral content or predominant frequency,


magnitude, and duration.
The oscillatory transients are categorized into three subclasses as low-, medium-,
and high-frequency oscillations [21]. These frequency ranges correspond to common
types of power system oscillatory transient phenomena in terms of frequency, dura-
tion, and voltage magnitude as depicted in Table E2.18.
(a) Partition the universe of frequency into fuzzy subsets representing low, medium,
and high frequencies.
(b) Partition the universe of duration into fuzzy subsets representing short, medium,
and long durations.
(c) Partition the universe of voltage magnitude into fuzzy subsets representing low
and high magnitudes in pu.

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.

Table E2.18 Oscillatory voltage classification [21]

Frequency Typical Typical Typical


categories spectral duration voltage
content magnitude
Low <5 kHz 0.3–50 ms 0–4 pu
Medium 5–500 kHz 20 ms 0–8 pu
High 0.5–5 MHz 5 ms 0–4 pu

Figure E2.18(a) Frequency categorization for oscillatory transients in power


systems
Fuzzy sets and fuzzy partitioning 71

Figure E2.18(b) Subcategories of oscillatory transient durations in power


systems

Figure E2.18(c) Subcategories of oscillatory voltage magnitude in power systems

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

Figure E2.19 Active power transmission between two buses

1
Membership degrees

0.8
0.6
0.4
0.2
0
0 45 90 135 180
Power angle (Deg)

Figure E2.19(a) Fuzzy subcategories of power angle d


Fuzzy sets and fuzzy partitioning 73

Membership degrees
0.8
0.6
0.4
0.2
0
0 0.5 1 1.5 2
Power (pu)

Figure E2.19(b) Fuzzy subcategories of electrical power Pe

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

Figure E2.20 The .m file for PV characteristics

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)

Figure E2.20(a) I–V and P–V characteristics of a PV array.

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

Figure E2.20(b) Fuzzy partition of PVA voltage

Figure E2.20(c) Fuzzy partition of PVA current

Figure E2.20(d) Fuzzy partition of PVA power

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

0 0:5 1 0:5 0 0 0:5 1 0:5 0


A¼ þ þ þ þ B¼ þ þ þ þ
0 1 2 3 4 2 3 4 5 6

0 0:5 1 0:5 0 0 0:5 1 0:5 0


C¼ þ þ þ þ C¼ þ þ þ þ
6 7 8 9 10 11 12 13 14 15

(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

0:0 0:5 1:0 0:5 0:0


B ¼ Positive small ¼ þ þ þ þ
0 1 2 3 4

0:0 0:5 1:0 0:5 0:0


B ¼ Positive medium ¼ þ þ þ þ
2 3 4 5 6

(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

(a) Plot these three fuzzy subsets in the same graph.


(b) Show a-cuts on the figure you obtained in (a) for a = 0 and a = 0.5.
(c) Perform the following operations on the given fuzzy subsets.
(i) (A \ B) or (B [ C)
(ii) (A [ B) or (B \ C)
P2.11 A fuzzy subset A is given in Figure P2.11. Find the core set, crossover
points, boundaries, support, height, and a-cuts for a = 0.2, 0.6, and 0.8.
Comment on the normality and convexity of the fuzzy subsets A.
P2.12 Fuzzy subsets cold, warm, and hot are defined in the universe of temperature
T = {0, 40} in  C. Triangular fuzzy membership functions defined in (2.4) in
terms of the parameters x1, x2, and x3 are to be used to represent these fuzzy
subsets cold, warm, and hot.
(a) Show the fuzzy subsets cold, warm, and hot in the universe of tem-
perature such that the parameters cold2, warm2, and hot2 corresponding
to the maximum membership values of each subset are evenly placed in
the universe.
(b) Obtain the membership values of temperatures T1 = 5 C and T2 = 25 C
in the fuzzy subsets cold, warm, and hot.
(c) Write a MATLAB .m file code to solve parts (a) and (b).
P2.13 Fuzzy subsets A and B are defined in the universe of X = {5, 5} and given
as
0 0:5 1 0:5 0 0 0:5 1 0:5 0
A¼ þ þ þ þ ;B ¼ þ þ þ þ
2 1 0 1 2 0 1 2 3 4
(a) Find C = A or B.
(b) Find D = A and B.
(c) Find the cardinality of E ¼ A [ B and F ¼ A \ B:
(d) Find the cardinality of G ¼ A \ B and H ¼ A [ B:

Figure P2.11 Fuzzy membership function A for Problem P2.11


Fuzzy sets and fuzzy partitioning 79

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,

Table P2.15(a) Decision table for Problem P2.15

Line voltage

Power factor LV NV HV
HPF NCC DC DC
NPF IC NCC DC
LPF IC IC NCC

Table P2.15(b) Crisp data for Problem P2.15

Input space Low (L) Normal (N) High (H)


Power factor (PF) 0.80 0.95 1.0
Live voltage (V) 10% 0.0 10%

Table P2.15(c) Crisp data for the output space in Problem P2.15

Output space Decrease (DC) No change (NCC) Increase (IC)


Capacitor change (C) 1.0 0.0 1.0
80 Fuzzy logic control in energy systems, 2nd edition

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

normal, high, decrease, no change, and increase as fuzzy subsets in their


crisp universes using the crisp values given in Tables P2.15(b) and P2.15(c).
P2.16 The values of PF described in Problem P2.15 are separated into sub-
categories in the universe of [0, 1] as given in Table P2.16.
(a) Represent these categories as fuzzy subsets and show them in a figure.
(b) Develop a MATLAB and a Simulink model to represent the fuzzy
subsets in part (a) by triangular-type membership functions.
(c) Repeat part (b) for Gaussian, sinusoid, bell, and trapezoidal membership
functions.
(d) If the PF is measured as cosf = 0.85, what would be the membership
degrees of PF in the fuzzy subsets developed in parts (b) and (c)?
P2.17 In order to supply electricity to a region with urban and rural areas, three
types of electrical power stations are constructed. These power stations are
categorized as large, medium, and small size power generating stations.
Power stations generating up to 5 MW are called small, up to 50 MW are
called medium, and up to 100 MW and over are called large power stations.
Represent these power stations in the universe of power in MW using
triangular, trapezoid, bell, Gaussian, sinusoid, and sigmoid membership
functions.
P2.18 The management of the power stations described in P2.17 is done according to
dissipated power by the loads. Such that the large size power stations are always
in service supplying a certain amount of power to the utility. Medium- and
small-size power stations are not operated every time. Depending on power
demand, medium- and small-size power stations are connected or disconnected
from the utility so that generation-dissipation is kept in balance.
During this process, the power generation is increased or decreased by
steps. In an intelligent power management system, the step size of power
increment or decrement is determined according to power demand in terms
of verbal fuzzy variables no change (NC), low Change (LC), medium
change (MC), and high change (HC).
Create a partitioned universe of power change considering increments and
decrements with the step sizes mentioned above in order to maintain
generation-dissipation equality. Triangular fuzzy membership functions can
be used to represent the fuzzy variables.
P2.19 In electrical utility systems, the loads are classified according to their
importance for energy management. Such that the most important loads such
as the ones related to health are always operated with priority. Some loads
Fuzzy sets and fuzzy partitioning 81

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

to observe the operating conditions and changes. As a result of thermal data


analysis, required precautions are taken on time.
A thermal photograph of a faulted point in transformer windings is given
in Figure P2.20. In this figure, the color changes from white on the sides to
red in the center. It means that the temperature is higher in the center.
Assume that the highest density of red in the center represents an unexpected
condition such as a faulted case. The white color on the other sides of the
image represents lower temperatures that may be considered as cool and
healthy conditions.
(a) Use the color spectrum from white to red and create subcategories that
represent no load (NoL), light load (LL), nominal load (NomL), heavy
load (HL), extra heavy load (EHL), and faulted (F) conditions.
Triangular fuzzy membership functions can be used to represent the
subcategories.
(b) Define the universe of discourse. What it should be?
P2.22 A crisp color spectrum is shown in Figure P2.21. Each color represents an
operating condition as no load (NoL), light load (LL), nominal load (NomL),
heavy load (HL), extra heavy load (EHL), and faulted (F) condition.
Convert the crisp color spectrum given in Figure P2.21 into a fuzzy color
spectrum representing the fuzzy operating conditions.

Figure P2.20 An image of a faulted point in transformer windings

Figure P2.21 Crisp color spectrum representing crisp operating conditions


Fuzzy sets and fuzzy partitioning 83

Figure P2.22(a) Color spectrum representing fuzzy loading conditions

Figure P2.22(b) Thermal pictures of a power transmission line under different


loadings

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

[1] Zadeh L.A. ‘Fuzzy sets’. Information and Control. 1965;8(3):338–353.


[2] 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.
[3] Klir G. and Folger T. Fuzzy Sets, Uncertainty, and Information. Englewood
Cliffs, NJ: Prentice-Hall; 1988.
[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] Tang K.S., Man K.F., Liu Z.F. and Kwong S. ‘Minimal fuzzy memberships
and rules using hierarchical genetic algorithms’. IEEE Transactions on
Industrial Electronics. 1998;45(1):162–169.
84 Fuzzy logic control in energy systems, 2nd edition

[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

General information on fuzzy relation and the compositional rule of inference


have been given in this chapter. Then, approximate reasoning, fuzzy rea-
soning, and fuzzy decision-making processes are given. Single input, multi-
ple input, and multiple rule base systems are studied and examples are given.
The concept of fuzzy reasoning and fuzzy decision makers is studied and
user-defined MATLAB files are used to support the operational behaviors
of fuzzy decision-making. Well-known fuzzy reasoning algorithms such as
Mamdani fuzzy reasoning, Sugeno fuzzy reasoning, and Tsukamoto fuzzy
reasoning have also been studied here.

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

3.2 Fuzzy relation


Let A1, A2, . . . , An be fuzzy sets defined in the universes Y1, Y2 . . . , Yn. The relation
of these sets is defined by their cartesian product R as

R ¼ A1  A2  A3      An (3.1)

This cartesian product is a subset of the cartesian product Y1  Y2      Yn.


The relation R is represented by the membership values of fuzzy sets A1, A2, . . . , An,
and defined as in (3.2).
ð
mA1 ðy1 Þ \ mA2 ðy2 Þ \    mAn ðyn Þ
R ¼ A1  A2      An ¼
Y1 Y2 Yn y1 ; y2 ; . . .; yn
(3.2)

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}.

0 0:2 0:4 0:6 0:8 1


HA ¼ þ þ þ þ þ
50 55 60 65 70 75
0 0:2 0:4 0:6 0:8 1
HJ ¼ þ þ þ þ þ
75 80 85 90 95 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.

High (HA) High (Hj)

Ambient temperature (◦C) Ambient temperature (◦C)


(i) (ii)

Figure E3.1(a) High fuzzy subsets of ambient and junction temperatures.


(i) Ambient temperature and (ii) junction temperature.

(b) The cartesian product R = HA  HJ is obtained as a relation between high ambient


and high junction temperatures in monocrystalline Si PV solar cells as follows.
ð
minðmHA ðT Þ; mHJ ðT ÞÞ X 6
mTA ðTm Þ \ mTJ ðTn Þ
R ¼ HA  HJ ¼ ¼ ; n ¼ 1:
T T T; T m¼1
ðxm ; xn Þ

Or the cartesian product R = HA  HJ can be written as

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).

Table E3.1(a) Membership matrix of the relation in Example 3.1

0 0:2 0:4 0:6 0:8 1


75 80 85 90 95 100

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

Table E3.1(b) Membership values of the relation matrix in Example 3.1

0 0:2 0:4 0:6 0:8 1


75 80 85 90 95 100

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

(e) A three-dimensional surface plot of the fuzzy relation R is shown in


Figure E3.1(c). The surface in Figure E3.1(c) represents the relation between
high ambient temperature and high junction temperature.

Example 3.1 shows that the Cartesian product HA  HJ is a subset of the


ordered pairs (TA  TJ). The membership values of the elements of the relation R in
the cartesian product TA  TJ are determined by the membership values of the
fuzzy subsets HA and HJ.

Figure E3.1(b) MATLAB .m file code for Example 3.1


92 Fuzzy logic control in energy systems, 2nd edition

HA × HJ

(◦C)
mperature
ent te
Ambi

Figure E3.1(c) The relation matrix R as a three-dimensional surface

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

Figure E3.2(a) Frequency categorization for oscillatory transients in power


systems

Figure E3.2(b) Subcategories of oscillatory transient durations in power systems

Figure E3.2(c) Subcategories of oscillatory voltage magnitude in power systems

(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

Table E3.2(b) Membership values of the relation matrix in Example 3.2(b)

Medium oscillation duration (ms)

0 50 100 150 200 250 300


0 0 0 0 0 0 0 0
1 0 0.25 0.25 0.25 0.25 0.20 0
High voltage (pu) 2 0 0.50 0.50 0.50 0.40 0.20 0
3 0 0.75 0.75 0.60 0.40 0.20 0
4 0 1.00 0.80 0.60 0.40 0.20 0

Du
ra
tio
n(
m
s)

Figure E3.2(g) The relation between low voltage magnitude and short duration

at high frequencies can be expressed as


R3 ¼ LV  SD
ð
minðmLV ; mSD Þ
mR3 ðV ; DÞ ¼
V D LV; SD
where LV and SD stand for low voltage and short duration, respectively. V
represents the universe of voltage and D represents the universe of duration.
LV and SD are fuzzy subsets defined in the universes of V and D, respectively.
The surface plot of the relation R3 ¼ LV  SD can be obtained by using a
MATLAB code similar to the one given in Figure E3.2(e). The line starting
with the line starting with LD(k) is replaced by
SDðk Þ ¼ triangle01mð0; 5; 50; xÞ;
The resultant surface plot of the relation R3 ¼ LV  SD is shown in
Figure E3.2(g) and the relation matrix is obtained in Table E3.2(c).
Fuzzy decision-making 97

Table E3.2(c) Membership values of the relation matrix in Example 3.2(c)

Short oscillation duration (ms)

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

3.3 Operation with fuzzy relations

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)

3.3.1 Intersection of two fuzzy relations


Let R1 and R2 be two fuzzy relations defined in universe X  Y. The intersection of
two fuzzy relations is also a fuzzy relation and is expressed as
R3 ¼ R1 \ R2 (3.4)
In terms of membership functions:
 
mR3 ðx; yÞ ¼ mR1 \R2 ðx; yÞ ¼ mR1 ðx; yÞ ^ mR2 ðx; yÞ ¼ min mR1 ðx; yÞ; mR2 ðx; yÞ
(3.5)
where the symbol ^ stands for intersection and x[X and y[Y.

3.3.2 Union of two fuzzy relations


The union of two fuzzy relations R1 and R2 is written as
R3 ¼ R1 [ R2 (3.6)
The union of two fuzzy relations can be obtained using membership
functions as
m R1 V R2 ðx; yÞ ¼ mR1 ðx; yÞ _ mR2 ðx; yÞ ¼ max½mR1 ðx; yÞ ; mR2 ðx; yÞ (3.7)

where the symbol _ is used for union operator.


98 Fuzzy logic control in energy systems, 2nd edition

3.3.3 Negation of a fuzzy relation


The negation or complement of a fuzzy relation is similar to not operator applied in
fuzzy sets. Therefore, it can be written as
mR ðx; yÞ ¼ 1  mR ðx; yÞ (3.8)
where mR(x, y) is a fuzzy relation defined on X  Y such that x[X and y[Y.
The fuzzy relation operator’s intersection, union, and negation are used as they
are used in fuzzy sets. However, fuzzy relations are more usable in the repre-
sentation of verbal expressions.

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 50 100 150 200 250 3003


0 0 0 0 0 0 0 0
166 0 0:25 0:25 0:25 0:25 0:20 0 7
7
6
R1 ¼ 2 6 0 0:50 0:50 0:50 0:40 0:20 0 7
7
3 4 0 0:75 0:75 0:60 0:40 0:20 0 5
4 0 1:0 0:80 0:60 0:40 0:20 0

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

(a) Obtain the intersection of the relations R1 and R2.


(b) Obtain the union of the relations R1 and R2.
(c) Obtain the negations of R1 and R2.

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

3.3.4 Inverse of a fuzzy relation


The inverse of a fuzzy relation is represented by R1 (x, y) or mR1 ðx; yÞ as a
membership function.

R1 ðx; yÞ ¼ mR1 ðx; yÞ (3.9)


100 Fuzzy logic control in energy systems, 2nd edition

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

3.3.5 Composition of fuzzy relations


Let A(X, Y) be a crisp relation from X to Y defined in X  Y and B(Y, Z) another
crisp relation from Y to Z defined in Y  Z. Both of these relations use the universe
Y as a common universe to transfer the relations A and B onto X  Z. The process of
obtaining a third relation from two existing ones sharing a common universe is
called composition and is defined by
CðX ; ZÞ ¼ AðX ; Y Þ  BðY ; ZÞ (3.12)
where C is a crisp relation from X to Z. Note that the composition operator gen-
erates a third relation from two existing relations, which have a common universe.
That means that a common universe must exist for the composition.
The composition operator for binary relations has the following properties:
A  B 6¼ B  A (3.13)
1
ðA  B Þ ¼ B1  A  ðB  C Þ (3.14)
ðA  B Þ  C ¼ A  ðB  C Þ (3.15)
Recall that various forms of fuzzy intersection and union operators are driven
from generalized crisp intersection and union. Similarly, the fuzzy composition is
also defined by generalizing the crisp composition. As it is done for the fuzzy
Fuzzy decision-making 101

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)

Then let the fuzzy relation C be a composition of A and B as C = AB. The


membership matrix for C is then written as
 
MC ¼ cij (3.18)

The composition C = AB can also be written in terms of membership matrices


   
cij ¼ ½aik   bkj (3.19)

where

cij ¼ max minðaik ; bkj Þ (3.20)

The membership values of the composition matrix are calculated in a similar


way as in matrix multiplication. The only difference comes from multiplication and
summation, which are replaced by min and max operators, respectively. Due to
max and min operators, the composition is called max–min composition and is
defined as in (4.21).

mC ðx; zÞ ¼ mAB ðx; zÞ ¼ max½minðmA ðx; yÞ; mB ðy; zÞÞ (3.21)

Sometimes the min operator is replaced by arithmetic product and the com-
position is called max–product composition, which is defined as

CðX ; ZÞ ¼ AðX ; Y Þ BðY ; ZÞ (3.22)

mC ðx; zÞ ¼ mA  B ðx; zÞ ¼ max½mA ðx; yÞmB ðy; zÞ (3.23)

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

(a) Obtain the fuzzy relation C(X, Z) using max–min composition.


(b) Obtain the fuzzy relation C(X, Z) using max–product composition.

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

c22 ¼ max½minð0:3; 0:7Þ; minð0:5; 0:8Þ ¼ max½ð0:3Þ; ð0:5Þ ¼ 0:5

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

(b) The fuzzy relation C(X, Z) using max–product 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

c22 ¼ max½ð0:30:7Þ; ð0:50:8Þ ¼ max½ð0:21Þ; ð0:4Þ ¼ 0:4

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

A MATLAB code is given in Figure E3.5(a) for max–min and max–


product compositions.
Fuzzy decision-making 103

Figure E3.5 A MATLAB code for max–min and max–product compositions

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.

3.3.6 The compositional rule of inference


The fuzzy relation R is defined as a relation between two or more fuzzy sets as
ð
mA ðxÞ \ mB ðyÞ
R¼AB¼ (3.24)
X Y x; y
mR ðx; yÞ ¼ minðmA ðxÞ; mB ðyÞÞ (3.25)
Equations (3.24) and (3.25) show that the relation R is obtained by using the
known fuzzy sets A and B. Now, let us assume that the membership matrix mR(x, y)
of relation R and the membership function of one of the fuzzy sets, for example, mA
(x) of A, used to generate it are known. Then the question is how the membership
Fuzzy decision-making 105

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

Figure E3.7 MATLAB code for the compositional rule of inference

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

3.4 The extension principle


Fuzzy membership functions are usually considered and analyzed as one-
dimensional, in other words, as single input sets. However, in some cases, fuzzy
membership functions with two input spaces are required to define the problems.
Membership functions having two inputs each coming from different universes can
only be represented by a two-dimensional membership function, which is defined
Fuzzy decision-making 107

in both universes such as the membership function of a fuzzy relation. A one-


dimensional fuzzy membership function can be extended to a two-dimensional
membership function using the cylindrical extension principle. On the other hand, a
two-dimensional fuzzy membership function can be separated into two one-
dimensional membership functions by an operator called projection. In some
applications, one-dimensional fuzzy membership functions are mapped onto
another space rather than the one that is defined. The mapping of a fuzzy mem-
bership function from one universe to another is done through a math function,
which is used for the fuzzification of crisp numbers, too.
Let a fuzzy set A be defined in a universe of X. The cylindrical extension of this
fuzzy set A in two-dimensional universe X  Y is obtained as
ð
SAðAÞ ¼ mA ðxÞ=ðx; yÞ (3.30)
X Y

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

Projection gives the reflection of a two-dimensional fuzzy set on both uni-


verses. Equation (3.31) gives the projection of R(X, Y) on the universe of X while
(3.32) gives it on the universe of Y. The projection reduces the dimension of the
membership function. If a two-dimensional fuzzy set or relation can be analytically
separated into two one-dimensional fuzzy sets, then it is called composite otherwise
noncomposite. If a composite two-dimensional fuzzy set is compared with the
projection sets, it can be seen that the projection is a result of the two-dimensional
fuzzy set being composite. The fuzzy set operator intersection (AND) and union
(OR) can also be used to combine the sets from different universes into one two-
dimensional common universe as a two-dimensional set.

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 (%)

Figure E3.8(b) Partition of total harmonic distortion into fuzzy subsets

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)

Figure E3.8(c) Fuzzy subset representing fuzzy high voltage (HV)


Membership degrees

THD (%)

Figure E3.8(d) Fuzzy subset representing fuzzy medium harmonic (MH)

Figure E3.8(e) Fuzzy relation representing HV  MH

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

Figure E3.9 Fuzzy relation representing HV  MH

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)

Figure E3.9(a) Projection of a two-dimensional fuzzy membership function mR(V, H)


on the universe of V as a fuzzy set HV. (a) Fuzzy set HV in the
universe V and (b) projection of mR(V, H) onto the universe of V.
Fuzzy decision-making 111

Membership degrees
Membership degrees

Vol
tag
e (k
V) (%)
THD (%) THD

(a) (b)

Figure E3.9(b) Projection of a two-dimensional fuzzy membership function


mR(V, H) on the universe of H as a fuzzy set MH. (a) Fuzzy set MH in
the universe H and (b) projection of mR(V, H) on the universe of H.

statements to obtain the two-dimensional representation of the verbal definitions in


graphical formats. The projection process can be applied as well. In Example 3.9, a
two-dimensional fuzzy membership function mR(V, H) is separated into two indi-
vidual fuzzy subsets. Therefore, it is composite.

3.5 Fuzzy mapping


Since Zadeh introduced the concept in 1975 [6–8], the extension principle has
become one of the important tools in fuzzy set theory. The extension principle
enables the crisp math functions to be carried into a fuzzy environment. Therefore,
it is used extensively in fuzzy set theory, especially in engineering for problem
definition and solution. A fuzzy subset A defined in the universe of X can be
mapped onto the universe of Y as another fuzzy subset B through a math function f
() using the extension principle.
Let A be a fuzzy subset defined in X = {x1, x2, . . . , xn} and f (x) be the math
function to be used in mapping the set A onto universe Y = {y1, y2, . . . , yn} as fuzzy
subset B. The fuzzy subset A is defined as in (3.33)
mA ðx1 Þ mA ðx2 Þ m ðxn Þ
A¼ þ þ  þ A (3.33)
x1 x2 xn
The mapping of fuzzy set A as a fuzzy set B in the universe of Y is obtained as
mB ðy1 Þ mB ðy2 Þ m ðyn Þ
B ¼ f ðAÞ ¼ þ þ  þ B (3.34)
y1 y2 yn
where the elements yi[Y for i = 1, 2, . . . , n, are obtained as a function of xi[X for i =
1, 2, . . . , n as depicted in (3.35).
yi ¼ f ðxi Þ (3.35)
112 Fuzzy logic control in energy systems, 2nd edition

Figure 3.1 One-to-one mapping

The elements xi of the universe of X are mapped onto the universe of Y


as yi over a math function f(). According to (3.35), each element xi may
result in an element of yi. This is called one-to-one mapping. Equations (3.34)
and (3.35) show that the membership values mB(yi) of fuzzy set B defined
in the universe of Y are determined by the membership values mA(xi) of fuzzy
set A defined in the universe of X. In one-to-one mapping, there is only one xi
for one yi, and one membership value of mB(yi) is obtained from just one
membership value of mA(xi). One-to-one mapping algorithm is shown in
Figure 3.1.
Depending on the function used in mapping, two or more elements x1, x2, . . . ,
xn[X may result in the same point yi [Y, then this is called many-to-one mapping
and defined as

yi ¼ f ðxm Þ ¼ f ðxn Þ; where m 6¼ n (3.36)

In many-to-one mapping, there are two or more xi, where i = 1, 2, . . . , n,


resulting in just one yi, whose membership value, mB(yi), is obtained as the
maximum of the membership values of mA(xi), where i = 1, 2, . . . , n, as given in
(3.37).

mB ðyÞ ¼ max mA ðxi Þ (3.37)


i¼1;n

Many-to-one mapping algorithm is shown in Figure 3.2 where many ele-


ments x in the universe of X yield the same y in the universe of Y. Since there are
many membership values for many values of x, the membership value of y must
be selected among the membership values of x. According to the definition of the
extension principle, the max operator is used for the final decision as depicted in
Figure 3.2.
Fuzzy decision-making 113

Figure 3.2 Many-to-one mapping

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)

Figure E3.10 Fuzzy partition of a 12 V variable DC voltage source


114 Fuzzy logic control in energy systems, 2nd edition

Table E3.10 Example for one-to-one mapping

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

Figure E3.10(a) Graphical representation of one-to-one mapping

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(δ)

Figure E3.11 Graphical representation of many-to-one mapping

Table E3.11 Example for many-to-one mapping

mHD ðd i Þ mðP ei Þ mðP ei Þ


di[Deg di Pei ¼ Pm sin d i Pei di di

45 0.0 1.4 1.4 0.0 _ 0.0 0.0


75 0.86 1.9 1.9 0.86 _ 0. 86 0.86
90 1.0 2.0 2.0 1.0 1.0
105 0. 86 1.9
135 0.0 1.4

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

Figure E3.12 Graphical representation of many-to-one mapping

Table E3.12 Example for many-to-one mapping

mOV ðvi Þ mðP i Þ mðPi Þ


vi[V vi Pi ¼ V C I C Pi vi pi

0.6 0.0 0.71 0.71 0.0 0.0


0.68 0.2 0.80 0.80 0.2 _ 0. 0 0.2
0.88 0.7 0.96 0.96 0.7 _ 0.5 0.7
1.0 1.0 1.0 1.0 1.0 1.0
1.1 0.5 0.96
1.2 0.0 0.80

Answer 3.12
The P–V curve and redefined fuzzy subset OV from Example 2.20 are replotted and
shown in Figure E3.12.

3.6 Fuzzy implications

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

if A then B else C ¼ A  B þ A  C (3.40)


where the signs + and  represent union (max) and intersection (min) operators,
respectively. The propositions given in (3.38) and (3.39) are also considered as
Fuzzy decision-making 117

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

Universe of power (MW)

Figure E3.13(a) Fuzzy partition of power stations


Fuzzy decision-making 119

Membership values

Change in power (MW)

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

Table E3.13 The relations in Example 3.13

The implication Resultant rule


If NM then NM : R1 = NM
If NL then NL : R2 = NL
If ZE then ZE : R3 = ZE
If PL then PL : R4 = PL
If PM then PM : R5 = PM
Membership values

Change in demand and power (MW)

Figure E3.13(c) The membership functions of the resultant fuzzy relations

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

This expression can be written in Cartesian product format as

Good  High þ Good  Low


There are two fuzzy relations here. They are connected to each other with else,
which has similar meaning as or, i.e., max operator. Therefore, (3.46) can be
applied.
R ¼ R1 þ R2
mR ðs; pÞ ¼ max½mR1 ðs; pÞ; mR2 ðs; pÞ
  
mR ðs; pÞ ¼ max minðmG ðsÞ; mH ðpÞÞ; min mG ðsÞ; mL ðpÞ
The relation R1 and R2, then R are obtained using the given fuzzy subsets and
shown in Figures E3.14(c), E3.14(d), and E3.14(e).
The surface plot shown in Figure E3.14(e) represents the verbal expression “If
Good then High else Low.” There are two implications in this sentence. These

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)

Figure E3.14(a and b) The membership functions for Example 3.14

Sol
ar i
rrad
iati
on
(mW r (pu)
/cm 2 Powe
)

Figure E3.14(c) The relation surface of good  high


122 Fuzzy logic control in energy systems, 2nd edition

Sol
ar i
rrad
iati
on
(mW
/cm

(pu)
Power
2)

Figure E3.14(d) The relation surface of not good  high

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

implications are considered two separate relations and processed separately in


Figures E3.14(c) and E3.14(d). The term “ . . . else low.” means that “if it is not good
then low.” Therefore, the relation “not good then low” is obtained and shown in
Figure E3.14(d). Figure E3.14(e) shows the combination of the rules as max(mR1, mR2).

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

3.7 Approximate reasoning


The theory of approximate reasoning was introduced by Zadeh in 1979 [10] as one of
the application areas of fuzzy implication to reach a decision from fuzzy data and
information. Contrary to the crisp set implication and reasoning, it is possible to reach
a decision about the events with incomplete data in fuzzy reasoning. Actually, Zadeh
suggested the use of fuzzy sets and fuzzy logic in the decision process in 1973 [7]
after the appearance of the concept “fuzzy sets” in literature [11].
In order to see the difference between the crisp and fuzzy reasonings, let us
take two crisp numbers x[X and y[Y. Assume that the relation between the numbers
x and y is given by
yðxÞ ¼ 1  ex (3.49)
It is clear that there is an answer y for every input value of x as depicted in
Figure 3.3. The crisp reasoning given by (3.49) and shown in Figure 3.3 has mainly
three parts, which are input, calculation formula, and result. In a decision process,
the formulation part is called premise, which gives a result based on the facts.
Therefore, the input is called as fact and the output or the result is called as con-
sequence. The crisp reasoning algorithm, which is called the inference system is
summarized in (3.50).
Premise : y ¼ f ðxÞ
Fact : x ¼ x1 (3.50)
Consequence : y ¼ y1
The reasoning algorithm given in (3.50) depends on the function in (3.49) used
as the premise. For point-to-point reasoning, the implications in (3.51) can be
written. The math functions used as premise may not yield a point-to-point rea-
soning algorithm every time. For example, there may not be an output y for every
input x as in V–I characteristics of diodes or photovoltaic cells in electronics. The
forward bias current of an ideal diode can be approximated as in (3.52) which
yields an I–V characteristic similar to the one shown in Figure 3.4.

Figure 3.3 A single input–single output crisp reasoning


124 Fuzzy logic control in energy systems, 2nd edition

Figure 3.4 I–V characteristics of a diode as a single input–single output system

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

Membership degrees Solar irradiation (mW/cm2)

Figure E3.15 Crisp set good

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:

3.8 Inference rules of approximate reasoning


The aggregation operators such as intersection, union, and complement discussed
in previous chapters, are used with implications, which are called rules in reason-
ing, to widen the range of approximate reasoning. Zadeh has introduced the concept
of approximate reasoning [10] with inference rules that enable the use of verbal
expressions together with the implications. Zadeh’s inference rules of approximate
reasoning can be used to generate different and meaningful inference engines for
specific applications. Some of these inference rules can be written as entailment
rule, conjunction rule, disjunction rule, negation rule, projection rule, generalized
modus ponens (GMP) rule, and compositional rule. Among these inference rules,
GMP rule and compositional rule are going to be used and expanded for decision-
making and control applications. Therefore, only these two inference rules have
been explained in this book.

3.8.1 Generalized modus ponens rule of inference


GMP is the basis of fuzzy inference system. That is why it is one of the most
important inference rules of fuzzy implications. The inference algorithm of GMP is
given as in (3.55). According to the GMP, the conclusion depends on how the data
suits the knowledge. Therefore, the existence of the conclusion is determined by
126 Fuzzy logic control in energy systems, 2nd edition

data. If data is true then there will be a conclusion.


Knowledge : If A then B
Data : A (3.55)
Conclusion : B

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:

3.8.2 Compositional rule of inference


The compositional rule of inference (CRI) was discussed in Section 3.3.6 in this
chapter. As stated in Section 3.3.6, this rule is used to extract the previously stored
data from the knowledge base. Since the relation R(X, Y) = A  B includes data
from the universe of X as the fuzzy subset A and from the universe of Y as the fuzzy
subset B, then a fuzzy subset B0 can be extracted from relation R as long as R and A
are known. Zadeh has suggested the compositional rule of inference for the fuzzy
implications to be used in approximate reasoning [10]. The fuzzy inference used in
fuzzy logic control systems is based on the compositional rule of inference, which
is written as in (3.56).
Knowledge : If x is A then y is B
Data : x is A0 (3.56)
Conclusion : y is B0
It is clear that the knowledge base here is a fuzzy implication as A!B.
Therefore, B can be obtained as a composition

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.

3.9 Fuzzy reasoning


The inference system used in fuzzy reasoning is similar to the one used for approx-
imate reasoning, but not exactly the same. Instead of fuzzy relation matrix, a rule base
is used as the knowledge base in fuzzy reasoning. Fuzzy inference system used for
fuzzy reasoning has fuzzy data as input layer, an if . . . then . . . rule processing layer,
and a fuzzy conclusion layer. Although these three layers are used in all fuzzy
reasoning-based applications, a consensus has not been reached about the name.
People are calling the fuzzy inference system with different names as listed below.
l Fuzzy inference systems [12,13]
l Fuzzy rule-based systems [14,15]
l Fuzzy expert systems [16,17]
l Fuzzy model [18,19]
l Fuzzy associative memory [20,21]
l Fuzzy logic controller [22,23]
The processes performed under these names are very similar and all of them use the
fuzzy rule-based reasoning algorithms. They have fuzzy input data, fuzzy rule
processing, and fuzzy reasoning. Since the inference system is a series of fuzzy
processes, it is called a fuzzy processor (FP) in this book. A fuzzy processor has
mainly three parts as shown in Figure 3.5.
In the fuzzy processor, the knowledge, information, or expert’s ideas are stored
in a rule-based system, which has a processing structure in the form of if . . .
then . . . else. The input data may be fuzzy or crisp. If data is uncertain or unclear,
then it can be used as fuzzy input data. The crisp data must be fuzzified first before
being used in the rule base. The rule processing unit yields an output for each rule.
Then these individual rule outputs are combined together in a reasoning unit to
yield a single fuzzy output. The reasoning unit uses fuzzy aggregation operators
such as union and intersection. After this interpretation of the fuzzy processor and

X is A1 Y is A1

X is A2 Y is A2

X is An Y is An

Figure 3.5 The fuzzy processor


128 Fuzzy logic control in energy systems, 2nd edition

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.

3.9.1 Inference engine with single input–single rule


The examples given earlier in this chapter for fuzzy implication and approximate
reasoning were all single input–single rule inference systems as given in (3.61).
If x is A then y is B (3.61)
Fuzzy decision-making 129

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

Figure E3.18 Single input–single rule inference engine


130 Fuzzy logic control in energy systems, 2nd edition

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Þ

3.9.2 Inference engine with multiple input–single rule


There may be more than one input space in many applications. If a rule has two or
more input spaces, then it is called a multiple input–single rule inference system. The
rule base is written by considering all inputs. Since there is one rule, then there will be
one single output. The output depends on all input data. In order to yield a conclusion,
at least one input should be included in the fuzzy subsets used in the rule base. If the
input fuzzy sets do not have any membership value in any subsets of the rule base, the
output is not generated. The degree of inclusion of the output fuzzy set as the final
decision is obtained from the membership values of the fuzzy sets used in input spaces.
Multiple input–single rule inference engine is expressed as in (3.62) and (3.63).
If x is A and y is B then z is C (3.62)
Rule base : If x is A and y is B then z is C
Data base : x is A1 and y is B1 (3.63)
Conclusion : z is C1
The fuzzy sets A and B in the input spaces X and Y are connected to one input
space using the and operator. Recall that the and operator is used for the inter-
section of the fuzzy subsets. Therefore, it has the same meaning here and is used as
an intersection. The rule could be written as if A or B then C instead of if A and B
then C. In this case, the and operator is replaced by or, which stands for the union
operator. The rule given in (3.45) can be written as
If A and B then C (3.64)
ðA \ B Þ ! C (3.65)
mC ðzÞ ¼ min½minðmA ðxÞ; mA1 ðxÞÞ; minðmB ðyÞ; mB1 ðyÞÞ (3.66)
Fuzzy decision-making 131

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.

If s is good (GI) and t is cold (CT) then p is high (HP)


where s[S and t[T. The fuzzy sets good (GI) and cold (CT) are defined in the
universes of S and T, respectively. Fuzzy set high (HP) is defined in the universe of
power (P) as shown in Figure E3.19(c).
μ(V)

Figure E3.19(a) Subcategories of solar irradiation

FT CT WT HT
1
μ(V)

–20 0 20 40 T

Figure E3.19(b) Subcategories of ambient temperature


132 Fuzzy logic control in energy systems, 2nd edition

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)

0 0.5 1.0 1.5 P (pu)

Figure E3.19(c) Subcategories of PV power

Figure E3.19(d) Double input–single rule inference engine


Fuzzy decision-making 133

The final membership value mHP2(p) = w2 of HP2 can be obtained using (3.66).

mHP2 ðpÞ ¼ min½w1 ; w2  ¼ 0:3

where

w1 ðsÞ ¼ minðmGI ðsÞ; mSI ðsÞÞ ¼ 0:5

w2 ðtÞ ¼ minðmCT ðtÞ; mWT ðtÞÞ ¼ 0:3

3.9.3 Inference engine with multiple input–multiple rule


Multiple input–multiple rule inference system is an expansion of multiple input–
single rule system. Besides the multiple inputs, this time there are multiple rules
and multiple outputs. Multiple inputs may be defined in the same or different
universes as multiple outputs may also be defined in the same or different uni-
verses. In a multiple rule inference system, there will be one output from each rule
yielding multiple outputs. All outputs from the rules may or may not be defined in
the same universe.
The number of outputs is determined by the inclusion of input data sets in the
fuzzy sets used in the fuzzy rules. In order to generate an output, at least one of
the input data sets should have nonzero membership degrees in one of the sets in
the rule. Otherwise, no output is generated. Therefore, it can easily be understood
that all of the rules in a multiple rule-based system may or may not be active. Some
rules may be active while some are not.
A multiple input–multiple rule inference system is expressed as in (3.68).

Rule Base : If x is A1 and y is B1 then z is C1


If x is A2 and y is B2 then z is C2
:::
::: (3.68)
If x is An and y is Bn then z is Cn
Data Base : x is A0 and y is B0
Conclusion : z is C 0

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).

Rule Base : If x is A1 and y is B1 then z is C1


else if x is A2 and y is B2 then z is C2
:::
:::
else if x is An1 and y is Bn1 then z is Cn1 (3.69)
else x is An and y is Bn then z is Cn
Data Base : x is A0 and y is B0
Conclusion : z is C 0

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.

C 0 ¼ ½ðA1 \ B1 Þ ! C1  [ ½ðA2 \ B2 Þ ! C2  [    [ ½ðAn \ Bn Þ ! Cn 


(3.70)

If the input data A0 and B0 are included, (3.70) becomes,


C 0 ¼ ½ðA1 \ A0 Þ \ ðB1 \ B0 Þ [    [ ½ðAn \ A0 Þ \ ðBn \ B0 Þ (3.71)
C 0 ¼ C1 0 [ C2 0 [ C3 0 [    [ Cn 0 (3.72)
where Ci’, i = 1, 2, . . . , n are the weighted outputs from each rule. The last equation
is nothing but a max–min composition and can be expressed as
mC0 ðzÞ ¼ max½minðwA1 ðxÞ; wB1 ðyÞÞ; . . .; minðwAn ðxÞ; wBn ðyÞÞ (3.73)
Equation (3.73) can be written in a shorter form as
wC10 ðzÞ ¼ minðwA1 ðxÞ; wB1 ðyÞÞ
wC20 ðzÞ ¼ minðwA2 ðxÞ; wB2 ðyÞÞ
(3.74)
:::
wCn0 ðzÞ ¼ minðwAn ðsÞ; wBn ðyÞÞ
where the weightings are obtained as
wA1 ðxÞ ¼ minðmA1 ðxÞ; mA0 ðxÞÞ; wB1 ðyÞ ¼ minðmB1 ðyÞ; mB0 ðyÞÞ
wA2 ðxÞ ¼ minðmA2 ðxÞ; mA0 ðxÞÞ; wB2 ðyÞ ¼ minðmB2 ðyÞ; mB0 ðyÞÞ
(3.75)
::::::
wAn ðxÞ ¼ minðmAn ðxÞ; mA0 ðxÞÞ; wBn ðyÞ ¼ minðmBn ðyÞ; mB0 ðyÞÞ

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

Figure E3.20 Graphical representation of multiple input–multiple rule inference


system
136 Fuzzy logic control in energy systems, 2nd edition

are determined by weightings wP1’ and wP2’ using (3.74) as below.


wP10 ðpÞ ¼ minðwS1 ðsÞ; wT 1 ðtÞÞ ¼ 0:3
wP20 ðpÞ ¼ minðwS2 ðsÞ; wT 2 ðtÞÞ ¼ 0:3
where
wS1 ðsÞ ¼ minðmGI ðsÞ; mSI ðsÞÞ ¼ 0:5 wT 1 ðtÞ ¼ minðmCT ðtÞ; mWT ðtÞÞ ¼ 0:3
wS2 ðsÞ ¼ minðmLI ðsÞ; mSI ðsÞÞ ¼ 0:5 wT 2 ðtÞ ¼ minðmHT ðtÞ; mWT ðtÞÞ ¼ 0:3
The final conclusion is then obtained as
mP0 ðpÞ ¼ max½minðwS1 ðsÞ; wT 1 ðtÞÞ; minðwS2 ðsÞ; wT 2 ðtÞÞ
mP0 ðpÞ ¼ max½minð0:5; 0:3Þ; minð0:5; 0:3Þ
mP0 ðpÞ ¼ max½0:3; 0:3
mP0 ðpÞ ¼ 0:3
Note that the calculations done here are done in terms of weightings. Actually,
the weighted outputs HP’ and LP’ are not just single membership values. They are
weighted fuzzy subsets and the final output is the union of HP’ and LP’ as shown in
Figure E3.20.
The fuzzy inference engine using the connector also is given by (3.76) for
multiple input–multiple rule systems.
Rule Base : If x is A1 and y is B1 then z is C1
also x is A2 and y is B2 then z is C2
:::
:::
also x is An1 and y is Bn1 then z is Cn1 (3.76)
also x is An and y is Bn then z is Cn
Data Base : x is A0 and y is B0
Conclusion : z is C 0
The inference engine of multiple input–multiple rule system with the also
connector given in (3.70) can be written as in (3.77) to (3.80), as well.
C 0 ¼ ½ðA1 \ B1 Þ ! C1  \ ½ðA2 \ B2 Þ ! C2  \    \ ½ðAn \ Bn Þ ! Cn 
(3.77)
If the input data A0 and B0 are included, (3.77) becomes,
C 0 ¼ ½ðA1 \ A0 Þ \ ðB1 \ B0 Þ \    \ ½ðAn \ A0 Þ \ ðBn \ B0 Þ (3.78)
The last equation is nothing but a min–min composition and can be expressed
as
mC0 ðzÞ ¼ min½minðwA1 ðxÞ; wB1 ðyÞÞ; . . .; minðwAn ðxÞ; wBn ðyÞÞ (3.79)
Fuzzy decision-making 137

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%.

Table P3.2 Descriptions of fuzzy membership functions for Practice 3.2

Water level in the tank Valve position Fuzzy membership function


EW: Empty FOV: Full open Right triangle
HW: Half full HOV: Half open Triangle
FW: Full FCV: Fully closed Right triangle

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

Traveling Accommodation Places


Dad Good Good Good
Mom Fair Fair Good
Child HE Fair Good Fair
Child CS Bad Good Bad

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

Figure E3.22(b) Mom’s satisfaction from the vacation

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(c) Dad’s satisfaction from the vacation

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%.

3.10 Human decision-making process

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.

Figure 3.6 Decision process of a human car driver


Fuzzy decision-making 143

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

Figure 3.7 Fuzzy subsets for the direction angle error

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

The rule base in (3.87) is a representation of the expertise and knowledge of


human driver. The driving ability of a driver has been stored as the fuzzy rules in
the rule base. Therefore, fuzzy decision-maker should have a reasoning algorithm
similar to that of a human decision-making process.
Let us consider Figure 3.10, which is a new version of Figure 3.6. Instead of
using left (LF) and right (RG) terms, negative () and positive (+) are used here.
The time response of deviation angle, which is equal to direction angle error, is also
depicted in Figure 3.10 in order to understand the movements of the vehicle to stay
in the correct direction. The time response of the deviation angle including the
states of the change deviation angle is given in Figure 3.11 with more details to
make it more understandable.
Now, let us think about what a driver does if deviation angle qe and its change
Dqe is negative, positive, or zero, and list the responses as given in Table 3.1.

Figure 3.10 Keeping a vehicle on correct route

Figure 3.11 Time response of deviation angle


Fuzzy decision-making 147

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

∆Te<0 ∆Te=0 ∆Te>0


Te<0 ∆TSW>o ∆TSW>o ∆TSW>o
Te=0 ∆TSW>o ∆TSW=o ∆TSW<o
Te>0 ∆TSW<o ∆TSW<o ∆TSW<o

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

Table 3.3 A 25-rule table to stare driver’s ability

NL∆Te NS∆Te ZE∆Te PS∆Te PL∆Te


NLTe PL∆TSW PL∆TSW PS∆TSW PS∆TSW ZE∆TSW
NSTe PL∆TSW PS∆TSW PS∆TSW ZE∆TSW NS∆TSW
ZETe PS∆TSW PS∆TSW ZE∆TSW NS∆TSW NS∆TSW
PSTe PS∆TSW ZE∆TSW NS∆TSW NS∆TSW NL∆TSW
PLTe ZE∆TSW NS∆TSW NS∆TSW NL∆TSW NL∆TSW

Table 3.3 is a symmetrical 25-rule table. The symmetrical structure will be


discussed in Chapter 4 after the Mamdani reasoning algorithm is explained.
Numerical examples will be given to see how the abilities of an expert are repre-
sented by the rule tables and how the decision process is utilized.

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

Obtain the fuzzy relations expressed as:


R3 = “The ages of Elif and Hilal are close to each other and away from each
other.”
R4 = “The ages of Elif and Hilal are either close to each other or away from
each other.”
P3.2 A two-dimensional fuzzy set representing “x is close to 6 and y is close to 4.”
is defined in the universe of R = X  Y, where the universes X and Y are given
as X = [0, 12] and Y = [0, 12]. Trapezoid membership functions are used to
represent the fuzzy sets.
(a) Plot the fuzzy set representing the expression “x is close to 6.”
(b) Plot the fuzzy set representing the expression “y is close to 4.”
(c) Obtain the relation R = X  Y in terms of fuzzy membership functions.
(d) Develop a MATLAB .m file code and plot this two-dimensional fuzzy set.
(e) Obtain the projections of R = X  Y in the universes X and Y separately.
Fuzzy decision-making 149

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

Table P3.9 Parameters of the fuzzy numbers A, B, and C

Fuzzy number Core set Support set


A 4 {3, 4, 5}
B 2 {1, 2, 3}
C 3 {2, 3, 4}

If the fuzzy number C is defined as C = f (A, B) = A/B, obtain its fuzzy


value and comment about the meaning of fuzzy C. Which crisp number is
represented by fuzzy C? Can fuzzy C be considered as a fuzzy number?
P3.8 A fuzzy set A is defined in the universe of X = {1, 2, 3, 4, 5} as follows. Map
the fuzzy set A onto universe of Y using the crisp function f(x) = 4x1.
0:0 0:5 1 0:5 0:0
A¼ þ þ þ þ
1 2 3 4 5
P3.9 Two fuzzy calculations are given as y1 ¼ A þ B and y2 ¼ A  C, where A, B,
and C are fuzzy numbers and defined in the universes of X, Y, and Z with the
parameters given below.
(a) Plot and show the fuzzy numbers A, B, and C in the same plot.
(b) Obtain y1 = f(A,B) and y2 = f(A,C) using the extension principle.

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

1.0 0.8 0.6 0.4 0.2 0.0


High school 0.0 0 0 0 0 0 0
student 0.5 0.5 0.5 0.5 0.4 0.2 0
1.0 1 0.8 0.6 0.4 0.2 0
0.5 0.5 0.5 0.5 0.4 0.2 0
0.0 0 0 0 0 0 0

R ¼ ðHigh School StudentÞ  ð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

Membership Universe of x1 as in (2.7) x2 as in (2.7) x3 as in (2.7)


function discourse
NE E 2 2 0
ZE E 2 0 5
PE E 0 5 5
NCE CE 0.2 0.2 0
ZCE CE 0.2 0 0.5
PCE CE 0 0.5 0.5
NCV CV 1 1 0
ZCV CV 1 0 1
PCV CV 0 1 1

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

[11] Zadeh L.A. ‘Fuzzy sets’. Information and Control. 1965;8(3):338–353.


[12] Jang J.S.R. ‘ANFIS: adaptive-network-based fuzzy inference system’, IEEE
Transactions on Systems, Man, and Cybernetics.1993;23(3):665–685.
[13] 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.
[14] Cordon O., Jesus M.J. and Herrera F. ‘A proposal on reasoning methods in
fuzzy rule-based classification systems’. International Journal of Approx-
imate Reasoning. 1999;20(1):21–45.
[15] Ishibuchi H. and Yamamoto T. ‘Rule weight specification in fuzzy rule-
based classification systems’. IEEE Transactions on Fuzzy Systems. 2015;13
(4):428–435.
[16] Kandel A. (ed.). Fuzzy Expert Systems. Boca Raton, FL: CRC Press; 1991.
[17] Siler W. and Buckley J.J. Fuzzy Expert Systems and Fuzzy Reasoning.
Hoboken, NJ: John Wiley & Sons; 2005.
[18] 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.
[19] Hellendoorn H. and Driankov D. (eds.). Fuzzy Model Identification: Selected
Approaches. London: Springer; 1997.
[20] Kosko B. ‘Fuzzy associative memory systems’ in Kandel A. (ed.). Fuzzy
Expert Systems. Boca Raton, FL: CRC Press; 1991. pp. 135–162.
[21] Chung F.L. and Lee T. ‘On fuzzy associative memory with multiple-rule
storage capacity’. IEEE Transactions on Fuzzy Systems. 1996;4(3): 375–384.
[22] Mamdani E.H. ‘Application of fuzzy algorithms for control of simple
dynamic plant’. IEE Proceedings. 1974;121(12):1585–1588.
[23] Lee C.C. ‘Fuzzy logic in control systems: fuzzy logic controller. I–II’. IEEE
Transactions on Systems, Man, and Cybernetics. 1990;20(2): 404–435.
This page intentionally left blank
Chapter 4
Fuzzy logic controller (FLC)

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.

4.2 Mamdani fuzzy reasoning

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

Figure 4.1 Mamdani fuzzy reasoning algorithm

hydraulic pressure system [2–4]. The inference mechanism used by Mamdani is


known as Mamdani fuzzy reasoning. This reasoning algorithm uses the max–min
process explained earlier as the compositional rule of inference. Mamdani reason-
ing algorithm is similar to the reasoning algorithms given in Section 3.9. However,
input data and output in the Mamdani algorithm are not fuzzy but crisp. Due to this
property, the Mamdani reasoning algorithm is very suitable to be used in fuzzy
control systems. In industrial control, the input and output data are usually mea-
surable and used in the process. The output is measured and feedback to input to
generate a new control signal by checking its value and whether an adjustment is
necessary. In addition to fuzzy reasoning algorithms given in Section 3.9, there are
two additional sections here. The crisp input variables are converted to fuzzy
variables before being used in fuzzy reasoning process and fuzzy output variable is
converted to crisp output variable to be used in real-time applications. Therefore,
besides the rule base, database, and conclusions given in fuzzy reasoning algo-
rithms in Chapter 3, two new sections called fuzzifier and defuzzifier are included in
the Mamdani reasoning algorithm as depicted in Figure 4.1.
The crisp inputs x[X and y [ Y in Mamdani fuzzy reasoning are mapped from
crisp input universes X and Y onto fuzzy input universe in terms of fuzzy mem-
bership values mi(x) and mj(y) where i and j are the number of fuzzy sets in which x
and y have non zero membership degrees. After the rule processing in the rule base,
the fuzzy outputs from each rule are obtained and combined in the reasoning stage
of output universe Z. The crisp output is then obtained by applying a process called
defuzzification, which is usually an averaging math function. Defuzzification will
be explained later in this chapter.

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

The crisp universes of solar irradiation, temperature, and maximum power


points are partitioned into subcategories as shown in Figures E4.1(a), E4.1(b),
and E4.1(c). The relation matrix PM is represented by nine rules, which are
written below and depicted in Table E4.1.

Figure E4.1(a) Subcategories of solar irradiation

Figure E4.1(b) Subcategories of ambient temperature

Figure E4.1(c) Subcategories of PV power


160 Fuzzy logic control in energy systems, 2nd edition

Table E4.1 The rule table for Example 4.1

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

ð0:04Þð0:5Þ þ ð0:7Þð0:5Þ þ ð0:04Þð1Þ þ ð0:7Þð1Þ 1:11


p¼ ¼ ¼ 0:75 pu:
0:04 þ 0:7 þ 0:04 þ 0:7 1:48
where the subscription Ri is the active rule number and mRi(p) is the weighting
factor obtained from the ith Rule. pRi is the crisp value as pRi[P and it is equal to the
core of the output fuzzy set for the ith Rule. P is the output universe and it is the
maximum power of a photovoltaic (PV) energy system (PVES) as described in
Example 4.1. The maximum power that the PVES can generate under the given
solar irradiation and temperature levels is 0.75 pu. Note that 1.0 pu is the highest
power that can be generated by this PVES.
It was stated earlier and shown in Figure 4.1 that Mamdani fuzzy reasoning
algorithm has four stages fuzzification, rule base, conclusion, and defuzzification
except inputs and outputs. These four stages are explained in detail next.

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)

Figure 4.2 Fuzzification


164 Fuzzy logic control in energy systems, 2nd edition

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.

4.2.2 Fuzz rule base


Fuzzy rule base is the brain of fuzzy reasoning algorithms. The rules represent the
operational behavior of a system, the decision process, and the thoughts of an
expert. Therefore, the construction of a rule base system is very important to get the
correct decision. The expert’s ideas, knowledge, intuitions, and tricks are included
in a decision process, therefore in the rule base. In technical problems, the rules are
usually developed based upon input–output characteristics of the systems.
Let us assume that the rules given in Table E4.1 represent an expert’s ideas
about the maximum power generated by a PVES at various temperature and solar
irradiation levels. Although there are nine rules in Table E4.1, only four of them are
active for the given input signals. Different rules will be activated for different
input signals. Due to the partitioning structure of the universes, maximum of four
rules can be activated at once.
The active rule base used in Example 4.1 consists of fuzzification and rea-
soning parts of Mamdani reasoning algorithm shown in Figure E4.1(d). These parts
of the referred figure are a representation of the active rules in (4.1) and are shown
in Figure 4.3.
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
(4.1)
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
After the fuzzification, a fuzzy membership value is obtained from each input
universe for each rule corresponding to the crisp input. The membership values
obtained from different input universes for each rule are used to obtain the
weighting factor of that rule as
wRi ðpÞ ¼ minðmAS ðsÞ; mBT ðtÞÞ (4.2)
where Ri stands for the ith rule, AS stands for the one of fuzzy subsets LS, MS, and
HS in the universe of solar irradiation for Example 4.1. BT stands for one of the
fuzzy subsets LT, WT, and HT defined in the universe of temperature. Therefore,
wRi(p) is the weighting factor to be used in the output space of the Rule i. Equation
(4.2) is used to obtain the weighting factors w4, w5, w7, and w8 for the rules R4, R5,
R7, and R8, respectively. The weighting factors are used to find the effectiveness of
the corresponding fuzzy subset in output space. The weighting factors give the
height of the shaded areas in the output space as shown in Figures 4.3 and 4.4. The
shaded areas from each rule are then combined as the final fuzzy conclusion, which
is discussed next.
s t

Figure 4.3 Fuzzy rule base


166 Fuzzy logic control in energy systems, 2nd edition

4.2.3 Fuzzy conclusion


The effectiveness of the fuzzy sets for each rule in output space is determined
by the weighting factors, which are membership values defined in the interval
[0, 1]. The weighting factors show how much of the output fuzzy subset is affective
for the related rule. The degree of the effectiveness of the output fuzzy subsets is
shown by shaded areas in Figure 4.4.
After the effect of each rule is determined by the weighting factor using (4.2),
the shaded areas are obtained using (4.3).
mRi ðpÞ ¼ min½wRi ; mCP ðpÞ (4.3)
where mRi(p) is the membership function representing the shaded area of the ith
rule. The final conclusion is the union of the result membership functions from all
active rules and written as
mRT ðpÞ ¼ [ mRi ðpÞ (4.4)
i¼1;N

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.

Figure 4.4 Fuzzy conclusion


Fuzzy logic controller (FLC) 167

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

Figure 4.5 Defuzzification methods


168 Fuzzy logic control in energy systems, 2nd edition

The upper maximum (UM) is used as another defuzzification method. It is equal to


the last element of the core set of the final fuzzy subset representing the final
conclusion as shown in Figure 4.5 and defined in (4.7).
 
zUM ðzÞ ¼ zi ; such that mðzi Þ > mðzj Þ for i 6¼ j and zi > zk for mðzi Þ ¼ mðzk Þ
(4.7)

The mean of maxima (MOM) is another defuzzification method. It is equal to the


mean of the fuzzy subset or a group of subsets that have maximum membership
values in the resulting final fuzzy subset representing the final conclusion as shown
in Figure 4.5 and defined in (4.8).
X
n
zi
zMOM ðzÞ ¼ (4.8)
i¼1
n

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

Figure 4.6 A Fuzyy output to be used to explain COA defuzzification method.

The defuzzification result of Figure 4.6 is written as


wRi  zi þ wRj  zj þ wRk  zk
zCOA ¼ (4.11)
wRi þ wRj þ wRk
The center of gravity (COG) and the center of areas are the same methods. They
use the same defuzzification formula given by (4.10). The names are different
because some researchers called the method as center of gravity [6,7] instead of
center of area.

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

Table E4.2(a) Parameters of the fuzzy membership functions for


Example 4.2

Membership Universe of x1 as in (2.7) x2 as in (2.7) x3 as in (2.7)


function discourse
A1 X 2 2 0
A2 X 2 0 2
A3 X 0 2 2
B1 Y 0.5 0.5 0
B2 Y 0.5 0 0.5
B3 Y 0 0.5 0.5
C1 Z 1 1 0
C2 Z 1 0 1
C3 Z 0 1 1
170 Fuzzy logic control in energy systems, 2nd edition

Table E4.2(b) The rule table for Example 4.2

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

Figure E4.2(a) MATLAB code for fuzzification

Figure E4.2(b) MATLAB code for weighting factors


Fuzzy logic controller (FLC) 171

shows which rules are active.

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

Figure E4.2(i) The MATLAB code for defuzzification in Example E4.2

direct solution by hand below.


w5  z5 þ w6  z6 þ w8  z8 þ w9  z9
zout ¼
w5 þ w6 þ w8 þ w9
ð0:25Þ  ð0Þ þ ð0:25Þ  ð1Þ þ ð0:6Þ  ð1Þ þ ð0:4Þ  ð0Þ
zout ¼
0:25 þ 0:25 þ 0:6 þ 0:4
0:25  0:6
zout ¼ ¼ 0:23
1:5
174 Fuzzy logic control in energy systems, 2nd edition

4.3 Takagi–Sugeno fuzzy reasoning


Fuzzy rules used in fuzzy controllers are usually defined by considering the
knowledge of human experts in specific areas. Takagi and Sugeno argue that an
operator cannot tell linguistically what kind of action he/she takes in a particular
situation [8] and they offer model-based control just in ordinary control theory.
Mowing from this point forward, they have developed Takagi–Sugeno (TS) fuzzy
model for system identification and modeling based on input–output data [8]. TS
fuzzy modeling can be used to represent complex nonlinear systems by fuzzy rules
that have linear crisp equations as the consequents [9]. This fuzzy approach is
widely used in system modeling and identifications [10–14]. The use of the TS
fuzzy modeling approach as a fuzzy reasoning method is explained in [15].
The general structure of the fuzzy rules in this method is written as in (4.12).
if x is A and y is B then z is f ðx; yÞ: (4.12)
where A and B are fuzzy subsets defined in the universes X and Y, respectively.
When compared with the rules in Mamdani fuzzy reasoning method, it is seen that
only the output space is different in (4.12). The output space in TS fuzzy reasoning
does not include fuzzy subsets. A crisp function f(x, y) is used to find a crisp output
for each rule. The crisp output function is usually defined in terms of crisp input
variables x and y, and written as
zi ¼ f ðx; yÞ (4.13)
where i is the active rule number. After calculating a crisp output zi for each active
rule, the final crisp output is obtained as a weighted sum of the crisp outputs as
X N
z¼ wRi  zi (4.14)
i¼1

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

Table E4.3(a) The rule table for Example 4.3

LT WT HT
LS P3 P3 P3
MS P2 P2 P2
HS P1 P1 P1
s

Figure E4.3(a) Takagi–Sugeno fuzzy reasoning algorithm


Fuzzy logic controller (FLC) 177

mðxÞ ¼ sinus01m ða; A; xÞ given in Figure E2.5(a) as follows:


mLT ð15Þ ¼ sinus01m ð20; p=2; 15Þ ¼ 0:38 (E4.3d)
mWT ð15Þ ¼ sinus01m ð20; 0; 15Þ ¼ 0:92 (E4.3e)
2
The given data s = 125 mW/cm has non-zero membership degrees in the fuzzy
subsets MS and HS in the universe of S and t = 15 C has non-zero membership degrees
in the fuzzy subsets LT and LW in the universe of T. Therefore, the active rules will be
related to the fuzzy subsets MS and HS in the universe of S and to the fuzzy subsets LT
and WT in the universe of T. The active rules are depicted in Table E4.3(b) by the
shaded area, which shows that the active rules are Rule 4, Rule 5, Rule 7, and Rule 8.
Rules 4 and 5 both trigger the crisp function P2 and rules 7 and 8 activate the crisp
function P1. The crisp function P3 is not activated for the given crisp inputs.
For given data s = 125 mW/cm2 and t = 15 C the crisp functions in the output
space are obtained directly by using the related formulas. Note that P3 is not acti-
vated because the rules using P3 are not active.

P1 ¼ 1  eð0:1Þð125Þ  eð0:1Þð15Þ ¼ 0:7769 pu


P2 ¼ 1  eð0:05Þð125Þ  eð0:06Þð15Þ ¼ 0:5915 pu (E4.3f)
P3 ¼ 1  eð0:02Þð125Þ  eð0:015Þð15Þ ¼ 0:1194 pu
Let us find the weighting factors for the active rules next.
wR4 ¼ minð0:75; 0:38Þ ¼ 0:38
wR5 ¼ minð0:75; 0:92Þ ¼ 0:75
(E4.3g)
wR7 ¼ minð0:25; 0:38Þ ¼ 0:25
wR8 ¼ minð0:25; 0:92Þ ¼ 0:25
The sum of the weightings becomes
X
N
wRi ¼ wR4 þ wR5 þ wR7 þ wR8
i¼1
X
N
wRi ¼ 0:38 þ 0:75 þ 0:25 þ 0:25 ¼ 1:63 (E4.3h)
i¼1
XN
wRi ¼ 1:63 > 1
i¼1

Table E4.3(b) The rule table for Example 4.3

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:

ð0:25Þð0:75Þ þ ð0:4Þð0:6Þ þ ð0:25Þð0:75Þ þ ð0:6Þð0:4Þ


pUDN ¼
0:25 þ 0:4 þ 0:25 þ 0:6 (E4.4b)
0:855
pUDN ¼ ¼ 0:57
1:5
The result from the weighted average is 0.57, which means that 57% of the
required power of the industrial plant is supplied from the utility distribution net-
work. The remaining 43% is supplied from PES and WES.
The graphical representation of this solution is shown in Figure E4.4.
μ s
u
μ w

μ s
μ w u

μ s
u
μ w

μ s μ w
u

s w

Figure E4.4 Takagi–Sugeno fuzzy reasoning algorithm for Example 4.4


Fuzzy logic controller (FLC) 181

4.4 Tsukamoto fuzzy reasoning


Fuzzification and rule processing stages in Mamdani, TS, and Tsukamoto fuzzy
reasoning algorithms are exactly the same. The crisp input data is fuzzified and
related rules in the rule base are executed to yield a consequent. The difference
between these three reasoning algorithms is seen in this consequent part. The
consequent in Mamdani fuzzy reasoning is a weighted fuzzy subset and the overall
consequence from all fuzzy rules is the union of the weighted fuzzy sets from all
the rules. Therefore, defuzzification is required in Mamdani reasoning in order to
yield a crisp output. The consequents of the individual rules in TS are crisp func-
tions and the final overall consequence is a crisp value obtained by using either a
weighted sum or a weighted average of the individual consequents. Tsukamoto has
suggested another approach to the consequent part of the fuzzy reasoning algorithm
[16]. In Tsukamoto fuzzy reasoning algorithm, the consequent is a fuzzy set such
that the intercepting of the weighting with this fuzzy set yields a crisp value as the
consequent of the related individual rule. Therefore, the effect of a weighting factor
on the output of a single rule is written as
wi ¼ Ci ðzi Þ (4.17)
where wi is the resultant weighting factor from the ith rule, Ci is the output fuzzy set
of the ith rule and zi[Z is the crisp consequent of the ith rule.

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

Figure E4.5 Tsukamoto fuzzy reasoning algorithm for Example 4.5


Fuzzy logic controller (FLC) 183

The final conclusion is obtained using the weighted average as follows:


ð0:25Þð0:375Þ þ ð0:4Þð0:2Þ þ ð0:25Þð0:625Þ þ ð0:6Þð0:55Þ
pU ¼
0:25 þ 0:4 þ 0:25 þ 0:6 (E4.5a)
0:66
pU ¼ ¼ 0:44
1:5
The result from the weighted average is 0.44, which means that 44% of the required
power of the industrial plant is supplied from the utility distribution network. The
remaining 46% is supplied from PES and WES.

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

A decrement of 2 MW in power demand yields the following membership values in


the fuzzy subsets defined in the universe of change in power demand.
NMD ¼ triangle01mð50; 50; 5; 2Þ ¼ 0:0
NLD ¼ triangle01mð50; 5; 0; 2Þ ¼ 0:4
ZED ¼ triangle01mð5; 0; 5; 2Þ ¼ 0:6
PLD ¼ triangle01mð0; 5; 50; 2Þ ¼ 0
PMD ¼ triangle01mð5; 50; 50; 2Þ ¼ 0
where tiangle01m.m is a MATLAB function given in Figure 2.5. Since the
fuzzy subsets NLG and ZEG are exactly the same as NLD and ZED, respec-
tively, the membership values in the output space will be the same. Applying
the defuzzification method, the center of area, gives the crisp output as the
final conclusion.
ð0:4Þð5Þ þ ð0:6Þð0:0Þ 2
pCG ¼ ¼ ¼ 2
0:4 þ 0:6 1 (E4.6a)
pCG ¼ 2MW
A power reduction 2 MW should be done in generation for the system equili-
brium. This reduction can be done by turning off some units in small power
stations.

4.5 Introduction to fuzzy logic control


Fuzzy logic (FL) controllers based on fuzzy set theory are used to represent the
experience and knowledge of a human operator in terms of linguistic variables that
are called fuzzy rules. Since an experienced human operator adjusts the system
inputs to get a desired output by just looking at the system output without any
knowledge of the system’s dynamics and interior parameter variations, the imple-
mentation of linguistic fuzzy rules based on the procedures done by human
operators does not also require a mathematical model of the system. Therefore, a
FLC becomes nonlinear and adaptive in nature having a robust performance under
parameter variations with the ability to get desired control actions for complex,
uncertain, and nonlinear systems without the requirement of their mathematical
models and parameter estimation. FL-based controllers provide a mathematical
foundation for approximate reasoning, which has been proven to be very successful
in a variety of applications [17]. In modern control techniques, uncertainty and
vagueness have a great amount of importance to be dealt with. The use of mem-
bership functions quantified from ambiguous terms in fuzzy logic control rules has
given a pulse to speed up the control of the systems with uncertainty and vagueness
[18–20]. Since the introduction of fuzzy set theory [1] and its application to control
systems [3], it has become an important and useful tool in especially controlling
nonlinear systems. As computer and chip technologies developed, the applications
of fuzzy logic-based controllers have increased tremendously so they have been
applied in many different systems [17,21–24].
Fuzzy logic controller (FLC) 185

In this chapter, a simple and direct approach will be addressed in order to


construct a fuzzy rule decision table that is suitable for modeling in the MATLAB/
Simulink GUI environment using simple operational blocks. A generalized rule
table will be constructed such that also works for different systems without the
requirement of a redesign process. Many works based on trial and error [25], arti-
ficial neural network (ANN) [26], genetic algorithms (GA)-based [27] algorithms,
and clustering methods [28] have appeared in the literature concerning the rule
decision table. The trial and error method uses some initial knowledge about how
the system works and estimates the rest of the rule table by trying and error until a
working table is obtained. The learning algorithms using ANN techniques also start
with initial knowledge and fill in the rule decision table by estimating the rest of it
using previously trained data. The algorithms using GA methods also consist of a
sort of learning system, which learns a set of rules from a set of examples [29]. It
has been proven that all these methods work very well. However, it should be noted
that they are not just fuzzy systems. They are hybrid systems, which combine other
intelligent methods such as neural networks and GA with fuzzy logic. Although the
hybrid systems are more powerful and adaptive, they require high-level algorithms
with time-consuming processes that are not desirable in control applications. The
FLCs that appeared in the literature are mostly modeled for specific applications
[30–32] rather than for general cases.
A direct approach to obtain an initial 3  3 rule table, which is then
expanded to larger dimensions is discussed in this chapter. The initial rule
table is extracted directly from the time response of the system control error and
the change in this error over one sampling period. Then the rule table is parti-
tioned into fuzzy sublevels in a similar way for partitioning the spaces of error
and error change. So, the rule table is actually nothing but the partitioned version
of the output space into fuzzy subsets with a symmetrical structure. Examples
representing various applications and cases are given for different control
schemes in MATLAB/Simulink environments. Some of these examples may be
listed as a permanent magnet DC (PMDC) motor speed control scheme, a PMDC
motor-driven position control scheme, a radar tracking control scheme for
moving targets, a synchronous generator voltage control scheme, and a power
system load–frequency control scheme.

4.6 Physical system behaviors and control


For a physical system operator, one of the most important knowledge is the time
response of the system. An operator knows very well how the system responds to a
change in reference input or system parameters in order to make necessary
adjustments so that the system keeps operating at the reference set point. In clas-
sical automatic control systems, an error signal is defined as the difference between
reference set value and actual system output.
eðtÞ ¼ rðtÞ  yðtÞ (4.18)
186 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.

fðsÞ ¼ s2 þ 2zwn þ w2n (4.19)


where z and wn are called damping ratio and natural frequency, respectively. If
z = 0, the system response oscillates like a sinewave and never reaches to a constant
steady-state value. If z is between 0 and 1 as 0 < z < 1, then the system response
oscillates. The magnitude of the oscillation is called overshoot and it gets smaller as
z approaches to unity. The response is called damped and no overshoot exists as it
is in the first-order systems if z = 1. For the values of z greater than unity as z > 1,
the response is called overdamped with a longer settling time than in the case called
damped response. The system responses for these four cases of z are summarized in
Figure 4.7. The natural frequency wn determines the oscillation frequency of the
response.
The time response of a physical system is important since it reflects the effects
of the changes either in reference input or system’s interior parameters. The
meaning of controlling a physical system is having the system behave or operate as
the user wishes. The user or the system operator tells the system what to do and
how to operate through the reference input. Then the system is controlled so that
the output will be equal or very close to the reference within acceptable error limits.
Besides tracking the reference, the operator wants a faster system response without
or with minimum overshoot. Therefore, the oscillations should be eliminated or
minimized while the time required for the output to reach and settle at the reference

Time (s)

Figure 4.7 Step responses of a second-order system


Fuzzy logic controller (FLC) 187

SS

y(t)

e(t)
SS

S
s

Figure 4.8 Adjustable control variables of a system response

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

Figure 4.9 Block diagram of a feedback control system

r V
V
t

ω on

g
g
C
V
V t
V
T
ω
J
L R a
V
b

Figure 4.10 A simple detailed PMDC motor control scheme

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

Figure 4.11 Output voltage profile of an ideal DC chopper

device. Assume that this electronic switch is turned on to conducting mode


when the gate current ig > 0 and turned off to blocking mode when ig = 0. The
gate current is obtained by comparing the control signal u(t) with a reference
sawtooth signal s(t) such that a pulse is generated during u(t) > s(t). The width
of the pulse becomes longer for larger values of u(t) and shorter for smaller
values of u(t).
Since the electronic switch is on conducting mode during ig pulses, the
chopped voltage of an ideal chopper will have the same pulse widths as ig
pulses as given in Figure 4.11. If the voltage from a DC power source has the
magnitude V, then the average voltage at the output terminals of the chopper
becomes V0 by getting the integration of the chopped output voltage over a
period as in (4.20).
ð
1 TON
V0 ¼ vðtÞdt (4.20)
TC
TON
V0 ¼ V (4.21)
TC
V0 ¼ CV (4.22)
where C is called chopper duty cycle and defined as
TON
0C¼ 1 (4.23)
TC
which yields the adjustable chopper output voltage
0  V0  V (4.24)
Since the duration TON is determined by u(t), if the value of u(t) is limited between
0 and 1, then (4.22) can be written directly as in (4.25) for simulation purposes.
V0 ¼ uðtÞV (4.25)
where V is the DC voltage at the input terminals of the chopper. An ideal DC
chopper can be simulated using (4.25) and can be represented as a gain block in
the block diagram of a closed-loop system. Therefore, Figure 4.9 can be
updated as in Figure 4.12.
190 Fuzzy logic control in energy systems, 2nd edition

u u
V

Figure 4.12 A simplified block diagram of feedback control systems

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

Figure E4.7(a) Controlled speed response of MPDC motor

(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

one-quarter of e-de space, while the values of e and de from a second-order


oscillatory system travel all four quarters. Since higher-order LTI systems will
also have an oscillating response similar to that of a second-order LTI system,
the plot of e = f(de) on e-de space of the second-order system given with the
solid line in Figure 4.14 can be used as a general case that valid for both first and
higher order oscillating systems.

4.7 Fuzzy processor for control


The studies on FL theory have increased tremendously since its development by
Zadeh [1]. The application of FL theory to a pressure control system by Mamdani
and his colleges [3] has given a push to the FL real-world applications.
The operation principle of an FLC is similar to the decision process of a
human operator doing the same job. It performs the same actions as a human
operator does by adjusting the input signal looking at only the system output. The
architecture of an FLC is very similar to that of a fuzzy reasoning algorithm. The
most used algorithm for FLC is the one given as the Mamdani reasoning algo-
rithm in this chapter earlier. As it was in Mamdani fuzzy reasoning architecture,
an FLC also consists of four stages namely fuzzifier, rule base, consequent, and
defuzzifier as shown in Figure 4.15. The input and output signals of an FLC are
crisp quantities, which require fuzzification and defuzzification processes.
Therefore, the main signal and its change for each sampling are crisp inputs and
converted to fuzzy membership values by the fuzzifier. Then they are used in
the rule base system to yield the fuzzy consequences which are combined as
fuzzy reasoning and then converted to crisp decisions by the process called
defuzzification.
The FL-based controller shown in Figure 4.15 is designed to act as an integral
controller, such that the final crisp consequent of the FLC is the change du(k),
which is added to the previous value u(k1) of the control signal u(k) to yield the
current output, which is the updated control signal u(k). Recalling the digital
solution of an integrator using Euler’s integration as

uðkÞ ¼ uðk  1Þ þ duðkÞ (4.26)

In a digital integration, the term du(k) is expressed as

duðkÞ ¼ KI TeðkÞ (4.27)

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

Figure 4.15 The structure of the fuzzy logic controller

The use of fuzzy processor in a feedback control system is shown in


Figure 4.15. Since the fuzzy processor is software-based and operates digitally, the
crisp inputs e(k) and de(k) are sampled data. Consequently, so is the output du(k).
The fuzzy processor uses the error e(k) and its change de(k) as two crisp inputs and
converts them to fuzzy membership values in the fuzzifier. The rule base system
then activates the related rules to yield a fuzzy consequent from each active rule.
The reasoning section of the fuzzy processor combines the individual consequences
into a general fuzzy conclusion of the process. Finally, the defuzzifier converts this
general fuzzy conclusion to the crisp output du(k) as the final decision for the kth
sampling. The fuzzy processor uses the Mamdani fuzzy reasoning method from the
inputs e(k) and de(k) to the output du(k). Depending on the magnitude of the control
signal u(k), the actuator adjusts the power or energy input to the physical system to
be controlled so that the system output tracks the reference. For example, the
actuator adjusts the armature voltage of the PMDC motor so that the motor runs at
the reference speed. The fuzzy processor, summers, actuator, and the physical
system all together are called the fuzzy logic control system, the process results in
the control signal u(t) is called the FLC.
The output du(k) of the fuzzy processor may be positive or negative resulting
in an increment or a decrement in the control signal u(k) as in (4.26). The decision
given by the fuzzy processor is expressed in terms of du(k) either to increase or
decrease the control signal, or do nothing if the system output y(t) is tracking the
reference r(k) within acceptable limits. In order to get a proper amount of incre-
ments and decrements the fuzzy processor should have correct and suitable rules in
the rule base. Therefore, the performance of the FLC depends on the rules, which
represent the expert’s knowledge to operate the system. It is clear that the con-
struction of the rule base is very important for the FLC because it is the modeling of
knowledge and thoughts of the human operator. The rules should reflect the
knowledge and decision of the operator correctly. There is no direct method to
drive the rules. However, some works have been done to complete the rules after
Fuzzy logic controller (FLC) 197

having some initial rules. A rule construction process will be given next to show a
way of constructing the rules.

4.7.1 Fuzzy rules: the modeling of thoughts and abilities


Human decision-making process is explained in Section 3.10 in the previous
chapter. Decision-making process of a driver was modeled in a rule-based system
to make an introduction to the concept. This section here addresses the modeling of
human thoughts and abilities in more detail by giving examples of the control of
physical systems.
As shown in Figure 4.15, there are two inputs to the fuzzy processor. One is the
control error e(k), which is the difference between the reference signal r(k) and the
output signal y(k), the other one is the change in this error de(k). These two inputs,
defined as in (4.28) and (4.29), are first fuzzified and converted to fuzzy mem-
bership values that are used in the rule base in order to execute the related rules so
that an output can be generated.
eðkÞ ¼ rðkÞ  yðkÞ (4.28)
deðkÞ ¼ eðkÞ  eðk  1Þ (4.29)
The fuzzy rule base, which may also be called as the fuzzy decision table, is
the unit mapping two crisp inputs, e(k) and de(k) to the fuzzy output space defined
on the universe of du(k). The time response of the control error e(k) for a step input
can be represented by the generalized step response error of a second-order system
as shown in Figures 4.8 and 4.13. This error signal may have a damped or an
oscillatory response with a decaying exponential component. The latter one is
considered for constructing the rule table since it includes overshoot effects leading
the rule base to represent more generalized cases. Let us divide the oscillatory error
response into 10 regions as shown in Figure 4.16 and look at each region more
closely with the eye of a system operator. What does an operator do to operate the

Figure 4.16 Operating regions of error and error change


198 Fuzzy logic control in energy systems, 2nd edition

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

I II III IV V VI VII VIII IX X


e(k) + 0   0 + +  + 0
de(k)    + + +  0 0 0
du(k) +    + + +  + 0

Table 4.2 An initial nine-rule table

e(k) de(k)

Nde Zde Pde


Pe Pdu Pdu Pdu
Ze Ndu Zdu Pdu
Ne Ndu Ndu Ndu

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.

Table 4.3 An initial 25-rule table

e(k) de(k)

NBde NSde ZEde PSde PBde


PBe PBdu PBdu PBdu PBdu PBdu
PSe PSdu PSdu PSdu PSdu PSdu
ZEe NBdu NSdu ZEdu PSdu PBdu
NSe NSdu NSdu NSdu NSdu NSdu
NBe NBdu NBdu NBdu NBdu NBdu

Table 4.4 An initial nine-rule table with zero diagonal

e(k) de(k)

Nde Zde Pde


Pe Zdu Pdu Pdu
Ze Ndu Zdu Pdu
Ne Ndu Ndu Zdu

Table 4.5 An initial 25-rule table with zero diagonal

e(k) de(k)

NBde NSde ZEde PSde PBde


PBe ZEdu PBdu PBdu PBdu PBdu
PSe PSdu ZEdu PSdu PSdu PSdu
ZEe NBdu NSdu ZEdu PSdu PBdu
NSe NSdu NSdu NSdu ZEdu NSdu
NBe NBdu NBdu NBdu NBdu ZEdu
202 Fuzzy logic control in energy systems, 2nd edition

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,

Table 4.6 A 25-rule table with zero diagonal

e(k) de(k)

NBde NSde ZEde PSde PBde


PBe ZEdu PBdu PBdu PBdu PBdu
PSe NSdu ZEdu PSdu PSdu PSdu
ZEe NBdu NSdu ZEdu PSdu PBdu
NSe NSdu NSdu NSdu ZEdu PSdu
NBe NBdu NBdu NBdu NBdu ZEdu

Table 4.7 A generalized symmetrical 25-rule table

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

Table 4.8 A generalized symmetrical 49-rule table

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.

4.7.2 The input–output interaction


A plot of e(k) versus de(k) makes it easy to see the variation space of these
variables. Therefore, an FLC designer can see and define the boundaries of the
variables. The definitions of the boundaries are very important to select a working
area in the input space so that the sparsity is minimized and operations are
focused in the active areas of the input universes. Such a plot of e(k) versus de(k)
for a second-order oscillatory system is shown in Figure 4.17 where each one of
the universes of e(k) and de(k) are partitioned into three regions as negative (N),
zero (Z) and positive (P). The usable area in Figure 4.17 is shown by the shaded
area. Triangular-type membership functions are used for partitioning the crisp
universes into fuzzy subsets. Different membership functions such as Gaussian,
trapezoidal, and bell could have also been used. Each one of these membership
functions has its own effects on the FLC output [25]. However, triangular mem-
bership functions are more convenient for expressing the concept because their
204 Fuzzy logic control in energy systems, 2nd edition

Figure 4.17 Input space of an FLC from the system response

linearity makes it easier to intercept membership degrees from a triangle.


Therefore, triangular membership function defined by (2.7) and given in
Figure 2.5 is used to represent the fuzzy subsets shown in Figure 4.17.
The boundaries for the universe e(k) are selected from 0.6 to 0.4, and the
boundaries of de(k) are selected from 0.025 to 0.015 in Figure 4.17. For a more
effective FLC, these boundaries can be selected much smaller in order to reduce
the sparsity. For example, another selection for e(k) might be from 0.2 to 0.3
while it might be from 0.01 to 0.01 for de(k). With the later selection, the
working area is focused more closely toward the origin where the data density is
higher. These latter boundaries are used in Figure 4.18. However, this time the
universes are partitioned into six and five subsets for e(k) and de(k), respectively.
Depending upon the responses of the physical systems, the fuzzy subsets may or
may not be spaced evenly. Since the lower and upper boundaries of the universe e
(k) in Figure 4.18 are not symmetrical according to zero line, the fuzzy subsets
might be distributed evenly. Even if they are evenly distributed in Figure 4.18, the
fuzzy subsets are not symmetrical. There are two fuzzy subsets in the negative
region and three fuzzy subsets in the positive region. The lower and upper
boundaries of the universe de(k) are symmetrical and the fuzzy subsets in de(k)
are distributed evenly. With the reduced sparsity, the fuzzy rules become more
effective because any operating point in the input space will have a membership
value in the fuzzy subsets defined in both e(k) and de(k) as depicted by the point
(e(k), de(k)) in Figure 4.18.
The input space given in Figure 4.18, enables the FLC design engineers to set
the boundaries of the input universes clearly. It should be kept in mind that the
Fuzzy logic controller (FLC) 205

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

Table 4.9 A generalized 30-rule table

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

Table 4.10 Active rules in Table 4.9 for the


data given in Figure 4.18

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

ð0:6Þð0Þ þ ð0:2Þð0:5Þ þ ð0:4Þð0:5Þ þ ð0:2Þð0Þ 0:1


duðkÞ ¼ ¼
0:4 þ 0:2 þ 0:4 þ 0:2 1:2
¼ 0:0833 pu:

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.

4.8 Modeling the FLC in MATLAB


The design and simulation of an FLC are explained in this section. An FLC is
designed to control a radar tracking system, which is adapted from [26]. A
MATLAB .m file is generated to simulate this FLC-controlled radar tracking sys-
tem. All steps of the designed FLC and its application to the radar tracking system
are given in detail through the codes of a MATLAB .m file.

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

Figure E4.8(a) Schematic diagram of the radar tracking system

C u u0

Figure E4.8(b) General block diagram of the control system

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

Figure E4.8(c) Simulation diagram of a PMDC motor

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(e) Plant data for the FLC

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

Figure E4.8(h) The rule matrix


Fuzzy logic controller (FLC) 213

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

Figure E4.8(i) Starting the simulation loop

Figure E4.8(j) The rule processing part in the simulation


214 Fuzzy logic control in energy systems, 2nd edition

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(k) Defuzzification and actuator


Fuzzy logic controller (FLC) 215

Figure E4.8(l) The final part of the while loop

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

Figure 4.18 Flowchart of fuzzy logic controlled system simulation

4.9 Modeling the FLC in Simulink


The model development of the FLC for the MATLAB/Simulink environment is
described in this section using the information given in previous sections and in
Fuzzy logic controller (FLC) 217

[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.19 A Simulink function for simulating triangular fuzzy membership


function. (a) Closed form of the Simulink block and (b) inside view of
the block in (a).
218 Fuzzy logic control in energy systems, 2nd edition

Figure 4.20 Parametric definitions of the fuzzy subsets in a universe of X

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.

Figure 4.22 The Simulink model of the fuzzy rules


220 Fuzzy logic control in energy systems, 2nd edition

Figure 4.23 Fuzzy reasoning represents the process from fuzzification to


defuzzification

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

Figure 4.24 The input and output units of the FLC

Figure 4.25 A single FLC block

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(b) Position control performances of both FL and PID controllers


Fuzzy logic controller (FLC) 225

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

Figure E4.11(b) Radar tracking performances of both FL and PID controllers

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

Figure E4.12(a) Using FLC block as a terminal voltage controller for a


synchronous generator

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)

Figure E4.12(b) Terminal voltage control responses of a synchronous generator


using both FL and PID controllers

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

A generalized direct approach for designing FL-based controllers in


MATLAB/Simulink environment is presented in this chapter. The approach is
based upon using e-de space consisting of the plot e(t) versus de(t). Since the error
response of an undamped second-order system is used as the base system to derive

Figure E4.13(a) Using FLC blocks as AGC controllers in power systems

0.01
Frequency Change (pu)

Area 2 With FLC


0.005

–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)

Figure E4.13(b) Load–frequency controller responses in a two-area power


system using both FL and PID controllers
Fuzzy logic controller (FLC) 229

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

Table P4.1 The rule table for Problem 4.1

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

Figure P4.5 A final fuzzy conclusion

Table P4.6 Parameters of the fuzzy membership functions used in P4.6

Membership function Universe Function parameters


x1 x2 x3
Cold (C) Temperature ( C) 0 0 20
Warm (W) Temperature ( C) 0 20 40
Hot (H) Temperature ( C) 20 40 40
Negative (N) The interval {0, 1} 1 1 0
Zero (Z) The interval {0, 1} 1 0 1
Positive (P) The interval {0, 1} 0 1 1

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).

Table P4.8(a) Decision rules for power compensation

Rule table Line voltage


Low (LV) Normal (NV) High (HV)
cosf High (HPF) ZC NC NC
Normal (NPF) PC ZC NC
Low (LPF) PC PC ZC
234 Fuzzy logic control in energy systems, 2nd edition

Table P4.8(b) Parameters of the fuzzy membership functions used in Problem


P4.8

Membership Function Universe Function parameters


x1 x2 x3
Low (LPF) Power factor 0.8 0.8 0.95
Normal (NPF) Power factor 0.8 0.95 1.0
High (HPF) Power factor 0.95 1.0 1.0
Low (LV) Voltage change 10% 10% 0
Normal (NV) Voltage change 10% 0 10%
High (HV) Voltage change 0 10% 10%
Negative (NC) The interval {1, 1} 1 1 0
Zero (ZC) The interval {1, 1} 1 0 1
Positive (PC) The interval {1, 1} 0 1 1

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(a) Decision rules for Problem P4.10

Rule table Washing time (min)


Low (LT) Normal (NT) High (HT)
Water darkness High (HW) FLL TQRT HLF
Normal (NW) ZE ZE ZE
Low (LW) TQRT HLF OQRT

Table P4.10(b) Preset time durations for water darkness in a washing machine

Water darkness (%)


0 20 40 70 100
Washing time (min)
10 30 60 10 30 60 10 30 60 10 30 60 10 30 60

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

Table P4.11(a) Fuzzy subset definitions for Problem P4.11

Water level in the tank Valve opening Fuzzy membership function


EM: empty FO: full open Triangle (0, 0, 50)
HF: half full HO: half open Triangle (0, 0, 100)
FL: full FC: fully closed Triangle (50, 100, 100)

Table P4.12 Output response of a physical system as a sampled data

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

Defined fuzzy subsets for e and de.


 
0 0:5 1 0:5 0
ZE ¼ Zero ¼ þ þ þ þ
2 1 0 1 2
 
0 0:5 1 0:5 0
PS ¼ PositiveSmall ¼ þ þ þ þ
0 0:5 1 1:5 2
 
0 0:5 1 0:5 0
PM ¼ PositiveMedium ¼ þ þ þ þ
1 1:5 2 2:5 3
The active rules:
Rule 1: IF E is ZE AND DE is ZE THEN DU is ZE
Rule 2: IF E is ZE AND DE is PM THEN DU is PS
Rule 3: IF E is PS AND DE is ZE THEN DU is PS
Rule 4: IF E is PS AND DE is PM THEN DU is PM
P4.14 In a fuzzy logic controller, the crisp universes of control error e error
change de and control input change du are partitioned into fuzzy
subsets as shown in Figure P4.14. The responses of the control error e
(k) and its change de(k) are given in Table P4.14(a) for four sampling
instants. Obtain the crisp value of the controller output u(k) using the
rule base given in Table P4.14(b).

Figure P4.14 Fuzzy subsets defined in e, de, and du

Table P4.14(a) The rule base for Problem P4.14

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

Table P4.14(b) 25-Rule table for Problem P4.14

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

P4.15 Develop a fuzzy logic control simulator in MATLAB as an .m file


and simulate the physical system given below. Then draw a flowchart
representing your FLC and the system to be controlled such that the
flowchart must include the following:
l Data input blocks
l FLC processing blocks
l Blocks representing the solution of the physical system
l Logical comparisons
l Loops
l Data updating
l Subfunction recallings
l Subfunctions
l Terminating blocks
State-space model equations of the physical system
         
x_ 1 3 1 x1 0 0 u1 x
¼ þ ; ½y ¼ ½ 1 0  1
x_ 2 2 0 x2 0 1 u2 x2
where u1 = 0, u2 = 1 and sampling period dt = 0.01.
P4.16 Develop an FLC simulator in Simulink for the physical system given
in P4.15.
P4.17 An FLC is to be designed to control the water level h(t) in a water
tank shown in Figure P4.17. The input valve is controlled to adjust
the amount of water so that the water level is kept constant at the
reference level when the water from the output valve is increased or
decreased.
The bottom area of the tank is S = 2 m2 and the maximum height of
the tank is H = 3 m. The maximum amount of water from the input and
output valves are Xi = Xo = 5 m3/s. The output flow ratio from the output
valve is defined as 0 < Ko < 1, where Ko = 1/Xo such that if
Ko = 0, the valve is fully closed and if Ko = 1 then the valve is full open.
Fuzzy logic controller (FLC) 239

Figure P4.17 Water tank system for Problem P4.17

The mathematical model for the water level is defined as


dhðtÞ Ko 1
¼  hðtÞ þ Xi
dt S S

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

Southeastcon’96. Bringing Together Education, Science and Technology;


Tampa, FL, April 1996, pp. 462–467.
[40] Macvicar-Whelan P.J. ‘Fuzzy sets for man–machine interaction’, Interna-
tional Journal Man–Machine Studies. 1976;8:687–697.
[41] Altas I.H. and Sharaf, A.M. ‘A generalized direct approach for designing fuzzy
logic controllers in MATLAB/Simulink GUI environment’, International
Journal of Information Technology and Intelligent Computing. 2007;1(4).
[42] Altas I. H. ‘A fuzzy logic based door position control system’, Proceedings
of the 3rd International Mechatronic Design and Modeling Workshop,
Middle East Technical University, Ankara, Turkey, 15–18 September 1997,
pp. 107–116.
[43] Altas I. H. ‘A fuzzy logic controlled tracking system for moving targets’,
12th IEEE International Symposium on Intelligent Control, ISIC’97, Istan-
bul, Turkey, 16–18 July 1997, pp. 43–48.
[44] Saadat H. Power System Analysis. New York: McGraw Hill Book Company,
1999.
Chapter 5
System modeling and control

This chapter starts with mathematical modeling of physical systems. The


methods of obtaining differential equations, simulation diagrams, and state-
space models of physical systems are studied. Runge–Kutta numerical solu-
tion method is discussed and user-based MATLAB software is developed to
show the meaning of controlling physical systems as one of the application
areas of fuzzy logic. The reader will be able to develop his/her own FLC code
in MATLAB and in MATLAB/Simulink. Examples of controlling elec-
trical, mechanical, and electromechanical systems are given.

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.

5.2 System modeling


As just mentioned above, 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. All these com-
ments are also valid for fuzzy logic-controlled system simulation. Computer or
software-based simulation tools require the mathematical models of the physical
system. A model for a given system depends upon defined system boundaries, the
objective of the study, and the required level of approximation A design model
includes many assumptions and simplifications in order to have linear, time-
invariant models so that analytical methods can be applied easily to solve the model
equations numerically using computer simulations.
The mathematical models of the physical systems are driven by experimental
data, basic physical properties, input–output data relations, physical laws such as the
law of conservation of mass, the law of conservation of energy, the law of con-
servation of momentum, and theoretical laws such as Newton’s law, Kirchhoff’s law,
Ohm’s law, Ampere’s law, Faraday’s law, and Lenz’s law. Depending on the subject
studied, many other laws can be added.
The mathematical model of a physical system is based on the objectives of the
modeling. Because the input–output variables and the operating boundaries depend
upon the defined objective function of the system. The system’s function is
expressed in terms of measured output variables, which are manipulated through
the control input variables. The system’s operation is also affected by the dis-
turbance input variables that may be measurable or unmeasurable [1]. Therefore,
the model of a physical system includes control and disturbance input variables,
output variables, boundaries, and subsystems as shown in Figure 5.1.

Figure 5.1 An overlook at a physical system


System modeling and control 245

The models of physical systems are represented in different forms such as


differential equations, transfer functions, state-space equations, signal flow graphs,
simulation diagrams, and block diagrams depending on analysis and design
domains, which are either time domain or frequency domain.
The modeling process is summarized as follows:
(I) Define the purpose or objective of the model considering system bound-
aries, interconnecting variables, and input–output relations.
(II) Identify each individual component of the physical system as the
subsystem.
(III) Write the mathematical equations to define the input–output relationship
of each subsystem using physical laws or experimental data.
(IV) Represent each component by its input–output equation in a software code
or by a functional block with clearly identified input and output
connection ports.
(V) Integrate the subsystem models into an overall system model either in a
software code or in a simulation block diagram.
(VI) Verify the model validity and accuracy by implementing a simulation of
the model equations and comparing the results with experimental data for
the same conditions.
(VII) Combine equations and make simplifications to create an approximate model
suitable for control design. In order to make this simplification, eliminate
ineffective dynamics for model reduction, use linearization to linearize the
nonlinear equations, use lumped parameters to convert partial differential
equations into ordinary differential equations, and use sequence models in
order to convert time-varying equations into time-invariant equations.
(VIII) Simulate the model equations and check the LTI reduced order model
accuracy again by comparing the experimental results. The model accu-
racy must be remained while the model complexity is reduced.
The mathematical model equations might be in three classes, which are con-
tinuous differential equations, discrete difference equations, or algebraic equations.
Within each class, there are subclasses of equations such as partial differential
equations, nonlinear equations, and time-varying equations [2]. However, these
subclasses of equations are converted to LTI equations in order to use the solutions
methods that are applicable in linear system theory [3].
Let us represent the smallest subsystem by a block consisting of one input and
one output port as shown in Figure 5.2. The system with just one input and one
output port is called as single input–single output system in control systems.

u(t) y(t)

Figure 5.2 A block represents a subsystem or a system


246 Fuzzy logic control in energy systems, 2nd edition

Block diagram representation of mathematical models helps in the realization,


synthesis, or fabrication of systems. A simulation of the system may be realized
from the block diagram by interconnecting the basic building blocks that represent
the smallest subsystems [4]. It also helps in the analysis and the design of systems
as it provides a clear picture of the cause-and-effect relationship governing the
various signals within the system. A simple block usually includes a linear gain, a
nonlinear gain, or an integral gain as in (5.1), (5.2), and (5.3), respectively.
y1 ¼ au1 (5.1)
y2 ¼ f ðu2 Þ (5.2)
ð
y3 ¼ u3 ðtÞdt (5.3)

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

u2(t) y2(t) y2=sin(u2)

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

Figure 5.6 Detailed simulation diagram of an integral gain

The right side of (5.5) can be written in two parts as


ðt ð0 ðt
yðtÞ ¼ uðtÞdt ¼ uðtÞdt þ uðtÞdt (5.6)
1 1 0
ðt
yðtÞ ¼ yð0Þ þ uðtÞdt (5.7)
0

where the initial value y(0) of the output y is defined as


ð0
yð0Þ ¼ uðtÞdt (5.8)
1

Equation (5.7) can be represented by a block diagram as in Figure 5.6. Note


that the block diagram shown in Figure 5.6 can also be used to represent (5.4).
The system simulation is usually started at t = 0 s. If the system has a nonzero
output at t = 0 s, this value is called the initial output value of the system. If the
output variable is zero at t = 0 s then the initial value is set to zero as y(0) = 0. In
this case, the block and simulation model representation of the integrator becomes
the one given in Figure 5.5, in which Euler’s method is used in the simulation code.
In fact, the figure on the right in Figure 5.6 is a block diagram representation of
Euler’s method. The integral block already exists in the Simulink block library in
both continues and discrete forms. Figure 5.6 depicts that an integrator block with
an indefinite integral sign is equivalent to a definite integrator block and a summer.
A comparison and analysis of the responses of linear and integral gains in
Figures 5.3 and 5.5 show that the output of the linear gain block depends upon the
existence of the input signal while the integral block keeps giving a constant non-
zero output even if its input is made zero after some time. If there is an input to the
linear gain block then there is an output. If the input is zero then the output is zero.
It can be concluded that a linear gain block gives an output if it has an input. The
linear gain block does not keep any data from previous samplings. Therefore, the
linear gain block is also called as static block without memory. It does not store
information during the previous samplings to yield an output when the input is
zero. On the other hand, the integral block stores data from the previous samplings
and keeps giving a constant output when the input signal becomes zero for any
reason. It is clear that the integrator block remembers, i.e., stores information.
Therefore, the integral block is called as a dynamic block with memory.
System modeling and control 249

In order to understand static and dynamic elements, let us consider a series


connected RL circuit given in Figure 5.7. The voltage across the resistance R and
inductance L can be written using Ohm’s law as
uR ¼ Ri (5.9)
di
uL ¼ L (5.10)
dt
The loop equation is then written using Kirchhoff’s voltage law as
vðtÞ ¼ uR þ uL (5.11)
diðtÞ
vðtÞ ¼ RiðtÞ þ L (5.12)
dt
This is a first-order LTI differential equation and can be rewritten as follows
by moving the highest-order term to the left side.
diðtÞ
L ¼ vðtÞ  RiðtÞ (5.13)
dt
The left side of (5.13) 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 on the left. This summation is shown in Figure 5.8. The
parameter R is a constant and i(t) must be obtained first to be multiplied by R.
The output of the summer is the derivation of current i(t) multiplied by the
constant L. Let us multiply the output of the summer by 1/L so that the derivation of
current is separated as a single term. Then the derivation of current can be inte-
grated to get the current itself, which is to be multiplied by R and added to the
summer as a negative feedback signal as given in Figure 5.9.
R L
uR uL
V i

Figure 5.7 Series connected RL circuit

Figure 5.8 A summer adding two inputs to yield an output

Figure 5.9 A detailed simulation diagram of a series RL circuit


250 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

Figure E5.1(a) Simulink model of Series RL circuit in Example 5.1

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).

5.3 Modeling electrical systems


The modeling process is summarized in the previous section and a series connected
RL electrical circuit is modeled as an example. It has shown that the model of a
continuous time system is described by a set of differential and algebraic equations
or in general by a set of integro-differential equations and algebraic equations.
Converting these sets of equations into detailed simulation diagrams enables us to
have an overall look at the system structure. As it is shown in Figure 5.9, the
simulation diagram is a pictorial representation of the mathematical model of the
system. Therefore, the simulation diagram approach is used extensively in this
book. The use of block diagrams in Simulink for the design and analysis of control
systems can be found in [5].
The mathematical model of the system is derived using the physical laws
governing the input–output map. 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, Kirchhoff’s law, Ohm’s
law, Ampere’s law, Faraday’s law, and Lenz’s law. The physical laws used in the
modeling of electrical systems are mainly Kirchhoff’s law, Ohm’s law, Ampere’s
law, Faraday’s law, and Lenz’s law.
The modeling of electrical systems starts with the circuit diagram, which is a
representation of system wiring diagram or an equivalent circuit of a more com-
plicated system showing the input–output relation. Then the physical laws are
applied to drive the mathematical model equations in various forms such as
l Integro-differential equations,
l Simulation diagrams,
l Block diagrams,
l Signal flow graphs,
l Transfer functions, and
l State-space equations.
Resistance (R), inductance (L), and capacitance (C) are three basic elements of
electrical systems. The voltage–current equations of these elements can be written
as follows using Ohm’s law.
vR ðtÞ ¼ RiðtÞ (5.14)
252 Fuzzy logic control in energy systems, 2nd edition

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.

Obtain the following mathematical models to represent input–output relation


of this circuit.
(a) Integro-differential equations
(b) Simulation diagram
(c) Transfer function
(d) Block diagram
Use the numerical values v(t) = 50 V, R = 5 Ohm, and C = 1000 mF and
simulate this system in MATLAB and Simulink.

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

Figure E5.2(a) Circuit diagram of a low pass filter


System modeling and control 253

Substituting (5.14) and (5.16) yields the first-order LTI integro-differential


equation as
ð
1
vi ðtÞ ¼ RiðtÞ þ iðtÞdt (E5.2b)
C

(b) Simulation diagram,


The integro-differential equation given in (E5.2b) can be rewritten as fol-
lows by moving the highest-order derivative term to the left side.
ð
1
RiðtÞ ¼ vi ðtÞ  iðtÞdt (E5.2c)
C

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

The Laplace transformation of (E5.2d) yields (E5.2g).

1
VO ðsÞ ¼ IðsÞ (E5.2g)
Cs

Rewriting (E5.2g) yields

IðsÞ ¼ CsVO ðsÞ (E5.2h)

Equating (E5.2f) and (E5.2h) yields the transfer function as

VO ðsÞ 1
¼ (E5.2i)
Vi ðsÞ RCs þ 1

(d) Block diagram


Transfer function given in (E5.2i) can be represented by a block diagram as in
Figure E5.2(c).

Simulation of this system in Simulink can be done by creating the simulation


diagram in Figure E5.2(b) in Simulink as in Figure E5.2(d).
Simulation of this system in MATLAB can be done using the transfer function
with MATLAB functions lsim and step functions in MATLAB. Substituting numerical
values into (E5.2i) yields (E5.2j) and simulation results as in Figure E5.2(e).

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

Figure E5.2(d) Simulation in Simulink


System modeling and control 255

Figure E5.2(e) Simulation in MATLAB using lsim and step functions

R L C

v(t) i(t)

Figure E5.3(a) Series connected RLC circuit

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

and (5.16), respectively. Substituting these equations into (E5.3a) we get


ð
diðtÞ 1
vðtÞ ¼ RiðtÞ þ L þ iðtÞdt (E5.3b)
dt C
This is a second-order LTI integro-differential equation.
(b) Simulation diagram,
The first step to sketch simulation diagram is writing the integro-differential
equation in proper order. This is done by writing the highest order derivative
term in (E5.3b) to the left side and mowing all others to the wright as in
(E5.3c).
ð
diðtÞ 1
L ¼ vðtÞ  RiðtÞ  iðtÞdt (E5.3c)
dt C
As the second step, identify the input and output variables, which are v(t) and
i(t), respectively, in this example. Then place the input to the left and the output
to the right ends.
In the third step, place the summer right after the input variable and connect
the input to the summer, usually as a positive input.
Check the other terms to be added to the summer and connect them as input
signals using unidirectional arrows. These additional terms to be added may
not be available clearly. Therefore, they should be separated from internal
variables and then added to the summer, later.
Identify the output term from the summer as the fifth step. The output from
the summer is the highest order derivative term placed to the left side of
(E5.3c). Then separate the derivative part from the constant coefficient if there
is any.
Starting from the highest derivative term, place integrators one after the
other until the derivatives are over and the variable is obtained.
As the seventh and final step, connect the individual linear and integral gain
blocks to satisfy (E5.3c). The final simulation diagram is obtained in
Figure E5.3(b). Note that the derivative term di/dt is integrated until the current
i(t) is obtained. However, the current i(t) is integrated again and multiplied by
1/C to obtain the voltage vC(t) across the capacitor.

L i(t) idt
v(t)
L
R

Figure E5.3(b) Simulation diagram of series connected RLC circuit-state-space


equations
System modeling and control 257

L i(t) idt
v(t)
L
R

Figure E5.3(c) Simulation diagram used to obtain state-space equations

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)

yðtÞ ¼ x1 ðtÞ (E5.3f)

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

(c) Transfer function


The transfer function of series connected RLC circuit is obtained in a couple
of ways. It can be obtained by applying Laplace transformation to (E5.3b) or
(E5.3d) and (E5.3f) or (E5.3i). The transfer function is also obtained by using
block diagram reduction methods to reduce Figure E5.3(b) into one
single block.
Let us apply Laplace transformation to (E5.3b) with zero initial values.
1
V ðsÞ ¼ RIðsÞ þ sLIðsÞ þ IðsÞ (E5.3j)
sC
Then the transfer function is obtained as
IðsÞ s
¼ 2 (E5.3k)
V ðsÞ Ls þ Rs þ C1

Let us apply Laplace transformation to (E5.3i) with zero initial values.


sX ðsÞ ¼ AX ðsÞ þ BU ðsÞ (E5.3l)
Y ðsÞ ¼ CX ðsÞ þ DU ðsÞ (E5.3m)
From (E5.3i),

X ðsÞ ¼ ðsI  AÞ1 BU ðsÞ (E5.3n)


Substituting (E5.3n) into (E5.3m) yields the transfer function in terms of
state-space model parameters.
Y ðsÞ
T ðsÞ ¼ ¼ C ðsI  AÞ1 B þ D (E5.3o)
U ðsÞ
(d) Block diagram
Let us use the block diagram reduction approach to obtain the block diagram
and transfer function of the given system. Replacing the integral sign with its
Laplace transform 1/s, converts the simulation diagram in Figure E5.3(b) from
the time domain to the s domain as shown in Figure E5.3(d). Note that the
block diagram has been reshaped so that the output signal i(t) is located at the
right end.

Ls Ls
R 1
R
1 Cs
Cs

Figure E5.3(d) Application of block diagram reduction to the simulation diagram


System modeling and control 259

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

Figure E5.4(a) MATLAB .m file used to simulate the RLC circuit

6
Current (A)

0
0 0.5 1 1.5 2
Time (s)

Figure E5.4(b) Time response of the circuit current

b. and c. Simulation and FL control in Simulink.


Simulation diagram of the given system in Simulink is shown in Figure E5.4(e),
which is very similar to the simulation diagram shown in Figure E5.3(b).
Simulation result in Simulink is given in Figure E5.4(f).
FLC controlled simulation diagram of the series-connected RLC circuit in
Simulink is given in Figure E5.4(g). The FLC subsystem block [7,8] defined in
Chapter 4 and shown in Figure 4.25 is used in Figure E5.4(g) as the controller and
connected to the subsystem representing the simulation diagram of a series
System modeling and control 261

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)

Figure E5.4(d) The circuit current is kept at 2 A by FLC in MATLAB

L.(di/dt) di/dt
1/s

1/L
VR=Ri

R
VC
1/s
1/C

Figure E5.4(e) Simulation diagram of RLC circuit in Simulink

4
Magnitude

0
0 0.5 1 1.5 2
Time (sec)

Figure E5.4(f) Time response of the circuit current in Simulink

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

Figure E5.4(g) Simulation diagram of FLC controlled circuit subsystem in


Simulink

2.5

2
Magnitude

1.5

0.5

0
0 1 2 3 4 5
Time (sec)

Figure E5.4(h) The circuit current is kept at 2 A by FLC in Simulink

R C C

R L
v i i v
v

Figure PRA5.1 Circuit diagram for Practice 5.1

Practice 5.1
Develop a simulation diagram and state-space model for the electrical circuit given
in Figure PRA5.1.

5.4 Modeling mechanical systems


The modeling process is summarized in Section 5.2. It has shown that the model of
a continuous time system is described by a set of differential and algebraic equa-
tions or in general by a set of integro-differential equations and algebraic equations.
Converting these sets of equations into detailed simulation diagrams enables us to
264 Fuzzy logic control in energy systems, 2nd edition

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].

5.4.1 Mechanical systems with linear motion


A rigid mechanical body makes a linear motion under an applied force. Therefore,
it is assumed that the applied force is input and linear displacements are the output
in the mathematical modeling of the basic mechanical elements.
If a force f (t) (N) is applied to a mass m (kg), it moves linearly with a dis-
placement x(t) (m). The relation between the applied force and the displacement is
written by invoking Newton’s second law, which states that the vector sum of all
System modeling and control 265

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.18)

Since the change in displacement is defined as velocity (m/s), the momentum


in (5.18) can be written as

pðtÞ ¼ mvðtÞ (5.19)

The change in momentum is written by getting the derivation of both sides of


(5.18) as in (5.20) or getting the derivation of both sides of (5.19) as in (5.21).

_
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

Figure 5.10 Viscous friction forces affecting the motion of a mass, m


266 Fuzzy logic control in energy systems, 2nd edition

mi xi
m

xj mj

Figure 5.11 Spring forces affect the motion of a mass, m

mi

mj

Figure 5.12 A two-mass system with spring and damper

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).

m€x ðtÞ ¼ fin ðtÞ  mg  kxðtÞ  b_x ðtÞ (E5.5e)

b.2 The reference direction is vertically up for Figure E5.5(b).


The reference direction is vertically up, the applied force is vertically
up, gravity force is naturally vertically down and the forces caused by
spring and damper are always negative. Therefore, the motion equation is
written as in (E5.5f).

m€x ðtÞ ¼ þfin ðtÞ  mg  kxðtÞ  b_x ðtÞ (E5.5f)

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

Figure E5.6 A two-mass system for Example 5.6

The spring k2 between the masses m1 and m2 is a common element connecting


them together both physically and mathematically.

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

Figure E5.7(a) A rotational system with one inertia


System modeling and control 271

m
b
k

Figure E5.7(b) Simulation diagram of the system given by (E5.7a)

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.

5.4.2 Mechanical systems with rotational motion


The systems with rotational motion are analogs with the linear motion systems.
Such that, the mass m in linear motion is replaced by inertia J in rotational motion.
The force f is replaced by torque T and the linear displacement x is replaced by
angular displacement q. The effect of the gravity force is included in the inertia and
not considered as an additional disturbance input. Example 5.8 shows the modeling
process of the rotational mechanic systems.

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

Figure E5.8(a) A rotational system with one inertia

Tin(t)
J

b
s

Figure E5.8(b) Simulation diagram of the rotational system given in (E5.8a)

(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.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

The following equations can be written directly from Figure E5.8(b).


1 b s
x_ 1 ðtÞ ¼ Tin ðtÞ  x1 ðtÞ  x2 ðtÞ (E5.8b)
J J J
x_ 2 ðtÞ ¼ x1 ðtÞ (E5.8c)

yðtÞ ¼ x2 ðtÞ (E5.8d)

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

Figure E5.9 A rotational system with two inertias


274 Fuzzy logic control in energy systems, 2nd edition

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?

5.5 Modeling electromechanical systems


One of the most used and the most known electromechanical systems in elec-
trical power engineering is the electrical machines. They are used in industry
either as electrical generators or electrical motors. Even though an electrical
machine itself is an electromechanical system, it might be used as a part of
larger electromechanical systems. Electrical motors are used in various parts
of the industry. DC machines are especially used widely in robotic systems,
numerical control machines, anti-aircraft radar tracking control systems,
antenna positioning systems, and electrical car drive systems. In this section of
the book, the modeling of DC motors is discussed and their simulation models
are derived.
A DC motor is based on fundamental laws of electromagnetism. If a conductor
of length, l,carrying a current, i, is placed in a uniform magnetic field of flux
density B, it will experience a force, f, given by Ampere’s law as in (5.29) when the
conductor is oriented at right angles to the magnetic field.
f ¼ Bi‘ (5.29)
In other words, if a 1-m conductor carrying one Ampere current is placed at
right angles to a magnetic field with a flux density of one Tesla (Weber/m2), a force
of one Newton is generated affecting the conductor to move. In terms of units, this
force can be written as 1 Newton = 1 Tesla  1 A  1 m. A schematic diagram of
the described system is shown in Figure 5.13.
In Figure 5.13, a voltage v is applied to a conductor with the length. This
voltage causes a current i to flow through the conductor. Since the length ‘ of the
conductor is placed in a magnetic field B, a force f is generated. This form of
operation is called an electrical motor.
If a moving conductor cuts a magnetic field of flux density, B, with a velocity v
then an electromagnetic force (emf), e, is induced in the conductor given by
Faraday’s law of electromagnetic induction as in (5.30). This mode of operation is
called an electrical generator.
e ¼ B‘v (5.30)
System modeling and control 275

Figure 5.13 Force generation in a conductor

Figure 5.14 Voltage induction in a conductor

In the form of generator operation, a force f is applied to a conductor placed


inside a magnetic field. With the effect of the applied force, the conductor moves in
the magnetic field of flux density cutting the magnetic field lines. This cause and
fact process is defined by Faraday’s law and expressed as in (5.30). A schematic
diagram of generator mode operation is depicted in Figure 5.14.
Now, let us place a single-turn coil in a uniformly distributed magnetic field
and apply a voltage V so that a current i flows through the coil as depicted in
Figure 5.15. Due to the flowing current, forces are generated on both sides of the
coil as a result of Ampere’s law. Since the coil is placed to rotate around an axis,
the forces result in a torque Te related to the distance d between two sides of the
coil. The generated torque is expressed as in (5.31).
Te ¼ Bi‘d (5.31)
where ‘ is the length of the coil under the effect of magnetic field B, i is the current
flowing in the coil and d is the distance between two sides of the coil. If the coil in
Figure 5.15 has N turns instead of one, the torque equation becomes as in (5.32).
Te ¼ NBi‘d (5.32)
276 Fuzzy logic control in energy systems, 2nd edition

d
r

Figure 5.15 A simple electrical motor

As mentioned earlier, if a moving conductor cuts a magnetic field of flux


density, B, with a velocity v then an emf, e, is induced in the conductor given by
Faraday’s law of electromagnetic induction as in (5.30). Let us expand this theory
to a coil with two sides rotating around an axis. Since there are two sides of the coil,
the induced voltage becomes twice that for a single conductor. Due to the rotation
around an axis, the velocity is replaced by an angular speed in rad/s. Then (5.30) is
replaced by (5.33) for a coil with N turn.
e ¼ 2NB‘wr (5.33)
Substituting r = d/2 from Figure 5.15 for r, the emf is written as
e ¼ NB‘wd (5.34)
The emf is an induced voltage in the coil of an electrical machine due to
Faraday’s law of induction. This induced voltage has a negative effect on the
applied voltage V according to Lenz law and is called back emf.
In the case of an electrical machine, the coil is placed on a rotatable body
called rotor, and for DC machines, it is called armature. The required magnetic
field is either generated by permanent magnets or electromagnets. Therefore, the
DC machines requiring electromagnets need additional coils to generate the mag-
netic field. Therefore, except for the permanent magnet (PM) DC machines, the
other DC machines have two coils, one is the armature coil where the power or
torque is generated, and the other one is the field coil used for excitation to generate
the magnetic field. These two coils, armature coil and field coil, are either fed
separately or from the same source. If they are fed separately, then this machine is
called a separately excited DC machine. If both coils are fed from the same source,
then the machine is named to represent the connection type of the coils according to
each other. If they are connected in series, then the machine is called a series
System modeling and control 277

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

Figure 5.16 Electromechanical diagram of a separately excited DC motor

Figure 5.17 The cause-and-effect digraph of the field subsystem

V i

Figure 5.18 The cause-and-effect digraph of the armature subsystem


278 Fuzzy logic control in energy systems, 2nd edition

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

Electromechanical interaction subsystem


If a DC voltage is applied to the field circuit, a field current occurs and a magnetic
field is generated as described under the subtitle field subsystem above. When a
magnetic field B is generated and the machine is stand still, the application of
armature voltage causes the armature current ia to flow in armature coil, which is
under the effect of the magnetic field B. Since a current-carrying coil in a magnetic
field generates torque according to Ampere’s law as given in (5.32) and written for
the motor as in (5.38).
Te ¼ NB‘dia (5.38)
A digraph representing the relationship between armature current ia and gen-
erated torque Te can be obtained as in Figure 5.20.
Due to the generated torque, the rotor starts rotating with an angular speed wm
as shown in Figure 5.19. According to Faraday’s law, if a coil is rotated in a
magnetic field, a voltage is induced in this coil. Therefore, once the coil starts
rotating due to the generated torque Te in the magnetic field B, a back emf ea is

Figure 5.19 The cause-and-effect digraph of the mechanical subsystem


280 Fuzzy logic control in energy systems, 2nd edition

Figure 5.20 Digraph of the current–torque electromechanical interaction

Velocity

Figure 5.21 Digraph of the speed-back emf electromechanical interaction

Velocity

V i T ω

Figure 5.22 The cause-and-effect digraph of a separately excited DC motor

generated as given by (5.34), which is rewritten for the DC motor in (5.39).


ea ¼ NB‘dwm (5.39)
A digraph representing the cause-and-effect relationship of angular velocity
and the back emf is shown in Figure 5.21.
The induced voltage in the armature windings will be opposite direction to the
voltage Va leading to the production of first motion which is the reason for its
formation in the first place. This event is called Lenz’s law and it is actually a result
of the principle of conservation of energy.
If the cause and effect relationships given in Figures 5.17–5.21 are combined,
the cause-and-effect diagram representing the overall operation of a DC motor for
both armature and field control cases is obtained as in Figure 5.22.
Since N is the number of turns of the armature coil, it is a constant quantity.
Similarly, d is the rotor diameter and l is the rotor length, they depend upon the
machine dimensions and are constants. Therefore, (5.38) and (5.39) can be written
System modeling and control 281

as in (5.40) and (5.41), respectively.


T e ¼ km kf i f i a (5.40)

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.

5.5.1 Modeling DC motors


Depending on application type, DC motors are controlled in terms of three vari-
ables, which are speed control, position control, and torque control. The control
process of these variables is done through armature, field, or both armature and
field. Therefore, the mathematical models of DC motors are obtained by
282 Fuzzy logic control in energy systems, 2nd edition

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

Figure 5.23 Electromechanical diagram of armature-controlled DC motor

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)

The simulation diagram of armature-controlled DC motor can be obtained easily


by using Equations (5.47)–(5.50). Since there are two first-order differential equa-
tions, there will be two integrators. The input to this system is the applied voltage Va
to the armature circuit and the rotor speed wm is the output since the speed control is
the objective in this system. The load torque TL is a disturbance input to the system.
Since it is an armature-controlled DC motor, the speed control will be done through
the armature voltage. The simulation diagram is shown in Figure 5.25. The position
of the shaft can also be added to the simulation diagram by integrating the speed.
The state equations of the armature-controlled DC motor can be written
directly from Figure 5.25.
2 3 2 3
2 3 Ra k 2 3 1
 
7 
x_ 1 0 0
6 La La 7 x1 6
4 x_ 2 5 ¼ 6 74 5 6 La1 7 Va
6 k b m 7 2x þ 6 7 (5.51)
4  05 4 0 5 TL
x_ 3 Jm Jm x 3 Jm
0 0 1 0 0
where the variables x1, x2, and x3 represent the armature current ia, motor speed wm,
and rotor position angle qm, respectively. The armature-controlled DC motor can be
simulated either using the simulation diagram in Figure 5.25 or state-space
Equation (5.51).

L
a a
a a m m
a e m m m

a m

a m m m

Figure 5.25 Simulation diagram of the armature-controlled DC motor


284 Fuzzy logic control in energy systems, 2nd edition

Computer simulation of armature-controlled DC motor has been given in


Examples 4.7–4.10. The mathematical model of the PMDC motor is the same one
obtained here. Therefore, similar examples are not repeated here.

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

Figure 5.26 Magnetizing curve representing the B–if relationship


System modeling and control 285

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.27 Simulation diagram of the armature and field-controlled DC motor

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

Figure E5.10(a) Simulink model of unified 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(b) Subsystems of the Simulink model shown in Figure E5.10(a)

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

Figure E5.10(d) Simulink submodel of the armature circuit

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

Figure E5.10(e) Simulink submodel of the field circuit

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

Figure E5.10(f) Simulink submodel of the mechanical subsystem

1
ia × 2
Te
2 Product
ifKe
× 1
3
ea
wm Product1

Figure E5.10(g) Simulink submodel of the mechanical subsystem


System modeling and control 289

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

Figure E5.10(h) Simulink submodel of the FLC-controlled DC motor

400

300
Speed (rad/s)

200

100

0
0 5 10 15 20
Time (s)

Figure E5.10(i) FLC controlled the speed response of the DC motor

flexibility of the controller. A better approach should be developed so that


armature and field control are done separately. For example, in order to reach
higher speeds above the rated value, the field voltage should be reduced while
the armature voltage is increased.
Shunt-excited DC motor
Field coil in shunt-excited DC motor is connected in parallel to the armature circuit
as shown in Figure 5.28. Two separate DC choppers or controlled rectifiers, which
are represented by the controlled switches Sa and Sf, can be used to control the
voltages to armature and field coils independently. One DC chopper or one con-
trollable rectifier can be used to control both coil voltages at the same time, as well.
Instead of one common controlled voltage, it is preferable to control both armature
and field voltages independently.
The properties of the shunt-connected field coil are the same as that of sepa-
rately excited machines. In other words, a separately excited DC motor can be used
as shunt excited, too. The shunt resistance Rfsh has a larger value compared to
armature resistance Ra such that a small amount of the total current im flows
through the shunt excited coil while the majority of the total current flows in
armature circuit. Therefore, the total motor current is written as in (5.58).
im ¼ ia þ ifsh (5.58)
290 Fuzzy logic control in energy systems, 2nd edition

T
S L
R
J
a
b
S
V R L

Figure 5.28 Electromechanical diagram of shunt excited DC motor

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

Figure 5.29 Electromechanical diagram of series-excited DC motor

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

Figure 5.30 Electromechanical diagram of compound excited DC motor

Bsh ¼ kfsh ifsh (5.67)


The parameter kfs is the slope of the magnetizing curve of Bs = f(ifs) and kfsh is
the slope of the magnetizing curve of Bsh = f(ifsh) similar to the magnetizing curve
of B = f(if) as shown in Figure 5.26. The full mathematical model of the compound-
excited DC motor is obtained by combining the series and shunt-excited machine
models.
A DC motor requires a power amplifier to drive it. High-speed, reliable, and
inexpensive solid state semi-conductor devices such as diodes, thyristors, and
recent devices such as gate turn-off thyristors (GTOs), bipolar junction transistors
(BJTs), metal oxide field effect transistors (MOSFETs) and insulated gate bipolar
transistors (IGBTs) have caused an important push up in the development of the
DC motor drive amplifiers. These improvements in DC motor drive systems have
increased the use of DC motors in industry and servo systems. The modeling of DC
motors given in this chapter can be used to simulate them in MATLAB and
Simulink by just integrating the models into the application.

5.5.2 Modeling AC motors


Mathematical modeling of DC motors is given in this chapter as examples of the
modeling of electromechanical systems. Their modeling is straightforward and
easy to follow the cause-and-effect relationships of the subsystems. However, the
modeling of induction machines requires a reference frame to work out and unite
the equations. The reference frame is used as a base for the equations to be trans-
formed. Due to the complexity and large contest of the AC machines, their mod-
eling is not going to be given in this book. However, in the chapters given later
about the application of fuzzy logic controllers, the modeling and simulation stu-
dies of synchronous generators will be discussed.

5.6 Numerical solution of model equations


Modeling and simulation of electrical, mechanical, and electromechanical systems
have been explained in previous sections of this chapter. The solutions of derived
System modeling and control 293

model equations in MATLAB and/or Simulink were given. MATLAB and


Simulink are making the solutions easier by using subprogram codes as MATLAB
functions for solutions. The users just need to put equations into proper forms such
as transfer functions, state-space equations, or simulation diagrams. While
MATLAB and Simulink make the solutions easier, the users generally do not care
how those equations are solved in the background and they get away with the
solution methods and their algorithms. This situation puts the engineers into diffi-
culties if they need to solve model equations without using MATLAB and
Simulink. Therefore, it would be better to include some numerical solution methods
here, so that a solution code could be written in any programming language inde-
pendent of MATLAB.
Two solution methods, which are Euler digital integration and the four-step
Runge–Kutta algorithm are going to be explained here.

5.6.1 Euler digital integration


Euler digital integration given by (5.68) is a simple method to be applied in the
solution of model equations of integral form as well as state-space form.
yn ¼ yn1 þ Trn1 (5.68)
Euler digital integration is an iterative method based on sample-and-hold
approach such that a new value is calculated at each iteration and held unchanged
until the next sampling. Then the new calculated value from the next sampling
takes over and is kept constant until the sampling comes after. Figure 5.31 shows
the solution results from Euler integration and the actual curve. Where T is the
sampling period or time increment at each iteration. As shown in Figure 5.31, the
Euler solution remains unchanged during each sampling period of T until a new
value is calculated in the next period.
There are other iterative methods such as trapezoid and Simpson rules to solve
integro-differential equations. Trapezoid and Simpson rules are defined by (5.69)
and (5.70), respectively. They give a better approximation compared to that of
Euler’s integration as could be understood from these definitions and from
Figure 5.32. Although trapezoid and Simpson rules give more accurate solutions,
they require more computer memory and iteration for the solution since they

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)

Figure 5.33 The rectangular area calculated by Euler’s integration

require more data from previous samplings.


T
yn ¼ yn1 þ ðrn þ rn1 Þ (5.69)
2
T
yn ¼ yn2 þ ðrn þ 4rn1 þ rn2 Þ (5.70)
3
where yn is the calculated output at the nth sampling, yn–1 and yn–2 are the calcu-
lated values from previous samplings, rn is the current input at nth sampling, rn–1
and rn–2 are the input signals from previous samplings.
Equation (5.69) gives an output signal approximation for the trapezoid rule of
integration as in Figure 5.32, which gives more accurate solution than Euler’s
integration.
Even if Euler’s integration is not as accurate as the others, it is going to be
explained and used in this section due to its simplicity and lower simulation time.
Let us integrate the curve z(t) in Figure 5.33 where the area under the curve can be
obtained using (5.71) in the time domain.
ðt
xðtÞ ¼ zðtÞdt þ xð0Þ (5.71)
0
The equivalence of (5.71) in the discrete domain will be as in (5.72).
xðnT Þ ¼ x½ðn  1ÞT  þ Tz½ðn  1ÞT  (5.72)
where x(nT) is the sum of the calculated perpendicular areas under the curve until
the nth sample. x[(n–1)T] is the sum of the calculated perpendicular areas under the
System modeling and control 295

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.

xðtÞ ¼ xð1Þ ¼ et ¼ e1 ¼ 0:3678 (E5.11e)


The solution results are close to each other but not equal. This error could be
reduced if the sampling period had been smaller such as 0.01 s. However, this time
more iteration would have been needed to reach 1 s.
296 Fuzzy logic control in energy systems, 2nd edition

5.6.2 Euler integration for state-space equations


Euler integration can be used to solve state-space model equations, too. Let us
consider integro-differential equation given in (5.74) and its discrete form in (5.75).
ðt
x1 ðtÞ ¼ x_ ðtÞdt þ xð0Þ (5.74)
0
xðnÞ ¼ xðn  1Þ þ T x_ ðn  1Þ (5.75)
where x(0) is the initial value of the variable x(t). The derivation x_ ðtÞ in the integral
part represents the state-space equations and is written as in (5.76) for continuous
and (5.77) for discrete forms.
x_ ðtÞ ¼ AxðtÞ þ BuðtÞ (5.76)
x_ ðn  1Þ ¼ xðn  1Þ þ Buðn  1Þ (5.77)
Since Euler integration is applied for digital simulation, (5.75) and (5.77) can be
used together in order to solve state-space model equations. In order to obtain the
solution numerically, the iteration starts by solving (5.77) and substituting the
resultant solution into (5.75). The process is repeated in every iteration until the final
result is obtained. This process is represented by the flowchart shown in Figure 5.34.

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

Figure 5.34 Flowchart of Euler’s integration to solve state-space model


equations
System modeling and control 297

P.S.: Analytic solution of this second-order system is given below.


    1 1
x1 ðtÞ ¼ et þ 2e2t x1 ð0Þ þ et  e2t x2 ð0Þ þ  et þ e2t
2 2
(E5.12c)
    3 1
x2 ðtÞ ¼ 2et þ 2e 2t
x1 ð0Þ þ 2et  e 2t
x2 ð0Þ þ  2et þ e2t
2 2
(E5.12d)

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.

Figure E5.12(a) MATLAB code for Euler integration

1.5
x2
Variables x1 and x2

0.5 x1

0
0 1 2 3 4 5 6
Time (s)

Figure E5.12(b) Solution results of Example 5.12 obtained by Euler integration


298 Fuzzy logic control in energy systems, 2nd edition

5.6.3 Runge–Kutta algorithm


There are several methods to be used to obtain approximate solutions of differential
equations relating to both types of initial value and boundary value problems [18]. The
Taylor series, RungeKutta, Adams–Bashforth, and Milne’s methods are some of the
well-known numerical methods used in the solution of differential equations [19].
Among those, the four-step Runge–Kutta method will be explained in this section.
Euler integration can be applied to solve ordinary differential equations more
accurately by selecting a smaller iteration step size or sampling period. However,
smaller step size requires more number of iterations to reach more accurate results.
The smaller step size problem can be overcome by the Runge–Kutta method since
it uses implicit and explicit iterative methods to reach the solution point. Especially
four-step Runge–Kutta algorithm, which also includes Euler integration is very
useful and widely used to solve higher-order ordinary differential equations
including non-linear system equations, too.
The four-step Runge–Kutta algorithm uses four-line slope approximations to
estimate the slope of the solution at time t0. The line slopes are obtained by using
(5.78)–(5.81).
a ¼ f ½xðt0 Þ; t0  (5.78)
 
T T
b ¼ f xðt0 Þ þ a ; t0 þ (5.79)
2 2
 
T T
c ¼ f xðt0 Þ þ b ; t0 þ (5.80)
2 2
d ¼ f ½xðt0 Þ þ cT ; t0 þ T  (5.81)
Then a weighted sum of the slopes a, b, c, and d gives the final estimate of
x(t0 + T) as in (5.82).
ða þ 2b þ 2c þ d ÞT
xðt0 þ T Þ ¼ xðt0 Þ þ (5.82)
6
xðt0 þ T Þ ¼ xðt0 Þ þ mT (5.83)
where t0 is the initial starting time and T is the step time or the sampling period. The
other symbols are described below.
a: a is the slope at the beginning of the time step. This slope corresponds to
Euler’s method.
b: If slope a is used to halfway of the sampling time, slope b will be an estimate of
the slope at the midpoint.
c: If the slope b is used halfway through the sampling time, then c becomes
another estimate of the slope at the midpoint.
d: If the slope c is used all the way across the sampling time (t0 + T), then d would
be an estimate of the slope at the endpoint.
m: m is the weighted average slope.
System modeling and control 299

5.6.4 Runge–Kutta algorithm for state-space equations


Let us adapt the four-step Runge–Kutta algorithm to the solution of state-space
equations using the form (5.84).
       
x_ 1 A11 A12 x1 B11 B12 u1
¼ þ (5.85)
x_ 2 A21 A22 x2 B21 B22 u2
 
x
½y ¼ ½ C11 C12  1 þ 0 (5.86)
x2
Since x_ ¼ dx _ _
dt and dt = T, then x 1 and x 2 can be written as in (5.87)
dx1 ¼ dt½ðA11 x1 þ A12 x2 Þ þ ðB11 u1 þ B12 u2 Þ
(5.87)
dx2 ¼ dt½ðA21 x1 þ A22 x2 Þ þ ðB21 u1 þ B22 u2 Þ
where dx1 and dx2 are the changes of x1 and x2, respectively, over a sampling
period. In order to obtain the solution for x1 and x2 the four-step Runge–Kutta
algorithm is used as follows.
Table 5.1 has been developed for a second-order system. Since there were two
variables we wrote two a slopes, two b slops, two c slopes, and two d slopes for the
solution. If there were a 10th-order system, we would have to write 10 slope
equations for each step of the Runge–Kutta algorithm. Therefore, a subprogram
should be developed to get rid of repeating calculations and make things easier.

Table 5.1 Runge–Kutta algorithm for a second-order state-space model equations

Step Formulation Description


Step 1 x11x ¼ x10 ; x21 ¼ x20 ; Initial values of x1 and x2 for step 1
a1 ¼ T ½ðA11 x11 þ A12 x21 Þ þ ðB11 u1 þ B12 u2 Þ Slope a1 for the variable x1
a2 ¼ T ½ðA21 x11 þ A22 x21 Þ þ ðB21 u1 þ B22 u2 Þ Slope a2 for the variable x2
Step 2 x12 ¼ x10 þ a21 ; x22 ¼ x20 þ a22 ; Initial values of x1 and x2 for the
b1 ¼ T ½ðA11 x12 þ A12 x22 Þ þ ðB11 u1 þ B12 u2 Þ step 2
b2 ¼ T ½ðA21 x12 þ A22 x22 Þ þ ðB21 u1 þ B22 u2 Þ Slope b1 for the variable x1
Slope b2 for the variable x2

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)

Update x10 ¼ x1 ðnÞ; x20 ¼ x2 ðnÞ Initial value updates of x1 and x2


for the next step (n + 1)
300 Fuzzy logic control in energy systems, 2nd edition

Equation (5.85) can be written in a closed form as in (5.88).


x_ n1 ¼ Ann xn1 þ Bnm um1 (5.88)
where x_ n1 is a state vector with the dimension n  1. A n  n is a n  n system
matrix with a square structure, Bn  m is called the input matrix, whose dimension is
n  m. Finally um  1 is the input vector. After these definitions, a MATLAB function
can be developed as in Figure 5.35.

Figure 5.35(a) Input and the first step of the four-step Runge–Kutta algorithm

Figure 5.35(b) The second step of the four-step Runge–Kutta algorithm


System modeling and control 301

Figure 5.35(c) The third 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.

Figure E5.13(a) MATLAB .m-file code for Example 5.13


System modeling and control 303

1.5

u, y, x1, x2
0.5

0
0 1 2 3 4 5 6
Time (s)

Figure E5.13(b) Variables x1 and x2

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

Figure P5.2 Figure for Problem P.5.2


304 Fuzzy logic control in energy systems, 2nd edition

k
f
m

x b

Figure P5.3 Figure for Problem P5.3

k b

m
V
k

m x
b
scope

Figure P5.4. Figure for Problem P5.4

(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

Figure P5.5(a) Figure for Problem P5.5

D
G

Figure P5.5(b) Details of gear system for Problem P5.5


306 Fuzzy logic control in energy systems, 2nd edition

(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

Figure P5.9 Figure for Problem P5.9

J
i i L R L θ
R
b
V ω
V V e T

Figure P5.10 Figure for problem P5.10

(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)

Figure P5.16(a) Circuit diagram of series connected RLC circuit

Figure P5.16(b) Simulation diagram of series connected RLC circuit


System modeling and control 309
  " # " #
x_ 1 0 1 x  1 0 0
¼ 1 R 1
þ 1 (P5.16a)
x_ 2   x2 0 v
LC L L
 
x
½ y ¼ ½ 0 1  1 (P5.16b)
x2

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

Application of fuzzy logic controller and decision maker to excitation control,


load–frequency control, and power compensation are discussed in this chapter.
Single- and multi-area control of power systems are also studied as examples in
the chapter besides FL-based load flow analysis.

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

Figure 6.1 Excitation and load–frequency control diagram of a synchronous


generator
FLC in power systems 313

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.

6.2 Excitation control


The control of electrical power systems is done in two steps, which are load–
frequency control and excitation control as depicted in Figure 6.1. In order to
generate the required power, steam or water input to the turbine is controlled by
load–frequency controller, which is called governor control. The emf, power factor,
and magnitude of the generated current are adjusted by excitation control. For
example, let us represent the synchronous generator by its per-phase Thevenin
equivalent circuit as shown in Figure 6.2.
Assume that the generator is operating with a lagging power factor and gen-
erating both active and reactive powers. The terminal voltage Vt is constant because
it is connected to an infinite bus. If the mechanical input power Pm is kept constant,
the generated electrical power Pe becomes constant, too. Under these operating
conditions, the phasor diagram given in Figure 6.3 is obtained from the per-phase
equivalent circuit in Figure 6.2.
The active electrical power generated by this machine can be expressed by two
different equations as in (6.1) and (6.2).
Pe ¼ Vt I cos q (6.1)

G t

Figure 6.2 Per-phase Thevenin equivalent circuit of a synchronous generator

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

Figure 6.5 The excitation effect on the phasor diagram


316 Fuzzy logic control in energy systems, 2nd edition

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

present as a problem to be solved in excitation systems. Various types of excitation


system models for stability studies in power systems are given by IEEE Std
421.5TM-2005 [44]. Besides, IEEE committee reports [5,6] and many other studies
in power system excitation modeling and control have been done in the literature.
Since there are many details available in the literature, more theoretical background
will not be repeated here. However, the modeling processes of mostly used exci-
tation systems for control purposes are given next.

6.2.1 Excitation system modeling


Automatic control of a physical system is a continuous process and requires mea-
surement, observation, and action continuously. A control signal for any changes
affecting the operation of the exciter must be generated to keep tracking the set
values, which are the terminal voltage and the reactive power of the generator.
Consider a typical exciter with a feedback structure as shown in Figure 6.6. In
this system the main synchronous generator is excited by using a DC generator. The
output voltage of the DC generator is directly applied to the field circuit of the
synchronous generator. Therefore, the DC voltage applied to the field of the syn-
chronous generator is adjusted in terms of the armature control of the DC generator.
As shown in Figure 6.6, the armature voltage of the DC generator is determined by
a voltage regulator using the difference between the reference voltage and the
synchronous generator’s terminal voltage, which is converted to DC to be used as a
feedback signal. The excitation system in Figure 6.6 consists of six main elements
as listed below.
l Synchronous generator, the main generator
l Rectifier and voltage transformers
l Difference amplifier
l Voltage regulator
l Power amplifier
l DC generator, the exciter
Since the terminal voltage of the synchronous generator in Figure 6.6 is to be
controlled, it is used as the feedback signal. Three-phase terminal voltages at
medium voltage levels are measured using a voltage transformer (VT) at low

Figure 6.6 A schematic diagram of the excitation control system


318 Fuzzy logic control in energy systems, 2nd edition

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

Figure 6.7 Connection diagram of VTs and rectifiers

Figure 6.8 Block diagram representation of difference amplifier


FLC in power systems 319

Figure 6.9 Block diagram representation of the regulator amplifier

Figure 6.10 Separately excited DC generator used as the exciter

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

Then (6.19) becomes as in (6.21).


tE v_ F þ RE iE ¼ vE (6.21)
The last equation looks like a linear time-invariant ordinary differential
equation. However, this equation is still not linear because the excitation voltage vF
of the synchronous generator is not linear with the exciter current iE. The exciter
voltage vE is usually assumed to be constant in stability studies. In excitation
control, the exciter voltage vE is adjusted to change the exciter current iE, and
therefore the terminal voltage of the synchronous generator.
Equation (6.21) represents an exciter system with a separately excited DC
machine is the exciter generator. Similar equation can be obtained for an exciter
using the self-excited DC generator. More details can be found in [1,2,4].
The exciter model given in (6.21) is not linear due to the nonlinear relation
between the exciter field current iE and synchronous generator field voltage vF.
Therefore, the solution of (6.21) requires nonlinear solution methods. The rela-
tionship between iE and vF is usually represented by a saturated magnetizing curve,
which includes a saturation function that is defined as in (6.22).
IA  IB
SE ¼ (6.22)
IB
where IA and IB are shown in Figure 6.11.
From (6.22)
IA ¼ ð1 þ SE ÞIB (6.23)
is obtained. Similarly, (6.24) is obtained from Figure 6.11.
EA ¼ ð1 þ SE ÞEB (6.24)
where SE is nonlinear and can be represented by any suitable nonlinear function [1].
If the slope of the air gap line is equal to 1/G, the total saturated current becomes as

Figure 6.11 Saturation curve of the exciter


322 Fuzzy logic control in energy systems, 2nd edition

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

Figure 6.12 Simulation diagram of the exciter

Figure 6.13 Normalized block diagram of the exciter


FLC in power systems 323

Figure 6.14 Block diagram of the overall exciter system model

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.

6.2.2 State-space model of excitation systems


In order to simulate the excitation control system, the block diagram given in
Figure 6.14 can be simulated by constructing the same diagram in Simulink.
However, a state-space model will be more useful to simulate the system by applying
numerical solution methods in any programming language such as C programming
language. The state-space model of the excitation system can be obtained by various
methods. One of these methods is the one converting the block diagram in Figure 6.14
into a simulation diagram and writing the state-space model equations directly from the
simulation diagram. In order to get an overall simulation diagram, each transfer func-
tion block in Figure 6.14 is converted to a simulation diagram first and then combined
to yield the general simulation diagram for the complete excitation system. For
example, the transfer function of the regulator amplifier given by (6.8) can be rewritten
as in (6.30) by ignoring the saturation block shown in Figure 6.9.
tA sVR ¼ KA Ve  VR (6.30)
Inverse Laplace transformation of (6.30) with zero initial conditions yields
(6.31), which can be represented by the simulation diagram shown in Figure 6.15.
tA v_ R ¼ KA ve  vR (6.31)
324 Fuzzy logic control in energy systems, 2nd edition

Figure 6.15 Block diagram of the overall exciter system model

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.

6.2.3 Fuzzy logic control of excitation systems


In order to damp oscillations faster and to make the power system more robust against
the oscillations in system frequency and voltages, additional compensators or power
system stabilizers are used. These compensators and stabilizers act like controllers
and filters to damp the oscillation so that the system keeps operating at
stable conditions. A power system stabilizer (PSS) gets the oscillating signal as an
input and generates a damping signal, which is added to the summer where the error
signal ve is calculated. The output signal of the PSS is added as a feedback signal to
damp the oscillations faster. A PSS can be designed to be used to damp voltage
oscillations as well as frequency oscillations. Various PSS structures have been stu-
died in literature including both conventional and intelligent methods. The use of
fuzzy logic as controller, stabilizer, and compensator is discussed here with examples.
The effect of adding an FLC to the exciter system is presented in Example 6.1.

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

Figure E6.1(b) Block diagram of the exciter system with FLC


FLC in power systems 327

Figure E6.1(c) Response of the exciter system with FLC

Table E6.1(a) The fuzzy rule table used in Example 6.1

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

Figure E6.1(d) Fuzzy membership functions used in Example 6.1

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

Figure E6.2(a) Simulink diagram of the exciter system with FLC

Figure E6.2(b) Response of the exciter system with FLC in Simulink.


FLC in power systems 329

Design Example 6.1


In order to increase the robustness of power excitation systems, usually a power
system stabilizer (PSS) or a power system compensator (PSC) is added to the
excitation systems. The outputs of both PSS and PSC are used as additional inputs
to the summer where the reference and feedback signal from the system output are
connected. Use Figures DE6.1(a) and DE6.1(b) as a benchmark for the design cases
asked below.
(a) Simulate the exciter system shown in Figure 6.16 with data given in Example
6.1 without any additional controller or component.
(b) Simulate the exciter system shown in Figure 6.17 with data given in Example
6.1 without any additional controller or component.
(c) Develop a fuzzy PSS that uses the terminal voltage change as input in order to
reduce the voltage oscillations and increase the stability of the system.
(d) Develop a fuzzy PSC that uses the terminal voltage as input in order to reduce
the voltage oscillations and increase the stability of the system.
Compare the effects of fuzzy PSS and Fuzzy compensator in power excitation
systems.

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

6.3 Load–frequency control


Load–frequency (L–F) control is an important task in electrical power system
design and operation. Since the load demand varies without any prior schedule, the
power generation is expected to overcome these variations without any voltage and
frequency instabilities. Therefore, voltage and frequency controllers are required to
maintain the generated power quality in order to supply power to the utility under
constant voltage and frequency operating conditions. The voltage control is done
by AVRs containing various types of compensators and controllers as discussed in
the previous section. The frequency control is done by load–frequency controllers,
which deal with the control of generator loadings depending on the frequency
changes. Each single generation area includes a load–frequency controller to
comply with the oscillations in frequency. Similarly, the load–frequency control
has to be applied in each area of multi-area power systems [15–21].
The load–frequency controllers are designed to ensure the stable and reliable
operation of power systems. Since the components of a power system are nonlinear,
a linearized model around an operating point is used in the design process of L–F
controllers. However, controllers based on linearized models are not capable of
supporting parameter variations for stability. Therefore, alternative methods such
as conventional controllers with improved dynamic models or adaptive and intel-
ligent controllers are required. Some of the proposed methods in literature deal with
system stability using fixed local plant models without considering the changes in
some system parameters as some methods use decentralized control approaches
based upon field testing and tuning in order to give robustness to the controllers.
Generalized approaches [45] based on the concepts of discontinuous control, dual-
mode control, and variable structure systems have also been proposed [46,47].
The variables of a single power system operating as a part of multi-area power
affect the system stability of the other areas. Therefore, an L–F control process has
to overcome the negative effects of system variables. The increasing interest and
development in intelligent control techniques have become a solution to the control
problems in power systems [11–15]. Due to their ability being able to model human
decision-making processes and represent vague and uncertain data, fuzzy logic-
based controllers have become an attractive choice in solving power system control
problems [11–14].

6.3.1 Small-signal modeling of power systems


As it is well defined in the literature [1–10], changes in real power mainly affect the
system frequency while the changes in reactive power have more effects on vol-
tage. The frequency is more sensitive to real power than it is to reactive power.
Therefore, the frequency oscillations due to the changes in active power demand
are damped using load–frequency controllers (LFC), which are used to maintain a
reasonable uniform frequency. The first step of control engineering consists of
mathematical modeling. Although fuzzy logic controllers do not require mathe-
matical models in real-time applications, they are needed for simulation purposes.
FLC in power systems 331

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

Figure 6.18 Block diagram of a single area load–frequency control


332 Fuzzy logic control in energy systems, 2nd edition

Figure 6.19 Steady-state frequency drop curve of the governor system

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

Figure 6.21 Active power transmission as a function of power angle


334 Fuzzy logic control in energy systems, 2nd edition

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

Figure 6.22 Simulation diagram of a two-area system

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.

6.3.2 Fuzzy logic controller design for LFC


Referring to the FLC developed and discussed in Chapter 4, it is known that the
FLC performs the same actions as a human operator by adjusting the input vari-
ables, only looking at the system output. Since the frequency oscillations are to be
damped in this problem, the frequency deviations, Dw, and changes in frequency
deviations, D(Dw), are the input signals of the FLC. When there is no oscillation,

Figure 6.23 Visual representation of the change DPL


FLC in power systems 337

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

classical controller, the response signal of this system is taken as a reference to


construct the rule table. The response signal, generated by the classical load–
frequency controller for an impulse input change is given in Figure 6.25. The plot is
obtained by using the matrices composed of (6.40) and (6.41) in the previous sec-
tion for the classical integral controller.
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. It is necessary to observe the behaviors of the error signal Dw and its
change D(Dw) on different operating regions in order to model the actions a human
operator would take. The decision is based upon different operating cases, deciding
whether the change, D(DP), in the controller output should be increased or
decreased according to the inputs of the fuzzifier. This controlled output is the
required change in the input of the system.
As been told, the result shown in Figure 6.25 is useful to construct the rule
table. The values from these graphics will be used to define the initial fuzzy set
intervals, which will be modified to reach a better structure with improved
performance.
Let us first try to develop an initial rule base (with only 3 fuzzy sets), which
will be extended to a 5 fuzzy sets base. According to the signs of Dw and D(Dw), the
sign of D(DP) is decided whether to be positive or negative. A summary of all
possible situations, or so-called operation regions, is given in Table 6.1.

× 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)

Figure 6.25 Impulse response of the system without any controller

Table 6.1 Output decision table

Operating regions
Dw + 0   0 +  + 0
D(Dw)    + + + 0 0 0
D(DP) +    + +  + 0
FLC in power systems 339

The sign of D(DP) should be positive if DP has to be increased and it should be


negative otherwise. This simple rule is applied as in Table 6.1 to determine the sign
of D(DP). A verbal expression of these rules is: “The error is positive and
decreasing towards zero. Therefore, D(DP) is set to positive to reduce the error.”
This example expresses the first column of Table 6.1. Similar reasoning can be
applied to the other columns. A “programming language translation” of this
table gives the expression.
IFDw is zero THEN D(DP) takes the sign of D(Dw), ELSE D(DP) takes the sign
of Dw.
Table 6.1 shows that each one of Dw, D(Dw), and D(DP) has three different
options for the signs to be assigned. They are either positive, negative, or zero.
With this knowledge, an initial rule decision table with nine rules can be formed
like in Table 6.2, where N means negative, Z zero, and P positive. The main part in
the middle represents the rules as well as the signs of D(DP).
From Table 6.2, some logical reasoning should be considered. A closer look at
this table shows that in some cases, there is a transition from negative to positive,
without passing through zero. Therefore, an adjustment in the initial rule table leads
to another table without this inconvenience. The influence of D(Dw) must stay, and
a symmetric solution has to be advised, so the modified rule table is the one that can
be found in Table 6.3.
A next step in designing the FLC is the extension of the nine rules table shown
in Table 6.3 to a 25 rules table, as in Table 6.4. In this last table, two extra sets are
added which gives us 5 fuzzy sets for each one of the input spaces. A nine-rule
fuzzy decision table may be sufficient for some applications. However, many
applications require more rules than nine rules.

Table 6.2 Initial rule table for D(DP)

Dw D(Dw)
N Z P
N N N N
Z N Z P
P P P P

Table 6.3 A nine-rule symmetrical table for D(DP)

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

Table 6.4 A nine-rule symmetrical table for D(DP)

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

Figure 6.26 Partitioning input spaces into five fuzzy subsections


FLC in power systems 341

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.

Table 6.5 A nine-rule symmetrical table for D(DP)

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

Figure 6.27 Partitioning input spaces into five fuzzy subsections


342 Fuzzy logic control in energy systems, 2nd edition

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,

Figure E6.3(a) Input data fuzzification for Example 6.3


FLC in power systems 343

respectively. A MATLAB function implementing (6.48), such as the one presented


in Figure 2.5 in Chapter 2, can be used to obtain the membership values of
Dw = 0.9  104 and D(Dw) = 0.45  106 in related fuzzy subsets as follows:
mNL ðDwÞ ¼ triangle01mð1:5; 1:5; 0:75; 0:9Þ ¼ 0:2 (E6.3a)
mNS ðDwÞ ¼ triangle01mð1:5; 0:75; 0:0; 0:9Þ ¼ 0:8 (E6.3b)
mZE ðDwÞ ¼ mPS ðDwÞ ¼ mPL ðDwÞ ¼ 0:0 (E6.3c)
mNL ðDðDwÞÞ ¼ mNS ðDðDwÞÞ ¼ 0:0 (E6.3d)
mZE ðDðDwÞÞ ¼ triangle01mð0:75; 0:0; 0:75; 0:45Þ ¼ 0:4 (E6.3e)
mPS ðDðDwÞÞ ¼ triangle01mð0:0; 0:75; 1:5; 0:45Þ ¼ 0:6 (E6.3f)
mPL ðDðDwÞÞ ¼ 0:0 (E6.3g)
4 6
where the multipliers 10 and 10 are omitted in (E6.3a)–(E6.3g) since the
use of these multipliers does not affect the membership values.
The membership values of Dw and D(Dw) on fuzzy subsets NL, NS, ZE, and
PS are evaluated by Table 6.4 using the min operator as in (E6.3h) to yield the
fuzzy membership values or the weighting factors at the output space for each rule
as depicted in Table E6.3(a).
mNS ðDðDPÞÞ ¼ min½mNL ðDwÞ; mPS ðDðDwÞÞ (E6.3h)
mNS ðDðDPÞÞ ¼ min½0:2; 0:6 ¼ 0:2 (E6.3i)
There are four active rules for the given values of Dw and D(Dw) as depicted in
Table E6.3(a). All of the other rules are zero and they have no effect in the output.
Four active rules are expressed as follows.
R1: If Dw is NL and D(Dw) is ZE, then D(DP) is NS.
R2: If Dw is NL and D(Dw) is PS, then D(DP) is NS.
R3: If Dw is NS and D(Dw) is ZE, then D(DP) is NS.
R4: If Dw is NS and D(Dw) is PS, then D(DP) is ZE.
The numerical values are obtained by employing a fuzzy decision process and
are shown in Table E6.3(a). The fuzzification results of input data Dw =
0.9  104 and D(Dw) = 0.45  106 from (E6.3a) to (E6.3g) are carried on to the

Table E6.3(a) Weighting factors of each rule at the output space D(DP)

Dw = 0.45  106 D(Dw) = 0.9  104


0.0/NLP 0.0/NSP 0.4/ZEP 0.6/PSP 0.0/PLP
0.2/NLP 0.0/NLP 0.0/NLP 0.2/NSP 0.2/NSP 0.0/ZEP
0.8/NSP 0.0/NLP 0.0/NSP 0.4/NSP 0.6/ZEP 0.0/PSP
0.0/ZEP 0.0/NSP 0.0/NSP 0.0/ZEP 0.0/PSP 0.0/PSP
0.0/PSP 0.0/NSP 0.0/ZEP 0.0/PSP 0.0/PSP 0.0/PLP
0.0/PLP 0.0/ZEP 0.0/PSP 0.0/PSP 0.0/PLP 0.0/PLP
344 Fuzzy logic control in energy systems, 2nd edition

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

The steady-state equations become as in (E6.4c)


x_ ¼ Ax þ B1 u1 þ B2 u2 þ B3 u3 þ B4 u4 (E6.4c)

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

Parameter Area 1 Area 2


D 0.6 0.9
H 5 4
R 0.05 0.0625
tg 0.2 0.3
tT 0.5 0.6
B 20.6 16.9
DPL 0.2 0
FLC in power systems 347

Figure E6.5(a) Simulink model of two-area AGC power system with FLC

× 10–3
5
Frequency Change (pu)

Area 2 With FLC


0
Area 1
–5

–10

–15
0 10 20 30 40
Time (s)

Figure E6.5(b) Load–frequency controller responses in a two-area power system


using FLC

Design Example 6.2


In two-area AGC power systems, the frequency of both areas is affected by the
demand power change that occurred in one of the areas. However, the frequency of
the area where the demand power is changed gets affected faster with a larger
change then the frequency of the other area. For example, if a change occurs in the
348 Fuzzy logic control in energy systems, 2nd edition

Figure E6.5(c) Load–frequency controller responses in a two-area power system


PID

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.

6.4 FLC in power compensation


The transmitted or distributed power in AC systems is a complex function with real
and imaginary parts. The power converted to usable energy by electrical machines
FLC in power systems 349

Q1

Figure 6.28 Reactive power generation by capacitors on the load site

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.

6.4.1 Power factor improvement


The use of capacitors to generate the reactive power requirement of the load and
improve distribution line power factor closer to unity is called power factor
improvement. With a small, such as 5%, reactive power loading, the power trans-
mission and distribution lines are prevented from overloading and higher power
losses. Assume that the required active and reactive powers in a manufacturing
plant are P1 and Q1, respectively. The corresponding power factor for P1 and Q1 is
cosf1 as depicted by the power triangle in Figure 6.29. However, the utility can
350 Fuzzy logic control in energy systems, 2nd edition

Figure 6.29 Power triangle before and after the compensation

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

Figure 6.30 A power factor control scheme

(6.53), (6.54), and (6.55).


pffiffiffi
S2 ¼ 3I2 V2 (6.53)
qffiffiffiffiffiffiffiffiffiffiffiffiffiffiffiffi
Q2 ¼ S22  P22 (6.54)
P2
cos f2 ¼ (6.55)
S2

Design Example 6.3


Assume that the distribution line shown in Figure 6.30 has a length of 10 km. The
line impedance is ZL = (0.196 + j0.320) Ohm/km. The line-to-line voltage at the
receiving end is 6 kV, load power at the receiving end is S1 = 30 MVA at a lagging
power factor of 0.75. A 5% voltage drop is allowed in this distribution feeder.
(a) Solve this problem by hand calculation and find active and reactive power
components flowing through line and related power factor.
(b) Obtain the voltage at the sending end and active power loss in the line.
(c) Calculate the required capacitor power to increase the power factor up to 0.95
and repeat parts (a) and (b) to observe the change in power loss in the line.
(d) Simulate this system in MATLAB/Simulink without the compensator. Plot
Voltage, current, and power waveforms at both ends of the transmission line.
(e) Connect the required capacitor bank you have calculated in part (c) to the load
bus (bus 3) and simulate the system. Observe the changes in bus voltages,
power flows, line power factor, and line losses.
(f) Add a 10 MVA load with a lagging power factor of 0.80 and repeat parts (b)–(e).
(g) Remove the load you have connected in part (f) and another power of 5 MW.
Then repeat parts (b)–(e).
352 Fuzzy logic control in energy systems, 2nd edition

Design Example 6.4


Assume that the manufacturing plant has asynchronous motors characterized by
their powers and power factors as follows.
Category 1: 20 kW at a lagging power factor of 0.80.
Category 2: 50 kW at a lagging power factor of 0.70.
Category 3: 100 kW at a lagging power factor of 0.75.
The capacitors are available in 50 kVAr groups enabling 50 kVAr switching
steps per phase.
Design a fuzzy logic decision maker (FDM) for the problem described in
Design Example 6.3 such that the lagging power factor of the power carried by the
distribution line is kept between 0.92 and 0.98 by switching the capacitor banks on
or off under the operating cases given below. Assume increasing and decreasing
capacitors in steps of 50 kVAr.
(a) 5 of 20 kW motors, 5 of 50 kW motors, and 2 of 100 kW motors are turned off.
(b) 5 of 20 kW motors, 15 of 50 kW motors, and 1 of 100 kW motors are turned on.

6.4.2 Bus voltage control


The load bus voltage decreases due to heavy loading or increases due to light
loadings. In both cases, the voltage at the load bus must remain at its rated value so
that the loads operating at this bus keep running without getting harmed because of
over-voltage or without losing performance because of under-voltage conditions.
The power stations where the electrical power is generated are generally far away
from the load sites in conventional power grids. Therefore, the utility acts as an infinite
source to the users at the end of distribution lines such that the effects of sudden load
changes along or at the end of the feeders are negligible. The voltage profile along a
radial feeder shows a reduction in magnitude due to line losses. Switching on or off a
couple of houses or houses along a street does not have a considerable large effect on
the voltage profile of the whole neighborhood. High impedance between electrical
generators and distribution feeders is high enough to compensate for these changes at
user sites. Although the changes in loads are not large enough to affect the stability of
power systems, the bus voltages along a radial feeder may be affected by these chan-
ges. Higher load power causes more voltage drop along the power line. In order to keep
the bus voltages at nominal values capacitor groups are connected to reduce the power
losses so that the voltage drops are also reduced.
The capacitors connected to the load bus for power factor improvement cause a
voltage rise in the bus they are connected to. Since the capacitor current is leading
the bus voltage it causes a voltage rise due to line reactance as in (6.56).
Vrise ¼ IC XL (6.56)
where IC is the rated total current drawn by the capacitor groups connected to bus
3 in Figure 6.30 and XL is the reactance of the distribution line. The capacitive
current is generated by the capacitor groups as a function of the total capacitor
FLC in power systems 353

power and the bus voltage as in (6.57).


Vrise ¼ IC XL (6.57)
Since the rated total capacitor current is obtained as in (6.58)
QC
IC ¼ pffiffiffi (6.58)
3VLL
The voltage rise can be expressed as a function of three-phase reactive power
QC and line-to-line voltage VLL as in (6.59).
 
XL QC
Vrise ¼ pffiffiffi (6.59)
3 VLL
Note that the line reactance is constant. VLL is the phase-to-phase voltage
before the voltage rise and QC is three-phase reactive power causing the voltage
rise. The voltage rise is usually expressed in percentages as in (6.60) and (61) for
line-to-line and line-to-neutral voltages, respectively.
 
X L QC
VLLrise % ¼ p ffiffi
ffi 2
100 (6.60)
3 VLL
 
XL QC1f
VLN rise % ¼ pffiffiffi 2
100 (6.61)
3 VLN
p
where QC1f = QC/3 and VLL = 3VLN.
In order to keep the bus voltage at its rated value, the required change in the
bus voltage is calculated and used in a controller or in an FDM to decide how much
increment or decrement should be made in reactive power. An algorithm shown in
Figure 6.31 can be applied for bus voltage control.

Figure 6.31 A power bus voltage control scheme


354 Fuzzy logic control in energy systems, 2nd edition

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%.

Figure E6.6 The power system to be studied in Example 6.6


FLC in power systems 355

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

Vb3 Vb2 jd¼Vb32 j0o þ ZL qoZ SPT1f foT (E6.6.5)

Rewriting (E6.6.5) yields (E6.6.6)


6:3
Vb32 j0o  Vb3 pffiffiffi jdþð3:2515j62:7257Þ ð0:5735j35:5377o Þ ¼ 0 (E6.6.6)
3
where two unknowns, which are the line-to-neutral voltage Vb3 at bus b3 and phase
angle d of the line-to-neutral voltage Vb2 at bus b2 are obtained from the solution of
(E6.6.6) as Vb3 ¼ 3:3486 kV and d ¼ 7:82o , respectively.
pffiffiffi
(a) Line-to-line voltage at load bus b3 is obtained as Vb3LL ¼ 3:3486 3 ¼ 5:8 kV
Line power flows and line power factor when there is no capacitor connected
to the load bus b3 are calculated as follows.
S P1 ¼ 0:8 þ j0:6 MVA, S P1 ¼ 1j36:87o MVA, cosfP1 = 0.8 lagging
S P2 ¼ 0:6 þ j0:4 MVA, S P2 ¼ 0:7211j33:69o MVA, cosfP2 = 0.8321 lagging
Total apparent power and power factor in the power line will be
S PT ¼ 1:4 þ j1:0 MVA, cosfPT = 0.8137 lagging and fPT = 35.5377
Voltage drop is calculated as the difference between sending and receiving
end voltages.
DV ¼ V b2  V b3 (E6.6.7)
356 Fuzzy logic control in energy systems, 2nd edition

Substitution of numerical values yields


6:3 5:8
DV ¼ pffiffiffi j7:82o  pffiffiffi j0o ¼ 0:5569j62:7257o kV
3 3
Percentage voltage drop is obtained as 7.9449% using (E6.6.8).
Vb2  Vb3
DV % ¼  100 (E6.6.8)
Vb2
It is obvious that 7.9449% is a high percentage since the allowable voltage
drop is given as 5%.
(b) Required capacitor power to be connected to bus b3 to increase the line power
factor to 0.98 lagging is obtained directly by using (6.52).
Power factor angle before the compensation is

fPT ¼ cos1 fPT ¼ cos1 ð0:8137Þ ¼ 35:5377o


Required power factor angle after the compensation is

fPT2 ¼ cos1 fPT2 ¼ cos1 ð0:98Þ ¼ 11:478o


Substituting power factor angles before and after the compensation into
(6.48) yields the capacitive power to be connected to bus b3.
QC ¼ 1:4ðtanð35:5377Þ  tanð11:478ÞÞ ¼ 0:7157 MVAr
(c) The voltage rise at bus b3 after the capacitors with a total power of 715.7 kVAr
are connected is calculated using (6.60).
 
2:89 0:7157
VLLrise % ¼ pffiffiffi 100 ¼ 3:5995
3 5:82

The new line-to-neutral voltage at bus b3 becomes as follows


5:8 5:8
V3LNnew ¼ pffiffiffi þ 0:0355  pffiffiffi ¼ 3:4675 kV
3 3
Then the new line-to-line voltage becomes
pffiffiffi
V3LLnew ¼ 3 ð3:4675Þ ¼ 6:0059 ffi 6 kV
The new voltage drop in the power line is equal to
6:3  6:0
DVnew % ¼  100 ¼ 4:6683
6:3
After the compensation, the voltage drop has been reduced to 4.6683%, which
is smaller than the acceptable limit given as 5%.
FLC in power systems 357

Design Example 6.5


Repeat Design Example 6.3 and calculate the voltage rise for the following cases.
(a) After connecting the capacitors to increase the power factor up to 0.95 lagging.
(b) After adding a 10 MVA load with a lagging power factor of 0.80 when the
capacitors calculated in (a) are connected.
(c) After removing the load you have connected in part (b) and another power of 5
MW when the capacitors calculated in (a) are connected.
(d) Simulate this system in MATLAB/Simulink for the operating cases
described above.

Design Example 6.6


Design a fuzzy logic decision maker (FDM) for the problem described in Design
Example 6.4 such that the load bus voltage is kept at 6 kV when the lagging power
factor of the power carried by the distribution line is kept between 0.92 and 0.98 by
switching the capacitor banks on or off under the operating cases given below.
Assume increasing and decreasing capacitors in steps of 50 kVAr.
(a) 5 of 20 kW motors, 5 of 50 kW motors, and 2 of 100 kW motors are turned off.
(b) 5 of 20 kW motors, 15 of 50 kW motors, and 1 of 100 kW motors are turned on.

6.5 FLC in load flow analysis


The main duty of a power system is to supply the required load power at rated voltage
and frequency whenever it is needed. The power system must be secure and reliable,
which requires system information at all times. Power flow (PF) analysis is an opera-
tional overlooked map of the interconnected power system providing information on bus
voltages and active–reactive power flows in transmission lines. This information on both
bus voltages and the power flows in transmission lines is used for planning, operating,
and management purposes as well as for recovering the system after the occurrence of
unexpected faults and abnormal operating conditions. Therefore, it is an important task
to have an accurate model of the power system to perform the PF analysis [48].
Interconnected power systems are modeled in various ways for PF solutions.
Usually, node or branch equations are used. Since the PF equations are nonlinear,
iterative methods such as Gauss–Seidel (G–S), Newton–Raphson (N–R), and Fast
Decoupled (FD) PF solution methods are preferred. Besides these classical PF
solution methods, many alternative works have appeared in the literature. A
Continuation Power Flow method was described in [49] for steady-state voltage
stability analysis. In this study, the authors developed a new approach based on
classical N–R Power Flow solution by injecting sub-parameters into the system so
that the convergence of the N–R solution is guaranteed and the PF solution is
obtained continuously for changing load conditions. Compensation-based power
flow method is given in [50] for weakly meshed distribution and transmission
networks. The authors show that this method works well, especially in radial and
weak distribution networks. A three-phase power flow method for real-time
358 Fuzzy logic control in energy systems, 2nd edition

distribution system analysis is proposed in [51]. This method also uses a


compensation-based PF approach for weak distribution networks rather than power
transmission systems. A power flow solution method is described in [52] for the
systems with uncertain inputs. The method uses interval arithmetic to include the
uncertain data in the solution. A fuzzy set approach is proposed in [53] by con-
sidering the inputs of the power system as fuzzy variables. In this study, the bus
powers, bus voltages, and bus voltage angles are modeled as fuzzy variables and
evaluated in an N–R power flow algorithm. In reference [30], fuzzy logic is used to
adjust the variables of the power system during the power flow solution. The line
impedances, bus voltage angles, and transformer tap positions are selected as the
parameters to be adjusted within the limits of the power flowing in the lines and the
bus voltage magnitudes. This study also deals with the acceleration of the iteration
convergence. In order to reduce the processing time of the PF solution in classical
PF methods, a fuzzy logic-based approach is used to update a correction factor in
[29] where the PF solution is based upon the modification of fast decoupled PF
solution method. A method consisting of some of the details that are ignored for
simplicity in classical PF modelings of power systems is given in [54]. The fuzzy
subsets are used to include the reactive power boundaries and load uncertainties for
more accurate PF modeling. Another fuzzy logic-based PF solution algorithm is
described in [55] by including the fuzziness of loads and generated power in the
modeling, which results in the PF solutions as fuzzy outputs.
Fuzzy logic is going to be used to develop a fuzzy-based acceleration factor in
this section of the book. The Fuzzy Logic Acceleration Factor (FLAF) has been
developed to speed up the PF solution by modifying classical G–S, N–R, and FD
power flow solution algorithms. With the FLAF algorithm, large initial steps are
processed as the step sizes are reduced as the solution point comes closer. Besides,
the ability of the fuzzy decision-making process remains the direction of the
iteration toward the convergence point. The proposed FLAF algorithms are com-
pared with the original PF algorithms for performance analysis.

6.5.1 Power system modeling for power flow


It is not intended in this section to explain how the PF equations are obtained. This
information can be found in any book related to power system analysis. Therefore,
only the final equations are discussed and the application of the FLAF algorithm is
explained.
A 30-bus IEEE test system is shown in Figure 32, which is adapted from [4]
and used in the simulations to test and compare the results with the other ones. All
line and bus data are given in [4]. The final forms of the PF equations for G–S, N–R,
and FD solution algorithms are summarized below and the use of the FLAF
algorithm is described afterward.

6.5.2 FL accelerated Gauss–Seidel algorithm


Gauss–Seidel power flow algorithm is based on the calculation of the bus voltages
iteratively. Starting with the initial guesses, the iteration continues until the
FLC in power systems 359

Figure 6.32 IEEE 30-bus test system [4]

difference between two consecutive values is within a preset precision value.

DPi ðkÞ  e (6.64)

DQi ðkÞ  e (6.65)

The bus voltages are updated at each iteration as

Vi ðkþ1Þ ¼ Vi ðkÞ þ aDVi ðkÞ (6.66)


where Vik is the voltage of the ith bus for the kth iteration, Vikþ1 is the newly
updated voltage of the same bus, and DVik is the change in the ith bus voltage from
iteration (k1) to k. a is called the acceleration factor and is used to speed up the
solution. The best value of a in classical PF solution algorithms is obtained by
using optimization techniques and kept constant during the iterative PF solution.
Large values of a may cause the system to reach the convergence point faster.
However, there is a high risk of skipping the solution point with larger a. Smaller a
may result in a closer catch-up to the convergence point, but the required iteration
number will tremendously be increased this time. Therefore, the use of a flexible
acceleration factor may be a solution to speed up the system when the solution is far
away from the convergence and slow it down when the solution approaches the
convergence point.
360 Fuzzy logic control in energy systems, 2nd edition
ðk Þ ðk Þ
Using the changes DPi and DQi in active and reactive power, respectively,
as the inputs to the fuzzy logic decision maker (FLDM) for the ith bus, a flexible
acceleration factor is generated. This new acceleration factor generated by FLDM
is represented by ab to replace a in (6.66). Since ab is obtained by a fuzzy decision-
making process it is called a Fuzzy Logic Acceleration Factor (FLAF). The process
of FLDM to generate the FLAF, which is also represented by ab , is shown in
Figure 6.33.
The FLDM consists of three stages namely fuzzifier, fuzzy rules, and defuzzi-
fier. The power changes are fuzzified in the first stage and converted to member-
ship values, which are evaluated by fuzzy rules in the second stage. Since the
output from the fuzzy rule process is fuzzy, the third stage is used a defuzzifier in
order to convert the fuzzy decision to a crisp value. The fuzzification stage uses
triangular fuzzy membership functions to fuzzify crisp inputs as shown in
Figure 6.34 where TS, S, M, B, and TB stand for Too Small, Small, Medium, Big,
and Too Big, respectively.
The absolute total power change D(PQ)(k) is the sum of the absolute active and
reactive power changes and obtained as

DðPQÞki ¼ DPi ðkÞ þ DQi ðkÞ (6.67)

Due to the triangular fuzzy membership functions used in the fuzzification


stage shown in Figure 6.34, there will be maximum of two active fuzzy rules for
each iteration. For example, there are two active fuzzy rules because of two inter-
ceptions of the crisp input D(PQ)(k) with the fuzzy subsets S and TS in Figure 6.34

Figure 6.33 Fuzzy decision maker used as FLAF

Figure 6.34 The fuzzy subsets and the fuzzification of the power change
FLC in power systems 361

Figure 6.35 The fuzzy output surface of the FLDM

resulting in the fuzzy membership values a and b as

a ¼ mS ½DðPQÞki  (6.68)

b ¼ mTS ½DðPQÞki  (6.69)


The following five rules are defined in the rule base of the FLDM.
Rule 1: If the input is TS, then the output is TS.
Rule 2: If the input is S, then the output is S.
Rule 3: If the input is M, then the output is M.
Rule 4: If the input is B, then the output is B.
Rule 5: If the input is TB, then the output is TB.
The rule base implies that the output takes the same action as the input. The
only difference is the amount of change which is determined by the upper and
lower limits of the crisp universes. These limits are given in Figure 6.34. for the
power change and in Figure 6.35 for the acceleration factor.
The final crisp output akb of the FLDM is obtained by applying the center of
area method [56]. It can be seen that the FLAF can have any value in the interval
[1,2] depending on the value of the absolute total power change at bus i. The value
of the acceleration factor FLAF may differ from bus to bus for all iterations.

6.5.3 FL accelerated Newton–Raphson algorithm


As well known, the classical N–R PF algorithm has already many advantages over
the classical G–S PF algorithm. However, the N–R algorithm can be improved
more by applying a flexible FLAF to the solution. As in the G–S algorithm, the
convergence of the N–R algorithm also uses the absolute power changes as given
by (6.64) and (6.65). Similar to (6.66), the acceleration factor is included in the
updated equations of power angle and bus voltages as

di ðkþ1Þ ¼ di ðkÞ þ ab Ddi ðkÞ (6.70)


ðkþ1Þ ðkÞ ðkÞ
Vi ¼ Vi þ ab D V i (6.71)

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.

6.5.4 FL accelerated fast decoupled algorithm


A similar approach is also applied here to get a faster solution. However, the fuzzy
logic acceleration factor is injected at two points of the FD algorithm because of the
inclusion of active and reactive power changes in the solution as decoupled vari-
ables of two separate equations. Therefore, two FLAFs (abP and abQ ) are generated
in this section. One from active power change and the other one from the reactive
power change. These acceleration factors are then used to speed up the solutions to
find the change in power angle Dd and the change in bus voltage magnitudeDjV j.

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.

6.5.5 Evaluations of the effect of FLAF


The IEEE 30-bus load flow test system is simulated using Gauss–Seidel, Newton–
Raphson, and Fast Decoupled algorithms without and with the fuzzy logic-based
acceleration factor. Figures 6.37 and 6.38 show the convergence error change with
respect to the iteration count for the cases without and with the fuzzy logic accel-
eration factor (FLAF), respectively. The convergence error changes for N–R

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

In order to increase the speed of power flow analysis algorithms, a dynamic


acceleration factor is generated using the FL decision-making process and applied
to Gauss–Seidel, Newton–Raphson, and Fast Decoupled load flow solution meth-
ods. The effect of the FLAF is more clear in Gauss–Seidel algorithm, because this
algorithm requires more iterations to solve the IEEE 30-bus test system compared
to the other two methods discussed here. Even if the effect of the FLAF is not
visible for the problems requiring less than 10 iterations, it is more effective for the
problems that require more iteration. Besides the iteration reduction, the FLAF can
be used to ensure the convergence whatever the starting values are.
366 Fuzzy logic control in energy systems, 2nd edition

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

Figure P6.6(a) A single area AGC power system to be used in P.6.6


368 Fuzzy logic control in energy systems, 2nd edition

Figure P6.7(a) A two-area AGC power system to be used in P.6.7

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

(a) Obtain the voltage rise at the load bus.


(b) Obtain the new voltage at the load bus.
(c) Obtain the voltage rise as a percentage of the nominal bus voltage.
(d) If a voltage rise of 2% is allowed at the load bus, what changes in
capacitor power should be made.
(e) What will be the value of line power factor after the changes made to
the capacitors in part (d).
P.6.11 Simulate the system described in Example 6.6 using MATLAB/Simulink
and observe the operational behavior of the system in parts (a), (b), and (c)
of Example 6.6.
P.6.12 Repeat Problem P.6.11 if Plant 2 in Example 6.6 is turned off when the system
is operating under the conditions described in part (b) of Example 6.6.

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

After a general introduction about wind energy systems, the application of


fuzzy logic control and decision-making processes to wind energy conversion
systems and their interfacing to utility are given in this chapter. Problems and
control issues in wind energy conversion systems are studied and the utili-
zation of fuzzy logic in solving these problems are shown.

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.

7.2 Wind turbine


A WEC system consists of mainly a wind turbine, an electrical generator, and
interfacing devices to load or to the utility grid. Besides the main units, turbine
blades, gear trains, excitation capacitors, converters, and controllers are the other
important elements of WEC systems. A generalized schematic diagram of a WEC
system is given in Figure 7.1. The wind speed effect, the wind power, to the wind
turbine is controlled by pitch angle control of the turbine blades. Turbine speed is
increased or decreased by a gear train to have the electrical generator run at a speed
that is suitable for generating electrical power.
FLC in wind energy systems 375

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

Controller PR Controller V DCR Controller ωR

Pitch angle

Figure 7.1 General schematic diagram of a WEC system

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)

Figure 7.2 Wind power as a function of wind speed

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.3 Turbine output power curves at various wind speeds


378 Fuzzy logic control in energy systems, 2nd edition

Figure 7.4 MATLAB file used to plot wind turbine power curves

Figure 7.5 MATLAB function used to obtain wind 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.

7.3 Electrical generator

The wind power is converted to electrical power by electrical generators. The


mechanical torque given in (7.8) is generated by the wind turbine due to wind speed
and is used as the input torque to the generator. Various types of electrical gen-
erators are used in WEC systems. Asynchronous or induction, synchronous,
FLC in wind energy systems 379

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

–P (pu) –PL P (pu)

Figure 7.6 Speed–power characteristics of an asynchronous machine


380 Fuzzy logic control in energy systems, 2nd edition

7.3.1 Dynamic modeling of induction generator


In order to analyze the dynamic performance and transients as well as the steady-
state response of the wind-driven three-phase induction machine, a mathematical
model representation must be obtained. Numerous methods have been developed to
analyze the transient performance of induction machines [40–44]. A three-phase
induction machine can be represented by its voltage equations corresponding to the
stator and rotor windings in terms of machine variables under the following
assumptions [42,43]:
(i) Both rotor and stator have three-phase balanced windings.
(ii) Three-phase windings are sinusoidally distributed in space and displaced
120 apart.
(iii) Flux magnetomotive force (mmf) and flux waves are distributed sinusoidally.
(iv) Effects of teeth and slots are neglected.
(v) Air gap is uniform.
(vi) Saturation, hysteresis, and eddy current effects are ignored.
(vii) Rotor windings are short-circuited so that the rotor terminal voltages are zero.
Under these assumptions, the resistances and the self-inductances of three-
phase windings in stator and rotor can be considered independent of time and rotor
displacement angle. Hence the following equalities are written.
Rs ¼ Ra ¼ Rb ¼ Rc (7.9)
Ls ¼ La ¼ Lb ¼ Lc (7.10)
Rr ¼ Rd ¼ Re ¼ Rf (7.11)
Lr ¼ Ld ¼ Le ¼ Lf (7.12)
where the stator resistance Rs is equal to the individual resistances Ra, Rb, and Rc of
phases a, b, and c, respectively. The stator inductance Ls is equal to the phase
inductances La, Lb, and Lc of the phases a, b, and c. Similarly, the rotor resistance
Rr and inductance Lr are equal to phase resistances and inductances Rd, Re, Rf and
Ld, Le, Lf of the phases d, e, and f, respectively. The mutual inductances between
the stator windings and between the rotor windings themselves are also regarded as
equal and independent of time and rotor position angle due to the assumptions of
the balanced three-phase distribution of the windings a, b, c and d, e, f.
Ms ¼ Mab ¼ Mac ¼ Mba ¼ Mca ¼ Mcb (7.13)
Mr ¼ Mde ¼ Mdf ¼ Med ¼ Mfd ¼ Mfe (7.14)
where M indicates mutual inductance and subscripts ab, ac, . . . , de, df, . . . , etc.
indicate the phases between which the mutual inductance occurs. The mutual
inductances between the stator and rotor windings are functions of rotor displace-
ment angle q, and therefore, time t, since the rotor position is time dependent.
The generalized equations of a three-phase induction machine are usually
written for a machine with a wound stator and wound rotor because the short-
FLC in wind energy systems 381

circuited bars of a squirrel cage rotor can be assumed equivalent to short-circuited


rotor windings. Therefore, the generalized equations of a wound rotor induction
machine are valid for induction machines with squirrel cage rotors.
Under the assumptions made, a three-phase induction machine can be repre-
sented as in Figure 7.7 by the three-phase stator and rotor windings, which yield the
voltage equations given in (7.15)–(7.20).
For the stator:
va ¼ Rs ia þ pla (7.15)
vb ¼ Rs ib þ plb (7.16)
vc ¼ Rs ic þ plc (7.17)
For the rotor:
vd ¼ Rr id þ pld (7.18)
ve ¼ Rr ie þ ple (7.19)
vf ¼ Rr if þ plf (7.20)
where p = d/dt and la, lb, lc, . . . , lf, are the derivative operator and flux linkages,
respectively. If these equations are written in terms of self- and mutual inductances
instead of flux linkages, the voltage equations of a three-phase induction machine
in a three-phase system are obtained as in (7.21). The voltage and current vectors,
and the impedance matrix of Equation (7.21) may be represented in a simpler form
with submatrices as shown in (7.22).
2 3 2 32 3
va Ra þ pLa pMab pMac pMad pMae pMaf ia
6 vb 7 6 pMba R þ pL pM pM pM pM 76 i b 7
6 7 6 a a bc bd be bf 76 7
6 vc 7 6 pMca pMcb Ra þ pLa pMcd pMce pMcf 7 6 7
6 7¼6 76 i c 7
6 vd 7 6 pMda pMdb pMdc Rr þ pLr pMde pMdf 767 7
6 7 6 6 id 7
4 ve 5 4 pMea pMeb pMec pMed Rr þ pLr pMef 5 4 ie 5
vf pMfa pMfb pMfc pMfd pMfe Rr þ pLr if
(7.21)
    
vs Zss Zsr is
¼ (7.22)
vr Zrs Zrr ir

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

Figure 7.7 Circuit representation of induction machine in rotating three-phase


frame

q axis
iqs
N qs
vqs

iqr
N qr vqr
N dr N ds
d axis
vdr idr vds ids

Figure 7.8 Stationary d–q axis representation of induction machine

machine is operated as a generator in this analysis. Therefore, the rotor speed is


known because it is determined by the wind speed. Besides the voltage equations,
an electromagnetic interaction equation is required to tie up the electrical and
mechanical quantities in the same frame. The electromagnetic interaction equation
is obtained from the torque–speed equation of the dynamic system. For a rotational
system, (7.33) is written, ignoring rotation and friction losses.

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

of d–q system currents as in (7.34).


P  T  
Te ¼ idq ½G idq (7.34)
2
where P is the number of the poles of the machine, [idq] is the d–q system current
array as in Equation (7.32), and [idq]T is its transpose. [G] is a matrix containing
only the terms with pq in the generalized d–q system equation (7.32) as given in
(7.35).
2 3
0 0 0 0
6 0 0 0 07
½G  ¼ 6
4 0
7 (7.35)
M 0 Lr 5
M 0 Lr 0
After replacing the current arrays and matrix [G] in (7.34), the induced torque
is obtained as a function of d–q currents ids, iqs, idr, and iqr, rotor inductance Lr, and
the peak mutual inductance M between the stator and the rotor windings as in
(7.36).
P  
Te ¼ M ids idr  iqr ids (7.36)
2
Thus, the substitution of (7.36) into (7.33) yields (7.37).
P   dwm
M ids idr  iqr ids ¼ Tm  Jm (7.37)
2 dt
This is an ordinary differential equation with only one independent variable,
time. After some manipulations and replacing pq by the speed wm, Equations (7.32)
and (7.37) are modified to the simultaneous first-order ordinary differential equa-
tion forms as given in (7.38)–(7.42).
dids 1 
¼ Rs Lr ids þ wm Miqs þ MRr idr þ wm Lr iqr þ Lr vds  Mvdr (7.38)
dt Ls Lr  M 2

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].

7.3.2 Self-excited induction generator


All electrical machines require a magnetic field for energy conversion. If a current-
carrying conductor is placed in a magnetic field, a force is generated as a result of
Ampere’s law. This is the basic principle for motor operation of rotating electrical
machines. If a conductor moves in a magnetic field with a speed, then a voltage is
induced in this conductor according to Faraday’s law of electromagnetic induction.
This is the basic principle for generator operation of electrical generators with
linear or rotational motion.
DC and synchronous machines are built with excitation windings to be used to
generate the required magnetic field. However, induction machines do not have an
excitation winding. They generate a magnetizing current by using the reactive
power component they draw from the AC source when they are operated as motor.
Therefore, induction motors dissipate both active and reactive power, which are
supplied by the AC source such as the AC utility. If the same induction machine is
operated as a generator, its rated reactive power must be supplied so that the gen-
erator can produce and deliver its rated active power to the load bus.
Usually, there are two special cases for the induction generators in terms of the
excitation process: utility-connected case and utility-isolated case. In utility-
connected WEC systems, the induction machine is operated as a motor below the
synchronous speed first, then the speed is increased above the synchronous speed to
continue with the generator operator. In this process, the induction machine gets both
active and reactive power from the utility while operating as a motor. When the
generator operation is started, the machine continues to receive reactive power from
the utility and begins to give active power to the utility as shown in Figure 7.9(a).
However, transferring reactive power to the WEC system by the utility is not

Utility grid Utility grid


a a
b b
c c
P3ɸ

P3ɸ Q3ɸ P3ɸ Q3ɸ P3 ɸ Q3ɸ


Motor
Motor Generator operation C C C
operation operation Generator
Q3 ɸ operation
Tm Induction Tm Induction
machine machine
(a) (b)

Figure 7.9 Excitation of utility-connected induction generator. (a) Utility excited


and (b) capacitor excited.
386 Fuzzy logic control in energy systems, 2nd edition

Load bus
a
b
c
P3 I

Q3I Q3I

C C C
Tm Induction
generator

Figure 7.10 Excitation of utility-isolated 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

Figure 7.11 Stationary d–q axis representation of capacitor excited induction


generator

R L L R

(a)

R L L R

Figure 7.12 Stationary d–q circuit representation of self-excited induction


generator. (a) q-Circuit and (b) d-circuit.

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

ldr in Figure 7.12 are obtained as in (7.45) and (7.46), respectively.


lqr ¼ Miqs þ Lr iqr þ lqr0 (7.45)
ldr ¼ Mids þ Lr idr þ ldr0 (7.46)
where lqr0 and ldr0 are the residual flux linkages and are equal to the initial values
of the flux linkages lqr and ldr. The stator and rotor inductances are expressed as in
(7.47) and (7.48), respectively.
Ls ¼ Lls þ M (7.47)
Lr ¼ Llr þ M (7.48)
where Lls and Llr are the leakage self-inductances of stator and rotor windings.
The terms we ldr and we lqr in Figure 7.12 are the electrical rotor speed voltages
along d- and q-axis, respectively. These are the generated voltages of the induction
generator due to the angular electrical speed we, which is obtained as a product of
the number of pole pairs and mechanical speed wr of the rotating shaft. These
voltages are expressed as in in (7.49) and (7.50).

we lqr ¼ we Miqs þ Lr iqr þ we lqr0 (7.49)
we ldr ¼ we ðMids þ Lr idr Þ þ we ldr0 (7.50)
The last terms we lqr0 and we ldr0 in (7.49) and (7.50) are the residual or initially
induced voltages along q- and d-axis of the rotor, respectively.
Stationary d–q axis model equations of self-excited induction generator can be
obtained as in (7.51) using the equivalent circuits in Figure 7.12 and Equations
(7.45–7.50).
2 3 2 32 3 2 3
vqs Rs þ pLs 0 pM 0 iqs 0
6 vds 7 6 0 Rs þ pLs 0 pM 7 6 7 6 0 7
6 7¼6 76 ids 7 þ 6 7
4 0 5 4 pM we M Rr þ pLr we Lr 5 4 iqr 5 4 we ldr0 5
0 we M pM we Lr Rr þ pLr idr we lqr0
(7.51)
Since the terminal voltages vqs and vds in Figure 7.12 are equal to capacitor
voltages vqc and vdc, respectively, the substitution of (7.43) and (7.44) into (7.51)
yields the final form of stationary d–q axis model equations of a self-excited
induction generator as given in (7.52).
2 1 3
2 3 R þ pLs þ 0 pM 0 2 3 2 3
0 6 s pC 7 iqs vqc0
607 6 76 7 6
7 ids 7 6 vdc0 7
6 7¼6 Rs þ pLs þ
1
pM 76 þ 7
405 6
6
0
pC
0
74 iqr 5 4 we ldr0 5
4 pM we M Rr þ pLr we Lr 5 idr
0 we lqr0
we M pM we Lr Rr þ pLr
(7.52)
FLC in wind energy systems 389

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.

7.4 FLC examples in WEC systems

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

Figure E7.1(b) Detailed circuit diagram of the WEC system

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

Figure E7.1(c) The control subsystem generates switching signals

ref pu
b1pu
b1
V
BASE
loop

Delay
b1
P

Delay
b1 loop
I
BASE
b1pu

Figure E7.1(d) Block diagram of tri-loop dynamic error detector

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).

Figure E7.1(e) Simulink block structure of the FL tuner


FLC in wind energy systems 393

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

Figure E7.1(f) Fuzzy subsets in the universe of error et

NDE ZDE PDE


1

μ(det )

0
–0.1 0 0.1
Universe of det

Figure E7.1(g) Fuzzy subsets in the universe of error det

dKN dKZ dKP


1

μ (dK )

0
–0.1 0 0.1
Universe of dK

Figure E7.1(h) Fuzzy subsets in the universe of error 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

The variations of effective voltage and current at bus b3 are shown in


Figures E7.1(i) and E7.1(j). Bus b3 is the load bus and effective voltage is required
to be 220 V. It is shown that this voltage is reached at its steady-state value of 220
V in 9 s. Current value is about 40 A. Active and reactive power variations at bus b3
are shown in Figures E7.1(k) and E7.1(l), respectively. Steady-state active power is
7.5 kW and reactive power is 3.4 kVAr.

235
230
225
Vb3eff (V)

220
215
210
205
200
5 6 7 8 9 10 11 12 13 14
Time (s)

Figure E7.1(i) Effective value of voltage at bus b3

60
50
Ib3eff (A)

40
30
20
10
0
0 5 10 15
Time (s)

Figure E7.1(j) Effective value of current at bus b3

14,000
12,000
Pb3 (W)

10,000
8000
6000
4000
2000
0
0 5 10 15
Time (s)

Figure E7.1(k) Active power at bus b3


FLC in wind energy systems 395

7000
6000

Qb3 (VAr)
5000
4000
3000
2000
1000
0
0 5 10 15
Time (s)

Figure E7.1(l) Reactive power at bus b3

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

bus 1 bus 2 bus 3 bus 4 bus 5 bus 6 bus 7

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

Figure E7.2(a) Utility interfaced WEC system for Example 7.2

Except for the WEC system interfaced to 11 kV distribution network at bus 3


and 138 kV main feed-in substation at bus 1, there is no other auxiliary generation
in the system. A step-down transformer is also used at the main feed-in substation
and at bus 6 where a large 4160 V/600 kVA induction motor is fed via an 11/4.16
kV step-down transformer.
(a) Develop a Simulink model for the 11 kV distribution system described above
with only 138 kV main feed-in substation at bus 1 connected as the power
source.
(b) Adopt and connect the Simulink model of the WEC system available in
MATLAB/Simulink to the utility at bus 3 as the second power source in
addition to 138 kV main feed-in substation at bus 1.
(c) Develop a Simulink model for dynamic power filter compensator (DPFC)
given in Figure E7.2(b) to be connected at bus 5.
(d) Modify and adapt the FLC developed in chapter 4 and given by Figure 4.25 to
be used to control the DPFC connected at bus 5.
(e) Show the effectiveness of the FLC-controlled DPFC scheme under electric load
disturbances.

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

Figure E7.2(b) A schematic of the dynamic power filter compensator

Figure E7.2(c) A schematic of the dynamic power filter compensator

(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

resonance conditions. Switch S1 is the negation of switch 2. They are triggered


simultaneously to generate the required filtering depending upon the voltage
and current at bus 5.
The IGBT switches have a forward voltage of 0.3 V and a conducting
resistance of 0.001 W. A snubber resistance of 0.1 MW is also connected to
the IGBT circuitry. The resistance Rf and inductance Lf between the switches
are selected as 0.15 W and 0.1 mH, respectively. The value of the series
connected coupling capacitor (Co) is selected as 180 mF. A 3.6 MVA, 60 HZ
11 kV/11 kV, Y/Y-connected three-phase transformer is used for coupling the
DPFC to the utility bus 5. The switching instants can be determined by
controlling the width of the pulses. A tri-loop error-driven control structure
presented in [46,48] is used in this example together with the FLC described
in Section 4.9 of Chapter 4.
(d) Now, let us modify and adapt the FLC developed in Chapter 4 and given in
Figure 4.25 to be employed to control the DPFC connected at bus 5. The FLC
is used in a tri-loop dynamic error-driven control scheme based on Sharaf’s
ideas in [46] to control the DPFC. The total error signal is a collection of the
RMS voltage error, change in RMS current, and RMS values of instantaneous
current ripples. Therefore, the controller will act whenever there is a change
or a ripple in the current besides the voltage error. A schematic diagram of the
tri-loop dynamic error-driven controller with the FLC and discrete PWM gen-
erator to generate the switching signals S1 and S2 is given in Figure E7.2(f).
400 Fuzzy logic control in energy systems, 2nd edition

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.

The DPFC is connected at bus 5 in a radial distribution grid network with


the wind energy interfaced at bus 3 was digitally simulated and validated in
the MATLAB/Simulink software environment. Full digital simulation and
validation testing were carried out without and with the FLC-controlled
DPFC located at bus 5 for a full test duration of 1.0 s in order to show
the dynamic voltage stabilization, harmonic reduction, and reactive power
flow.
FLC in wind energy systems 401

Figure E7.2(g) The FLC block diagram with input parameters

With FLC-controlled DPFC

Without FLC-controlled DPFC

Figure E7.2(h) Voltage transients at bus 5 without and with the FLC-controlled
DPFC

The dynamic performance of the FLC-controlled DPFC device was tested


under two load-switching disturbance sequences. As the first operating condi-
tion an 11 kV, 1.2 MW, and 0.9 MVAr linear load at bus 5 is switched on at
0.25 s and switched off at 0.4 s of the digital simulation. A 600 kW, 4.16 kV,
60 Hz three-phase induction motor and a 500 Ohms resistive load are switched
on and off at the same instants of 0.7 s and 0.8 s, respectively.
402 Fuzzy logic control in energy systems, 2nd edition

With FLC-controlled DPFC

Without 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.

Design Example 7.1


The power generated by a WEC system will be connected to the distribution system
of a town by 5 km power cable with the parameters 0.2 + j0.1 Ohm/km. A 20 MW
power at 66 kV will be transmitted from WES to the distribution center. The dis-
tribution voltage is 6.3 kV.
(a) Draw a one-line diagram to represent the power generation and distribution
system described above.
(b) Obtain the sizing of the WES considering that the three-phase asynchronous
wind energy generating units available are 5 MW (0.8 lagging). 2 MW
(0.85 lagging) and 1 MW (0.8 lagging). The rated voltages of all units are equal
and 15 kV at 50 Hz.
(c) Obtain the required capacitor group sizing for the wind asynchronous machines
to be operated as a generators at their rated values. Assume that the available
capacitors groups have the ratings as 250 kVAr, 500 kVAr, and 1000 kVAr at
50 Hz with 8.66 kV operating voltage. Obtain all possible capacitor sizing for
the generator selections you obtained in (a).
FLC in wind energy systems 403

(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.

Design Example 7.2


A water pumping system for agricultural purposes is planned to be powered by a
WES. There are three 2 kW wind generators (SCIG) in WES. Each generator
requires 600 VAr for excitation. The capacitor groups to be used are available as
75, 100, 125, and 150 VAr units.
Three water pumping motors are three-phase asynchronous motors with 1 kW
electrical input power at 0.8 lagging power factor. The applied voltage to the
motors must be 50 Hz, 380 V phase to phase. An additional 1 kW of power is
required by a shelter built on the agricultural site. All of the appliances in the
shelter operate with 220 V phase to neutral voltage.
(a) Draw a single-line diagram of this system showing the WES, the bus where
the WES is connected, the load bus and loads connected to the generator
bus. Show all required devices and components including the required
devices and connections to keep a constant frequency, and constant mag-
nitude AC voltage at load terminals.
(b) Determine the capacitor sizing for the excitation of each induction generator
and draw a three-phase solidly grounded Wye connection diagram of the
capacitors.
(c) Determine the capacitor sizing for the compensation of each pumping
motor.
(d) Determine the capacitor sizing for the compensation of the appliances in
the shelter.
(e) Develop a Simulink model for this system and analyze the voltage, current, and
power profiles.
(f) Design a power compensator and a suitable controller to overcome the load-
switching effects as well as wind speed excursions.
(g) 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.
404 Fuzzy logic control in energy systems, 2nd edition

7.5 Problems

P7.1 A three-phase synchronous generator generates voltages with a frequency


of 50 Hz when operated at 750 rpm. A per phase Thevenin equivalent
circuit of this generator is given in Figure P7.1 where Xs = j0.7 pu,
Vt = 1.0ff0 pu, I = 1.0ff30 pu and pu excitation current is defined as
IF = EO + 0.00138 e4.28Eo. The excitation circuit is fed from a DC voltage
source to generate the required magnetic field and mechanical power input
is supplied from a wind turbine.
Assume that the wind speed is constant generating a constant rotor speed of
750 rpm.
(a) Find the back electromagnetic force (emf) E0 in pu.
(b) Find the required excitation current IF in pu.
(c) If the gearbox between the generator and wind turbine has a turn ratio of
1/4 from the generator to wind turbine, what is the wind speed?
(d) Develop a Simulink model for the system described in this problem
including wind turbine speed and generator excitation control for voltage
regulation and power–frequency control.
P7.2 Replace the synchronous generator in P7.1 with the DC machine described in
Example 5.10 and perform the following.
(a) Develop a Simulink model for the wind turbine–DC generator
combination.
(b) Modify the FLC described in Chapter 4 and use it to control the terminal
voltage of the DC generator via the field circuit at constant wind speed.
(c) Repeat part (b) by giving a step change to the wind speed while the
system is being operated at a steady state.
P7.3 Replace the synchronous generator in P.7.1 with a three-phase, 20 HP, 220/
380 V, 50 Hz, 6 pole squirrel cage induction motor with an efficiency of 80%.
The induction machine is to be operated as a self-excited generator. Assume
that the wind speed is constant at 15 m/s.

Figure P7.1 Per phase equivalent circuit of a synchronous generator


FLC in wind energy systems 405

(a) Develop a Simulink model for the wind turbine-induction generator


combination.
(b) Modify the FLC described in Chapter 4 and control the switching
sequences of the self-excitation capacitors to maintain a terminal RMS
voltage.
(c) Repeat part (b) by giving a step change to the wind speed while the
system is being operated at a steady state. Observe the voltage fre-
quencies when the wind speed is changed.
(d) Establish a DC link using controllable AC/DC and DC/AC converters for
constant voltage and frequency operation.
(e) Use an FLC to control AC/DC and DC/AC converters in part (d).
P7.4 A three-phase, 20 HP, 220/380 V, 50 Hz, 6 pole squirrel cage induction
machine is used in a wind power generation system. The induction machine
has a 50 A nominal current and a power factor of 80% under nominal power
operating conditions.
(a) What would be the synchronous speed of this induction machine when it
is operated as a generator?
(b) What would be the value of D-connected excitation capacitors for each
phase when the induction generator is operated at its rated power to feed
a resistive load?
(c) What would be the value of Y-connected excitation capacitors for each
phase while the induction generator is feeding a load with 80% lagging at
its rated values?
P7.5 A WEC system is to be installed in a farmhouse where there is no utility grid.
The farm has a 2 kW R–L linear AC load with 0.80 lagging power factor, a
three-phase 3 kW, 50 Hz, 220/380 V AC motor operating at 0.70 lagging
power factor, lights with a total power of 1.5 kW and heating with a total
power of 5 KW. Diversity is ignored.
(a) Obtain the total active power required by the farmhouse
(b) Obtain the required total reactive power required by the farmhouse
(c) Obtain the sizing of the WES considering that the wind energy generating
units available are 2 KW (0.8 lagging). 500 W (0.85 lagging) and 1 KW
(0.9 lagging) units are also available.
(d) Obtain the required Wye-connected optimal capacitor group sizing for
the wind asynchronous machine to be operated as a generator at its
rated values. Assume that the available capacitors groups have the
ratings as 0.5 kVAr, 1 kVAr, and 1.5 kVAr at 50 Hz with 220 V
and 380 V.
(e) Obtain the required Wye-connected capacitor sizing to supply reactive
power to the loads. Make your selection so that the reactive power sup-
plied to the load can be controlled with the highest range as the loads are
turned on/off randomly.
(f) Obtain the total Wye connected capacitor sizing required for generators
and loads together.
406 Fuzzy logic control in energy systems, 2nd edition

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

Figure P7.7 Sample distribution system for Problem 7.7


FLC in wind energy systems 407

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

[41] Krause P.C. ‘Simulation of symmetrical induction machinery’. IEEE


Transactions on Power Apparatus and Systems. 1965;PAS-84(11):1038–
1053.
[42] Krause P.C. Analysis of Electric Machinery. New York: McGraw-Hill; 1986.
[43] Hancock N.N. Matrix Analysis of Electrical Machinery. Oxford: Pergamon
Press; 1974.
[44] Bose B.K. Power Electronics and AC Drives. Englewood Cliffs, NJ:
Prentice-Hall; 1986.
[45] Yanmaz K., Mengi O.O. and Altas I.H. ‘Design and implementation of a
smart STATCOM in small scale wind turbines’. 1st International Black Sea
Congress on Environmental Sciences (IBCESS-2016); Giresun, Turkey,
September 2016.
[46] Sharaf A.M., Wang W. and Altas I.H. ‘A novel modulated power filter
compensator for distribution networks with distributed wind energy’. Inter-
national Journal of Emerging Electric Power Systems. 2007;8(3):1–20.
[47] Sharaf A.M., Wang W. and Altas I.H. ‘A novel hybrid active filter com-
pensator for stabilization of wind-utility grid interface scheme’. International
Transactions on Electrical Energy Systems. 2010;20(3):306–326.
[48] Sharaf A.M., Elbakush E. and Altas I.H. ‘A dynamic error driven PID con-
troller for PMDC motor drives fed by non-constant voltage sources’. IEEE
Canadian Conference on Electrical and Computer Engineering; Vancouver,
Canada, 2007.
[49] Sharaf A.M., Elbakush E. and Altas I.H. ‘A wind energy conversion scheme
utilizing FACTS’. IEEE Canadian Conference on Electrical and Computer
Engineering; Vancouver, Canada, 2007.
Chapter 8
FLC in PV solar energy systems

Application of fuzzy logic control and decision-making processes in photo-


voltaic (PV) solar systems are given in this chapter. Modeling and char-
acteristic properties of PV solar arrays are viewed in terms of maximum
power point tracking (MPPT), sun tracking, voltage control, battery charging,
interfacing issues, and management of the generated power. As new to this
chapter, shaded effects of PV systems will be added and simulation examples
will be given related to MPPT control under shading effects.

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

conditions in temperature and solar irradiation levels is also considered as one of


the research areas in PV systems.
The output electric power level and energy produced from a stand-alone PV
array feeding a single or a group of resistive and motor-type loads can be adjusted
by connecting the solar panels in different configurations of series and series/par-
allel groups. When the input solar power to the PV array changes due to varying
ambient temperature and solar irradiation levels, the output power also tends to
change. But the load being fed usually requires a maintained constant power level.
In order to keep the PV array output electric power constant or limit power chan-
ges, the number of solar panels in series or parallel strings is continuously mod-
ified. More panels are either added to or removed from the PV series/parallel
matrix array. If all of the panels in an array are in use and the output power is not
sufficient, then some of the electrical loads are removed by employing a power
management algorithm to operate the priority loads more efficiently. For both
cases, either changing array configuration or removing loads, the PV array should
be operated at its highest utilization efficiency so that all of the solar energy that is
converted to electricity is used. If a PV array is operated under its maximum output
power level, some of the solar power which is already converted to useful electrical
energy is wasted. Therefore, a PV array should be operated at such a voltage and
current level that its maximum output power is always available. If the load is
connected directly to the PV array and there is no interface controller, the array
operates at any arbitrary voltage and current levels that match the power require-
ment of the changing load. In this case, the array may supply less power than its
maximum power and operate with low utilization efficiency wasting the available
energy. In addition, in direct coupling schemes, if the load power requirement is
more or less than the array output power, the array may not generate any power at
all. Besides, any change in the temperature and irradiation levels will affect the
load power directly and will make the maintenance of stable operation very diffi-
cult or even impossible. If an electrical motor is used as load, it may run at lower or
higher speeds depending on the PV array operating zone, which may be either over-
voltage or over-current operating zone. The motor may not run at all if the array
output power is very low, or the motor may run at very high speeds causing elec-
trical and mechanical damage if the array output power is too high. Therefore, a PV
energy conversion scheme should not only satisfy the maximum power output
condition of the PV array but should also be designed to ensure protection from the
danger of over-voltage and over-current operation. These problems can be solved
by using a matching-controllable interface device for the coupling of the PV array
to the electrical-load system. By controlling the interface semiconductor converter
device, the output power of the PV array can be controlled easily so that the load is
operated at its desired voltage, current, and power levels. In a fixed array topology
configuration, the load power lies in the PV array output power range which varies
depending on the solar irradiation level and temperature changes. If the PV array
power does not match the load power demand, i.e., if the array current and voltage
are too high or too low to be controlled at the existing level of temperature
and solar irradiation, a feedback controller can be employed for topology
414 Fuzzy logic control in energy systems, 2nd edition

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.

8.2 PV cell models

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)

Iph: photocurrent, function of irradiation level, and junction temperature (A)


I0: reverse saturation current of the diode D (A)

I–V
V
P–

Figure 8.1 Typical I–V and P–V characteristics of a photovoltaic cell


416 Fuzzy logic control in energy systems, 2nd edition

R I
I I
D R V
S
T

Figure 8.2 Generalized static equivalent circuit of a photovoltaic cell

Figure 8.3 Dynamic equivalent circuit of a photovoltaic cell

VC: cell output voltage (V)


RS: series resistance of the cell (Ohm)
RSH: parallel resistance of the cell (Ohm)
e: electron charge (C)
k: Boltzmann constant (J/K)
TC: Reference cell operating temperature ( C)

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

Figure 8.4 Simplified equivalent circuit and symbol of a photovoltaic cell

(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.

8.2.1 Reference I–V characteristics of a PV panel


The PV cells are usually available in the form of PV panels. Therefore, the mea-
surements of I–V characteristics of a single PV cell may be possible in a laboratory
environment only. Since PV panels are commercially available and easily acces-
sible for testing, it is better to model the measurable PV panels rather than the PV
cells. PV panels include series and parallel connected identical cells. Therefore, the
I–V characteristics of a PV cell are nothing but a scaled version of I–V character-
istics of a panel.
The reference I–V characteristics are usually obtained by testing the panel
under a certain solar irradiation level SR and cell operating temperature TR. Then
the reference I–V characteristics of a single panel are used to represent the I–V
characteristics of the PV array consisting of parallel connected panel strings which
in turn are made up of panels identical to the reference panel connected in series.
Since the array connection configuration is usually changed depending on the
weather and load conditions, it is preferred to use a single panel characteristic as a
reference rather than the array characteristics. The reference I–V curve used in this
section was also obtained by testing one of the PV panels, which was available in
the Electrical Engineering Power Laboratory at The University of New Brunswick,
Canada when the author was working on his PhD thesis during the early 1990s [8].
In order to obtain an approximate mathematical model representation of the
reference I–V characteristics of the solar panel simulation model, the following
steps are followed.
1. Set up the connection diagram shown in Figure 8.5. Vary the load resistance
RL, connected across the output terminals of the solar PV panel, from highest
(open circuit) to lowest (short circuit) value and record voltage VR and current
IR for different load levels.
2. Identify the short circuit current ISC and the open circuit voltage VOC from the
data obtained in step 1 as ISC = IR when VR = 0.0 and VOC = VR when IR = 0.0.
3. The photocurrent, Iph, of the solar cell, was assumed to be equal to the short
circuit current, ISC, since the reverse saturation current of a diode is negligible
compared to the short circuit current.
4. Measure and record the reference solar irradiation level SR and panel operating
temperature TR. Assume that these values remain constant during the test.
5. Using a curve fitting process, the values of panel series resistance, RS, diode
reverse saturation current, I0, and curve fitting factor, A, in (8.5) are
FLC in PV solar energy systems 419

Figure 8.5 Reference I–V curve measurement of a PV panel


determined. Then they are used in the mathematical model representation of
the reference I–V characteristics.
The values of RS, I0, and A in (8.5) can also be determined using three mea-
sured data points around the knee of the I–V characteristics. Substitution of the
voltage and current values from these three data points results in three nonlinear
equations to be solved for three unknowns.

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

Table E8.1(a) Current, voltage, and power


readings from PV panel testing

Voltage (V) Current (A) Power (W)


0.00 5.40 0.00
6.80 5.21 35.428
17.28 4.75 82.08
19.30 4.50 86.85
20.60 4.25 87.55
22.12 4.00 88.48
23.40 3.75 87.75
24.72 3.50 86.52
25.46 3.25 82.745
26.14 3.00 78.42
26.88 2.75 73.92
27.50 2.50 68.75
28.00 2.25 63.00
28.60 2.00 57.20
29.12 1.75 50.96
29.50 1.50 44.25
29.76 1.25 37.20
30.10 1.00 30.10
30.16 0.89 26.84
31.20 0.00 0.00
420 Fuzzy logic control in energy systems, 2nd edition

operating temperature are measured as 100 mW/cm2 and 20  C, respectively, and


assumed to be unchanged during the rest. The electron charge and Boltzmann con-
stant are given as e = 1.106  1019 Coulomb and k = 273  0.138  1023 J/ C,
respectively.
(a) Select three data points around the knee of the I–V characteristic and obtain
three nonlinear equations to be solved.
(b) Apply a trial-and-error approach and obtain the unknown parameters RS, I0,
and A using measured data and (8.5).
(c) Plot measured and estimated I–V curves on the same graph and analyze how
they match by calculating the matching errors of three nonlinear equations.

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).

Table E8.1(b) Selected data points from PV panel testing

Voltage (V) Current (A) Power (W)


17.28 4.75 82.08
22.12 4.00 88.48
25.46 3.25 82.745
FLC in PV solar energy systems 421

6
Reference I-V Characteristic
5
Estimated
4 Measured

Current (A)
3

0
0 10 20 30 40
Voltage (V)

Figure E8.1 Measured and estimated I–V curves

Table E8.1(c) Error analysis of the estimated parameters

Voltage (V) Current (A) Errors (V) Error %


17.28 4.75 0.3478 1.97
22.12 4.00 0.4219 1.87
25.46 3.25 0.1004 0.39

An average error is calculated as 0.2231 V, which is 1.046%. This is a rea-


sonably small error. However, it can be made much smaller by using theoretical
curve fitting or optimization methods.

8.2.2 The effects of changes in solar irradiation and


temperature
PV panels generate electricity from the sunlight, which carries the solar irradiation
to PV panels. The solar irradiation arrives at the panels as photons and is converted
to electrical power in terms of photocurrents. Therefore, the solar irradiation level
is an important factor in the generated power. However, it depends upon the
availability of sunlight that varies from morning to evening, from day to day, from
month to month, and from season to season. The sunlight also carries heat that
causes the PV panel to get heated. The load current also causes heat in the panels by
increasing the temperature in P–N junction of the PV cells. The changes in both
solar irradiation level and operating temperature affect the performance of PV
panels in terms of generated voltage, current, and therefore power.
The generated photocurrent of a PV cell or a PV panel is affected by the
changes in solar irradiation and operating temperature resulting in changes in vol-
tage and power, as well. Therefore, the mathematical model of a PV cell or a panel
must include the changing effects of solar irradiation and temperature levels. The
model must reflect any changes in solar irradiation and temperature so that the
422 Fuzzy logic control in energy systems, 2nd edition

generated photocurrent, voltage, and power can be calculated correctly. Model


accuracy is the first key to analyze, control, manage, and track the maximum power
generated by the PV panels.
Let (8.5) be the benchmark model for the known operating temperature TR and
known solar irradiation level SR. Since all the cells in a panel are assumed to be identical
and they carry the same current with the same output voltage, the junction temperatures
of all the cells are assumed to be equal too. The ambient temperature is also the same for
all the cells because they are in the same location. Therefore, the effects of the changes
in solar irradiation level and operating temperature in a PV cell will be similar to those in
a PV panel. When the ambient temperature and irradiation levels change, the operating
temperature TP of the panel in the panel also changes resulting in a new output voltage
and a new photocurrent value. The PV panel operating temperature varies as a function
of solar irradiation level and ambient temperature. The variable ambient temperature TX
affects the panel output voltage and panel photocurrent. These effects are represented in
the model by the temperature coefficients [2] CTV and CTI for panel output voltage and
panel photocurrent, respectively, as in (8.6) and (8.7).
CTV ¼ 1 þ bT ðTR  TX Þ (8.6)
g
CTI ¼ 1 þ T ðTX  TR Þ (8.7)
SR
where the coefficients bT and gT indicate the slopes of the changes in PV panel
voltage and current, respectively, due to variable temperature. The values of bT and
gT vary from panel to panel and are obtained experimentally. Normally, the value
of bT is between 0.004 and 0.006 [2], and the value of gT is between 0.02 and 0.1.
These values are assumed to be 0.004 and 0.06 for bT and gT, respectively, in the
examples of this chapter. TR in (8.6) and (8.7) is the known reference ambient
temperature during the panel testing and it is assumed to have a value of 20  C.
Equations (8.6) and (8.7) are used to obtain the modified model of the panel for
another ambient temperature TX. Even if the ambient temperature does not change
significantly during the daytime, the solar irradiation level changes depending on
the amount of sunlight and passing clouds causing a change in the panel photo-
current and operating temperature which, in turn, affects the panel output voltage.
If the solar irradiation level changes from SX1 to SX2, the panel operating tem-
perature will also change from TX1 to TX2 resulting in a change in the photocurrent
from Iph1 to Iph2. Thus, the effect of the changing solar irradiation level on the panel
photocurrent and output voltage is expressed via two correction factors CSV and
CSI, which are obtained using the method in [2] and given in (8.8) and (8.9).
CSV ¼ 1 þ bT aS ðSX  SR Þ (8.8)
1
CSI ¼ 1 þ ðSX  SR Þ (8.9)
SR
where SR with a value of 100 mW/cm2 is the benchmark reference solar irradiation
level during the panel testing to obtain the modified panel model. SX is the new
FLC in PV solar energy systems 423

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

Figure E8.2(a) MATLAB function pvpanel.m to be used as reference function

I-V
4 P/20
Current (A)

P-V
2

0
0 10 20 30 40
Voltage (V)

Figure E8.2(b) MATLAB function pvpanel.m to be used as reference function


FLC in PV solar energy systems 425

characteristics by assigning 0, 50, and 100 to dS as the changes in solar irra-


diation while keeping dT = 0 for three cases.
The effects of solar irradiation level are very important on the generated
panel power. As the solar irradiation level changes from morning to evening, so
does the generated power. If the load demand power is constant all the day, the
generated panel power does not match the load. It may be equal sometimes but
smaller or higher other times. If the generated maximum power marked as
PM1, PM2, and PM3 in Figure E8.2(c) is not tracked and used as the solar
irradiation changes, some of the generated power will be lost. Therefore, the
maximum power generated by the panel should be tracked and used or stored to
be used when needed.
(d) I–V and P–V characteristics of the PV panel used in this example change as
shown in Figure E8.2(d) if the temperature increases from 0  C to 20  C and
then up to 40  C while the solar irradiation level is kept constant.
The effects of temperature changes on the generated panel power are smaller
than those of solar irradiation. However, the effects of the changes in operating
temperature affect the panel output voltage besides the generated power. High
temperatures have negative effects on both panel power and voltage. This

Figure E8.2(c) Solar irradiation effects on I–V and P–V characteristics

s s

T=0 ºC T=0 ºC

T=20 ºC T=20 ºC

T=40 ºC T=40 ºC

Figure E8.2(d) Temperature effects on I–V and P–V characteristics


426 Fuzzy logic control in energy systems, 2nd edition

analysis shows that cooler locations with higher solar irradiation levels are
better for installing the PV power stations.

Design Example 8.1


Convert the MATLAB function pvpanel.m in Example 8.2 to a Simulink model and
simulate the system for the following:
(a) Repeat parts (b), (c), and (d) in Example 8.2 using the Simulink model of the
PV panel.
(b) Use PV panel Simulink model as the power source for DC motor given in
Example 8.10 and repeat Example 8.10.

8.2.3 PV panel modeling in Simulink


A general Simulink GUI block of the PV panel model is given in Figure 8.6. The
block has four inputs and one output. Solar irradiation and temperature are two
external inputs to the model. They are represented by a slider-type input element in
Simulink in order to be able to change the values during the simulation by dragging
the slider gain adjustments of these blocks named as variable temperature and
variable solar irradiation. The other two inputs NS and NP are the number of panels
in series and the number of series strings in parallel, respectively. NS = 1 and
NP = 1 mean that there is just one single panel. Therefore, the block can be used as
PV array model too, by entering proper values for NS and NP. The output port of the
model given in Figure 8.6 is the PV panel or array voltage to be applied to the
loads. A measurement bus bar is used to measure and plot the time responses of
array output current and voltage as the output port to be connected to load is
represented by the array voltage VA.

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

Figure 8.6 Simulink block of a single PV panel


FLC in PV solar energy systems 427

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

Transport Saturation Divide


NP
Delay
2

Figure 8.7 PV panel subsystem of Simulink GUI block of PV panel

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

Figure 8.8 PV panel subsystem of Simulink GUI block of PV panel

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

PVA GUI Model

Figure E8.3(a) PV-powered DC load system

Speed
Discrete
PWM Generator
Error
e u
wr
Ua
Summer FLC 2 pulses

Va
Vin Imotor
DC PMDC Motor
powergui Chopper

Figure E8.3(b) PV-powered DC load system


430 Fuzzy logic control in energy systems, 2nd edition

S
S

S
S

Figure E8.3(c) Time responses of PV array voltage and current

SX=150 mW/cm2 300 SX=150 mW/cm2


5 O2 O2
O1
4
Current (A)

Power (W)

200
3 O2

2 SX=100 mW/cm2 100 SX=100 mW/cm2


1
0 0
80 90 100 110 120 130 80 90 100 110 120 130
Voltage (V) Voltage (V)

Figure E8.3(d) PV array I–V and PV characteristics under operation

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

Figure E8.3(e) PV-powered PMDC motor speed responses

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

Figure E8.4(a) PV array as a three-phase AC generator

Figure E8.4(b) PV array voltage and current at DC side

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)

Figure E8.4(c) Line-to-line AC voltages before and after the transformer

Figure E8.4(d) RMS value of the line-to-line AC

transformer coil, the alternating pulses are converted to a sinewave. However,


the converted voltage waveforms are not pure sinewaves. They include har-
monic components with a total harmonic distortion (THD) of 3.9.
(b) The total harmonic distortion (THD) of the AC voltages is obtained as THD =
0.03908, which is about 3.9%. Besides the THD, the fundamental, third, and
fifth harmonic components are measured as 331.8 V, 0.9876 V, and 1.095 V,
respectively.
The RMS value of the line-to-line voltages is given in Figure E8.4(d). The
RMS voltage oscillates around 234–235 V.

8.2.4 A PV array emulator


Besides the computer simulation models, emulation models of PV arrays are also
developed to implement the characteristic behaviors of the arrays by feeding the
434 Fuzzy logic control in energy systems, 2nd edition

Figure 8.9 An emulator model for PV arrays

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.

8.3 Maximum power point (MPP) search in PV arrays

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

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. Studies related to the maximum output power tracking of PV
arrays deal mostly with the isolation requirements and interfacing problems of
direct coupling to loads. The output electric power level and energy produced from
a stand-alone PV array feeding a single or a group of resistive and motor-type loads
can be adjusted by connecting the solar cells in different configurations of series/
parallel groups. When the input solar power to the PV array changes due to Varying
ambient temperature and solar irradiation levels, the output power from the PV
array also changes. However, the load being fed usually requires a maintained
constant power level. Therefore, if the PV array output power exceeds the power
requirement of the load connected, either additional loads should be put into service
or the power over the requirement should be stored to be used when it is needed. If
the PV array output power is below the power requirement of the load, then either
the required additional power is supplied from the storage or some of the loads are
put off the service to match the power of the PV array. For all the cases, the
operation of the PV array at its maximum output power is necessary in order to
operate it with maximum efficiency.
The MPPT of a PV array is achieved by maximizing its output power to load.
To obtain a maximized output power, controllers are used to minimize the error
between the operating power and the reference maximum power, which varies with
the changing temperature and solar irradiation level. Therefore, the value of the
reference maximum power must be determined for the changing temperature and
solar irradiation level before it is compared with the operating power.
Various methods to find the maximum power point of PV arrays have been
introduced and classified as follows:
(i) Using look-up tables representing the previously determined maximum power
point data for different temperature and solar irradiation levels [20–22].
(ii) Simulating the PV array characteristic equations to search for the new maximum
power point if any change occurs in temperature or solar irradiation level [23].
(iii) Using an online search technique for the maximum power point regardless of
the changes in the temperature and solar irradiation level [16,24].
The first two methods require a PV array model and the measurement of
temperature and solar irradiation levels. The third method, however, requires nei-
ther the measurement of temperature and solar irradiation nor a PV array model.
The latter one has been studied by the author in his earlier research [8–13] and will
be described in the next sections.
The maximum power point operation of a PV array is achieved by maximizing
its output power to load. The controllers are used to minimize the error between the
operating power and the reference maximum power which varies with the changing
temperature and solar irradiation level. Therefore, the value of the reference max-
imum power must be determined for the changing temperature and solar irradiation
level before it is compared with the operating power.
FLC in PV solar energy systems 437

8.3.1 MPP by lookup tables


Using the PV panel model given in the previous sections, the I–V and P–V char-
acteristics of the PV array are obtained for different temperature and solar irra-
diation levels. The maximum power point values from these characteristics are then
found to yield the look-up table for the maximum power points at different tem-
peratures and solar irradiation levels. The look-up tables containing the MPP values
of PV array power, PM, current, IM, and voltage, VM, as functions of temperature
and solar irradiation are represented by the third-order polynomial equations whose
coefficients can be found by the least square curve fitting of the known PM, IM, and,
VM values. Polynomial equations given in (8.13), (8.14), and (8.15) for the max-
imum power points, maximum power point currents, and maximum power point
voltages, are adopted from [8] with the parameters given in Table 8.1.

PM ¼ XP1 þ XP2 SX þ XP3 SX2 þ XP4 SX3

þ XP5 TX þ XP6 TX SX þ XP7 TX SX2 þ XP8 TX SX3
 (8.13)
þ XP9 TX2 þ XP10 TX2 SX þ XP11 TX2 SX2 þ XP12 TX2 SX3

þ XP13 TX3 þ XP14 TX3 SX þ XP15 TX3 SX2 þ XP16 TX3 SX3

IM ¼ XC1 þ XC2 SX þ XC3 SX2 þ XC4 SX3

þ XC5 TX þ XC6 TX SX þ XC7 TX SX2 þ XC8 TX SX3
 (8.14)
þ XC9 TX2 þ XC10 TX2 SX þ XC11 TX2 SX2 þ XC12 TX2 SX3

þ XC13 TX3 þ XC14 TX3 SX þ XC15 TX3 SX2 þ XC16 TX3 SX3

Table 8.1 Polynomial coefficients for (8.13), (8.14), and


(8.15)

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

8.3.2 MPP search algorithm based on measurements of SX


and TX
MPP is also determined using search algorithms. The flow chart of a search algo-
rithm is given in Figure 8.10, which requires the measurements of solar irradiation
SX and temperature TX. Two consecutive values of temperature and two con-
secutive values of solar irradiation level are compared in this search algorithm. If
the change in temperature or solar irradiation level is greater than a reasonable
change, e, then a new reference MPP is calculated by simulating the PV array I–V
characteristics, defined by (8.5), for the new temperature and solar irradiation level.

Figure 8.10 Flowchart of MPP search algorithm based on the measurements of


SX and TX
FLC in PV solar energy systems 439

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.

8.3.3 MPP search algorithm based on voltage and current


measurements
Figure 8.11 shows the flowchart of another MPP search method that does not require
the measurement of temperature TX and solar irradiation level SX. This algorithm
uses only the measurement of array voltage and current and calculates the operating
power. The operating power is increased by connecting more loads or battery backup
units to the system until the increment in operating power is stopped and started to
decrease. This search algorithm is given in Figure 8.11 and described below.
The algorithm given in Figure 8.11 searches the MPP of the PV array I–V char-
acteristics with an error, ePT. Initially, the reference values of MPP power, PM, and
current, IM, are set to zero, and voltage, VM, is equated to the open circuit voltage, VOC,
of the PV array. At each sampling instant, the difference, eP1, between the reference
initial value of PM, and current operating power, PA, is calculated and compared with
the assumed MPP error, ePT. If the difference, eP1, is smaller than the acceptable error,
eP, the currently assigned initial values PM, IM, and VM are maintained unchanged. If
the power error, eP1 is greater than eP, then the algorithm searches for a new MPP. If
the operating power PA is greater than the current MPP power value, PM, then the
value of PA is assigned as new PM. If the operating power, PA, is smaller than the
current MPP power, PM, then the operating current, IA, and voltage, VA, are compared
with the MPP current, IM, and voltage, VM, respectively. If IA is greater than IM or if
VA is smaller than VM, the operating power point (OPP) values PA, IA, and VA are
assigned as the new reference MPP values. Otherwise, the algorithm continues with
440 Fuzzy logic control in energy systems, 2nd edition

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.

8.3.4 MPP search algorithm based on online repetitive


method
Another MPP search algorithm for different solar irradiation and ambient tem-
perature levels using the information only from the current and voltage measure-
ments is addressed in this section. The algorithm is adapted from [11] and depicted
by the flow chart shown in Figure 8.12.
FLC in PV solar energy systems 441

Figure 8.12 The online repetitive MPP search algorithm

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.

8.4 Maximum power point tracking of PV arrays

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.

8.4.1 Constant maximum power angle approach


The current–voltage space (I–V space) of a PV array is separated into three sub-
spaces as maximum power zone, over-voltage zone, and over-current zone. The
maximum power zone is represented by a maximum power line passing through the
origin and the maximum power point. The zone where the PV array operating
voltage VA is greater than the maximum power point voltage VM (VA > VM), is
called over-voltage zone. Similarly, the zone where the PV array operating current
FLC in PV solar energy systems 443

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

Figure 8.14 PV emulator feeding a PMDC motor

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

Table 8.2 A 49-rule table for the FL-controlled MPPT

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

8.4.2 Online load-matching approach


An online load-matching approach for the MPPT in PV arrays is described in this
section. As mentioned earlier, after detecting the MPP, it is supposed to be tracked
by operating power. A two-stage FLC is designed to keep the operating power of
the PV array at its maximum power available. A general block diagram of the
MPPT consisting of MPP detector and tracking controller is given in Figure 8.17.
Two-stage FLC uses the maximum power operating error and the ratio of the power
change to the current change in order to keep the operating point at the maximum.
The maximum power operating error is the difference between the maximum and
operating power values. Two-stage FLC generates the control signal, u, which is
used in the switching process of load and backup batteries. The dual fuzzy logic
control scheme comprises one fuzzy logic controller (FLC) and one fuzzy decision
maker (FDM). The total control action is the output sum of these two fuzzy pro-
cessing units. Therefore, it is called as a two-stage FLC.
The MPPT described here is based on load and battery backup switching. If the
operating power is less than the maximum power determined by the MPP search
process, then the loads and backup batteries are switched on or off. The first action
may be thought to be taken to increase the array current by switching on additional
loads. However, it is not that clear and easy to give a decision when the switching
should be on or off since the lower operating power condition occurs both due to
high and low currents, which means both heavy and light loads.
As shown in Figure 8.18(a) and (b), when the system starts to operate from a
stand-still, initially the array current was zero and the array voltage is the open
circuit voltage. Therefore, the operating power is also zero resulting in a large
maximum power error as shown by operating region 1 in Figure 8.18(b). The initial
error is equal to the maximum power and gets smaller along the operating region 2.
Once the operating power becomes equal to the maximum power, the error
becomes zero as depicted by region 3 in Figure 8.18(a) and (b). If the load current
keeps increasing the operating power becomes smaller and moves toward region 4
due to heavy load. If some of the loads are not switched off, then the operating
FLC in PV solar energy systems 449

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.

power drops down to zero resulting a short-circuited PV array operation as shown


by region 5 in Figure 8.18(a) and (b). When some of the loads are switched off,
then power will be back starting from region 6 and moving along region 7 toward
region 8. Operating regions 8 and 3 are the same MPP and the PV array should be
operated at these regions with the correct switching of loads and/or backup bat-
teries. Otherwise, the operating power point moves to the right or left side of the
MPP current Im. If the current is smaller than Im, then the load is lighter. If the
current is greater than Im then the load is heavy.
As explained above, the maximum power operating can be achieved by either
increasing or decreasing the load. However, this process does not guarantee the
MPP operation because an optimum load value must be connected across the PV
array with the proper switching. In order to get a proper load matching, a fuzzy
logic-based MPPT controller is developed and utilized here. The switching com-
mands are generated by the two-stage FLC using a set of operating fuzzy rules,
which are obtained using the operating regions shown in Figure 8.18(a) and (b).
450 Fuzzy logic control in energy systems, 2nd edition

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

Table 8.4 The rules generated for the FLC

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.5 The rules generated for the FDM

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

Sx Tx DC/DC Vdc=constant Optional


Chopper 1 for AC/utility connection
RF LF
DC/DC
DC Load Bus

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

MPPT Switchable Constant PMDC Motor


R-L Load R-L Load Driving fan/pump

Figure E8.5(a) An MPPT application in stand-alone PV array system


P-V DC Bus
Voltage Control
Tx TX Scope Wref
Vpanel
Tx Vo
SUM Vo

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

current operating conditions. Then a constant 40 V DC load bus is established


to supply power to a constant R–L type load and a PMDC motor. The DC load
bus voltage is controlled and kept constant at 40 V by using an integral con-
troller with the integral gain set to 0.1. The speed of the PMDC motor is also
controlled using the FLC developed in Chapter 7 and modified here to meet the
speed control specifications of the motor. Since the rated voltage of the PMDC
motor is 36 V, the load bus voltage is kept constant at 40 V. The average value
of the output voltage of the chopper 1 is compared with 40 V reference voltages
and the difference is used by the controller C1 depicted in Figure E8.5(a) to
generate the required chopper duty cycle so that the DC bus voltage is kept at
40 V. The duty cycle of the chopper 2 is determined by controller C2 using the
error between the reference and the running speeds of the motor.
The total current, IPA, drawn by all the loads and backup batteries being
charged is the current drawn from the PV array. This total current is divided by
the number of PV panels in parallel to find the current of a single panel so that
it can be used to simulate a PV panel model to generate a voltage, which is then
multiplied by the number of the panels in series to obtain the PV array output
voltage, VPA.
(b) Simulink model of the MPPT is given in Figure E8.5(c). PV array voltage and
current are the only two inputs to the MPPT block. The power of the PV array
is calculated as the product of the array voltage and current, then used by the
MPP detector to find the MPP for the current operating conditions. The power
at MPP is then used as the reference power to be tracked by the FLC and
FLDM as described in Section 8.4.2. The maximum power point operating
error and the rate of dP/dI are the inputs to the FLC and FLDM to generate a
control signal Ucont to ensure the MPPT. The performance of the MPPT is
shown by the simulation results in part (e).
(c) An integral controller is applied to keep the DC bus voltage constant at 40 V.
As the input voltage of the DC–DC chopper in Figure E8.5(a) changes due to
solar irradiation, temperature, and loading conditions, the integral controller
with a gain of 0.1 is employed to keep the DC output voltage at the reference

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

Figure E8.5(c) Inside view of the MPPT block


456 Fuzzy logic control in energy systems, 2nd edition

value of 40 V. Therefore, a 40 V constant DC load bus is generated for the


loads to be connected. The performance of the system is given by the simula-
tion results in part (c) below.
(d) A 36 V PMDC motor, whose parameters are given in Example 7.1, is con-
nected to the DC load bus and is supposed to be operated at a constant speed
of 200 rad/s. The motor speed should not be affected by the changes in solar
irradiation level and loads. Therefore, the FLC block developed in Chapter 7
is used in this example for the speed control of the motor. Since the simu-
lation models of the PMDC motor have been given in Chapter 8, it is not
going to be repeated here. The simulation results, however, are given and
discussed next in part (e).
(e) The simulation results of the models described in parts (a), (b), and (c) are
given in Figures E8.5(d), E8.5(e), and E8.5(f). The effects of the changes in
solar irradiation level are observed by giving some stepwise increments and
decrements. In the first part of the simulation, the solar irradiation level is
started from 150 mW/cm2 and reduced to 130 mW/cm2 with 10 mW/cm2 steps
at the time instants 3 s and 6 s. The values of both temperature and solar
irradiation levels are arbitrary inputs to the PVA without any measurement and
are normally unknown.
mW/cm2
Maximum Power (W)
MPP Error (A)

–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

Design Example 8.2


Modify the PV array models described in Sections 8.2.2 and 8.2.3 to include the
shading effects on the PV array characteristics as well as MPPT control algorithms.

Design Example 8.3


A water pumping system for agricultural purposes is planned to be powered by PV
panels. Three separately excited DC motors are used for the pumping. The motors
are identical and have the nameplate values of 220 V, 4 poles, 2 HP, and 80%
efficiency. The excitation voltages of the motors are 220 V DC. The PV array is to
be designed so that three motors can be powered at the same time when there is
sufficient sunlight as well as individually when there is lower sunlight.
Besides the water pumping motors, a small shelter next to the water pumping
system used by the farmers for living and resting is also powered by the same PV
arrays. Since there is no sunlight at night, a backup battery unit is used to supply the
required power during nights. There is a 500 W refrigerator, 200 W lights, a 500 W
water heater, and a 300 W TV in the shelter. All equipment in the shelter operate
with 12 V DC.
(a) Obtain the total active power to be supplied by the PV array.
(b) Obtain total reactive power required by the loads.
FLC in PV solar energy systems 459

(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.

Design Example 8.4


The electricity of a fully equipped single house is going to be supplied from PV
panels mounted on the roof. The house is also connected to the utility grid and gets
electricity from the utility when the sun power is not sufficient. The installed power
capacity of the house is 8 kW with a demand power of 5 kW. The appliances
require 220 V, 50 Hz single-phase AC voltages.
(a) Design a PV system to supply power to this house such that all the required
power is supplied from the PV system ensuring sustainability without con-
sidering the utility.
(b) Develop a Simulink model for the whole system and simulate it for perfor-
mance testing.
(c) Operate the PV array at the MPP by using storage batteries and storing the
additional power generated more than the required amount.

8.5 Shading effects in PV arrays


PV arrays consisting of identical or unidentical PV modules are studied in this
section. Although the shading effect starts from PV cells, which are connected in
series and parallel to make up a module, the shading effect on the PV modules is
considered here instead of that of PV cells. For commercial applications, usually,
PV modules are available rather than single PV cells. Therefore, this section has
focused on shading effects on the modules rather than PV cells. Besides, it is not
easy to access the connection ports for connecting any bypass and/or protection
diodes in order to eliminate the shading effects because the PV modules are man-
ufactured with industrial processes.
Even though the same type of PV modules are always preferred to be used in
PV arrays, characteristics of the PV panels or modules connected in series/parallel
in an array may change due to aging, dusting, shading, and/or replacing with uni-
dentical panels [25]. Connecting unidentical PV panels in series or in parallel gives
the same effect as shading does [26]. Therefore, the shading effect on PV arrays can
be understood by the analysis of an array that consists of unidentical panels.
However, let us understand the I–V and P–V characteristics of a PV array with
identical PV panels first.
460 Fuzzy logic control in energy systems, 2nd edition

8.5.1 PV arrays with identical PV panels


The same type of PV panels are preferred to be connected in series and parallel to
make up the PV arrays. This is because the currents in series connected panels and the
voltages in parallel connected panels must be equal to each as shown in Figure 8.19(a)
and (b). The operating points of the panels in the PV array having the same type of PV
panels will be the same as given in Figure 8.20 resulting in a smoother operation and
easier control of the system. If the panels with different I–V characteristics are used in
series and parallel combinations their operating points will be different affecting the
efficiency and operating properties of all PV installations.
In Figure 8.19, the figure on the left shows a series connected two identical PV
panels, and the figure on the right shows the same panels connected in parallel. In a
series connection, the same current flows through the panels. Since the panels are
identical, their I–V characteristics become the same and they overlap as given in

Figure 8.19 (a) Series and (b) parallel configurations of two identical PV panels

Figure 8.20 I–V characteristics of two identical PV panels connected in series


FLC in PV solar energy systems 461

30
25
20
15
10
5
0
0 5 10 15 20 25 30 35 40

Figure 8.21 I–V characteristics of two identical PV panels connected in parallel

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

Combined I-V Characteristics


of PV-1 and PV-2 in series

Figure 8.22 I–V characteristics of two unidentical PV panels connected in series

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

represented by DB and DBPxy, respectively. The letters x and y in subscripts have


been used to depict the locations of the PV modules in the array. For example, x
indicates the row number and y is the column number. Similarly, the PV numbers
on the PV symbols in Figure 8.23 are also showing the locations of the modules in
matrix format.
If a PV module is under shading effect and acts as a load, the bypass diode
becomes active and lets the load current continue to flow bypassing the shaded PV
module. In this case, the unshaded modules in a row operate normally. However,
the shaded modules cause a reduction in the power of related rows.

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

Table E8.6 Characteristic data for the PV array used in


Example 8.6

Characteristic data Data for temperature and


solar irradiation effects
q = 1.106e19 C b = 0.004
k = 273  0.138e23 J/ C g = 0.06
Rs = 0.01 Ohm a = 0.2
I0 = 0.051 A
IPH = 5.4 A Curve fitting coefficient
TR = 20  C A = 99
SR = 100 mW/cm2
FLC in PV solar energy systems 465

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).

Figure E8.6(a) MATLAB .m file for Example 8.6


466 Fuzzy logic control in energy systems, 2nd edition

I–V

P–V

Figure E8.6(b) Two identical panels are in series. There are no shading effects

Since there is no shading, the load voltage would be V L = 2V PV1 and


IL = I PV1 = IPV2 . The power can be obtained as P L = (V L )(I L ).
In the case of two identical PV modules connected in series, the total power
and load voltage are doubled. This operation mode corresponds to operating a
PV array without shading effects as depicted in Figure E8.6(b).
(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.
If Module 2 is under the shade effect and receives lesser solar irradiation
than that of Module 1, its short circuit current would be smaller and the mag-
nitude of Module 2 current would shrink toward the x-axis. Since the open
circuit voltage of Module 2 under the shade becomes smaller than that of
during unshaded operation, the total open circuit voltage of the PV array with
one PV module under the shading effect would be smaller than that of the array
during unshaded operation. Since the short circuit current of Module 2 under
shading is smaller, the total current of the series connected modules could not
be greater than the short circuit current of Module 2 as shown in Figure E8.6(c).
Curve (I–V)1 represents the current–voltage characteristics of Module 1, which
has no shading effects. Curve (I–V)2 is the I–V characteristics of Module 2,
which is partially shaded. Curves (I–V)3 and (I–V)4 belong to the PV array made
of two series connected PV modules. Curve (I–V)3 is the I–V characteristics of
the PV array with unshaded two modules connected in series and curve (I–V)4 is
the I–V characteristics of the same PV array when one of the modules is partially
shaded. The P–V curves of the same PV array are given in the second part of
Figure E8.6(c). The curve (P–V)3 is the P–V curve of the PV array when
there is no shading effect on both of the modules. The P–V curve of the PV
FLC in PV solar energy systems 467

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.5.3 MPPT in PV arrays under shading


The use of bypass diodes causes a PV characteristic with multiple local maxima, as
shown in Figure 8.24. For a PV array under partial shading to produce maximum
468 Fuzzy logic control in energy systems, 2nd edition

Figure 8.24 Power–voltage characteristics of a PV array under partial shading

power, it must be operated at current–voltage operating point corresponding to the


highest global maximum power point by using an MPPT. Some of the maximum
power point trackers such as the ones called Reset and Find (RSF) algorithm
[10,11], the traditional Perturb and Observe (P&O) algorithm, Incremental
Conductance (IC) algorithm, and switching for reconfiguration (SFR) have been
introduced by the literature [39–44]. Under homogeneous solar irradiation, RSF
and the P&O algorithm are simpler and faster than the IC algorithm. However, all
these three algorithms have the disadvantage of getting stuck at the local maximum
power point in case of partial shading. In the switching for reconfiguration of the
modules, the efficiency can be improved, but the costly hardware requirement has a
negative impact on this method. Research studies [45–53] show that the optimi-
zation algorithms used for MPPT have advantages and disadvantages in terms of a
number of parameters, convergence time, and tracking capability.

8.5.4 MPPT optimization methods for PV arrays under


shading
Optimization can be defined as the problem of finding suitable values for the sys-
tem variables that maximize or minimize the objective function defined under
constraints. Optimization methods are classified into two categories as determi-
nistic and stochastic approaches. The deterministic approach includes linear and
nonlinear programming methods, while the stochastic approach includes heuristic
and meta-heuristic methods [54]. Two population-based meta-heuristic methods
namely Symbiotic Organism Search (SOS) and Whale Optimization Algorithms
(WOA) are introduced in this section using an example, which is adapted
from [57].
Symbiotic Organism Search (SOS) uses a meta-heuristic algorithm such as
Artificial Bee Colony and Particle Swarm Optimization to mimic natural phe-
nomena such as the foraging behavior of honeybee swarms and animal swarm
behavior. This algorithm searches for the most suitable organism by simulating
symbiotic interactions within a paired organism relationship. The SOS starts with
FLC in PV solar energy systems 469

an initial population, referred to as an ecosystem, where a group of organisms is


randomly generated in the search space. Each organism in the ecosystem is associated
with a fitness value toward the desired goal. To generate new solutions for the next
iteration, SOS is governed by mimicking the biological interactions of mutualism,
commensalism, and parasitism. Every organism interacts with each other in all phases
until termination criteria are satisfied. For example, in the mutualism phase, Xi is an
organism that pairs with the ith member of the ecosystem, and organism Xj is ran-
domly selected to interact with Xi. Both organisms generate new solutions based on
the symbiosis given in (8.34) and (8.35) in order to increase their survival advantage.
Xinew ¼ Xi þ randð0; 1ÞðXbest  Mutualv BF1 Þ (8.34)
Xjnew ¼ Xj þ randð0; 1ÞðXbest  Mutualv BF2 Þ (8.35)
where BF1 and BF2 are utility factors representing whether each organism benefits par-
tially or fully from the interaction and are randomly selected as either 1 or 2. The mutual
vector representing the relationship characteristic between Xi and Xj is given in (8.36).
Mutualv ¼ ðXi þ Xj Þ=2 (8.36)
Xbest in (8.34) and (8.35) represents the highest degree of adaptation and
reflects the mutual effort to reach a goal that increases the survival advantage of the
organism [55].
Whale Optimization Algorithms (WOA) is based on humpback whales, which
have a unique hunting method known as bubble net. In the first maneuver, hump-
back whales dive to a depth of about 12 m and then start swimming toward the
surface by forming spiral-shaped bubbles around their moment path. This man-
euver is called as upward spiral. The other maneuver, known as multiple loops
consists of coral loop, lobtail, and capture loop. The spiral bubble network feeding
maneuver has been mathematically modeled for the implementation of the whale
optimization algorithm. For example, in the journey encirclement phase, WOA
assumes that the current solution is close to optimum because the position of the
optimal design is unknown. Once the best agent is identified, the other agents
update their positions relative to the best agent using (8.37) and (8.38).
! ! !  !
D ¼ C:X ðkÞ  XðkÞ (8.37)
! !  ! !
X ðk þ 1Þ ¼ X ðkÞ  A D (8.38)
! 
where k is the iteration
!
counter,
!
X is the position vector of the most
!
optimal
!
solution obtained, D and X are the position vector. The vectors A and C are
computed as in (8.37) and (8.38), respectively.
! ! ! !
A ¼ 2a  r  a (8.39)
! !
C ¼2r (8.40)
470 Fuzzy logic control in energy systems, 2nd edition
! !
where a is linearly decreased from 2 to 0 across iterations and r is a random vector
in the interval [0, 1] [56].
An application of the SOS-WOA hybrid optimization method for the MPPT
problem under partial shading of PV arrays has been studied by the author and his
PhD student Büşra Özgenç in [57,58] and will not be repeated here.

8.6 Problems

P.5.1 A PV array system is used to supply power to 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–AC load system interfacing are also considered.
(b) Explain the purpose of each component you used in your circuit.
P.5.2 A single PV panel is represented by the reference model equation (8.5) with
the reference model parameters given as A = 100, RS = 0.02 Ohms, I0 =
0.001 A, reference solar irradiation SR = 100 mW/cm2, and reference tem-
perature TR = 20  C. Open circuit voltage and short circuit current are given
as VOCR = 40 V and ISCR = 6 A, respectively. Temperature coefficients are bT
= 0.005 and gT = 0.06. Solar irradiation coefficient aS = 0.22  C cm2/mW.
(a) How the I–V characteristics of this PV panel change if the solar irra-
diation level is increased from 100 mW/cm2 to 130 mW/cm2 and then to
160 mW/cm2? Assume temperature TA = constant at reference tem-
perature 20  C.
(b) How the I–V characteristics of this PV panel change if temperature TA is
decreased from 20  C to 10  C and then down to 0  C. Assume that the
solar irradiation level is constant at a reference value of 100 mW/cm2.
(c) Assume that you have PV panels with a 150 Wp power. What would be
the PV array sizing if you want to connect it directly to a 1 kW load that
operates with 220 V DC.
P.5.3 The equivalent circuit given in Figure 8.2 is used to represent a PV panel. In
the circuit, Iph is the generated photocurrent, ID is the reverse leakage current
of the diode, RSH is the shunt resistance representing the I2R losses due to
shunt leakage currents, RS is the series resistance representing the I2R losses
due to load current. IC is the panel output current, which is equal to the load
current, and VC is the panel’s output terminal voltage.
When this equivalent circuit is developed, only the I2R-type heat losses are
considered. There are two main equations for this equivalent circuit. The cur-
rent equation, IC ¼ Iph  I0  Ish 2
Rsh and the voltage equation,
VC ¼ Vph  RS IC , where Vph is the generated photovoltage. The PV panels are
connected in series/parallel combinations to build a PV array.
FLC in PV solar energy systems 471

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

[3] Carrasco J.M., Franquelo L.G., Bialasiewicz J.T., et al. ‘Power-electronic


systems for the grid integration of renewable energy sources: a survey’, IEEE
Transactions on Industrial Electronics. 2006;53:1002–1016.
[4] Grau T., Huo M. and Neuhoff K. ‘Survey of photovoltaic industry and policy
in Germany and China’, Energy Policy. 2012;51:20–37.
[5] Eltawil M.A. and Zhao Z. ‘Grid-connected photovoltaic power systems:
technical and potential problems—a review’, Renewable and Sustainable
Energy Reviews. 2010;14:112–129.
[6] Green M.A., Emery K., Hishikawa Y., Warta W. and Dunlop E.D. ‘Solar cell
efficiency tables (Version 45)’, Progress in Photovoltaics: Research And
Applications. 2015;23:1–9
[7] Ugehes R.O.H, ‘Optimum control of sun tracking solar collectors’, Pro-
ceedings of the First Workshop on the Control of Solar Energy Systems for
Heating and Cooling, 1978, pp. 69–74.
[8] Altas I.H. ‘Control strategies for maximum power tracking and energy uti-
lization of a stand-alone photovoltaic energy system’, PhD Thesis, University
of New Brunswick, Faculty of Engineering, Department of Electrical Engi-
neering, Fredericton, New Brunswick, Canada, 1993.
[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:227–238.
[10] Altas I.H. and Sharaf A.M. ‘A novel on-line MPP search algorithm for PV
arrays’, IEEE Transactions on Energy Conversion. 1996;11:748–754.
[11] Altas I.H. and Sharaf A.M. ‘Novel maximum power fuzzy logic controller for
photovoltaic solar energy systems’, Renewable Energy. 2008;33:388–399.
[12] Altas 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.
[13] Altas I.H. and Sharaf A.M. ‘A photovoltaic array simulation model for
MATLAB–Simulink GUI environment’, 2007 International Conference on
Clean Electrical Power, Capri, Italy, 2007, pp. 341–345, https://doi.org/10.
1109/ICCEP.2007.384234.
[14] Rauschenbach H.S., Solar Cell Array Design Handbook—The Principles and
Technology of Photovoltaic Energy Conversion. Washington, DC: Van
Nostrand Reinhold Company, 1980.
[15] Yao Y., Ramshaw R.S. and Bustamante E. ‘A review of photovoltaic
models’, Canadian Conference on Electrical and Computer Engineering,
25–27 September 1991, Quebec City, Quebec, Canada, pp. 56.3.1–56.3.4.
[16] Wasynczuk O. ‘Dynamic behavior of a class of photovoltaic power systems’,
IEEE Power Engineering Review. 1983;PER-3:36–37, https://doi.org/10.
1109/MPER.1983.5519293.
[17] Altas I.H. and Sharaf A.M. ‘A solar powered permanent magnet DC motor
drive scheme’, Proceedings of the 17th Annual Conference of the Solar
Energy Society of Canada, 21–26 June 1991, Toronto, Ontario, pp. 65–70.
474 Fuzzy logic control in energy systems, 2nd edition

[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

Conversion Systems (GECS), Hammamet, Tunisia, 2017, pp. 1–5, https://doi.


org/10.1109/GECS.2017.8066212.
[32] Sebbagh T., Kelaiaia R. and Zaatri A. ‘An experimental validation of the
effect of partial shade on the I–V characteristic of PV panel’, The Interna-
tional Journal of Advanced Manufacturing Technology. 2018;96:4165–4172,
https://doi.org/10.1007/s00170-018-1858-4.
[33] Patel H. and Agarwal V. ‘MATLAB-based modeling to study the effects of
partial shading on PV array characteristics’, IEEE Transactions on Energy
Conversion. 2008;23:302–310, https://doi.org/10.1109/TEC.2007.914308.
[34] Ahmada R., Murtaza A.F., Sher H.A., Shami U.T. and Olalekan S. ‘An
analytical approach to study partial shading effects on PV array supported by
literature’, Renewable and Sustainable Energy Reviews. 2017;74:721–732.
[35] Balasubramanian I.R., Ganesan S.I. and Chilakapati N. ‘Impact of partial
shading on the output power of PV systems under partial shading conditions’,
IET Power Electronics. 2014;7:657–666, https://doi.org/10.1049/iet-pel.
2013.0143.
[36] Krishna G.S. and Moger T. ‘Reconfiguration strategies for reducing partial
shading effects in photovoltaic arrays: state of the art’, Solar Energy. 2019;
182:429–452.
[37] Santos P dos., Vicente E.M. and Ribeiro E.R. ‘Reconfiguration methodology
of shaded photovoltaic panels to maximize the produced energy’, XI Brazi-
lian Power Electronics Conference, Natal, Brazil, 2011, pp. 700–706, https://
doi.org/10.1109/COBEP.2011.6085266.
[38] Sokolov M. and Shmilovitz D. ‘Load line emulation based maximum power
point tracking’, 2008 IEEE Power Electronics Specialists Conference,
Rhodes, Greece, 2008, pp. 4098–4101, https://doi.org/10.1109/PESC.2008.
4592595.
[39] Keskin Y., Başoğlu M.E., Tekdemir I.G. and Çakir B. ‘Fotovoltaik Sis-
temlerde Değiştir-Gözle ve Artan İletkenlik Algoritmalarının Karşılaştır-
ılması’, Elektrik-Elektronik-Bilgisayar ve Biyomedikal Mühendisliği
Sempozyumu (ELECO), Kasım 2014, Bursa.
[40] Jalil F., Saxena R., Ansari M.S. and Ali N. ‘Reconfiguration of photovoltaic
arrays under partial shading conditions’, Second International Innovative
Applications of Computational Intelligence on Power, Energy and Controls
with their Impact on Humanity (CIPECH), November 2016, India, pp. 193–200.
[41] Babu T.S., Ram J.P. and Dragičević T., ‘Particle swarm optimization based
solar PV array reconfiguration of the maximum power extraction under
partial shading conditions’, IEEE Transactions on Sustainable Energy. 2018;
9:74–85.
[42] Bosco M.J. and Mabel M.C. ‘A novel cross diagonal view configuration of a
PV system under partial shading condition’, International Solar Energy
Society. 2017;158:760–773.
[43] Belhaouas N., Ait Cheikh M.S., Agathoklis P., et al. ‘PV array power output
maximization under partial shading using new shifted PV array arrange-
ments’, Applied Energy. 2017;187:326–337.
476 Fuzzy logic control in energy systems, 2nd edition

[44] Fathy A. ‘Recent meta-heuristic grasshopper optimization algorithm for


optimal reconfiguration of partially shaded PV array’, International Solar
Energy Society. 2018;171:638–651.
[45] Ishaque K., Salam Z., Taheri H. and Shamsudin A. ‘Maximum power point
tracking for PV system under partial shading condition via particle swarm
optimization’, IEEE Applied Power Electronics Colloquium (IAPEC), April
2011, Malaysia, pp. 5–9.
[46] Ram, J.P. and Rajasekar N. ‘A novel flower pollination based global max-
imum power point method for solar maximum power point tracking’, IEEE
Transactions on Power Electronics. 2017;32:8486–8499.
[47] Jubaer A. and Zainal S. ‘A maximum power point tracking for PV system
using cuckoo search with partial shading capability’, Applied Energy. 2014;
119:118–130.
[48] Guo L., Meng Z., Sun Y. and Wang L. ‘A modified cat swarm optimization
based maximum power point tracking method for photovoltaic system under
partially shaded condition’, International Journal of Energy. 2018;144:501–
514.
[49] Oshaba A.S., Ali E.S. and Abd Elazim S.M. ‘MPPT control design of PV
system supplied SRM using BAT search algorithm’, Sustainable Energy,
Grids and Networks. 2015;2:51–60.
[50] Rezk H., Fathy A. and Abdelaziz A.Y. ‘A comparison of different global
MPPT techniques based on meta-heuristic algorithms for photovoltaic sys-
tem subjected to partial shading conditions’, Renewable and Sustainable
Energy Reviews. 2017;74:377–386.
[51] Jiang L.L. and Maskell D.L. ‘A uniform implementation scheme for evolu-
tionary optimization algorithms and the experimental implementation of an
ACO based MPPT for PV system under partial shading’, IEEE Symposium on
Computational Intelligence Applications in Smart Grid (CIASG), December
2014, USA, pp. 1–8.
[52] Manickam C., Raman G.P., Raman G.R., Ganesan S.I. and Chilakapati N.
‘Fireworks enriched P&O algorithm for GMPPT and detection of partial
shading in PV systems’, IEEE Transactions on Power Electronics. 2017;
32:4432–4443.
[53] Mohanty S., Subudhi B. and Ray P. ‘A grey wolf assisted perturb & observe
MPPT algorithm for a PV system’, IEEE Transactions on Energy Conver-
sion. 2017;32:340–347.
[54] Mashwani W., Haider R. and Brahim Belhaouari S. ‘A multiswarm intelli-
gence algorithm for expensive bound constrained optimization problems’.
Complexity. 2021;2021:1–18. https://doi.org/10.1155/2021/5521951.
[55] Cheng M.Y. and Prayogo D. ‘Symbiotic organisms search: a new metaheur-
istic optimization algorithm’, Computers & Structures. 2014;139:98–112.
[56] Mirjalili S. and Lewis A. ‘The whale optimization algorithm’, Advances in
Engineering Software. 2016;95:51–67.
[57] Özgenç B. and Altaş, İ.H. ‘Comparison of MPPT algorithms in PV systems’.
2019 Innovations in Intelligent Systems and Applications Conference
FLC in PV solar energy systems 477

(ASYU), Izmir, Turkey, 2019, pp. 1–5, https://doi.org/10.1109/ASYU48272.


2019.8946396.
[58] Özgenç B. and Altaş, İ.H. ‘Implementation of a new maximum power point
tracking algorithm for partially shaded PV systems’, 7th International
Istanbul Smart Grids and Cities Congress and Fair (ICSG), İstanbul, Turkey,
2019, pp. 119–123.
This page intentionally left blank
Chapter 9
Microgrids and energy management

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

Figure 9.1 One-line diagram of a conventional power transmission and


distribution system

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

Figure 9.2 A conventional power system from generation to consumption

Figure 9.3 Addition of wind and PV sources to conventional power systems

applied. Inclusion of this power and management system in distribution networks


gives a new ability to the network and this network is called as a microgrid.
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 com-
munities such as the ones listed below:
l Housing sites,
l University campuses,
l Business areas or trade centers,
l Industrial sites,
Microgrids and energy management 483

RESIDENTIAL

Figure 9.4 A utility-connected microgrid

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.

9.3 Interfacing distributed sources to AC microgrids


Considering various types of renewable energy-based power sources, the common
power grid could be AC or DC. Therefore, it would be better to look at the inter-
facing issue separately for AC microgrids and DC microgrids.
Renewable energy-based power sources such as solar PV and fuel cells have
DC output. Wind and wave energy systems may have DC or AC outputs depending
upon the type of generators used. Storage devices and car charging stations with
storage units have DC outputs, too. These storage devices might be charged from
renewable energy sources or from utility grids having fossil fuel-based conven-
tional power sources. In this book, renewable energy systems are the main subject.
Thus, only the interfacing of the storage devices charged from renewable energy
sources is considered here.
Microgrids and energy management 485

9.3.1 Solar PV systems


Solar PV systems have DC output voltages. However, the magnitude of this DC
voltage may not be constant due to changing meteorological conditions. Therefore,
a voltage regulator or a DC–DC converter has to be used to have a constant DC
voltage as given in Figure 9.5. If a backup battery unit is used then a battery charger
with regulator function might be used instead. Besides, an inverter must be used
to complete the connection of the PV system to common AC grid [19,20]. The
PV system may also be directly connected to the input side of the inverter if the
input DC voltage range is large enough. However, direct connection of the PV
array output to the inverter is usually not preferred because of the possibility that
the voltage magnitudes might be out of the input voltage range of the inverter.
Another interfacing scheme of the PV arrays to the common power bus is shown
in figure 9.6. The differences between Figures 9.5 and 9.6 are the replacement of
the charge regulator by a DC chopper, the addition of the charge controller, and
the inclusion of the AC–AC interfacing unit inside three-phase inverter. The
AC–AC interfacing unit is a device that is used to check the synchronization
conditions and connect two AC systems to each other. This device is generally
included in the inverter and synchronizes the inverter output to the common
power grid.
The variable output voltage VPV of the PV panel is regulated by the charge
regulator to get the voltage VDC as a straight line as depicted in Figure 9.5. The
same process can be done by using a DC–DC converter, which is operated as a
DC chopper and shown in Figure 9.6. Digital simulation models of DC chopper
and three-phase inverter are given later in this section. The DC chopper is con-
trolled to obtain a constant DC voltage as the input voltage to three-phase
inverter and to the charge controller. Therefore, the chopper output voltage VDC
is used as the feedback voltage to the DC chopper controller. The reference
voltage used in the DC chopper controller is the desired input voltage of three-
phase inverter. The instantaneous three-phase voltages of the common AC grid
are the reference signals of the inverter controller. The controller detects the

Three

Figure 9.5 Interfacing of a PV array to the common AC grid using a charger


regulator
486 Fuzzy logic control in energy systems, 2nd edition

Three-phase

Figure 9.6 Interfacing of a PV array to the common AC grid using DC–DC


converter

frequency, phase order, voltage magnitudes, and phase differences of the AC


power grid and use them to adjust the inverter output voltages for synchroniza-
tion and stable operation.

9.3.2 Fuel cells and storage devices


Fuel cells and storage devices are DC sources and their interfacing process to the
AC power grid is the same as that of solar PV systems [20]. After the fuel cell or
storage devices either a voltage regulator or a controllable DC–DC converter is
used to obtain a constant DC voltage, which is the input DC voltage of the inverter.
In some cases, if the DC source voltage is compatible with the input voltage of the
inverter, then a DC voltage regulator or a DC–DC converter may not be needed
[20]. Since the microgrid integration of solar PV system also represents the inte-
gration of all other DC sources, separate explanations will not be given.

9.3.3 Wind energy systems


Wind energy systems (WES) are usually considered with asynchronous generators,
which generate AC voltages. The wind energy systems have been discussed in
Chapter 7 and the same things will not be repeated here. However, the WES is a
good example of the interfacing of AC sources to the AC common power bus-bar.
Asynchronous generators are able to generate the same power at various wind
speeds, which causes the generated voltages to have variable magnitudes and
variable frequencies. Since an AC system with variable voltages and frequencies
cannot be synchronized to another AC system with constant voltage magnitude and
frequency, an AC–DC–AC link between these two AC systems that have different
properties, would be a good solution to be established [19–21].
The asynchronous generator is converted to a DC source by using a full-bridge
diode or a controllable rectifier. Controllable rectifier is usually preferred to control
the magnitude of DC voltage to be applied to the inverter as given in Figure 9.7.
Microgrids and energy management 487

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.

9.4 Interfacing with DC microgrids

Power distribution in DC microgrids is done by DC common DC power network. A


part of a DC microgrid is given in Figure 9.8 where all distributed sources are

line

line

line

Figure 9.8 A DC microgrid with distributed generation units


488 Fuzzy logic control in energy systems, 2nd edition

connected to a common DC power grid. DC–DC power electronic converters are


used to control DC source voltages so that they can be connected to the same
common DC grid. Similarly, AC–DC power electronic converters are used to
control AC source voltages for DC power grid connection.
Both AC and DC microgrids have energy management system (EMS) that
requires information from all parts of the grid. Therefore, data is collected from
distributed sources, loads, and converters and transmitted to a control and EMS
center, which may have either local or centralized structure. Besides, meteor-
ological data is also collected from the sites where solar PV, wind energy, and
small hydro systems are located and used for forecasting the power to be generated
the next day or later. This forecasting is an important part of the energy manage-
ment system, which will be discussed later in this chapter.
As depicted in Figures 9.5–9.8, both AC and DC microgrids require power
electronic converters for interfacing distributed sources to the microgrids.
Therefore, it would be good to look at some of the power electronics converters
used in the interfacing of distributed sources to the grids.

9.5 Modeling DC–DC converters (choppers)

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 A type B DC–DC buck converter circuit


Microgrids and energy management 489

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

Figure 9.10 Basic waveforms of a type B DC–DC buck converter


490 Fuzzy logic control in energy systems, 2nd edition

terminals marked as A and B. The conducting period TON of M1 and D2 is


determined by applying a controller to get the desired DC output voltage vL. For
an ideal DC–DC buck converter the output voltage would have a square wave
shape as depicted by vL in Figure 9.10. Due to the filter capacitor, the load
current continues to flow in the opposite direction during the blocking mode
operation of the chopper. Thus, the current iS has negative parts, but iPV does not
because of diode D. The average value, VAV, of the chopper output voltage can
be calculated by the integral of the instant value of vL over the chopping period
TCH as given in (9.1).
ð tON
1
VAV ¼ vL ðtÞdt (9.1)
TCH 0

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)

tON ¼ uTCH (9.5)

Substituting (9.5) into (9.29) yields the average output DC voltage as


VAV ¼ uVS (9.6)

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

Figure 9.11 Generating the gating signals by a controller

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.

Design Example 9.1


Develop a detailed simulation model for the chopper circuit given in Figure 9.9 by
utilizing the following steps.
(a) Replace the PV array with a 50 V DC power source and redraw the circuit.
(b) Use a 50 Ohms resistance as the load.
(c) Write circuit equations while MOSFET M1 is operating in conducting mode
and MOSFET M2 is operating in blocking mode.
(d) Write circuit equations while MOSFET M1 is operating in blocking mode and
MOSFET M2 is operating in conducting mode.
(e) Combine the equations you wrote in parts (c) and (d) for the solution of the
whole system equations.
(f) Design a fuzzy logic controller in order to control the load voltage vL in
Figure 9.9 and keep it at a desired constant value of 30 V.
(g) Write a solution algorithm in MATLAB as an .m file and simulate this system.
(h) Plot resultant time responses of load voltage, control error, load current, and
gate signals.

9.6 Modeling DC–AC converters (inverters)


A simulation model of an inverter converting the PV array voltage to three-phase
AC voltages is studied here. Considering its basic operating principles, the inverter
may be treated as a device that converts input DC voltage VDC into AC voltages va0,
vb0, and vc0 as represented in Figure 9.12. Assuming that the inverter is controlled
only by the frequency control signal which is determined by the controllers using
the common power grid frequency requirements. It should be noted that in the case
of induction motor control, a constant V/F ratio scheme is required to ensure
satisfactory operation and avoid saturation.

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

terms of the dc input voltage, Vdc, of the inverter as follows:


va0 ¼ 0:5 Vdc ; for vaR > vC ; where vaR > 0 (9.11)
va0 ¼ 0:5 Vdc ; for vaR < vC ; where vaR > 0 (9.12)
Similarly, the comparison of the carrier wave, vC, with the phase references vbR
and vcR, for the phases b and c, respectively, results in the pulsating phase voltages
vb0 and vc0 for these phases. The width of the pulses also represents the conduction
periods of the power electronic switches shown in Figure 9.12.
The pulsating phase voltages are used to obtain the line-to-line voltages vab,
vbc, and vca as in (9.13), (9.14), and (9.15). The resultant line-to-line voltages are
shown in Figure 9.15. Each one of these line-to-line voltage waveforms has a
sinewave at reference signal frequency FR besides other components at the multi-
ples of the reference frequency of 50 Hz.
vab ðtÞ ¼ va0 ðtÞ  vb0 ðtÞ (9.13)
vbc ðtÞ ¼ vb0 ðtÞ  vc0 ðtÞ (9.14)
vca ðtÞ ¼ vc0 ðtÞ  va0 ðtÞ (9.15)
The MATLAB m file used to obtain Figures 9.13–9.15 is given in Figure 9.16.
496 Fuzzy logic control in energy systems, 2nd edition

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)

Figure 9.15 Line-to-line output voltages of the three-phase PWM inverter

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.

Design Example 9.2


Develop a MATLAB .m file code to simulate a PWM inverter by generating the
pulsating output signals va0, vb0, and vc0 from triangular carrier signal, which is
defined by (9.7) and reference sinusoid phase voltages defined by (9.8), (9.9), and
(9.10). Assume that the related data is given as follows:
DC voltage input (VDC) = 540 V;
The peak value of the reference signals (Ar) = 540;
Microgrids and energy management 497

Figure 9.16 The MATLAB .m file used to simulate a three-phase PWM inverter

The peak value of the carrier signals (Ac) = 1.1Ar;


Reference frequency (Fr) = 50 Hz;
Carrier wave frequency (Fc) = 1000 Hz;
Number of reference signal period to be displayed (CYR) = 2;
Number of iterations, n, in (9.7) = 9;
498 Fuzzy logic control in energy systems, 2nd edition

Figure E9.2 Basic flow chart of the inverter model

Sampling period dt = 0.0001;


Simulation time (Tend) = CYR(1/FR).

9.7 Distributed generation and control


Electrical power generation from wind and PV power systems keeps increasing
with the new installations in many countries. The renewable energy units are
installed as large power generating stations, which are usually called wind farm
and/or PV farm. The PV systems are also installed on the roofs of residential sites.
A schematic one-line diagram of generalized distributed power system is given in
Figure 9.17. The generated power from the distributed generation units is collected
in a power bus to be distributed to the loads. The residential loads with PV units on
their roofs may be powered directly from these units. However, it is usually pre-
ferred to sell the generated power to the utility and buy the required amount back
from the utility in order to use the generated power more efficiently.
As shown in Figure 9.17, the power generating units and the loads are all
connected to the same distribution network such that any sudden changes in loads
or in generating units affect the power network. Therefore, load dissipation and
power generation are monitored for system management and control purposes. Data
is measured from every load and generation side and transmitted to a center where
the management and control decisions are made. This control approach is called
centralized control in distributed generation systems. The centralized control has
been used widely in distributed generation [12–15]. However, the centralized
control requires secure and fast data transmission from everywhere in the network.
Microgrids and energy management 499

Figure 9.17 A distributed generation with centralized control

Figure 9.18 A distributed generation with distributed control

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

of distributed control in power systems. In a distributed control scheme, the mea-


surement and control (M&C) are done locally at every loading and generating unit.
Every data is not transferred to the central storage and control unit. The control
and management are processed separately for each load and generation depending
on local demand. Smart plugs, switches, and decision-makers are placed on the
loads in terms of appliances and devices.
Distributed control has a more flexible structure compared to that of the cen-
tralized control. The distributed control and management approach enables the
power utility company to reach the customers by offering alternative energy prices
to run their loads at shifted times to prevent overloading and power outages because
of insufficient generation.
Both schemes given in Figures 9.17 and 9.18 have data measurement, com-
munication, control, and management. Both schemes include decision-making
processes and smart devices to operate the distribution network. The distributed
power systems with data communication, control, and management algorithms are
called smart grids. Figures 9.17 and 9.18 show only the power and data measure-
ment and transmission paths for simplicity to focus only on the measurement and
control.
The distributed power networks and smart grids are more complicated
including measurement devices, protection devices, switchgear connections,
transformers, control elements, management algorithms, and computers. An ana-
lysis of these two control schemes of distributed generation yields the major pro-
blems as follows:
l Integration of the generating units to the distribution network
l The control of the generating units and loads
l Power quality and voltage regulation
l Stable operation and reliability
l Optimum locations of generating units
l The management of generation, distribution, and load sites
l Protection of distribution systems
l Energy backup and storage systems
l Data communication
l Cyber security in data transmission
Many other issues can be added to these listed ones. For example, the integration of
distributed generation to utility and loads includes many other sub-issues such as
power electronic converters, power filters, and their controls. Each one of these
issues requires a solution so that the system can be operated smoothly.

9.8 Energy management in a renewable integration


system
Solar PV, wind, hydrogen fuel cells, and small hydropower systems are used
separately as well as together with hybrid systems. Even if renewable energy is
Microgrids and energy management 501

environmentally friendly with unlimited sources, its implementation schemes


require interface units that affect both installation costs and the quality of power
transferred to load or utility grid. Power electronic converters are used for inter-
facing PV, wind turbines, fuel cells, and microturbines with utility. Switching and
control techniques of the interfacing devices are important for power quality as well
as for efficient and maximum power utilization. In fact, the use of power electro-
nics is growing rapidly not only in renewable energy systems but also in power
systems and promises to change the landscape of future power systems in terms of
generation, operation, and control.
It is widely accepted that distributed generation is a very important energy
option in the near future. Most of the distributed energy resources require a
power electronic converter to interface with the load and utility. The most
important application areas of power electronics can be considered as dis-
tributed generation, flexible AC transmission systems (FACTS), and power
quality. FACTS are important due to two main reasons: (1) deregulation of
utility requires precise control of power flow by FACTS and (2) growing energy
demand coupled with difficulty in constructing more transmission lines requires
FACTS devices to enable increased power flow in existing lines. FACTS are
one of the important topics that should be considered as a part of a distributed
generation system that consists of the hybrid wind/PV/fuel cell and small
hydropower generating units.

9.8.1 Centralized control of distributed renewable energy


systems
The control of distributed generation is done mainly by two approaches, which are
called centralized control and distributed control. In the centralized control
approach, all the measurements are transferred to a central computer unit, and the
control or management decisions are made centrally by processing the algorithms
in this computer. The centralized control of distributed renewable energy systems is
discussed using a distributed renewable energy integration scheme shown in
Figure 9.19, which includes hybrid wind, photovoltaic (PV), small hydro, and fuel
cell (FC) renewable energy schemes. The integration consists of a FACTS scheme
topology, controller structure, and interface converters for:
(i) Maximum energy utilization
(ii) Low-cost implementation
(iii) Conversion interface scheme robustness, effective control to minimize the
impact of the renewable energy source on the host electrical grid, or satis-
factory performance for stand-alone operation
(iv) Effective coordination and protection schemes for distributed energy
systems.
The control schemes may include classical PID, fuzzy, neural fuzzy, and other
intelligent approaches with adaptivity. Derivative free heuristic optimization methods
such as genetic algorithms, particle swarm optimization, ant colony, etc. may be
502 Fuzzy logic control in energy systems, 2nd edition

Figure 9.19 Distributed renewable energy system

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).

PG ¼ wpv PPV (9.16)

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

Figure E9.3(a) Renewable power generation system and energy management


Microgrids and energy management 507

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.

Figure E9.3(b) The PV power generation part of the system


508 Fuzzy logic control in energy systems, 2nd edition

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

Figure E9.3(c) The wind power generates part of the system


Microgrids and energy management 509

Volts. Full-bridge rectifier output voltage changes from 40.5 V to 51 V. A DC


chopper is used to keep this variable voltage at 48 V constant DC to be connected to
common DC bus, which has a 48 V constant DC voltage.
The machine used as the generator is a three-phase, four-pole, 3.5 kW, 50 Hz
1415 rpm induction machine with a power factor of cosj = 0.80. In order to operate
this induction machine as generator at its rated values, the required reactive power
is calculated as 2.625 kVAr. This reactive power can be supplied by connecting
19.27 mF on each phase of a delta-connected configuration. However, 22 mF and
33 mF values are used in the testing to get a wide speed range.
Three-phase output voltages of the induction generator are rectified and kept
constant at 48 V by controlling a DC chopper to be connected to common DC bus.
Then an inverter is used to convert this 48 V DC voltage to 230 V, 50 Hz AC to
operate the loads. During this operation, the load current, load voltage, chopper
input voltage, and chopper output current are measured and transferred to the
computer.
In addition to PES and WES systems, the utility is also considered as a power
source in Figure E9.3(a). Therefore, two separate cases become available to be
analyzed. The first case includes the consideration of PES and WES systems only
to analyze the off-grid connection by supplying power to individual loads. The
second case deals with utility-connected renewable energy schemes when the
power from renewable sources is not sufficient. Details of the utility interface to
48 V DC bus and loads are shown in Figure E9.3(d).
As shown in Figure E9.3(d), the utility voltage is converted to 48 V DC con-
stant value and connected to 48 V common DC bus as it is done for wind and PV
systems. Data collected from various parts of the system is transferred to a central
computer and used for control and decision-making processes. The interfacing
between the real system and the computer is established by NI USB 6259 data
acquisition card.

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

Figure E9.3(d) Utility grid interfacing


510 Fuzzy logic control in energy systems, 2nd edition

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

Base load power Open secondary


(300W) power system
No

Yes
>0 Loads
Wind system Wind system
power power

Consumed power

Figure E9.3(e) Basic block diagram of the power management system


Microgrids and energy management 511

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

Figure E9.3(g) Simplified flowchart of power management algorithm

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.

These steps bring up the importance of the following:


1. The operating time of each unit.
2. Turn off time of each unit.
3. The amount of load at present conditions.
Microgrids and energy management 513

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

Figure E9.3(h) Fuzzy decision-maker

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

Table E9.3(a) FDM rules for 0–700 W power

Current (A) Voltage Frequency Peak 7 Rules 7 Rules


(V) (Hz) Power 18 Output 7 Output
(W) FDM FDM
I1!3.5 (100 W) V1!27 32.1 150 P1 I1!3.5
I1!3.5 V2!30.5 33.5 250 P2 I1!3.5
I1!3.5 V3!34 34.8 350 P3 I1!3.5
I1!3.5 V4!37.5 36.6 500 P4 I1!3.5
I1!3.5 V5!41 38.5 650 P5 I1!3.5
I1!3.5 V6!44.5 40.3 900 P6 I1!3.5
I1!3.5 V7!48 42.2 1000 P7 I1!3.5
I2!6.83 (250 W) V1!27 33.6 250 P2 I2!6.83
I2!6.83 V2!30.5 34.6 350 P3 I2!6.83
I2!6.83 V3!34 36 450 P3 I2!6.83
I2!6.83 V4!37.5 37.6 550 P4 I2!6.83
I2!6.83 V5!41 39.4 750 P5 I2!6.83
I2!6.83 V6!44.5 41.2 925 P7 I2!6.83
I2!6.83 V7!48 43 1000 P7 I2!6.83
I3!10.16 V1!27 35.4 400 P3 I3!10.16
I3!10.16 V2!30.5 35.9 450 P3 I3!10.16
I3!10.16 V3!34 37.3 550 P4 I3!10.16
I3!10.16 V4!37.5 38.8 650 P5 I3!10.16
I3!10.16 V5!41 40.2 850 P6 I3!10.16
I3!10.16 V6!44.5 42 1000 P7 I3!10.16
I3!10.16 V7!48 43.8 1000 P7 I3!10.16
I1!3.5 V1!27 32.1 150 P1 I1!3.5
I1!3.5 V2!30.5 33.5 250 P2 I1!3.5
I1!3.5 V3!34 34.8 350 P3 I1!3.5
I1!3.5 V4!37.5 36.6 500 P4 I1!3.5
I1!3.5 V5!41 38.5 650 P5 I1!3.5
I1!3.5 V6!44.5 40.3 900 P6 I1!3.5
I1!3.5 V7!48 42.2 1000 P7 I1!3.5

Table E9.3(b) FDM rules for 700–1000 W power

Current(A) Voltage(V) Frequency(Hz) Peak 7 Rules 7 Rules


Power (W) 18 Output 7 Output
FDM FDM
I5!16.83 (700 W) V1!27 – – – P4
I5!16.83 V2!30.5 39.2 700 P12 P5
I5!16.83 V3!34 39.8 850 P15 P6
I5!16.83 V4!37.5 41 900 P16 P6
I5!16.83 V5!41 – 1000 P18 P7
I5!16.83 V6!44.5 – 1000 P18 P7
I5!16.83 V7!48 – 1000 P18 P7
I6!20.16 (850 W) V1!27 – – – P5
I6!20.16 V2!30.5 40.2 850 P15 P6
I6!20.16 V3!34 41.3 950 P17 P7
I6!20.16 V4!37.5 – 1000 P18 P7
I6!20.16 V5!41 – 1000 P18 P7
(Continues)
518 Fuzzy logic control in energy systems, 2nd edition

Table E9.3(b) (Continued)

Current(A) Voltage(V) Frequency(Hz) Peak 7 Rules 7 Rules


Power (W) 18 Output 7 Output
FDM FDM
I6!20.16 V6!44.5 – 1000 P18 P7
I6!20.16 V7!48 – 1000 P18 P7
I7!23.5 (1000 W) V1!27 – – – P6
I7!23.5 V2!30.5 – – – P6
I7!23.5 V3!34 – 1000 P18 P7
I7!23.5 V4!37.5 – 1000 P18 P7
I7!23.5 V5!41 – 1000 P18 P7
I7!23.5 V6!44.5 – 1000 P18 P7
I7!23.5 V7!48 – 1000 P18 P7

Table E9.3(c) FDM rules

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

Table E9.3(d) Collected data from wind turbine 38–44 Hz

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

Table E9.3(e) Collected data from wind turbines 31–37 Hz

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

Now let us analyze some operating cases.

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.

9.8.2 Distributed control of renewable energy systems


The centralized control of distributed generation has been applied widely for power
management in distributed power systems. However, as the distributed power
system installations speed up and start getting larger by covering wide areas, the
centralized control becomes harder to apply. As the distributed generation and
distributed power systems turn to smart grids, measurements at every generation
and every load become ineligible. Some of these measurements are used for ana-
lyzing, planning, pricing, and maintenance purposes, some others are used for
522 Fuzzy logic control in energy systems, 2nd edition

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

Figure 9.22 A sample distributed generating network


Microgrids and energy management 523

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

Figure E9.4(a) The fuzzy decision-maker algorithm for Example 9.4

Table E9.4(a) The fuzzy rules used in FDM in Example E9.4

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).

Figure E9.4(b) The fuzzy decision-maker process for Example 9.4

Figure E9.4(c) Defuzzification of the fuzzy decision for Example 9.4


526 Fuzzy logic control in energy systems, 2nd edition

Figure E9.4(d) MATLAB .m file of the fuzzy decision in Example 9.4


Microgrids and energy management 527

Design Example 9.3


A residential site gets its electricity from PV panels installed on the roofs of the
houses. Statistics show that the peak power dissipation in this site is between 19:00
and 22:00 hours in the evening. On the other hand, solar PV panels operate more
efficiently and generate electrical power from 07:00 to 18:00 during the daytime.
In order to use the electricity from the PV system instead of the utility grid,
which uses fossil fuel-based sources, the power company decided to apply some
pricing tariffs so that the customers will prefer to use electricity during the daytime
when the power from PV systems is available instead of using from the utility
during evenings. The tariff applied by the power company is described as follows:
(i) The electricity pricing is low during high power generation from the PV
systems.
(ii) The electricity pricing is low when the power dissipation in the distribution
network is low.
(iii) The electricity pricing is high when the power demand and dissipation is high.
Develop a fuzzy decision-maker and a power management algorithm for this sys-
tem using predicted load demand and predicted solar power capacity in a 2-day
projection so that the customers get the electricity at lower price.

Design Example 9.4


Based on the renewable energy integration scheme given in Figure 9.18, develop a
simulation model in MATLAB/Simulink environment for the following:
1. Investigation of novel interface converter topology and V/F stabilization net-
work to ensure secure and reliable electrical energy source.
2. Investigate the effects of load changes on the voltage of the AC load bus and
develop a FACTS-based dynamic power filter to reduce the effects of load
changes.
3. Investigate the effects of the power sources given in Figure 9.4 during weather
changes and develop solutions for energy sustainability.

Design Example 9.5


Investigate the following as separate projects:
1. Design and analyze a pollution-free distributed generation system including
solar, wind, fuel cell, and small hydro units. Develop specifications/recom-
mendations of a number of commercial renewable energy models for possible
market commercialization and remote site installations.
2. Investigate and demonstrate ways of using the electricity and heat produced by
fuel cells and develop a fuel cell simulation model.
3. Design distributed energy schemes to offer solutions to many pressing energy
and electric power problems, including blackouts and brownouts, energy
security concerns, power quality issues, tighter emission standards, transmis-
sion bottlenecks, and the desire for greater control over energy costs.
528 Fuzzy logic control in energy systems, 2nd edition

4. Develop a CAD and Engineering software package based on intelligent


approaches for sizing, matching, and computer validation of different tracking
and operating control strategies.
5. Design, prototype, test and validate four novel renewable energy schemes
utilizing wind/PV/fuel cell/small hydro for stand-alone and utility grid-
connected applications
6. Design a prototype implementation of a novel efficient nonlinear control sys-
tem to ensure maximum available Wind/PV energy tracking and utilization.

Design Example 9.6


Develop a load flow solution approach for the distributed power systems. Consider
the robustness and power flow stability issues. Assume an interconnected dis-
tributed network and the operating voltage of the buses are all the same. However,
the PV generation and power dissipation by the houses are not constant, and they
vary for changing weather conditions and load demands.

9.9 Day-ahead forecasting in energy management


systems
The forecasting is making inferences about the future using current and past
information. The determination of endogenous and exogenous variables is the most
important part of the forecasting tool. A forecaster solves the linear or nonlinear
relationship between features and targets.
Forecasting theory is used in many research areas in literature. But here it is
focused on renewable energy technology and energy demand areas. The power
generation forecast is an expression of the expectation of electricity production
from one or more power generation plants in the near future. The value called
production is the power that can be produced and the energy that is produced for
each time interval. The energy demand or load forecast is an estimate of the amount
of electrical energy that will be consumed in the near future.
The power forecasting of renewable energy sources (RES) is critical for energy
generation, transmission, distribution, and the electric markets. The power fore-
casting is one of the core steps for scheduling of the generation, transmission, and
distribution of electrical energy as well as the maintenance of power systems,
management of the demand response, and financial planning [36–41]. Although the
power forecasting is important to manage the power system planning and opera-
tions, inaccurate forecasting might cause insufficient or over-power generation,
which yields voltage and frequency fluctuations, power quality problems, and the
inability to manage the system economically and efficiently [37–39]. Besides,
inaccurate forecasting might also cause power system instability. The forecasted
power is also used for the trading of electric power. Incorrect energy forecasting
might result in economic losses and even bankruptcy of energy companies. For this
reason, companies try to keep their estimation error at low values to avoid these
penalties. In addition, incorrect estimation of the power to be generated by
renewable resources affects the trading profit of the companies [42].
Microgrids and energy management 529

The reliable operation of power systems relies on the planning of energy


generation and consumption. Traditional energy sources can be easily controlled
and managed with experience. However, with the widespread integration of
renewable energy sources, which have variable and intermittent generation char-
acteristics, electricity grids are becoming more complex, and power systems are
becoming more difficult to manage. The correct planning required for the reliable
operation of power systems fed by renewable resources depends on the correct
estimation of the energy to be obtained from these resources and the load to be
consumed by the consumer units.
The time span used to forecast is called the forecasting horizon, which can be
divided into four categories as very short term, short term, medium term, and long
term [43]. Microgrids are controlled and managed by very short-term forecasts with
a time horizon of a few seconds to a few minutes. The short-term horizons might go
up to 72 h ahead and they are used to schedule and control power system opera-
tions, economic dispatch, unit commitment, and electric market operation.
Medium-term forecasting is from a few days to 1 week ahead and long-term fore-
casting is from a few months to a year or more. Medium and long-term horizons are
typically used for network maintenance and planning. The forecast horizon is also
categorized to describe the forecast horizon subsections including intra-hour, intra-
day, and day-ahead [44]. Intra-hour involves the forecast horizon from a few sec-
onds to an hour and it is used for regulation and safety of the system operation. The
intra-day forecast horizon is being done for 1–6 h and it finds applications in
electricity trading and electrical load control. The day-ahead forecasts cover a
duration of 6–48 h. These forecasts are used for unit commitment, scheduling, and
dispatching of electricity. The forecast horizon plays an important role in the
accuracy of the forecast. Prior to the design of a forecasting model, the appropriate
time horizon for the forecast should be selected. It has been shown that increasing
the forecast horizon reduces the accuracy of the model [44].

9.9.1 Data using for renewable energy source power and


demand forecasting
The PV and wind powers are related to solar radiation data and wind speed data,
respectively. PV module power can be calculated using the solar radiation, module
temperature, module efficiency, and module area as in (9.22), where h is the
module efficiency, A is the module surface area in m2, SPVM is the solar radiation
on module surface and TPVM is the module operating temperature.
PPVM ¼ hASPVM ½1  0:005  ðTPVM  25Þ (9.22)
There are a number of factors that affect the energy produced by the wind. The
most important factor is the wind speed. The rotational kinetic energy formula is
used to calculate the energy generation by a wind turbine as explained in Chapter 7
and given in (9.23).

Pwind ¼ 0:5CrAv3 (9.23)


530 Fuzzy logic control in energy systems, 2nd edition

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].

9.9.2 Methods for renewable energy source power and


demand forecasting
A number of different algorithms and models have been used in the literature for
the forecasting of renewable energy and electric load demand. In the last few years,
machine learning algorithms [36,38,42,56,57,62,63] and in particular deep learning
algorithms [46,51,64–68] have come to the foreward. Although these methods are
used alone, hybrid structures are also coming to the attention [38,47,69]. In addi-
tion, there are studies where the data are used as raw data, and there are also studies
where the data are separated into many frequencies using data decomposition
methods [47,70–72].
Machine learning (ML) refers to technologies that have the ability to learn auto-
matically from experience or datasets and is a subset of artificial intelligence (AI). ML
algorithms fall into three categories: supervised learning, unsupervised learning, and
reinforcement learning. Forecasting problems are a type of regression problem. They
can be solved using supervised learning algorithms. Artificial neural network (ANN),
k-nearest neighbors (k-NN), and support vector machine (SVM) are some of the ML
techniques. On the other hand, there is another technique called deep learning (DL),
which is a subset of machine learning and uses improved versions of ANNs to solve
problems. The main difference between a DL and a typical neural network is the
number of hidden layers and the roles they play. Convolutional neural networks
(CNN), gated recurrent unit (GRU), recurrent neural network (RNN), and long short-
term memory (LSTM) architecture are some of the recently developed DL techniques.

9.9.3 Artificial neural network (ANN)


Artificial neural networks are mathematically simple models of the brain and the
nervous system of humans. They work in a similar way to computer networks, but
Microgrids and energy management 531

unlike programs written on computers, they have features such as classification,


generalization, optimization, and learning, as well as performing a specific task. By
evaluating the feature and target data, they can successfully learn their relations
with each other.
The brain is the center of the biological nervous system. It is the structure that
receives, interprets, and makes decisions. The neural networks in the brain are
made up of billions of nerve cells called neurons. Neurons consist of the cell body,
synapses, dendrites, and axons as shown in Figure 9.23. The nucleus is located in
the cell. Dendrites transmit signals from other neurons to which they are connected
to the nucleus. The nucleus collects the signals from the dendrite and transmits
them to the axon. These collected signals are processed by the axon and sent to the
connections to transmit the new signals produced to other neurons.
Like biological neurons, artificial neurons consist of parts that receive input
information, collect and process these signals, and produce outputs. The artificial
neuron, which is the most basic cell of artificial neural networks, consists of inputs
(dendrites), weights (synapses), summation function, activation function, and out-
put (axon) parts. Neurons receiving one or more inputs produce a single output, and
this output value can be an input value for other neurons or a network output result.
Figure 9.24 shows the mathematical model of an artificial neuron model. Input
values are information that is transmitted to the cell from the outside world or from
other neurons.

Input

Input Dendrites

Axo
n
Dendrites
Synapse
Output

Input

Figure 9.23 The structure of a biological neuron

w
w

f w

w
w

Figure 9.24 Mathematical model of a neuron cell


532 Fuzzy logic control in energy systems, 2nd edition

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

9.9.4 Multi-layer artificial neural network


Artificial neural networks are formed by combining artificial neurons. Depending
on the number of layers, it is analyzed as single-layer and multi-layer ANN. The
basic structure of a multi-layer artificial neural network consists of an input layer,
one hidden layer, and an output layer. The general structure of a multi-layer arti-
ficial neural network with a single hidden layer is shown in Figure 9.25. The input
layer is the layer where the input values from the outside world feed the artificial
neural network. The input layer has as many neuron cells as the number of inputs,
x, from the outside world. These inputs are transmitted from the input layer to the
first hidden layer by being multiplied with the w weighting factors. For example,
the vector X represents the values of the variables in the input layer in Figure 9.25.
As depicted by xn, there are n input variables.
The hidden layer transmits the information received from the input layer to the
next layer as the products of its cell outputs and the related weighting factors of that
layer. The number of hidden layers varies according to the problem. In Figure 9.25,
t represents the number of neurons in the hidden layer. The output layer processes
the information coming from the hidden layers and produces the output value of the
network. The outputs produced are sent to the outside world. However, the output
value produced is sent back to the artificial neural network if the network structure
has feedback. In Figure 9.25, ym represents the output signals and m represents the
number of neurons in the output layer.
Microgrids and energy management 533

Figure 9.25 Single hidden layer artificial neuron network

9.9.5 Learning process in a neural network


ANN learning is the process of adjusting the values of the weights in the network in
order to perform a particular function. The weight values where the information is
stored are randomly assigned at the beginning of the process, the input samples are
sent and taught to the network by changing the weighting factor values. Once the
weights have been set correctly, test sample outputs are produced by the ANN. The
accuracy of the outputs obtained gives information about the learning ability of the
network. To determine the relationship between input and output data of a problem
with artificial neural networks, patterns should be taught to the network using a
learning algorithm. If the weights in the network are at the most appropriate values,
it is possible for the network to learn this relationship.
The weighting factors are trained by updating them with the addition of a
change Dw that includes a learning process as given in (9.26) and (9.27).
wi ðnewÞ ¼ wi ðoldÞ þ Dwi (9.26)
Dwi ¼ adxi (9.27)
534 Fuzzy logic control in energy systems, 2nd edition

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).

wijk ðnewÞ ¼ wijk ðoldÞ þ aEkiþ1 xjk (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.

9.9.6 Training an artificial neural network for forecasting


Initially, the weights are randomly assigned for training the network. The randomly
assigned weights determine the starting point of the training. Deciding how long to
continue training is one of the most important issues in artificial neural networks.
There are two options for completing the training process. The first of these is to set
a certain amount of fault tolerance (mean absolute error, MAE) and continue
training until it reaches a lower error value than that error value. The other option is
to choose a fixed training number. Here, the trainer accepts the error that will be
obtained as a result of the specified training number [73]. The training flowchart of
the network is shown in Figure 9.26.

k=1

k=k+1

k k

Figure 9.26 The training flowchart of the neural network


Microgrids and energy management 535

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(a) The flowchart of designed model for Example 9.5


536 Fuzzy logic control in energy systems, 2nd edition

Figure E9.5(b) The forecasting and real value for test samples

the minimum distance.


hXT i0:5
di ¼ j¼1
ðYj  Xij Þ2 i ¼ 1; 2; . . .; n (9.26)

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%.

9.10 Cybersecurity in microgrids

Cybersecurity is the practice of defending digital systems, networks, and data


against a wide range of dynamic threats. It encompasses a range of measures, from
basic best practices to advanced technologies and strong policies. As the digital
landscape evolves, cyber threats become increasingly complex, necessitating
constant adaptation and innovation by cybersecurity professionals. This synopsis
provides an overview of the challenges associated with protecting digital
Microgrids and energy management 537

infrastructures. Critical infrastructure is essential for the well-being of modern


societies and its smooth operation is crucial for public welfare and economic sta-
bility. Cybersecurity plays a vital role in safeguarding this infrastructure and pre-
venting any disruptions that could affect other industries.
Power systems are crucial, particularly in terms of national security, and any
cybersecurity intrusion could result in power outages or monetary losses. The
importance of electricity systems in vital infrastructure highlights the urgency of
having strong cybersecurity safeguards. The continuous digitization of power sys-
tems, exemplified by the integration of smart grids, Internet of Things (IoT) devices,
energy management, and advanced control systems, is expected to result in unpar-
alleled efficiency and responsiveness. However, this digital transformation also
introduces new risks, as the same mechanisms designed to enhance functionality can
now be targeted by malicious actors. Cyberattacks on power systems exploit vul-
nerabilities, which can result in energy delivery interruptions, compromised con-
fidential information, and even physical harm to critical infrastructure. Understanding
this intricate relationship is crucial for developing effective cybersecurity plans that
mitigate threats and ensure the stability of our electrical infrastructure.

9.10.1 Fundamentals of cybersecurity


A discussion about cybersecurity should begin with a basic understanding of its
nature. Cybersecurity refers to the procedures, technologies, processes, and policies
used to protect networks, computers, and data against damage, illegal access, and
cyberattacks. Its main objective is to ensure the security and resilience of digital
assets, and it includes a proactive strategy for identifying, preventing, and
responding to potential threats. A set of three interrelated concepts that serve as the
foundation of cybersecurity are defined as follows [77,78]:
Confidentiality: To ensure that sensitive information is only accessible to
authorized individuals, safeguards such as encryption, access limits, and secure
communication routes must be put in place.
Integrity: It is also important to ensure that data remains reliable, consistent, and
accurate throughout its existence. Cybersecurity techniques such as digital sig-
natures, hashing, and checksums are essential for identifying and preventing
illegal data changes.
Availability: Ensuring authorized users have prompt and continuous access to
necessary resources and services. The goal of cybersecurity strategies is to prevent
and minimize interruptions caused by unexpected events, technical malfunctions,
or cyberattacks.
Having a thorough comprehension of and adherence to the principles of
availability, integrity, and confidentiality provides a framework for creating
effective cybersecurity solutions. Understanding important phrases and concepts is
essential to navigating the world of cybersecurity. This includes crucial compo-
nents such as:
538 Fuzzy logic control in energy systems, 2nd edition

Firewall: A security system acts as a barrier between a secure internal network


and potentially unsafe external networks by monitoring and managing incoming
and outgoing network traffic.
Malware: Malware, which includes trojan horses, worms, viruses, and ransom-
ware, is a type of destructive software that is designed to compromise and corrupt
computer systems.
Authentication: The process used to verify the identity of a user, system, or device
to ensure that only authorized parties are granted access.
Encryption: Data encryption is the process of converting plaintext into a coded
format to prevent unauthorized access. It is a crucial tool for safeguarding private
information during transmission and storage.
Phishing: Phishing is a type of cybercrime where perpetrators trick victims into
revealing sensitive information, such as login credentials or bank account details,
through fraudulent emails, texts, or websites.
A strong foundation for understanding cybersecurity and implementing measures
to protect digital assets can be established by mastering these core concepts.

9.10.2 Cybersecurity threats


In the rapidly changing digital world, cybersecurity threats have become increas-
ingly complex, varied, and pervasive. It is crucial to understand the nature of these
threats to strengthen defenses against future cyberattacks. Common cybersecurity
risks include malicious software that are:
(a) Malware: Aims to interfere with, harm, or gain unauthorized access to com-
puter systems. This group includes spyware, trojan horses, worms, and viruses.
(b) Phishing: Phishing attacks are attempts by dishonest individuals or groups to
impersonate reliable organizations in emails, chats, or webpages with the goal of
obtaining sensitive information, such as financial information or login passwords.
(c) Ransomware: Ransomware is a type of virus that encrypts user data and
demands payment, often in Bitcoin, to unlock it. These attacks pose a serious
threat to businesses of all kinds as they can completely destroy systems.
(d) Denial-of-Service (DoS) and Distributed Denial-of-Service (DDoS) Attacks: A
denial-of-service attack attempts to saturate a system, network, or website with
traffic to prevent authorized users from accessing it. Such attacks cause dis-
ruptions to regular operations and may result in service outages.
Power systems, as vital infrastructure, are susceptible to various threats that
could have severe consequences. Some notable dangers include:
(a) SCADA and Industrial Control System (ICS) Attacks: Cyberattacks targeting
Industrial Control Systems (ICS) and Supervisory Control and Data
Acquisition (SCADA) can potentially interfere with power system control
processes, leading to operational failures.
Microgrids and energy management 539

(b) Malware Targeting Power Systems: Malicious programs designed to exploit


vulnerabilities in power system components can compromise the integrity and
performance of critical equipment in the electrical grid.
(c) Insider Threats: Dangers that come from within a company, when workers or
outside contractors abuse their access rights to subvert power system security,
whether on purpose or accidentally.
Studying real-world events provides invaluable insight into the potential
impact of cybersecurity failures. Notable case studies include:
(a) Stuxnet Worm (2010): An advanced worm created to attack Iran’s nuclear
facilities, which demonstrated the harm that can be caused to physical infra-
structure by cyber assaults.
(b) Ukraine Power Grid Cyberattack (2015 and 2016): Cyberattacks on Ukraine’s
power infrastructure resulted in widespread power outages, highlighting the
vulnerability of power systems to well-planned and directed attacks.
(c) NotPetya Ransomware (2017): The NotPetya ransomware outbreak caused
major disruptions throughout the world, highlighting the potential collateral
harm that can arise from cyber disasters. It is important to note that the ran-
somware did not deliberately target power systems.
The lessons learned from previous cybersecurity events involving power sys-
tems emphasize the need for frequent awareness and training campaigns, multi-
layered defenses, and ongoing monitoring and incident response. As demonstrated
by the 2015 and 2016 hack on the Ukraine power grid [79], regular training pro-
grams and heightened awareness campaigns are crucial in recognizing the human
aspect as a possible risk. To build the human element of cybersecurity, it is
essential to ensure that operators and staff possess the skills required to identify and
respond to potential attacks. Additionally, it is crucial to recognize the importance
of multiple layers of security, as a single line of defense is insufficient to combat
the constantly evolving cyber threat landscape. Acquiring knowledge from events
such as the 2010 Stuxnet worm [80], which exploited several vulnerabilities,
highlights the need for a comprehensive defense plan that integrates technological
measures, operational guidelines, and increased human awareness. Lessons learned
also underscore the importance of incident response capabilities and ongoing
monitoring, as demonstrated by events such as the hack on the Ukrainian power
grid. Establishing strong procedures for continuing vigilance, rapid detection, and
effective reaction ensures a proactive stance against cyberthreats [81]. This
enhances the overall resilience of power systems in the face of a constantly chan-
ging cybersecurity landscape. Besides the Ukrainian power grid cyberattack, there
are several other power system failures listed as follows [82–84].
l Northeast Blackout in the USA (2003) was caused by a software bug resulting
in alarm system failure and affected more than 50 million customers.
l The Italy Blackout (2003) occurred due to cascading failures between power
and communication infrastructures and left about 56 million people without
electricity in Italy.
540 Fuzzy logic control in energy systems, 2nd edition

l Arizona Blackout (2007) affected 100,000 customers because of unexpected


activation of the load shedding program.
l Florida Blackout (2008) left 1 million customers without electricity because of
disabled relay protection during a diagnostic process.
l Southwest Blackout (2017) was triggered by a monitoring equipment failure at
a substation and left around 2.7 million customers without electricity.
l Ukraine Blackout (2015) was initiated by remote cyber intrusions after a
malware installation and caused about 225,000 customers to lose their
electricity.
These examples show how the undisrupted operation of power systems is impor-
tant. Although similar events might occur in microgrids, due to the islanding mode
operating opportunity the effects of unwanted events can be kept locally without
spreading the large areas. However, due to the extensive use of ICTs, microgrids
are open to cyberattacks locally, as well, and precautions must be taken to detect
and stop the attacks.

9.10.3 Cybersecurity for power systems


The increasing penetration of renewable energy sources such as wind and solar
photovoltaics to advanced microgrids as distributed energy resources (DERs)
brings new challenges to electrical power distribution networks. Microgrids
become more complicated with new issues contrary to their reliability and resi-
liency operation expectations. Therefore, the inclusion of device control and energy
management system (EMS) in microgrids using DERs becomes inevitable resulting
in a network structure as given in Figures 9.4 and 9.18. As shown in these
figures data is collected from every part of the grid and evaluated by control and
management centers, which are also called supervisory control and data acquisition
(SCADA) centers. After the evaluation of the data, the generated or developed
control and management signals are sent back to the related devices or units for the
smooth operation of the system. It is obvious that the increasing installations of
renewable DERs in microgrids has gradually converted conventional power dis-
tribution systems from traditionally centralized electric power systems to localized
power generation and consumption-type power systems by reducing inefficiencies
and vulnerabilities included in the long-distance power delivery.
Microgrids with DERs might supply power to local loads during unexpected
events such as earthquakes, floating, winter conditions, and cyberattacks by oper-
ating in islanding mode. The ability to be operated locally independent from the
main power grid, microgrids can make important contributions to electric power
system operations by strengthening resiliency.
Since microgrids include two-way data transmission either from each sub-unit
to control and management centers, which are local sites or at a remote central site,
the information and communication technologies (ICTs) are extensively used in
microgrid-type electric power distribution systems. The data transmitted from
individual units to control and management centers and vice versa is open to
cyberattacks. Thus, the electric power networks equipped with ICTs can be
Microgrids and energy management 541

considered as cyber-physical systems. The use of ICTs increases the ability of


controllability and manageability of power systems. However, they may also cause
unexpected cyberattacks such as remotely manipulating generators by affecting
their control signals with a malware virus such as Trojan. The manipulated gen-
erators may be overloaded unintentionally and fail, which causes the collapse of the
regional electric power system such as the one described in [85]. The attackers
usually interfere with the power grids to gain economic benefit, to get profit from
contingency in electricity markets, and to create/support terrorism [86].
The stable operation of the power system is one of the important issues in
keeping power generation, transmission, distribution, and consumption at an equi-
librium operating condition. The main condition of the stable operation of the
power system is to make generated power equal to the sum of consumption and
losses. Hence the power system is controlled by means of excitation and load–
frequency adjustment as explained in Chapter 6. The load–frequency control (LFC)
has two control loops, one is the primary control, which is based on the drop of the
generator, and the other one is the secondary frequency control to maintain the
frequency within the scheduled range and power flow on tie lines within the line
capacity range. The attackers such as adversaries can perturb the scheduled fre-
quency by preventing the correct signal from being transferred to the control center.
The wrong or delayed frequency data may lead the power system to
misoperate and collapse.
the objective of cybersecurity of LFC operation has been described in [86] as (1) to
find the malicious measurements and prevent incorrect area control error (ACE)
and (2) to maintain the balance between generation and demand powers during
untrusted measurements. The cyberattacks on load–frequency control of power
systems are classified in literature [86–88] as given below.
The Strategic Attack is classified into six sub-classes replay attack, denial of
service (DoS) attack, data integrity attack, timing attack, covert attack, and zero
dynamics attack. The replay attack is a sort of manipulation attack, in which the
attacker monitors and records the measured data and replays it later at another time
as if it belongs to the current case. DoS attack blocks the data transmission channels
by pumping extensive data from the field. In data integrity attacks, the transmitted
data is modified, and false data is sent to the controllers. If the attackers cause a
delay in transmission time, the controllers or the decision-makers become late to
generate the required signal. These types of attacks are called timing attacks and
might have serious effects on system operation. Another strategic attack is the one
called covert attack, in which the attack signal is hidden by replacing the measured
output with a calculated system response. The attacker is able to access the com-
munication channels and inject false data that might cause hazardous effects. The
Zero dynamic attack uses decoupled outputs and the zeros of linear system transfer
function to develop attack strategies. This attack requires a good knowledge of
system dynamics and the use of related state equations.
Template Attacks affect the magnitude of the signal to be transmitted. In this
attack, the magnitude is scaled by a constant or a bias signal. A constant, a pulse, or
542 Fuzzy logic control in energy systems, 2nd edition

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

Figure E9.6(a) Block diagram of a two-area LFC open to cyberattacks


Microgrids and energy management 543

Cyber
attack

Figure E9.6(b) A data integrity attack on a two-area LFC without any controllers

Figure E9.6(c) Response of an uncontrolled two-area LFC under integrity attack

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

Figure E9.6(d) A data integrity attack on a two-area LFC system controlled by an


FLC

Figure E9.6(e) Response of an FL-controlled two-area LFC under integrity


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].

Design Example 9.7


Develop a timing attack scenario for the LFC system given in Examples 6.5 and
9.6. To develop a timing attack, assume that the area error signal or area error
control signal is delayed by a time delay t, where t can be taken as equal to 1 or
2 sampling period.

Design Example 9.8


Develop a template attack scenario for the LFC system given in Examples 6.5 and
9.6. To develop a template attack, assume that the area error signal or area error
control signal is multiplied by a constant c, where c can be taken between 1
and 100.

Design Example 9.9


Develop a location attack scenario for the LFC system given in Examples 6.5 and 9.6.
To develop a location attack, assume that the change in demand power is infected and
increased by an amount of z, where z can be taken between 0.1 and 1 pu.

9.10.4 Future trends in cybersecurity for power systems


Three major factors are expected to significantly alter the cybersecurity landscape
for power systems in the future. Firstly, new developments in cybersecurity are
poised to completely transform the defense systems used to safeguard vital infra-
structure. Technological innovations such as decentralized cybersecurity archi-
tectures and quantum-resistant cryptography offer stronger defenses against
increasingly complex cyberattacks. Second, the cybersecurity paradigm will be
influenced by anticipated opportunities and challenges as power systems increas-
ingly adopt advanced technologies. The growing attack surface presented by con-
nected devices may present challenges, but it also offers opportunities for creative
solutions that utilize automation and real-time threat intelligence. Finally, the
combination of machine learning (ML) and artificial intelligence (AI) is a crucial
factor in enhancing power system cybersecurity. The use of AI and ML algorithms
improves the proactive capabilities of cybersecurity measures by analyzing large
546 Fuzzy logic control in energy systems, 2nd edition

datasets, identifying abnormalities, and predicting possible attacks with unpar-


alleled accuracy. Power systems can strengthen their cybersecurity posture and
move resiliently and adaptably across the changing digital landscape by adopting
these upcoming trends.

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

Design a power management algorithm to meet what the power company


has planned.
P9.6 A distributed power network uses a centralized control approach because the
wind and PV systems supplying power to the network are installed close to
each other and generated power from both sources is collected in an AC
power pool. The power network is also connected to the utility power grid.
However, the utility grid is only activated when the power generation from
wind and PV is not high enough.
Design a PMA and an FDM for this system and explain how FDM and
PMA are used to manage this power system for power loss minimization and
energy efficiency.
P9.7 Develop an energy management (EM) algorithm so that the sources are used
according to the priority and management constraints, which are given below.
The priority of the sources:
1. Solar PV
2. Wind energy system
3. Storage
4. Combined heat and power
5. Utility grid
Constraints:
The state of charge (SOC) of the batteries should not be smaller than 20%.
The demand for power to be supplied is categorized as low, planned,
and high.
Consider SOC, demand power, and the availability of the sources to
develop the EM algorithm.
P9.8 The output voltage of a PV array, VDC, varies between 0 V and 400 V. This
PV array is being used to supply power to a DC load. In order to keep the load
voltage V0 constant at 200 V, The DC/DC converter (Chopper) given in
Figure 9.9 is used for interfacing the PV array to the load.
The load voltage V0 is controlled by the MOSFET’s gate signals ig1 and ig2
which are in the form of pulses as shown in Figures 9.10 and 9.11. The gate
signal pulses are obtained by comparing a reference sawtooth signal with the
control signal u, which is generated by a controller. If the chopping frequency
is 1000 Hz calculate the following:
(a) What would be the conducting period tON in order to have an output
voltage V0 = 200 V from the DC/DC converter when the PV array voltage
is 400 V?
(b) What would be the conducting period tON in order to have an output voltage
V0 = 200 V from the DC/DC converter when the PV array voltage is 350 V?
(c) What would be the conducting period tON in order to have an output
voltage V0 = 200 V from the DC/DC converter when the PV array voltage
is 300 V?
(d) What would be the output voltage V0 if the conducting period tON is
0.00025 s when the PV array voltage is 400 V, 350 V, 300 V, or 250 V?
548 Fuzzy logic control in energy systems, 2nd edition

P9.9 Draw utility-connected connection diagrams of the following electrical


sources. Show all required converters and filters in your diagrams.
(a) Utility-connected wind energy systems (WES).
(b) Utility-connected solar photovoltaic (PV) systems.
(c) Stand-alone wind energy systems (WES).
(d) Stand-alone solar photovoltaic (PV) systems.
P9.10 An e-car charging station is getting its power from a PV array and a wind
energy system. The PV array can generate 10 kWp with an operating voltage
of 500 V DC under the best environmental conditions. On the other hand,
the wind energy system is able to generate 20 kWp with 500 V output
voltage and 50 Hz frequency.
The charging station (a DC Power storage) is also being used to supply
power to the utility grid during peak consumption hours besides its car
charging duty.
Draw a detailed connection diagram of the system described above.
CAUTION: Your connection diagram must include a PV energy system,
Wind energy system, charging station, and utility grid besides the required
power electronic converters. You can represent the converters by blocks.
However, you must draw the required three-phase, single-phase, and DC
lines. Do not include control blocks in your drawing.

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

[35] Cakmak R. ‘Intelligency power dissipation and energy management in utility


integrated residential areas with PV installations’, PhD Thesis, Turkish
‘Şebeke Bağlantılı Fv Güneş Enerji Sistemine Sahip Konutlarda Akıllı Güç
Tüketimi Ve Enerji Yönetimi’, under study, Karadeniz Technical University,
Trabzon, Turkey.
[36] Antonanzas J., Osorio R. Escobar, R., et al. ‘Review of photovoltaic power
forecasting’, Solar Energy. 2016; 136:78–111. https://doi.org/10.1016/j.sol-
ener.2016.06.069.
[37] Ahmed R., Sreeram V., Mishra Y. and Arif M.D. ‘A review and evaluation
of the state-of-the-art in PV solar power forecasting: techniques and opti-
mization’, Renewable and Sustainable Energy Reviews. 2020; 124:109792.
[38] Wan C., Zhao J., Song Y., et al. ‘Photovoltaic and solar power forecasting
for smart grid energy management’, CSEE Journal of Power and Energy
Systems. 2015; 1(4):38–46.
[39] Guermoui M., Melgani F., Gairaa. K. and Mekhalfi M.L. ‘A comprehensive
review of hybrid models for solar radiation forecasting’, Journal of Cleaner
Production. 2020;258:120357, https://doi.org/10.1016/j.jclepro.2020.120357.
[40] Chang W.Y. ‘A literature review of wind forecasting methods’, Journal of
Power and Energy Engineering. 2014; 2(4):161.
[41] Gao M., Li J., Hong F. and Long D. ‘Day-ahead power forecasting in a large-
scale photovoltaic plant based on weather classification using LSTM’,
Energy. 2019; 187:115838.
[42] Bitar E.Y., Rajagopal R., Khargonekar P.P., Poolla K. and Varaiya P.
‘Bringing wind energy to market’, IEEE Transactions on Power Systems.
2012; 27(3):1225–1235.
[43] Mellit A. Pavan A.M., Ogliari E., Leva S. and Lughi V. ‘Advanced methods
for photovoltaic output power forecasting: a review’, Applied Sciences. 2020;
10(2):487.
[44] Rahimi N., Park S., Choi W., et al. ‘A comprehensive review on ensemble
solar power forecasting algorithms’, Journal of Electrical Engineering &
Technology. 2023; 18(2):719–733.
[45] Carrillo C., Obando Montaño A.F., Cidrás J., Dı́az-Dorado E. ‘Review of
power curve modelling for wind turbines’, Renewable and Sustainable Energy
Reviews. 2013;21:572–581, https://doi.org/10.1016/j.rser.2013.01.012.
[46] Zang H., Cheng L., Ding T., et al. ‘Day-ahead photovoltaic power fore-
casting approach based on deep convolutional neural networks and meta
learning’, International Journal of Electrical Power & Energy Systems.
2020; 118:105790.
[47] Lan H., Yin H., Hong Y.Y., et al. ‘Day-ahead spatio-temporal forecasting of
solar irradiation along a navigation route’, Applied Energy. 2018; 211:15–27.
[48] Yan J., Zhang H., Liu Y., et al. ‘Forecasting the high penetration of wind
power on multiple scales using multi-to-multi mapping’, IEEE Transactions
on Power Systems. 2018; 33(3):3276–3284.
552 Fuzzy logic control in energy systems, 2nd edition

[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

Electronics Society, Melbourne, VIC, Australia, 2011, pp. 4490–4494,


https://doi.org/10.1109/IECON.2011.6120048.
[80] Sheikh Z.A. and Singh Y. ‘A hybrid threat assessment model for security of
cyber physical systems’, 2022 Seventh International Conference on Parallel,
Distributed and Grid Computing (PDGC), Solan, Himachal Pradesh, India,
2022, pp. 582–587, https://doi.org/10.1109/PDGC56933.2022.10053332.
[81] Fernandez E.B. ‘Preventing and unifying threats in cyberphysical systems,’
2016 IEEE 17th International Symposium on High Assurance Systems
Engineering (HASE), Orlando, FL, USA, 2016, pp. 292–293, https://doi.org/
10.1109/HASE.2016.50.
[82] Bompard E., Huang T., Wu Y. and Cremenescu M. ‘Classification and trend
analysis of threats origins to the security of power systems,’ International
Journal of Electrical Power & Energy Systems. 2013; 50(1):50–64.
[83] Lloyd’s, ‘Business blackout: the insurance implications of a cyber attack on
the US power grid,’ 2015.
[84] Buldyrev S.V., Parshani R., Paul G., Eugene Stanley H. and Havlin S.
‘Catastrophic cascade of failures in interdependent networks,’ Nature. 2010;
464:1025–1028.
[85] Smith E., Corzine, D., Racey, D., et al. ‘Going beyond cybersecurity com-
pliance,’ IEEE Power and Energy Magazine. 2016; 14(5):48–56.
[86] Saxena S., Bhatia S. and Gupta R. ‘Cybersecurity analysis of load frequency
control (LFC) in power systems: a survey’, Designs. 2021; 5:52. https://doi.
org/10.3390/designs5030052.
[87] Sarangan S., Singh V.K. and Govindarasu M. ‘Cyber attack-defense analysis
for automatic generation control with renewable energy sources’, Proceed-
ings of the 2018 North American Power Symposium (NAPS), Fargo, ND,
USA, 9–11 September 2018; pp. 1–6.
[88] Mohan A.M., Meskin N., Mehrjerdi H. ‘A comprehensive review of the
cyber-attacks and cyber-security on load frequency control of power sys-
tems’, Energies. 2020: 13:3860. https://doi.org/10.3390/en13153860.
[89] Wang Q., Cai X., Tang Y. and Ni M. ‘Methods of cyber-attack identification
for power systems based on bilateral cyber-physical information’, Electrical
Power and Energy Systems. 2021; 125:106515, https://doi.org/10.1016/j.
ijepes.2020.106515.
Index

acceleration factor 359 automatic voltage regulator (AVR)


AC–DC–AC link control 374 control system 226, 313
AC–DC power electronic converters availability 537
488
active power 62, 232, 349 back emf 276
transmission 333 bandwidth 55
actuator 188, 214 battery charging unit 49
algebraic equations 245, 251 bell membership function 25–7
ambient temperature 73, 89, 138, 159 Betz limit 377, 530
Ampere current 274 binary fuzzy relation 92
Ampere’s law 244, 274, 279 bipolar junction transistors (BJTs) 292
analog computer representation 264 block diagram 254–5, 258–9
approximate reasoning 123–5 Boltzmann constant 73, 124
inference rules of 125 Boolean algebra 44, 46, 50
compositional rule of inference Boolean logic 3
126–7 Boolean operator 219
generalized modus ponens rule of bubble net 469
inference 125–6 buck-boost converters 488
Zadeh’s inference rules of 125 bus bars 5
area control error (ACE) 334, 336, 541
armature 276 Cauchy curve function 26
armature-controlled DC motor 282–4 Cauchy distribution 25
armature subsystem 278–9 center of area defuzzification method
Artificial Bee Colony 468 219
artificial intelligence (AI) 530, 545 center of areas (COA) method 162,
artificial neural network (ANN) 16, 32, 168–9
185, 530–2 center of gravity (COG) 169–73
asynchronous generators 373, 379, 486 centralized control 498, 501
authentication 538 chopper duty cycle 189, 490
automatic generation control (AGC) classical automatic control system 187
system 227 closed-loop system 189
556 Fuzzy logic control in energy systems, 2nd edition

clustering methods 185 for power systems 540–5


complement operator 50–3, 55 threats 538–40
compositional rule of inference (CRI) cylindrical extension principle 107
104–6, 125–7
composition operator 100 damping ratio 186
compound excited DC motor 291–2 data acquisition (DA) 484
concentration 55 data encryption 538
conductors data integrity attack 541
force generation in 275 DC choppers 488
voltage induction in 275 DC–DC converters 486, 488–93
confidentiality 537 DC–DC power electronic converters
conjunction rule 125 488
constant power angle approach 444 DC generator 317
continuous differential equations 245 DC motors 281
continuous membership function 14 armature-controlled DC motor
contrast intensification 55 282–4
control center (CC) 484 both armature and field controlled
DC motor 284–9
control error 152
compound excited DC motor 291–2
controllable rectifier 486
series-excited DC motor 290–1
control signal 214
shunt-excited DC motor 289–90
control systems 2, 194
general block diagram of 208 DDUTOP 214
convolutional neural networks (CNN) decision-making processes 1, 59, 157,
530 481
copper–cadmium sulfide (Cu2S/CdS) decision process 63
412 decreasing sigmoid 31
coral loop 469 deep learning (DL) 530
covert attack 541 defuzzification methods 167
C programming language 323 center of areas 168–9
crisp reasoning algorithm 125 center of gravity 169–73
crisp subsets 11 equal area 168
cut-in speed 376 lower maximum 167
cut-out speed 376 mean of maxima 168
cyberattacks 537 upper maximum 168
cyberphysical systems (CBS) 542 defuzzification unit 137
cybersecurity 481, 536 defuzzifier 158, 360
fundamentals of 537–8 degrees of freedom 267
future trends in cybersecurity for denial-of-service (DoS) attacks 538,
power systems 545–6 541
Index 557

differential equations 193, 245 electrical motors 274


dilation operator 55 electrical power systems 2, 5, 311, 375,
diode saturation current 73 479
direct current (DC) generators 379 electrical power transmission 67
discrete difference equations 245 electrical systems 251–63
discrete functions 12 electric grid system 373
disjunction rule 125 electromechanical systems 191
dispersion constant 320 electronic switch 189
distributed control 499, 501 energy management system (EMS)
distributed denial-of-service (DDoS) 479, 484, 488, 540
attacks 538 entailment rule 125
distributed energy resources (DERs) equal area (EA) method 168
540 Euler digital integration 293–5
distributed generation (DG) 311, 480 Euler’s integration 195, 243–4, 393
and control 498–500 for state-space equations 295–7
distributed networks 479–80 Euler’s method 246–7
distributed power network 480 excitation control 312, 314
distributed power systems 479 excitation system modeling 317–23
distribution systems 67 fuzzy logic control of excitation
double input–single rule inference systems 325–9
engine 132 state-space model of excitation
d–q axis system 382 systems 323–5
driver’s decisions 144 exciter system
dynamic block with memory 248 with FLC 326
dynamic modeling of induction normalized block diagram
generator 380–5 of 322
dynamic voltage regulator (DVR) saturation curve of 321
389–90 simulation diagram of 322
without regulator and without
electrical energy systems 479 controller 326
fuzziness 3–4 extension principle 106–11
fuzzy membership functions 4
fuzzy sets 5 Faraday’s law 244, 275, 279
latest developments in energy field subsystem 278
systems 5–6 firewall 538
electrical generators 274, 378 first-order differential equations 283
dynamic modeling of induction first-order LTI differential equation
generator 380–5 249–50
self-excited induction generator first-order ordinary differential
385–9 equation 384
558 Fuzzy logic control in energy systems, 2nd edition

FL accelerated fast decoupled compositional rule of inference


algorithm 362–3 104–6
FL accelerated Gauss–Seidel algorithm composition of fuzzy relations
358–61 100–4
FL accelerated Newton–Raphson intersection of two fuzzy relations
algorithm 361–2 97
flexible AC transmission systems inverse of fuzzy relation 99–100
(FACTS) 374, 501 negation of fuzzy relation 98–9
forecasting horizon 529 union of two fuzzy relations 97
Fourier series 494 fuzzy implications 2, 116–22
frequency controllers 375 fuzzy inference engine 137
frequency drop curve 332 fuzzy logic (FL) 1, 3, 9, 358
FSDUTOP 214 fuzzy logic acceleration factor (FLAF)
fuel cells 486 358, 360
fuzzification unit 137, 162–4 fuzzy logic-based controllers 215
fuzzifier 158, 360 fuzzy logic controller (FLC) 157, 243,
fuzziness 3–4 313, 373, 411, 448, 544
adjustment of 53–6 fuzzy processor for control 195
fuzz rule base 164–5 fuzzy rules 197–203
fuzzy decision-based management input–output interaction 203–7
systems 374 input and output units of 221
fuzzy decision maker (FDM) 234, 350, introduction to 184–5
448 in load flow analysis 357
fuzzy decision-making processes 87 effect of FLAF 363–6
approximate reasoning 123–5 FL accelerated fast decoupled
extension principle 106–11 algorithm 362–3
fuzzy implications 116–22 FL accelerated Gauss–Seidel
fuzzy mapping 111–16 algorithm 358–61
fuzzy reasoning 127 FL accelerated Newton–Raphson
inference engine with algorithm 361–2
multiple input–multiple rule power system modeling for power
133–42 flow 358
inference engine with multiple Mamdani fuzzy reasoning algorithm
input–single rule 130–3 157
inference engine with single defuzzification 167–73
input–single rule 128–30 fuzzification 162–4
fuzzy relation 88–97 fuzz rule base 164–5
human decision-making process fuzzy conclusion 166–7
142–8 in MATLAB 207–16
operation with fuzzy relations 97 operation principle of 195
Index 559

physical system behaviors and intersection of two fuzzy relations


control 185–95 97
plant data for 211 inverse of fuzzy relation 99–100
in power compensation 348 negation of fuzzy relation 98–9
bus voltage control 352–7 union of two fuzzy relations 97
power factor improvement fuzzy rule-based reasoning algorithms
349–52 127
in Simulink 216–29 fuzzy rule matrix 160
structure of 196 fuzzy rules 197–203, 360
Takagi–Sugeno fuzzy reasoning fuzzy set approach 358
174–80 fuzzy sets 5, 9, 142
Tsukamoto fuzzy reasoning 181–4 adjustment of fuzziness 53–6
fuzzy logic decision maker (FLDM) a-cut of 39
360 bandwidth of 39
fuzzy logic systems 9 boundary of 39
fuzzy logic tuner (FLT) 392 cardinality of 40
fuzzy mapping 111–16 convexity of 39
fuzzy membership functions 3–4, 12 core of 38
fuzzy number 3, 25 crossover points of 39
fuzzy partitioning 56 and fuzzy membership
of changes in power demand and functions 15
generation 118 bell membership function 25–7
in energy systems 60–75 Gaussian membership function
of power stations 118 24–5
theoretical approaches for 59–60 properties of 38–44
fuzzy processor (FP) 3, 127–8, 137 sigmoid membership function
fuzzy reasoning algorithm (FRA) 87, 31–8
127, 137–8, 157, 341–8 sinusoid membership function
inference engine with multiple 27–31
input–multiple rule 133–42 trapezoid membership function
inference engine with multiple 20–4
input–single rule 130–3 triangular membership function
inference engine with single 16–20
input–single rule 128–30 height of 39
fuzzy relations 87–97 operations 44
operation with 97 complement 50–3
compositional rule of inference t-conorm 46–50
104–6 t-norm 44–6
composition of fuzzy relations support of 39
100–4 fuzzy set theory 184
560 Fuzzy logic control in energy systems, 2nd edition

fuzzy subsets 3, 9–10, 54 Incremental Conductance (IC)


for change in direction angle error algorithm 468
145 induction generators 379
characteristic properties of 38 Industrial Control Systems (ICS)
for rotation angle changes of steering attacks 538
wheel 145 inference system 123
fuzzy variables 54, 63 information and communication
fuzzy zero 54 technologies (ICTs) 540
initial value 247
gallium arsenide (GaAs) 412 input matrix 300
gallium arsenide-based III-and V-type input–output data relations 244
cells 412 input–output interaction 203–7
gated recurrent unit (GRU) 530 insulated gate bipolar transistors
gate turn-off thyristors (GTOs) 292 (IGBTs) 292, 391
Gaussian membership function 24–5, integrity 537
35 integro-differential equations 252–3,
properties of 43–4 255–6
Gauss–Seidel algorithm 365 intersection operator 47
Gauss–Seidel (G–S) equations 357 inverse Laplace transformation 323
generalized modus ponens (GMP) rule inverter control 374
125–6
generation control 374 Kirchhoff’s current law 252
generator excitation control 374 Kirchhoff’s law 244
genetic algorithms (GA) 185 Kirchhoff’s voltage law 249, 252, 255,
governor (GOV) control 313–14 278
governor model 332 k-nearest neighbors (k-NN) 530
governor speed regulation 332
Laplace transformation 253–4
harmonic filtering control 374 leakage flux 320
harmonics 67 Lenz’s law 244, 280
human decision-making linear motion models 264
process 142–8 linear time-invariant (LTI)
human–machine interaction 1 differential equations 244–5
hybrid power filter compensator ordinary differential
(HPFC) scheme 395 equation 321
system 186, 193
IEEE 30-bus test system 364 linguistic variables 56, 157
image processing 1 load–frequency controllers (LFC) 313,
increasing sigmoid 31 330, 541
Index 561

fuzzy logic controller design for for plotting discrete subset C 13


336–48 for simulating triangular fuzzy
fuzzy processor for 337–41 membership function 17
fuzzy reasoning 341–8 for weighting factors 170
small-signal modeling of power matrix multiplication 101
systems 330–6 maximum power line (MPL) 443
load shifting 523 maximum power operating error
location attack 542 (MPPE) 435
long short-term memory (LSTM) 530 maximum power point (MPP) 443
lower maximum (LM) 167 search 451
low pass filter maximum power point tracking
circuit diagram of 252 (MPPT) 411, 414
transfer function block diagram of max–min composition 101–2, 105
254 max operator 137
max–product composition 101–2
machine learning (ML) 530, 545 mean of maxima (MOM) 168
Malware 538 measurement and control
Mamdani fuzzy reasoning algorithm (M&C) 500
87, 137, 148, 157, 161, 328 mechanical systems
defuzzification 167–73 with linear motion 264–71
fuzzification 162–4 with rotational motion 271–4
fuzz rule base 164–5 membership functions 3, 9, 11, 217
fuzzy conclusion 166–7 meta-heuristic algorithm 468
man–machine interaction 202 metal oxide field effect transistors
many-to-one mapping algorithm 112, (MOSFETs) 292
115–16 microgrids 2, 5, 311, 481
mass flow rate 376 cybersecurity in 536
mathematical models 243 fundamentals of 537–8
MATLAB 14, 22, 207–16, 259, 293 future trends in cybersecurity for
for compositional rule of inference power systems 545–6
106 for power systems 540–5
for defuzzification 173 threats 538–40
for max–min and max–product day-ahead forecasting in energy
compositions 103 management systems 528
modeling and simulating trapezoid artificial neural network
fuzzy subsets in 23 530–2
modeling and simulating triangular data using for renewable energy
fuzzy subsets in 19 source power and demand
plot of continuous fuzzy subset in 14 forecasting 529–30
562 Fuzzy logic control in energy systems, 2nd edition

learning process in neural network negative undefined case (NUC) 452


533–4 neurons 531
methods for renewable energy Newton–Raphson (N–R)
source power and demand equations 357
forecasting 530 Newton’s law 244, 264, 267
multi-layer artificial neural Newton’s second law 264, 279
network 532–3
nonlinear equations 245
training artificial neural network
NotPetya ransomware 539
for forecasting 534–6
DC–AC converters 493–8
Ohm’s law 113, 244, 249, 251
DC–DC converters 488–93
one-to-one mapping algorithm 112,
distributed generation and control 114
498–500
operation regions 338
energy management in renewable
optimization 59
integration system 500
optimization algorithms 468
centralized control of distributed
renewable energy systems optimum voltage (OV) 115
501–21 oscillatory transients 70
distributed control of renewable oscillatory voltage classification 70
energy systems 521–8 over-current line (OCL) 443
interfacing distributed sources to AC over-current zone 443
microgrids 484 over-voltage line (OVL) 443
fuel cells and storage devices 486 over-voltage zone 442
solar PV systems 485–6
wind energy systems 486–7 partial differential equations 245
interfacing with DC microgrids Particle Swarm Optimization 468
487–8 partitioning 217
utility-connected microgrid 483 of individual harmonics into fuzzy
micro-hydro power generation systems subsets 69
483 of low voltage section into fuzzy
min–min composition 136 subsets LV and MV 68
min operator 137 of power system bus voltages into
monocrystalline Si PV solar cells 89 fuzzy subsets 68
multi-layer artificial neural network of total harmonic distortion into
532–3 fuzzy subsets 69
multiple input–single rule inference passive power filter (PPF) 374
system 130 permanent magnet direct current
(PMDC) motor 185, 207, 209,
natural frequency 186 276
negation rule 50, 125 state-space model of 209
Index 563

Perturb and Observe (P&O) algorithm based on voltage and current


468 measurements 439–40
phasor diagram by lookup tables 437–8
with constant parameters and search algorithm based on
variables 315 measurements 438–9
excitation effect on 315 maximum power point tracking of
Phishing attacks 538 PV arrays 442
photocurrent 73 constant maximum power angle
photovoltaic array (PVA) 115 approach 442–8
photovoltaic (PV) arrays online load-matching approach
448–59
maximum power point search in 435
PV cell models 414
based on online repetitive method
440–2 effects of changes in solar
irradiation and temperature
based on voltage and current
421–6
measurements 439–40
I–V characteristics of PV panel
by lookup tables 437–8
418–21
search algorithm based on
PV array emulator 433–5
measurements 438–9
PV panel modeling in Simulink
maximum power point tracking of
426–33
442
shading effects in PV arrays 459
constant maximum power angle
approach 442–8 with identical PV panels 460–1
online load-matching approach MPPT in PV arrays under shading
448–59 467–8
shading effects in 459 MPPT optimization methods for
PV arrays under shading 468–70
with identical PV panels 460–1
with unidentical PV
MPPT in PV arrays under shading
panels 461–7
467–8
physical systems 244–5
MPPT optimization methods for
PV arrays under shading 468–70 pitch angle control 374
point of common coupling
with unidentical PV panels 461–7
(PCC) 484
photovoltaic (PV) cells 311, 411
point-to-point reasoning
photovoltaic energy system (PVES) algorithm 123
162, 164, 178
polynomial equation 190
photovoltaic (PV) solar cells 60, 73, 88
positive small (PS) 149
photovoltaic (PV) solar systems 411
positive undefined case (PUC) 452
maximum power point search in PV
arrays 435 power amplifier 317
based on online repetitive method power angle 71
440–2 power curves of wind turbines 377
564 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

Runge–Kutta algorithms 243–4, 259, small power stations 118


298 small signal model 331
for state-space equations 299–303 smart grids 312, 500
s-norm 46, 50
S-curves 31 software-based simulation tools 244
second-order electromechanical system solar irradiation 159
191
solar PV cells 411
second-order system 186
solar PV systems 485–6
self-excited induction generator 385–9
spring force 266
series connected RLC circuit 255
square crisp function 26
series connected RL circuit 249–50
squirrel cage induction generator
series-excited DC motor 290–1 (SCIG) 389
shunt-excited DC motor 289–90 state-space equations 245, 251
sigmoid membership function 31–8 state-space model equations 190, 193
signal flow graphs 193, 245, 251 state vector 257
silicon cells 412 static block without memory 248
Simpson’s rule 246, 293 static exciters 325
simulation diagrams 193, 246, 253, steady-space matrices 334
256–7
step-down transformers 5, 396, 480
Simulink Block Library 219
step-up transformers 5, 480
Simulink functions 18, 21–2, 216–29,
storage devices 486
398
strategic attack 541
modeling and simulating trapezoid
fuzzy subsets in 23 Stuxnet Worm 539
Simulink submodel Sugeno fuzzy reasoning 87, 137
of armature circuit 288 supervisory control and data
acquisition (SCADA) 538, 540
of field circuit 288
support vector machine (SVM) 530
of FLC-controlled DC motor 289
of mechanical subsystem 288 switched power filter (SPF) 389–90
sinewave function 27, 29 switching for reconfiguration (SFR)
468
single FLC block 221
Symbiotic Organism Search (SOS) 468
single input–single output crisp
reasoning 123 synchronous generator 312, 321
single input–single output system 245 excitation and load–frequency
single input–single rule inference control diagram of 312
engine 129 with lagging power factor 314
sinusoid membership functions 27–31, per-phase Thevenin equivalent
72 circuit of 314
properties of 40–3 voltage control scheme 185
566 Fuzzy logic control in energy systems, 2nd edition

system modeling 244 trapezoid method 246


electrical systems 251–63 trapezoid rules 293
electromechanical systems 274 trapezoid-type membership functions
AC motors 292 15
armature subsystem 278–9 triangle01m 170
DC motors 281–92 triangular membership function 16–20
electromechanical interaction triangular-type membership functions
subsystem 279–81 203
field subsystem 278 tri-loop dynamic error detector 391
mechanical subsystem 279 Tsukamoto fuzzy reasoning 87, 137,
mechanical systems 263 181–4
with linear motion 264–71 turbine power coefficient 377
with rotational motion 271–4 two-dimensional membership function
numerical solution of model 106
equations 292 two-mass system 270
Euler digital integration 293–5 two-stage FLC 448
Euler integration for state-space
equations 295–7 Ukraine Power Grid Cyberattack 539
Runge–Kutta algorithm 298 union operator 49
Runge–Kutta algorithm for upper maximum (UM) 168
state-space equations 299–303 upward spiral 469
user-defined MATLAB files 87
Takagi–Sugeno fuzzy reasoning
algorithm 174–80 utility distribution network (UDN)
178–9
t-conorm 46–50
template attacks 541–2
verbal terms 53
ternary fuzzy relation 92
viscous friction forces 266
three-dimensional surface 88
voltage–current equations 251
three-phase induction machine 381
voltage distortion limits 67
thyristor 188
voltage regulator 316–17
time-varying equations 245
voltage source converter (VSC) 395
timing attacks 541
voltage transformer (VT) 317
tip speed ratio (TSR) 377
t-norm 44–6 Whale Optimization Algorithms
total harmonic distortion (THD) 67 (WOA) 469–70
transfer functions 193, 245, 253–4, 258 wind energy conversion (WEC) system
transformation models 264 373
transmission lines 5 wind energy systems (WES) 311, 373,
trapezoid membership function 20–4 486–7
Index 567

electrical generator 378 Zadeh complement 50


dynamic modeling of induction Zadeh intersection 44
generator 380–5 Zadeh’s inference rules 125
self-excited induction generator Zadeh union 47
385–9 zero diagonal 202
FLC examples in 389–403 initial 25-rule table with 201
wind turbine 374–8 initial nine-rule table with 201
wind farm 498 zero dynamics attack 541
wind speed model 375–6, 398 zero steady-state error operation 198, 208
wind turbine 61, 373–8

You might also like