Intelligent multi-coloured lighting system design with fuzzy logic controller
Transcript of Intelligent multi-coloured lighting system design with fuzzy logic controller
UNIVERSITY OF NAIROBI SCHOOL OF ENGINEERING
DEPARTMENT OF ELECTRICAL AND INFORMATION ENGINEERING
Intelligent Multi-Coloured Lighting System
Design with Fuzzy Logic Controller
By
Paul Wambua Mutua
F56/69356/2011
A thesis submitted in partial fulfillment for the Degree of MSc. Electrical
and Electronics Engineering in the Department of Electrical and
Information Engineering in the University of Nairobi
Previous Degrees Attained:
BSc. Electrical Engineering (2nd Upper Honours), University of Nairobi, 1988
JULY 2015
Intelligent Multi-Coloured Lighting System Design with Fuzzy Logic Controller
ii
Declaration of Originality
NAME OF STUDENT: Paul Wambua Mutua
REGISTRATION NUMBER: F56/69356/2011
COLLEGE: Architecture and Engineering
FACULTY/ SCHOOL/ INSTITUTE: School of Engineering
DEPARTMENT: Electrical and Information Engineering
COURSE NAME: Master of Science in Electrical & Electronic
………………………………………….. Engineering
TITLE OF WORK: Intelligent Multi-Coloured Lighting System
………………………………………… Design with Fuzzy Logic Controller
1) I understand what plagiarism is and I am aware of the university policy in this regard.
2) I declare that this thesis is my original work and has not been submitted elsewhere for
examination or award of a degree. Where other people's work or my own work has been
used, this has properly been acknowledged and referenced in accordance with the
University of Nairobi's requirements.
3) I have not sought or used the services of any professional agencies to produce this work.
4) I have not allowed, and shall not allow anyone to copy my work with the intention of
passing it off as his/her own work.
5) I understand that any false claim in respect of this work shall result in disciplinary
action, in accordance with University anti- plagiarism policy.
Signature: ......................................................................................................
Date:.................................................................................................................
Intelligent Multi-Coloured Lighting System Design with Fuzzy Logic Controller
iii
Declaration
This thesis is my original work and has not been presented for a degree in any other
University.
Paul Wambua Mutua, F56/69356/2011: ………………………….Date:…………………..
Approval
This thesis has been submitted for examination with my approval as University supervisor.
Prof. Mwangi Mbuthia: …..……………………………………….Date:………………….
Intelligent Multi-Coloured Lighting System Design with Fuzzy Logic Controller
iv
Dedication
This research work is dedicated to my family: My late wife, Eunice Mwikali, for her patience
and special support. My son, Emmanuel Muthoka, for encouraging and renting me his only
laptop computer for this research work. My daughter, Rael Munyiva, for her prayers and
spiritual strength.
Intelligent Multi-Coloured Lighting System Design with Fuzzy Logic Controller
v
Acknowledgements
I would like to take this opportunity to thank my supervisor, Prof. M. Mbuthia, for his valuable
guidance and support throughout my MSc. course and this research work. May Almighty God
bless you in plenty as you endeavor to make the university research work interesting and of
help in producing knowledge. I also want to acknowledge Dr. C. Wekesa and the other
lecturers, at the Electrical and Information Engineering department, for their personal support
and positive critic. It could have been almost impossible without your support. You were God
sent. I thank God for you.
I take this early opportunity to thank the top management of my company, KenGen, for
allowing me to think freely on engineering academics and by extension sponsoring my MSc.
studies. I would be pleased to pass my special gratitude to the Operations Director, Eng. R.
Nderitu, and the Human Resources & Administration Director, Mrs. B. Soi, for their personal
encouragement and support throughout my studies. I want to give special thanks to my
immediate senior, Eng. S. Kariuki, and the other managers at KenGen for their understanding
and support during the studies and preparation of this thesis. I would also want to thank my
office colleague, Eng. H. Ng’iela, for his positive critic and many discussions on how to
compile a good thesis.
I would also like to thank my postgraduate colleagues and all staff in the Department of
Electrical and Information Engineering, University of Nairobi, for their support and
encouragement.
I would like to thank my family, my immediate local Kalambya/Thinu community, and friends
for their encouragement and support throughout my studies and preparation of this thesis.
Finally, I take this opportunity to thank my Lord God for guarding and guiding me throughout
the studies.
Intelligent Multi-Coloured Lighting System Design with Fuzzy Logic Controller
vi
Table of Contents
Declaration of Originality ........................................................................................................................... ii
Declaration ................................................................................................................................................ iii
Dedication ................................................................................................................................................. iv
Acknowledgements .................................................................................................................................... v
Table of Contents ...................................................................................................................................... vi
List of Tables, Graphs, and Figures ............................................................................................................ ix
List of Abbreviations and Nomenclature ..................................................................................................xiii
Abstract .................................................................................................................................................... xv
CHAPTER 1 - INTRODUCTION ................................................................................................................ 1
1.1 Background of the study ............................................................................................................ 1
1.2 Statement of the Problem .......................................................................................................... 2
1.3 Objectives of the study ............................................................................................................... 3
1.4 Research Questions .................................................................................................................... 4
1.5 Motivation and Benefits of the research study .......................................................................... 4
1.6 Scope and Limitations of the Study ............................................................................................ 5
CHAPTER 2 - LITERATURE REVIEW ........................................................................................................ 6
2.1 Introduction ................................................................................................................................ 6
2.2 Light and Sight aspects ............................................................................................................... 6
2.3 Sources of Light .......................................................................................................................... 9
2.4 The Concept of Designing a Lighting System ............................................................................ 10
Intelligent Multi-Coloured Lighting System Design with Fuzzy Logic Controller
vii
2.5 Light Emitting Diodes (LEDs)..................................................................................................... 11
2.6 Lighting Control Systems .......................................................................................................... 14
2.7 Concept of Fuzzy Logic ............................................................................................................. 15
2.8 Fuzzy Logic Controllers ............................................................................................................. 19
2.9 Lighting Systems with Fuzzy Logic controls .............................................................................. 22
2.10 Summary of the Literature Review .......................................................................................... 24
2.11 Concept Design of an Intelligent Multi-Coloured Lighting system ........................................... 25
CHAPTER 3 - MATERIALS AND METHODOLOGY .................................................................................. 27
3.1 Introduction .............................................................................................................................. 27
3.2 Typical Room Representation Diagram with Lighting Control Infrastructure .......................... 27
3.3 Functional Block Diagrams for the Lighting System Model ...................................................... 30
3.4 LED Driver ................................................................................................................................. 33
3.5 PWM - Pulse Generator ............................................................................................................ 36
3.6 Signal Source Controller ........................................................................................................... 38
3.7 Light Colour Production ............................................................................................................ 40
3.8 Modeling and Simulation of the Lighting System in MATLAB Simulink ................................... 42
CHAPTER 4 - RESULTS AND DISCUSSIONS ........................................................................................... 59
4.1 Introduction .............................................................................................................................. 59
4.2 Effect of gain factor value for Rate of Change of the Indoor Light Intensity. .......................... 60
4.3 Effect of Window Shade Position Fuzzy Logic Controller Output Gain factor ......................... 64
4.4 Effect of Outdoor Light Intensity Levels ................................................................................... 69
4.5 Effect of Different Level Values of the Red, Green and Blue Colour Portions ......................... 77
Intelligent Multi-Coloured Lighting System Design with Fuzzy Logic Controller
viii
4.6 Cause and effect of absence of Colour Decoder, Movement Detector, and Room Occupancy
Signals. .................................................................................................................................................. 84
4.7 Effect of Too High, Moderate, Low and Negative Values of Outdoor Light ............................. 86
4.8 Effect of Changing Shape of the Membership Functions ......................................................... 93
4.9 Effect of Shifting Plot Position of the Mid Membership Functions. ......................................... 96
CHAPTER 5 - CONCLUSION AND RECOMMENDATIONS .................................................................... 100
5.1 Introduction ............................................................................................................................ 100
5.2 Empirical Findings ................................................................................................................... 101
5.3 Theoretical Implication ........................................................................................................... 104
5.4 Recommendations for further research works ...................................................................... 105
REFERENCES ........................................................................................................................................... 106
APPENDICES............................................................................................................................................ 109
Intelligent Multi-Coloured Lighting System Design with Fuzzy Logic Controller
ix
List of Tables, Graphs, and Figures
List of Tables
3.1: List of the actual physical implementation devices ........................................................... 32
3.2: Control rules for input colour product signal (cp) and outdoor light level (lod) ................ 50
3.3: Indoor lighting LEDs average power output control rules ................................................ 54
4.1: Constant values – Effect of Gain factor (kp) for Rate of change of indoor light levels .... 61
4.2: Constant values – Effect of gain factor (kw) for window shade position controller ......... 63
4.3: Constant values - Effects of Outdoor Light intensity levels ............................................. 71
4.4: Constant values- Effect of different signal levels of colour red, green, blue portions ...... 78
List of Graphs
4.1: Screen shots- Effect of Gain factor (kp) for Rate of change of indoor light level ............. 62
4.2: Screen shots – Effects of gain factor (kw) for window shade controller output ................ 65
4.3: Line graph – effect of the window shade controller output gain factor ............................ 68
4.4: Screen shots – Effects of Outdoor Light intensity values ................................................. 72
4.5: Line graph – effect of the outdoor light intensity level signal on other output signals ..... 74
4.6: Screen shots – Effects of sinusoidal signal for Outdoor Light intensity values ................ 74
4.7: Screen shots- Effect of different values of RGB colour portion signal levels .................. 79
4.8: Line graph – Effect of Red, Green, and Blue values on values of the white light signal . 81
4.9: Line graph – Effect of white light signal on window shade controller output .................. 81
Intelligent Multi-Coloured Lighting System Design with Fuzzy Logic Controller
x
4.10: Line graph –Effect of Red, Green, and Blue on respective PWM generator ref. values 82
4.11: Screen shot – Effect of zero values of colour, movement and occupancy signals. ......... 85
4.12: Screen shots- Effect of too high outdoor light intensity signal values ............................ 88
4.13: Screen shots – Effect of moderate outdoor light intensity signal values ........................ 89
4.14: Screen shots – Effect of small Outdoor light intensity signal values .............................. 90
4.15: Screen shots – Effect of changing shapes of membership functions .............................. 94
4.16: Screen shots – Effect of shifting the middle membership function plots ....................... 98
List of Figures
2.1: Additive colour mixing illustration ..................................................................................... 7
2.2: Parts of an LED ................................................................................................................ 12
2.3: Combined spectral curves for blue, green and blue .......................................................... 13
2.4: Photograph of four leads RGB LED ................................................................................. 14
2.5: Cross-section of LED lamp ............................................................................................... 14
2.6: Illustration of fuzzy logic membership function ............................................................... 17
2.7: Membership function for set of tall people (Crisp set) ..................................................... 17
2.8: Membership function for set of tall people (Fuzzy set) .................................................... 18
2.9: Fuzzy logic temperature membership function ................................................................. 19
2.10: Fuzzy inference process diagram .................................................................................... 22
2.11: Concept design of multi-coloured lighting system with fuzzy logic ............................. 25
3.1: Illustration of a typical room with controlled window shades and RGB LEDs ............... 28
Intelligent Multi-Coloured Lighting System Design with Fuzzy Logic Controller
xi
3.2: Signal flow chart for controlling the lighting system ........................................................ 29
3.3: Basic scheme of the multi-coloured LED lighting system ................................................ 30
3.4: Schematic diagram for implementing the LED lighting system ....................................... 31
3.5: LED characteristic curve ................................................................................................... 33
3.6: PWM controlled LED circuit ............................................................................................ 34
3.7: Theoretical pulse wave forms ........................................................................................... 35
3.8: PWM Generator (2-level) wave forms .............................................................................. 37
3.9: PWM generator - Illustration of pulse generation ............................................................. 37
3.10: Illustration of basic principle of Fuzzy Logic Controller ................................................ 39
3.11: Additive colour mixing demonstration ........................................................................... 40
3.12: RGB LEDs’ scheme circuit diagram ............................................................................... 40
3.13: Basic scheme for producing controlled PWM for each coloured LED .......................... 41
3.14: Screen shot - assembled lighting system model in MATLAB Simulink ....................... 44
3.15: Window shade opening position functional block diagram ............................................ 45
3.16: Screen shot - blocks for window shade position fuzzy logic controller ......................... 46
3.17: Screen shot - Window shade position fuzzy logic controller Inference System ............. 46
3.18: Outdoor light level - input Membership function algorithm plot ................................... 47
3.19: Screen shot –outdoor light level – input membership function ...................................... 47
3.20: Colour product signal - input Membership function algorithm plot ............................... 48
Intelligent Multi-Coloured Lighting System Design with Fuzzy Logic Controller
xii
3.21: Screen shot – colour product signal- input Membership function .................................. 48
3.22: Window shade position - output Membership function algorithm plot .......................... 48
3.23: Screen shot - window shade position - output Membership function ............................ 49
3.24: Screen shot – “IF –THEN” control rules for the window shade position controller ...... 50
3.25: LEDs’ output light intensity control – functional block diagram ................................... 50
3.26: Screen shot - LEDs’ fuzzy logic controller signal connections ...................................... 51
3.27: Screen shot - fuzzy logic inference system for the LEDs’ output light .......................... 51
3.28: Indoor light intensity – input membership function algorithm plot ................................ 52
3.29: Screen shot - indoor light intensity - input membership function ................................... 52
3.30: Rate of change of Indoor light intensity – input membership function algorithm .......... 52
3.31: Screen shot - rate of change of the indoor light intensity – input membership function 53
3.32: LEDs’ output light intensity – output membership function algorithm plot ................... 53
3.33: Screen shot - LEDs’ output light level - output membership function ........................... 54
3.34: Screen shot - configured fuzzy rules for the LEDs’ output light controller .................... 55
3.35: Screen shot – section showing enabler switch blocks for the LEDs’ controller output . 55
3.36: Screen shot – section showing RGB colour ratio value calculation blocks .................... 56
3.37: Screen shot – section showing RGB colour-ratio-signal product for PWM generators . 57
3.38: Screen shot – section showing LEDs and the indoor light totallizer/feedback line ........ 58
Intelligent Multi-Coloured Lighting System Design with Fuzzy Logic Controller
xiii
List of Abbreviations and Nomenclature
List of Abbreviations
AI - Artificial Intelligence
ANFIS - Adaptive Neurο-Fuzzy Inference System
B-LED - Blue LED
br - colour blue part ratio
CFL - Compact Fluorescence Lamp
CIE - International Commission on Illumination
CRI (Ra) - Colour Rendering Index
cd - Candela
Cp - Colour product signal
Cs - Decoded/selected colour signal
DALI - Digital Addressable Lighting Interface
ECG - Electronic Control Gear
EN - European Standard
FL - Fuzzy Logic
FIS - Fuzzy Inference System
gr - colour green part ratio
G-LED - Green LED
IEEE - Institute of Electrical and Electronics Engineers
LED - Light Emitting Diode
lm - Lumen
lx - lux
lod - Outdoor light level signal
lodr - Outdoor light illuminating the room
lk - Indoor light level signal
MF - Membership Function
Md - Movement detection signal
pr - Window shade position reference signal
PWM - Pulse Width Modulation
R-LED - Red LED
RGB LED - combined Red, Green, and Blue colour LEDs (Multi-colour LED)
rr - colour red part ratio
Ro - Room occupancy signal
Sc - Simulink Scope block
∆lk - Indoor light level rate of change
Intelligent Multi-Coloured Lighting System Design with Fuzzy Logic Controller
xiv
List of Nomenclature
Colour product signal – is the product of Red, Green, and Blue colour ratios in light colour
mixing.
Decoded/selected colour signal – the summation of Red, Green, and Blue colour ratios in light
colour mixing.
Fuzzy Logic – Logic of words and not numbers. A logic set of linguistic variables.
Fuzzy Logic Controller – Digital controller based on fuzzy logic.
Fuzzy inference – the process of formulating the mapping from a given input to an output
using fuzzy logic.
Illuminance - is the quantity of light falling on a unit area of a surface in lux (lx).
Intelligent system – a system of electrical, electronic and mechanical devises, that is in a
position to sense, calculate logic and act reasonably to produce a required result.
Indoor light – illuminance in an enclosed space or room
Lumen - a measure of amount of light given by a point source (lm).
Luminance level – quantity of light emitted from a light source (e.g. LEDs) in cd/m2.
Luminous efficacy - is the ratio of luminous flux to electrical power of the light source (lm/w).
Light Intensity - quantity or brightness of light on a surface.
Lighting design – the art and craft of creating the visual environment by means of illuminating
it.
Membership Function - This is a mathematical function represented in a curve/graphical plot
where the x-axis is a range of crisp values but the y-axis is fuzzy values which always range
from 0 to 1.
Multi-coloured lighting system – a lighting system that uses RGB LEDs as one of its source
of coloured light.
Window Shade position - Opening level of a light blinding shade for a room window.
Intelligent Multi-Coloured Lighting System Design with Fuzzy Logic Controller
xv
Abstract
This thesis is about design of an intelligent energy efficient lighting system based on fuzzy
logic controller that uses multi-colour LEDs to produce light of the required luminance level
and appropriate colour in a typical room space. The lighting system incorporates automatic
controlling of a room’s window shade opening, conveniently harvesting daylight. Appropriate
room occupancy sensors were set to dim off the LEDs if there are no people in the room. A
movement sensor was also considered for dimming the LEDs if the persons in the room are
asleep. A colour sensor or decoder was included in the control system to dim off the LEDs if
the colour signal is not initiated. The colour decoder signal determine the LEDs’ output light
colour, and close the window shades if the required room’s light colour is not white. Two
Fuzzy Logic controllers were used in the system; the first one to control opening of the room’s
window shades, and the other to control the LEDs’ output luminance level.
The study was limited to simulation of the design in a MATLAB software environment.
However, a proposal of the appropriate hardware that could be used to actualize the lighting
system was also researched and a labeled block diagram for the same provided.
The appropriate devices were identified, configured and assembled into a complete operating
simulate system using a MATLAB-Simulink applications software. The designed system was
simulated in the computer MATLAB environment, and the results were observed and
monitored using the associated Simulink scopes.
The LEDs were observed (via current pulse width) to dim accordingly in response to level of
illumination in the room; the higher the outdoor light into room, the smaller the luminance from
the LEDs. If outdoor light is very low, the window shade was observed to close. Also observed
was the window shade closing when the LEDs output light colour is not white. The simulated
model was able to calculate accurately the respective primary colour-part ratios, where the
values were used in driving the RGB LEDs for production the required room lighting colour.
The designed multi-coloured LED lighting system model is intelligent in saving lighting
electric energy, and providing room illumination levels and lighting colour requirements.
Intelligent Multi-Coloured Lighting System Design with Fuzzy Logic Controller
1
CHAPTER 1 - INTRODUCTION
1.1 Background of the study
Nowadays lighting is seen also as a way of creating a pleasant atmosphere in the interior as a
whole and as a means of providing comfortable conditions in which to live and work. It is not
there just to improve visual perception, but also to determine the emotional atmosphere: cool or
warm, businesslike or pleasant, happy or solemn [11].
Since the discovery and use of incandescent electric lamps by end of 19th century, lighting
systems have undergone many major developments. Research for more efficient lighting
system is an on-going exercise driven by the need to save energy, the international
requirements to reduce greenhouse gases, and high cost of electricity from renewable energy
sources. Lighting can account for up to 20% of a household’s yearly electricity usage, and up to
40% a year in commercial buildings [9][11].
Energy lighting efficient research could be classified in three focuses: lamp technologies,
lighting design, and lighting control methods [1]. The three focuses could be optimized by
integrating them with an appropriate artificial intelligence (AI) system.
The current generations of light emitting diodes (LEDs) are more efficient, some having
efficacies of more than 100 lm/w [16][19][20][25][33]. The use of control technology in
electric light dimming, daylight harvesting, and movement detection can greatly improve
lighting energy efficiency [8][11][19][20]. The LED characterized by mercury-free, high
efficiency, and long life cycle is expected to be the new generation of light source [1][25][33].
The new generation of multi-colour RGB (Red, Green, Blue) LEDs offer not merely another
means to form white light but a new means to form light of different colours. As more effort is
devoted to investigating this method, multi-colour LEDs should have profound influence on the
fundamental method that we use to produce and control light colour [15][16][25][33].
Intelligent Multi-Coloured Lighting System Design with Fuzzy Logic Controller
2
To achieve a desired quality of light for a space, various lighting control systems have been
explored and described, including use of Digital Addressable Light Interface (DALI),
Programmable Logic Controllers (PLC), digital signal controllers (DSC), and Fuzzy Logic
Controllers [1][2][13][14][18][21][23][24][28][29][31][32].
Fuzzy logic, a branch of artificial intelligent (AI) systems, is a form of algebra employing a
range of values from "false" (0) to "true" (1) that is used in making decisions with imprecise
data. Fuzzy logic is a very powerful tool for dealing quickly and efficiently with imprecision
and non-linearity issues, like light intensity level in a room, requiring decision making [6][7]
[24][26].
Energy saving has been identified as the major concern in designing any intelligent energy
efficient lighting system [1][9][30].
1.2 Statement of the Problem
The lighting industry is going through a radical transformation driven by rapid progress in
multi-colour LED lighting, information technology, and the need for sustainable and energy-
efficient solutions. Demands on lighting systems have changed considerably in recent years.
While just switching individual lights on and off used to be sufficient, the new focus is on
dynamic lighting [5][19]20].
There is need to optimize the applications of new generation of multi-colour LEDs and the
intelligent systems, which in combination with advanced digital addressable sensors and
controls, will fuel new lighting applications. Application of Artificial Intelligent (AI) software
programs in control of multi-coloured light sources is bound to become a way of life in the near
future and lead to new lighting solutions, which are not possible with conventional lighting
technology.
It is necessary to optimize utilization of natural light in both homes and work places as a
strategy to save lighting related energy costs, and at the same time improve comfort of living
and working in such places. To do this we need to monitor and adjust the amount of light
intensity in the user places. Manually, on/off switching and discrete level dimmers can be used
Intelligent Multi-Coloured Lighting System Design with Fuzzy Logic Controller
3
to control the amount of light provided in a space, however, there is not much timing accuracy
using this technique – and people also forget. It is therefore necessary to automate lighting
intensity control in a space.
This study was seeking for a way to automate light intensity and colour control in a space using
fuzzy logic controllers.
1.3 Objectives of the study
1.3.1 The Main Objective
The main objective of this study was to design an intelligent lighting system based on fuzzy
logic controller that uses multi-colour LEDs to produce light of the required luminance level
and appropriate colour in a room space considering energy efficiency requirements.
1.3.2 The Specific Objectives
The specific objectives of the research study were:
1. To design hardware and control algorithms for an outdoor lighting level sensor to
automatically control a room’s window shade position;
2. To design hardware and control algorithms for an indoor lighting level sensor to
intelligently adjust the LEDs’ output light to the required room’s illuminance level;
3. To design hardware and control algorithms for an occupant detector that counts the
number of persons in a room and dim off the LEDs light if the room is not occupied;
4. To design hardware and control algorithms for a movement detector that dims off
the LEDs light if a movement in the room is not detected;
5. To design a colour decoder/sensor hardware and control algorithms for determining
the multi-colour LEDs’ output light colour and open the window shade if output
light colour is white;
6. To integrate all the sensors’ subsystems into energy efficient automated intelligent
multi-coloured lighting system.
Intelligent Multi-Coloured Lighting System Design with Fuzzy Logic Controller
4
1.4 Research Questions
The following specific questions were used as guide for the research study:
1. How can the output of an outdoor lighting level sensor be configured and processed
to automatically control a room’s window shade position?
2. How can the output of an indoor lighting level sensor be configured and processed
to intelligently control LEDs’ luminance and maintain the required room’s
illumination levels?
3. How can the output of an occupant detector that counts the number persons in a
room be configured and processed to dim off the LEDs lights if the room is not
occupied?
4. How can the output of a movement detector be configured and processed to dim off
the LEDs if a movement in the room is not detected?
5. How can the output of a colour decoder/sensor be processed to accurately determine
the multi-colour LEDs’ output light colour and at the same time close the room’s
window shades if the output light is not white?
6. Can the integrated system of addressable sensors, window shade, fuzzy logic
controllers, and multi-colour LEDs provide a typical room with light of appropriate
colour at required intensity levels and still be efficient in electrical energy usage?
1.5 Motivation and Benefits of the research study
The author believes human beings live to enjoy life to fullest levels possible. Light is one of the
major sources of enjoyment in life. It is through light that we perceive exciting beauty in our
surroundings.
Research study on how to extract greater excitements from light, and especially on how to
create dynamic intelligent automatic coloured scenes using the new generation of multi-
coloured LEDs is on high demand.
Intelligent Multi-Coloured Lighting System Design with Fuzzy Logic Controller
5
Energy efficiency and sustainability are major concerns in society today. Fuzzy logic
controller, whose operation is based on expert’s knowledge and human reasoning, could be the
best option for modeling an intelligent and energy efficient lighting system, which do not
require fine accuracy in illumination levels.
The knowledge gained from this research study would be beneficial to the universities and
lighting industries. This thesis would form a basis for further studies on artificial intelligent
systems energy saving and lighting colour control. This thesis would be used in improving
energy and comfort performance of modern smart buildings.
1.6 Scope and Limitations of the Study
This thesis is about use of Fuzzy Logic concept in automating opening of window shades and
energy efficiency control of RGB LEDs’ output light intensity in a typical room space. The
study was limited to simulation of the lighting system design using Simulink blocks on a
MATLAB environment.
However, a physical implementation scheme for the lighting system, using appropriate
microprocessors and addressable digital sensors, was researched and proposed for future works.
Intelligent Multi-Coloured Lighting System Design with Fuzzy Logic Controller
6
CHAPTER 2 - LITERATURE REVIEW
2.1 Introduction
In this chapter, literature on issues concerning light has been reviewed and explained in terms
of what light is, quality of light, measurements and definitions of light, sources of light,
concepts of designing lighting systems, LEDs, and lighting control systems. Also reviewed is
the concept of Fuzzy Logic, Fuzzy logic controllers and lighting systems based on logic
controllers. A concept design for the Intelligent Multi-coloured Lighting System with Fuzzy
logic controllers is also described.
2.2 Light and Sight aspects
2.2.1 What is light?
Light is a form of energy manifesting itself as electromagnetic radiation. The human eye
responds to wavelengths between 380nM and 780nM of the spectrum. The eye interprets the
different wavelengths within this range as colours – moving from violet, indigo, blue, green,
yellow, orange, and red as wavelength increases [9][35]. Sight, therefore, is one of the most
vital sense mankind possesses and understanding of how the eye works and how the brain
responds to the visual stimuli they receive is crucial to understanding the way light impacts on
our lives [9].
We all live in a world where at some point, colour will be a part that affect us in our everyday
lives [35]. Colour in everyday life is very diverse, from knowing that a fruit is ripe to eat, to
understanding how colour can affect our moods; blue can be calming, red can make you tense
[35].
The retina in our eyes have three types of colour receptors in the form of cones. We can detect
only three of these visible colours – red, blue and green. These colours are called additive
primaries. It is these three colours that are mixed in our brain to create all of the other colours
we see [35].
Intelligent Multi-Coloured Lighting System Design with Fuzzy Logic Controller
7
These are called the primary colours and additive mixing of these colours will produce all other
light colours, including white. Figure 2.1 illustrates the additive colour mixing [9][35].
Figure 2.1: Additive colour mixing illustration
Where: red + green = yellow, red + blue = magenta (purplish red), green + blue = cyan (sky
blue), and red + green + blue =white
2.2.2 Quality of Light
Good quality lighting is a crucial factor affecting our ability to perform tasks at work and at
home. It embodies a combination of several criteria including lighting level, luminance
contrast, glare and spatial distribution of the light, colour and colour rendering [9].
Although white light is a mixture of colours, not all whites are the same since they depend on
their constituent colours. So a white with a higher proportion of red will appear warmer and a
white with a higher proportion of blue will appear cooler [9][11].
2.2.3 Measurements and Definitions of some lighting terms
Photometric measurement is based on photo-detectors, devices (of several types) that produce
an electric signal when exposed to light [1][9].
Photometry is the science of the measurement of light, in terms of its perceived brightness to
the human eye. In photometry, the radiant power at each wavelength is weighted by a
luminosity function that models human brightness sensitivity; weighted according to how
sensitive the human eye is to it [9].
Intelligent Multi-Coloured Lighting System Design with Fuzzy Logic Controller
8
The lumen is defined as amount of light given into one steradian by a point source of one
candela strength; while the candela, a base SI unit, is defined as the luminous intensity of a
source of monochromatic radiation, of frequency 540 terahertz (555nm – wavelength, in the
green, to which the human eye is most sensitive) and a radiant intensity of 1/683 watts per
steradian. Therefore 1/683 watt of 555 nanometre green light provides one lumen. The
definition tells us that 1 watt of pure green 555nm light is "worth" 683 lumens.
Luminous flux expresses the total quantity of light radiated per 1 second by a light source. The
unit of luminous flux is the lumen (lm).
Luminous intensity is defined as the flux of light emitted in a certain direction. The unit of
luminous intensity is the candela (cd).
Illuminance is the quantity of light falling on a unit area of a surface. The unit of illuminance
is lumen/m2, or lux (lx).
Luminance describes the light emitted from a unit area in a specific direction. The unit of
luminance is expressed in cd/m2 (apparent surface).
Luminous efficacy is a measure of how well a light source produces visible light. It is the ratio
of luminous flux to power (lm/w). The luminous efficacy of a source is a measure of the
efficiency with which the source provides visible light from electricity.
Colour Rendering Index (CRI also denoted as Ra) describes the effectiveness of white light
to render all the visible colours on illuminating a surface. The scale of the Ra ranges from 50-
100.
Intelligent Multi-Coloured Lighting System Design with Fuzzy Logic Controller
9
2.3 Sources of Light
There are three main sources of light; Sun - the source of daylight, Chemicals - the source of
fire flame, and Electricity - the source of electric light.
Sun is the source of the natural daylight. The utilization of the daylight with appropriate
shading device control in buildings is useful to complement or replace the other lighting forms,
which results in significantly lower energy consumption for lighting, while maintaining the
occupants’ visual comfort [18].
Electricity is the most modern form of energy which can conveniently be converted to visible
light energy. The quantity and quality of the light produced can easily be controlled based on
the type of light source device and the average power to the light producing device.
Various types of electric light producing devices (lamps) have been developed. Incandescent
lamp is the second oldest form of electric lighting. When incandescent lamps first appeared by
the end of the 19th century, their efficacy was just 3 lm/W, which has improved to around 14
lm/W today [9]. The halogen incandescent lamp has luminous efficacy of about 5-27 lm/w at
colour rendering index of 100 Ra.
Low-pressure sodium lamp has luminous efficacy of about 100-203 lm/w with colour
rendering index less than 30Ra. High-pressure sodium lamp has luminous efficacy of about 50-
130 lm/w at colour rendering index of 10-80 Ra [9].
The compact fluorescent lamp (CFL) is basically a low-pressure mercury gas discharge lamp
with luminous efficacy of about 60-105 lm/w at colour rendering index of 60-95 Ra. High-
pressure mercury lamp has luminous efficacy of about 35-60 lm/w at colour rendering index of
40-60 Ra. Metal halide lamps have luminous efficacy of about 75-140 lm/w at colour rendering
index of 65-95 Ra. A more recent development is the ceramic metal halide lamp, which has
luminous efficacy of about 68-90 lm/w at colour rendering index of 80-95 Ra.
Intelligent Multi-Coloured Lighting System Design with Fuzzy Logic Controller
10
The most recent evolution in lighting is solid-state lighting based on light emitting diode (LED)
technology. LED has luminous efficacy of about 50-130 lm/w at colour rendering index of 10-
90 Ra [9] [11].
2.4 The Concept of Designing a Lighting System
A lighting system is a string of modules that are connected systematically to produce light of
the desired quantity and quality at the required space and time. Lighting design, on the other
hand, is the art and craft of creating the visual environment by means of illuminating it.
Light gives us beauty as well as vision, and the quality is often far more important to us than
the quantity. Good lighting is both a science and an art, combining knowledge of physics,
engineering, design, physiology and psychology. Nowadays lighting is seen also as a way of
creating a pleasant atmosphere in the interior as a whole and as a means of providing
comfortable conditions in which to live and work [11].
Lighting system is not there just to improve visual perception, but also to determine the
emotional atmosphere: cool or warm, businesslike or pleasant, happy or solemn. This is the
lighting designer’s task, which is achieved by creating comfortable and stimulating lighting
systems [9][11].
The EN 12464-1 standard specifies requirements for lighting systems for almost all indoor
work places and their associated areas in terms of quantity and quality of illumination [9][34].
Around the world Legislation sets targets for the reduction of greenhouse gases, reduction or
elimination in the use of hazardous substances such as mercury and lead and mandatory
recycling of used lamps [9].
Nowadays a great portion of our source of energy is from fossil fuel that will be exhausted
soon. The cost of electricity is going to increase due to the need of investments in renewable
energy supply and shortage of crude oil [9][21].
Today, energy efficiency is an essential element of every home and business. In fact, lighting
can account for up to 20% of a household’s yearly electricity usage, and up to 40% a year in
Intelligent Multi-Coloured Lighting System Design with Fuzzy Logic Controller
11
commercial buildings. The use of control technology, dimming, daylight equalization,
movement detection to schedule power management through control and dimming of lights can
greatly improve efficiency going forwards. Most dimmable CFLs will dim down to 10% to
30% measured light output. Early versions of dimmable LEDs on the market have the ability to
dim lower than CFLs and can reach levels as low as 5% to 15% measured light [20].
Energy lighting efficient research could be classified in three focuses: lamp technologies,
lighting design, and lighting control method [1].
2.5 Light Emitting Diodes (LEDs)
A light-emitting diode (LED) is a semiconductor light source. LEDs were initially used as
indicator lamps in many devices and are increasingly used for other lighting. Appearing as
practical electronic components in 1962, early LEDs emitted low-intensity red light, but
modern versions are available across the visible spectrum, ultraviolet, and infrared
wavelengths, with very high brightness.
When a light-emitting semiconductor diode is forward-biased (switched on), electrons are able
to recombine with electron holes within the device, releasing energy in the form of photons.
Colour of the light produced (corresponding to the energy of the photon) is determined by the
energy gap of the semiconductor. A LED is often small in area (less than 1 mm2), and
integrated optical components may be used to shape its radiation pattern.
At the heart of every white LED is a semiconductor chip made from nitride-based materials.
The chip is traditionally positioned on top of the cathode lead. Applying several volts across
this device makes the chip emit blue light. Passing the blue light through a yellow phosphor
yields white light. Modern, high-power LEDs are variants of this architecture, featuring more
complex packages for superior thermal management. Figure 2.2 is a visual illustration of LED
lighting principles [22].
Intelligent Multi-Coloured Lighting System Design with Fuzzy Logic Controller
12
Figure 2.2: Parts of an LED with detailed light source architecture. Illustration by Bryan Christie [22]
The efficiency of conventional InGaN based LEDs decreases as one increases current above a
given level. This phenomenon of decrease in efficiency is called droop. Solving this mystery
will enable the design of droop-busting LED architectures that will make brighter cheaper
solid-state lighting [22].
By its very nature, LEDs can only generate monochromatic colours. Giving LEDs the blues in
1994, was the key to replacing the incandescent bulb. The first high-brightness blue LED was
demonstrated by Shuji Nakamura of Nichia Corporation in 1994 and was based on InGaN
(Indium Gallium Nitrade). In September 2003, a new type of blue LED was demonstrated by
the company Cree Inc. to provide 24 mW at 20 milliamperes (mA). This produced a
commercially packaged white light giving 65 lm/W at 20 mA, becoming the brightest white
LED commercially available at the time, and more than four times as efficient as standard
incandescent lamps [22][25][33].
There are two primary ways of producing White Light-Emitting Diodes. One is to use
individual LEDs that emit the three primary colors- red, green, and blue (RGB) and then mix
Emitted Light
Molded
epoxy lens
Anode wire
Anode lead Cathode lead
Reflective cap
Proton
Electron
Hole
p- type GaN
n- type GaN
Active region
Positive terminal
Negative terminal
Intelligent Multi-Coloured Lighting System Design with Fuzzy Logic Controller
13
all the colors to form white light. The other way is to use a phosphor material to convert
monochromatic light from a blue or UV LED to broad-spectrum white light, much in the same
way a fluorescent light bulb works.
So in order to create white light, two or more colours need to be combined. The blue one can be
added to existing red and green LEDs to produce the impression of white light. Figure 2.3
shows combined spectral curves for blue, yellow-green, and high-brightness red at respective
radiation wavelengths.
Figure 2.3: Combined spectral curves for blue, yellow-green, and high-brightness red solid-
state semiconductor LEDs [25].
Figure 2.4 is a photograph of a single LED with four leads for three inbuilt RGB LEDs. Figure
2.5 is a cross-section of white LEDs lamp showing part of the electronic driver board.
Wavelength (nanometers)
300 400
0
500 600 700 800
1010
2010
3010
0
4010
Intensity Count
Blue
Yellow
green
Red
Intelligent Multi-Coloured Lighting System Design with Fuzzy Logic Controller
14
Figure 2.4: Photograph of a four leads RGB LED Figure 2.5: cross-section of LED lamp[25]
One solution for white LED light is by mixing red, green and blue (RGB) semiconductor chips
into one single LED, or, by placing separate red, green and blue LEDs very close together, and
optically mixing the emitted radiation. Hence the method is called multi-colour white LEDs
(sometimes referred to as RGB LEDs). This method is particularly interesting in many uses
because of the flexibility of mixing different colours, and, in principle, this mechanism also has
higher quantum efficiency in producing white light.
As more effort is devoted to investigating the effective methods of mixing light colours, multi-
colour LEDs should have profound influence on the fundamental method that we use to
produce and control light colour [20][25][33].
In 2012, Cree announced a white LED giving 254 lumens per watt. In December 2012 Cree
issued another press release announcing commercial availability of 200 lumens per watt LED at
room temperature [20].
With the development of high-efficiency and high-power LEDs, it has become possible to use
LEDs in lighting and illumination [22][33].
2.6 Lighting Control Systems
A lighting control system consists of a device that controls electric lighting and devices, alone
or as part of a daylight harvesting system, for a public, commercial, or residential building or
property, or the theater [8]. Lighting control systems, with an embedded processor or industrial
Heat sink
LEDs
Cover
Driver card
Screw terminal
Intelligent Multi-Coloured Lighting System Design with Fuzzy Logic Controller
15
computer device, usually include one or more portable or mounted keypad or touch-screen
console interfaces, and can include mobile phone operation [8][36][37]. These control
interfaces allow users the ability to remotely toggle (on-off) power to individual or groups of
lights, operate dimmers, and pre-program space lighting levels.
Intelligent lighting can be as simple as automating a single light, so that it can be controlled by
a remote control device or timer. Intelligent lighting also refers to stage lighting that has
automated or mechanical abilities beyond those of traditional, stationary illumination.
Intelligent lighting is also known as automated lighting, moving lights or moving heads [8][27].
Demands on lighting systems have changed considerably in recent years. While just switching
individual lights on and off used to be sufficient, the new focus is on dynamic lighting
[5][19]20]. The storage and retrieval of entire lighting scenes is also in demand in this context.
In order to create lighting scenes, lights have to be assigned to particular groups, but as a rule,
the end-user also wants the option of controlling the lights individually [4][5][10].
Digital Addressable Lighting Interface (DALI) is a draft standard for a digital interface for
controlling (dimmable) electronic control gear (ECG). DALI is a joint development by a
majority of the lighting industry. The aim in developing DALI was to create a uniform standard
in the lighting industry and fill the gap between previous 1-10V control lighting interface
technology and more complex bus systems [4][5][10].
2.7 Concept of Fuzzy Logic
2.7.1 Fuzzy Logic
Fuzzy logic is a branch of Artificial Intelligence (AI) developed by Lotfi Zadeh in 1965
[7][12][24]. Fuzzy logic is a superset of Boolean logic dealing with the concept of partial truth
- truth values between "completely true" and "completely false" [6][7][12]. In classic Boolean
logic, a value is either 1 (one – completely true) or 0 (zero – completely false) but cannot be
there between as it is with Fuzzy logic.
The basic concept underlying fuzzy logic is that of a linguistic variable, that is, a variable
whose values are words, such as large, small, very bright, etc, rather than numbers. Fuzzy logic
Intelligent Multi-Coloured Lighting System Design with Fuzzy Logic Controller
16
is all about the relative importance of precision- “how important is it to be exactly right when a
rough answer will do?” [12][24].
Fuzzy logic uses fuzzy sets to relate classes of objects with unclearly defined boundaries in
which membership is a matter of degree. Fuzzy logic is a form of algebra employing a range of
values from "true" to "false" that is used in making decisions with imprecise data. The outcome
of an operation is assigned a value between 0 and 1 corresponding to its degree of truth [6][7]
[24][26].
2.7.2 Fuzzy sets
The idea of grade of membership, which is the concept that became the backbone of fuzzy set
theory, occurred to Lotfi A. Zadeh in 1964, leading to the publication of his seminal paper on
fuzzy sets in 1965, which marked the birth of fuzzy logic technology [6][7][24].
Fuzzy sets is a class of objects with a continuum of grades of membership. Such a set is
characterised by a membership (characteristic) function which assigns to each object a grade of
membership ranging from zero to one [6]. Fuzzy sets allow partial membership which means
that an element may partially belong to more than one set. The grade of membership ranges
from 0 (no membership) to 1 (full membership), written as in equation (2-1).
μA:U→ [0,1] (2-1)
which means that the fuzzy set A belongs to the universal set U (called the universe of
discourse) defined in a specific problem.
Just as a Boolean predicate asserts that its argument definitely belongs to some subset of all
objects, a fuzzy predicate gives the degree of truth with which its argument belongs to a fuzzy
subset [6][12][24][26].
Intelligent Multi-Coloured Lighting System Design with Fuzzy Logic Controller
17
2.7.3 Membership Function
A membership function is a function from a universal set U to the interval [0,1]. A membership
function is a curve that defines how each point in the input space is mapped to a membership
value (or degree of membership) between 0 and 1. The input space is sometimes referred to as
“Universe of discourse” [12][24]. Figure 2.6 shows representation of the membership function -
input U is mapped to the corresponding degree of membership µ in the range of 0 to 1.
The curve known as a “membership function” is often given the designation of μ. The value μ
is the degree of membership, which is along the y-axis of the graph. The universe of discourse
U is along the x-axis of the membership function graph.
Consider, for example, the set of membership function for a set of tall people. If the set is given
the crisp boundary of a classical set such that, if more than 6ft is tall, then less than 6ft is short.
This crisp set is illustrated in figure 2.7.
Height (ft) 0
0
1
μ
Membership
function
(mapping)
Input space -U
“Universe of
discourse”
Degree of
membership- µ
- [0,1]
0.5
6
TALL
SHORT
Figure 2.7: Membership function -Set of tall people (Crisp Set)
Figure 2.6: Illustration of membership function
Intelligent Multi-Coloured Lighting System Design with Fuzzy Logic Controller
18
But for more realistic, a smooth curve from SHORT to TALL is a fuzzy set such that a person
may be both tall and short to some degree. This is illustrated in figure 2.8.
2.7.4 Fuzzy Logical Operations
Fuzzy logical reasoning is the fact that it is a superset of standard Boolean Logic. The set
operations intersection and union correspond to logic operations, conjunction (AND) and
disjunction (OR), respectively. In the fuzzy logic, the statement A AND B, where A and B are
limited to the range (0,1), is resolved by using the function min(A, B). Also the operation A
OR B becomes equivalent to max(A, B). The operation NOT A becomes equivalent to the
operation 1-A [6][12][24].
The set operations of intersection (AND), union (OR), and complementation (NOT), are
defined in terms of characteristic (membership) functions in the following fuzzy logic
equations (2-2), (2-3), and (2-4) respectively:
Intersection: μA∩B(x) = min(μA(x), μB(x)) (2-2)
Union: μAUB(x) = max(μA(x), μB(x)) (2-3)
Complement: μnot A(x) = 1-μA(x) (2-4)
Height (ft) 0
0
1
μ 0.5
6
SHORT TALL
Figure 2.8: Membership function - Set of tall people (Fuzzy Set)
4
Intelligent Multi-Coloured Lighting System Design with Fuzzy Logic Controller
19
2.8 Fuzzy Logic Controllers
A fuzzy control system is a control system based on fuzzy logic—a mathematical system that
analyzes analog input values in terms of logical variables that take on continuous values
between 0 and 1. This is in contrast to classical or digital logic, which operates on discrete
values of either 1 or 0 (true or false, respectively) [26]. Fuzzy logic is used, for example, in
artificial intelligence (AI) systems. It is a very powerful tool for dealing quickly and efficiently
with imprecision and non-linearity issues requiring decision making.
Fuzzy system is better placed in solving day-to-day problems due to its ability to be built on top
of the experience of experts and can be blended with conventional control technologies
[12][24]. Traditionally, fuzzy logic has been viewed in the Artificial Intelligence (AI)
community as an approach for managing uncertainty. In the 1990's, however, fuzzy logic has
emerged as a paradigm for approximating a functional mapping [12][24][26].
Fuzzy logic control relies on basic physical properties of the system, and it is potentially able to
extend control capability even to those operating conditions where linear control techniques
fail.
A basic application might characterize sub ranges of a continuous variable [26]. For instance,
a temperature measurement for anti-lock brakes might have several separate membership
functions, as shown in figure 2.9, defining particular temperature ranges needed to control the
brakes properly. Each function maps the same temperature value to a truth value in the 0 to 1
range. These truth values can then be used to determine how the brakes should be controlled.
Figure 2.9: Fuzzy logic temperature membership function [26]
Cold -blue
Warm-orange
Hot- red
Intelligent Multi-Coloured Lighting System Design with Fuzzy Logic Controller
20
In this image, figure 2.9, the expressions cold, warm, and hot are represented by functions
mapping a temperature scale. A point on that scale has three "truth values"—one for each of the
three functions. The vertical line in the image represents a particular temperature that the three
arrows (truth values) gauge. Since the red arrow points to zero, this temperature may be
interpreted as "not hot". The orange arrow (pointing at 0.2) may describe it as "slightly
warm" and the blue arrow (pointing at 0.8) "fairly cold" [26].
A fuzzy controller is based on a collection of conditional statements known as “If-Then” rules.
2.8.1 “If-Then” Fuzzy Statement Rules
The purpose of fuzzy logic is to map an input space to an output space, and the primary
mechanism for doing this is a list of “IF – THEN” statements called rules, placed between the
input space and output space.
A Fuzzy rule is a conditional statement Rk based on expert knowledge expressed in the form of
fuzzy equation (2-5):
Rk: IF x is A THEN y is B (2-5)
Where A (e.g. small) and B (e.g. large) are linguistic values defined by fuzzy sets, on the range
(universe of discourse) x and y respectively. Rk is the kth rule.
If there are n rules, the rule set, R, is represented by the union of the rules in the form of the
fuzzy equation (2-6).
R = R1 else R2 else R3 else ... Rn. (2-6)
The “IF” part of the rule “x is A” is called antecedent or premise. The “THEN” part of the
rule “y is B” is called the consequent or conclusion. In general, the input to an if-then rule is
the current value for the input variable, U (universe of discourse), and the output is an entire
fuzzy set, µ ([0, 1]).
Intelligent Multi-Coloured Lighting System Design with Fuzzy Logic Controller
21
Interpreting if-then rules is a three-part process: Fuzzy inputs - Resolve all fuzzy statements in
the antecedent to a degree of membership between 0 and 1. Apply fuzzy operator to multiple
part antecedents and resolve the antecedents to a single number between 0 and 1. Apply
implication method- use the degree of support for the entire rule to shape the output fuzzy set.
If the antecedent is true to some degree of membership, then the consequent is also true to the
same degree. Thus in binary logic: if p → q (here p and q are either both true or both false). In
fuzzy logic: if 0.4p → 0.4q (here partial antecedents provide partial implication). The
“implication function” then modifies that fuzzy set to the degree specified by the antecedent.
In general, one rule alone is not effective. Two or more rules that can play off one another are
needed [12].
2.8.2 Fuzzy Inference Systems
Fuzzy inference is the process of formulating the mapping from a given input to an output
using fuzzy logic [12]. There are two types of fuzzy inference systems that vary somewhat in
the way outputs are determined [12][24]: Mamdani type:- proposed in 1975 by Ebrahim
Mamdani - the output membership functions are single spike fuzzy sets (singleton outputs)
rather than distributed fuzzy sets. Mamdani method finds the centroid of the two-dimensional
output function for defuzzification purpose. Sugeno type:- used to model any inference system
in which the output membership function are either linear or constants [12].
Mamdani method Fuzzy inference process comprises of five parts: first step is fuzzification of
the input variables where the degree to which they belong to each of the appropriate fuzzy sets
via membership functions is determined. The second step is application of the fuzzy operator
(AND or OR) in the antecedent. The fuzzy operator is applied to obtain one number that
represents the result of the antecedent for that rule. The third step is implication from the
antecedent to the consequent. The rule’s weight must be determined first. The forth step is
aggregation of the consequents across the rules the fuzzy sets that represent the outputs of each
rule are combined into a single fuzzy set. The fifth step is defuzzification where a single crisp
number is determined by centroid method of the aggregate.
Intelligent Multi-Coloured Lighting System Design with Fuzzy Logic Controller
22
This fuzzy inference process could best be explained in a diagram as in figure 2.10 [12].
In this figure 2.10, the flow proceeds up from the inputs in the lower left, then across each row,
or rule, and then down the rule outputs to finish in the lower right.
The most popular defuzzification method is the centroid calculation, which returns the center of
area under the aggregated curve.
2.9 Lighting Systems with Fuzzy Logic controls
In a paper by S.D. Panjaitan [1], fuzzy logic scheme is proposed as a basis to control lighting
system in building zone where the fluorescent lamps are the controlled objects. The proposed
lighting design procedure determines the maximum number of lamps that should be used
according to the room function. Then the proposed controller is activated and deactivated
Output
Input 1 Input 2
1- IF
2- IF
AND
AND
THEN
THEN
Figure 2.10: Fuzzy inference process diagram
Fuzzification Fuzzification
Operator and Implication
Operator and Implication Aggregation
Defuzzification
Intelligent Multi-Coloured Lighting System Design with Fuzzy Logic Controller
23
according to information from occupancy sensors, which gives information about room
occupancy. The fuzzy set of the output variable is defuzzified to deliver a crisp numerical value
by the centroid-of-area method. Programming of the Fuzzy Logic Controller for the lighting
control system was realized by using Software Assembler DT51S.
Papers by [1], [22] and [29] describes the development of fuzzy logic controller for room
lighting system using a microcontroller. Input to the fuzzy logic controller is room light level
and the outdoor daylight level and the number of occupants in the room. The controllers will
control daylight shading, and the number of lamps to be switched on while maintaining the
suitable illuminance for the specific condition of the room. The paper by M.A.A. Saleh [29]
describes a fuzzy controller that controls the number of lamps lit using the number of people
inside the room and the required illuminance as control inputs.
M. T. Lah [18] proposed a modern approach to control the inside illuminance with fully
automated fuzzy system for adjusting shades, which responds constantly to the changes in the
available solar radiation, which makes decisions as it follows the human thinking process. The
control algorithm contains a cascade control with fuzzy controller as the main and conventional
PID-(proportional-integral-derivative) controller as auxiliary controller. The implementation of
fuzzy logic controller for the roller blind positioning is Sugeno type.
C. Zhang [28] developed a microprocessor-based intelligent control device for streetlight
control, applying fuzzy decision theory to distinguish accurately various interferences and to
make it operate, reliably, a transformer high voltage circuit breaker.
The paper by M. L. Jin [2] describes how we can design a lighting control system including
hardware and software based on fuzzy logic. Software incorporates LABVIEW graphical
programming language and MATLAB Fuzzy Logic Toolbox to design the light fuzzy
controller. The control system can dim the bulb automatically according to the environmental
light. The fuzzy set of the output variable is defuzzified to deliver a crisp numerical value by
the center-of-gravity method.
K. K. Tan [13], S. Mehan [14] and C. M. Prades [31] describes the implementation of an
intelligent traffic lights control system using fuzzy logic technology which has the capability of
Intelligent Multi-Coloured Lighting System Design with Fuzzy Logic Controller
24
mimicking human intelligence for controlling traffic lights. The papers [13][14][31] proposed
fuzzy logic controlled traffic light that uses sensors that count the numbers of cars in a queue
and extend or reduce time needed for the green light on the arrival side. The reasoning method
in the fuzzy controller is similar to that of a policeman handling the traffic flow at a typical
junction.
K. Alexandridis [23] proposed a control method that uses digital PI-like fuzzy logic controller
to improve both lighting level and energy efficiency at the same time. Hybrid systems like
ANFIS (Adaptive Neurο-Fuzzy Inference System) was used for prediction and control of the
artificial lighting in buildings, following the variations of the natural lighting. The indoor
illuminance levels together with the Daylight Glare Index are taken into account by the fuzzy
control scheme to regulate the shading and electric lighting.
M.G. Shafer [32] proposes a model of fuzzy logic control system to control illumination of
LEDs lamp, in order to obtain homogeneity of light intensity in a room.
2.10 Summary of the Literature Review
The literature described various sources of light and why quality of the light is more important
than its quantity in illuminating a space. To achieve a desired quality of light for a space,
various control models are described, including DALI and Fuzzy Logic Controllers. Electrical
energy saving has been identified as the major concern in designing any intelligent and efficient
lighting system.
However, the author noticed a need in research for an intelligent lighting system that takes
advantage of availability of daylight and the new generation of high efficient RGB LEDs in
production of both white light and multi-coloured light. The author proposed a design of a
multi-coloured lighting system, based on Fuzzy Logic, where the electric light source changes
its light intensity and colour automatically to the desires and convenience of the user.
Intelligent Multi-Coloured Lighting System Design with Fuzzy Logic Controller
25
2.11 Concept Design of an Intelligent Multi-Coloured Lighting system
Figure 2.11 is a block diagram illustrating the concept of a lighting system with fuzzy logic
controller. It explains the process of automating multi-coloured LEDs lighting intensity and
colour change in a room. The proposed system has five inputs and four outputs.
The input “Daylight” refers to the natural outdoor light from the sun as detected by a light
sensor: If the daylight intensity level is at the required minimum setting, the room’s sun light
window shades (blinders) automatically opens to maximum position possible. If the daylight
intensity is lower than minimum set point, the shades closes.
The input “room light intensity” refers to the lighting level in the room area or space as
measured by the installed photometer (light sensor): This determines the dimming of the LED’s
light. If the light level is higher than the set point, the LEDs automatically dim down to the
required room light level. If the light level in the room is lower than the set point, the sun
shades are opened further, but if the sun shades are fully open and the room light level is still
low, the LEDs output light is increased. If the room light level is higher than the set point and
the LEDs are fully dimmed, then the shades are automatically partially closed.
The input “Desired room light colour” refers to the user’s preferred colour as selected on a
touch pad colour chart or colour sensor or mood detector: The light produced by the LEDs will
be of the colour as the selected by the user on a colour chart touch pad or detected
INPUT
1. Outdoor light
(daylight) intensity
2. Room light intensity
3. Desired light colour
4. Number of people in
room (occupancy)
5. Movement detection
Fuzzy
Inference
System
Micro -
controller
and the
LEDs’
drivers
RGB
LEDs
OUTPUT
1. On and Off
2. Light colour
3. Dimming
4. Daylight
shades’
position
Figure 2.11: Concept design of a multi-coloured lighting system with fuzzy logic controller
Intelligent Multi-Coloured Lighting System Design with Fuzzy Logic Controller
26
colour/mood. If the selected colour is not white, then the room’s window outdoor light shades
will automatically close fully.
The input “room occupancy” is same as “number of people in the room” which is the
number of people occupying the room as computed by an entrance counter detector: If the
computed number of persons in the room is one or more, then the LEDs system will
automatically be activated to normal operation. If the computed number of persons is zero, then
the LEDs light will automatically be dimmed off.
The input “movement detection” refers to motion sensors detecting movement in the room: If
the motion sensors do not detect movement in the room within a predetermined duration, then
the LEDs light is dimmed off. If a movement in the room is detected, then the LEDs system is
activated to normal operations.
Intelligent Multi-Coloured Lighting System Design with Fuzzy Logic Controller
27
CHAPTER 3 - MATERIALS AND METHODOLOGY
3.1 Introduction
How the research was performed is briefly explained in this chapter. A line diagram
representing a typical room is described, where the indoor room illumination is the subject of
control. The general functionality of the multi-coloured lighting system is shown in a labeled
single line diagram. The functions and the principles of operation of each component in the
lighting system are also described. Also shown is schematic diagram with hardware that may
be used in implementing the lighting system.
MATLAB computer software environment is used for simulating operations of the lighting
system. Screenshot of the assembled MATLAB Simulink model of the multi-coloured lighting
system is shown. Also outlined here are the operational assumptions for the simulation.
Screenshots of the membership function plots and the “IF-THEN” statement control rules for
two Fuzzy Logic Controllers are explained.
The function and purpose of each section of the MATLAB-Simulink lighting system model is
explained with aid of sectional screenshots. The simulation processes and points for monitoring
the lighting signal levels and the LEDs’ current pulses are explained.
3.2 Typical Room Representation Diagram with Lighting Control
Infrastructure
The figure 3.1 is a labeled diagram representing a typical room whose inside illumination level
is controlled by light from a set of ceiling mounted multi-colour LED lamps and daylight
(outdoor light) through clear-glass window with electrically movable shades (outdoor light
blinders). It is assumed that the number and the rating of the multi-colour LED lamps is enough
to illuminate the whole room uniformly and to the required light intensity. It is also assumed
that the windows are large enough to allow passage of the daylight to illuminate the room
uniformly to the required light intensity. The window shades are expected to blind out the
Intelligent Multi-Coloured Lighting System Design with Fuzzy Logic Controller
28
outdoor light. The amount of outdoor light entering the room is expected to be proportional to
the opening of the window shades. Opening of the window shades is electrically controlled.
There is only one indoor light sensor, which is ceiling mounted at centre of the room. The
outdoor light sensor is strategically mounted to monitor the daylight levels that could pass
through the window into the room. The movement detector is mounted in front side of the room
in a position such that it can detect motion of persons in the entire room space. The room
occupancy counter is composed of two detectors that are conveniently mounted sequentially at
the door frame such that the first detector in entering is assigned addition to number in the
room, and other detector on the line, which is first in leaving the room, is assigned subtraction
to the number in the room. The colour selector/sensor/decoder module is mounted conveniently
at the entrance area of the room such that the user has an option of either select a colour by
touch of a colour-chart or the module can sense a facial mood of a person or the module can
decode clothing colour and automatically set the colour of the LED lamps. The colour signal is
expected to determine the window-shades’ opening position. Figure 3.2 is the flow chart for
signal controlling the lighting system.
Outdoor light
Outdoor light
Room window
Room window shade
Movement
detector
Room window
shade opening
position
mechanism
Number entering
counter
Number leaving
counter
Outdoor light
intensity sensor
Room
illumination
level sensor
Multi-coloured
LED lamp
Colour
sensor/decoder
Figure 3.1: Illustration of a typical room with controlled multi-coloured LED lighting
system
Intelligent Multi-Coloured Lighting System Design with Fuzzy Logic Controller
29
START
System power and signal
initialization
Is Outdoor light
sensor signal on?
Window Shade Position
Fuzzy Logic Controller
Is Room’s light
sensor signal on?
LEDs’ output Fuzzy
Logic Controller
Is room
occupancy ≥1?
Is movement
detector signal on?
Is colour
signal High?
Calculate ratios for
red, green and blue
colour portions
Pulse Width Modulation
(PWM) generators
Send zero value signal
to PWM generators
LED drivers
Room Illumination
levels
Yes
Yes
Yes
Yes
Yes
No
No
No
No
No
Figure 3.2: Signal flow chart for controlling the lighting system
Calculate colour
product
Motor drivers
Window shade
position
Intelligent Multi-Coloured Lighting System Design with Fuzzy Logic Controller
30
3.3 Functional Block Diagrams for the Lighting System Model
3.3.1 Functional Representation of the Lighting System Model
Figure 3.3 shows basic scheme of the multi-coloured lighting system with two fuzzy logic
controllers; one for controlling position of the window light-shade opening (position) and the
other for controlling the average output light intensity (luminance) of the multi-colour LEDs.
Fuzzy Logic Controller for the
window shade position
Outdoor light (lod)
sensor signal Microcontroller-
motor driver
Window Shade
Position (sp)
Feedback
Colour Decoder /
sensor
Colour product
signal (Cp)
colour red part
colour green part
colour blue part
Room
Occupancy (Ro)
signal
Movement
detector (Md)
signal
Indoor light
intensity (lk)
signal
Indoor light rate
of change (∆lk)
signal
R-LED
G-LED
B-LED
LED
Driver
LED Driver
LED
Driver
PWM
PWM
PWM Multiplier
Multiplier
Multiplier
rr
br
gr
Figure 3.3: Basic scheme of the multi-coloured LED lighting system
Fuzzy Logic Controller for the LED average output light
Signal controlled enabler
switches
Highest value
selector
Summation of
colour ratios (Cs)
Multiplier of the
colour ratios
Colour ratio
calculator
x
/
x
/
x
/
Intelligent Multi-Coloured Lighting System Design with Fuzzy Logic Controller
31
The multi-coloured lighting system is based on Fuzzy Logic controllers which enable it have
the necessary operational intelligence that mimic human decision making process. Daylight
(outdoor lighting) harvesting through windows with controllable window-shade mechanism
was necessary for reducing use of electrical energy. The system uses multi-colour (RGB) LEDs
for purpose of producing dynamic coloured light in a typical room space.
3.3.2 Physical Implementation schematic diagram
Figure 3.4 is a labeled schematic diagram with actual industrial electronic devices proposed for
implementing the multi-colour LEDs room lighting system. All the lighting system actual
devices are digitally addressable and are expected to intercommunicate through the I2C (Inter-
Integrated Circuit) bus. The software for the Fuzzy Logic Toolbox and the colour decoder
signal processing, would be installed in the master microcontroller.
Master
Microcontroller (PIC16F690)
Slave 1 Microcontroller
(PIC16F690) Indoor light
sensor –
(TSL29020)
Colour
sensor (TCS3472)
Motion
detector (DP-002A)
People Counter
Room occupancy
(PC6464M2)
Motor for moving
the window shade
Window Shade position
decoder (IEK58MM)
Shade position
feedback signal
+VDD
Red LED
(ASMT-YTD2-0BB02)
Green
LED
MOSFET
(2N7000)
I2C - Bus
Outdoor light
sensor –
(TSL29020)
Slave 2
Microcontroller
(PIC16F690)
Motor Driver
interface
Blue
LED
Figure 3.4: Schematic diagram for implementing the LED lighting system
LED Driver
interface
Intelligent Multi-Coloured Lighting System Design with Fuzzy Logic Controller
32
The various actual devices that may be used in constructing (implementing) the multi-coloured
lighting system are described in the table 3.1 for list of items.
Table 3.1: List of the actual physical devices for realizing the lighting system
Item Description Manufacturer Part No./Type Remarks
1 Master
microcontroller
Microchip Technology Inc.
USA.
http://www.microchip.com
PIC16F690 Master
Microprocessor
2 RGB LEDs AVAGO Technologies,
USA
http://www.avogotech.com
ASMT-TYD2-
0BB02
PWM driven
3 Microcontroller –
PWM generator for
the LEDs’ drivers
and the Shade
position motor drive
Microchip Technology Inc.
USA.
http://www.microchip.com
PIC16F690 Serial
addressable
device through
I2C Bus
4 -Indoor light sensor
-Outdoor light
sensor
Texas Advanced
Optoelectronic Solution
(TAOS) Inc. USA
http://www.taosinc.com
TSL29020 Digital
addressable
devices.
5 Window Shade
position decoder
TR-Eletronic GmbH,
German
http://www.tr-electronic.de
IEK-58MM
(Integrated
Coupling
Incremental
Encoder )
Digital
addressable
device
6 Colour sensor Texas Advanced
Optoelectronic Solution
(TAOS) Inc. USA
http://www.taosinc.com
TCS3472 Digital
addressable
device
7 Motion detector Glolab Corporation, USA
http://www.glolab.com
DP-002A Digital
addressable
device
8 Room Occupancy
counter (People
counter)
IEE, Luxembourg
Web: www.iee.lu
PC6464M2 Digital
addressable
device
Intelligent Multi-Coloured Lighting System Design with Fuzzy Logic Controller
33
3.4 LED Driver
LEDs are current driven devices. Figure 3.5 shows the characteristic curve of a LED [1]. The
y-axis is the current, in mA, through the LED while the x-axis is DC voltage, in volts, across
the LED. By increasing the voltage in the ∆V range, the current increases almost proportional.
The brightness of an LED is approximately proportional to its average current. However, a
current variation in an LED may cause colour shift. Such an approach is not appropriate for
applications, which strictly requires a consistent colour gamut [3]. For this reason a driver
circuit is designed essentially to drive LEDs at the required constant current.
To prevent the LED lighting from colour shift, the LED lamp can be dimmed by pulsed current.
The average LED current is adjusted by the duty cycle of the PWM.
Figure 3.6 shows a LED circuit with a pulse controlled switching device. The switching device
(LED driver) is fed with a controlled signal from a PWM pulse generator. The average load
current Io is a function of the duty cycle of the PWM for controlling opening and closing of the
circuit switch S. The resistor R is for limiting the current amplitude.
Figure 3.5: LED characteristic curve [3].
LED voltage in volts
LED
current
in mA
Intelligent Multi-Coloured Lighting System Design with Fuzzy Logic Controller
34
When switch S is closed, the current, Io, rises instantaneously to Vs/R. When switch S is
opened, the current at once falls to zero.
Figure 3.7 shows the theoretical wave form of the voltage across the associated LED resistor,
VR, and the current Io. The voltage, current and power delivered to the LED is represented by
equations (3-1) to (3-7).
A chopped dc voltage is produced in the LED resistor terminal:
VR = TON/(TON + TOFF)Vs = TON/T Vs = αVs (3-1)
Where T=TON +TOFF = chopping period.
α = TON/T = duty cycle (duty ratio)
Thus, the LED and resistor average voltage, Vo, can be controlled by varying the duty cycle α.
Average output voltage Vo = αVs (3-2)
Average output current Io = αVs /R (3-3)
PWM
PWM - pulse
generator
S - Pulse controlled
switch
LED
R- Resistor associated
with the LED circuit.
+ - DC
source
Vs
Io
Figure 3.6: PWM controlled LED circuit
VR
Intelligent Multi-Coloured Lighting System Design with Fuzzy Logic Controller
35
Calculation of the RMS values and the average power consumed by the LED.
RMS value of output voltage Vor = [αVs2]1/2 = √α Vs (3-4)
RMS value of output current Ior = [α(Vs/R)2]1/2 = √α (Vs/R) (3-5)
Power delivered to the LED Po = Ior Vor = √α(Vs/R) √α Vs = α (Vs2/R) (3-6)
Hence, Po = Kα (3-7)
Where K is a constant, (Vs2/R), as long as the dc source, Vs, is maintained constant.
The average power Po through the LED resistor is controlled through α (duty cycle) by opening
and closing the switch S periodically by means of the PWM pulse generator. The Po is
proportional to the LED’s luminosity level.
time
time
VR
Io
Vs /R
Vs
0
0 T
TOFF TON
time T
TOFF TON PWM
Figure 3.7: Theoretical Pulse wave forms – (a) PWM generator output, (b) voltage VR
across the resistor, (c) current Io through the LED.
0
t
(a)
0t
(b)
0t
(c)
0t
Intelligent Multi-Coloured Lighting System Design with Fuzzy Logic Controller
36
A means to control the duty cycle, α, of the PWM pulse generator output is all what was
required.
3.5 PWM - Pulse Generator
A Pulse Width Modulator (PWM) generator is a device which is a source of control signal of
pulses with constant amplitude and frequency but variable duty cycle.
The reference signal, called modulating signal, is naturally sampled and compared with a
symmetrical triangle carrier as shown in figure 3.8, graphical representation. A PWM generator
block, used in MATLAB Simulink computer software, has two output signal; pulse-upper
device level (high=1) and pulse-lower device level (high=1). When the reference signal is
greater than the carrier, the pulse for the upper switching device is high (1), and the pulse for
the lower device is low (0).
The triangular carrier wave is used to fix the frequency of the output pulses.
For uniformly generated rectangular output pulses, a constant input signal is used as reference.
The output pulse width (the duty cycle) is varied by varying magnitude of the input signal as
demonstrated in figure 3.8 and figure 3.9 wave forms. Part (a) of figure 3.9 shows the
triangular carrier wave form cross-cut with constant reference signals, one with value more
than zero and another with value less than zero.
Part (b) of figure 3.9 shows two sets of the generator out pulses with same period T; one with
wider TON duration as a result of the input reference signal of value more than zero (signal line
of colour blue). The other pulse has a narrow TON duration which results from an input
reference signal of value less than zero (signal line of colour red). The narrow pulses are also
shown in part (c). Width of the output pulses is proportional to the value of the input signal in
the range of -1 to +1.
An appropriate source of signal to control the duty cycle of the PWM generator was required.
Intelligent Multi-Coloured Lighting System Design with Fuzzy Logic Controller
37
Figure 3.8: PWM Generator (2-level) wave forms – (a) the reference and the triangular
carrier, (b) the upper device output pulses, (c) the lower device output pulses.
Figure 3.9: PWM generator - Illustration of pulse generation; (a) input reference signals, (b)
output pulses (c ) Narrower pulse with PWM generator reference input value less than zero
Period of pulse with
wider width
Period of pulse with
narrower width
(a)
(b)
0
-1
+1
0
+1
Time
Time T
TON TOFF
T
TOFF TON
Triangular carrier wave
form
Constant input signal
value more than zero
Constant input signal
value less than zero
Time 0
+1
(c )
Intelligent Multi-Coloured Lighting System Design with Fuzzy Logic Controller
38
3.6 Signal Source Controller
The signal level which is input to PWM generator, for variable output pulse width, requires
control. The indoor light sensor output signal, was identified as the initiator that affect the
required LEDs output. An appropriate controller was required to be between the indoor light
level sensor and the PWM pulse generator. The controller output signal level was required to be
variable values in the range of -1 to +1, as input to the PWM generator.
There are several types of controllers that would be used.
3.6.1 Conventional Controllers
The conventional controllers like PIDs, PLCs, digital signal controllers, microcontrollers,
digital signal processors were considered. Each of the conventional controllers was found to be
heavily dependent on complex software programming.
A digital signal controller (DSC) is a hybrid of microcontrollers and digital signal processors
(DSPs). Like microcontrollers, DSCs have fast interrupt responses, offer control-oriented
peripherals like PWMs and watchdog timers, and are usually programmed using the C
programming language, although they can be programmed using the device's native assembly
language. DSCs are used in a wide range of applications, but the majority goes into motor
control, power conversion, and sensor processing applications. Currently DSCs are being
marketed as green technologies for their potential to reduce power consumption in electric
motors and power supplies.
3.6.2 Fuzzy Logic controllers
Fuzzy logic controllers are fashionable in areas of artificial intelligence like in sense and
control of intelligent systems. The controllers rely on expertise knowledge and desires of the
system user. Very little programming is required. It is easier to program the controller using
the already packaged software, Fuzzy Logic Toolbox, in MATLAB computer software
environment.
Intelligent Multi-Coloured Lighting System Design with Fuzzy Logic Controller
39
Fuzzy Logic control system was chosen as the most appropriate controller for the lighting
system due to its simplicity, generalization of light level settings, and auto-control ability.
A basic configuration of a two input fuzzy logic controller is illustrated in figure 3.10. The U1
and U2 in the diagram represent the first and the second input signals respectively. The output
signal of the controller is a crisp value that may be used as reference (input) for the PWM pulse
generator.
The fuzzy logic controller comprises of four principal components:
1. Fuzzification Interface:- It converts input into suitable linguistic values using a
membership function.
2. Knowledge base:- Consists of a database with the necessary linguistic definitions and
the control rules.
3. Inference Engine:- It simulates a human decision making process in order to infer the
fuzzy control action from the knowledge of the control rules.
4. Defuzzificztion interface:- Converts an inferred fuzzy controller output into non-fuzzy
(crisp) control action signal.
Knowledge Base
Output
U1
U2
Input Fuzzification
interface
interface
Inference Engine
Decision Making
Logic
Defuzzification
interface
Figure 3.10: Illustration of basic principle of Fuzzy Logic Controller
Output
Intelligent Multi-Coloured Lighting System Design with Fuzzy Logic Controller
40
3.7 Light Colour Production
The primary colors of light are red, blue, and green. The secondary are yellow, cyan, and
magenta. When beams of light are mixed without any absorption, an additive process occurs.
The more we mix the beams, the closer they get to being white light. Figure 3.11 demonstrates
the additive colour mixing.
Figure 3.11: Additive colour mixing demonstration
The average current through each LED determines its output luminance level, which is its ratio
contribution to the total output light colour. By controlling the average current through each
colour LED, any colour could be created. This is illustrated in figure 3.12.
The three coloured LEDs were expected to be physically close and next to each other so that
their output light blends well. The average current to each colour LED is expected to be a
fraction of the highest of the three. To ensure that the average current to any two of the
coloured LEDs is a fraction of the one with highest value, a colour decoder circuit is configured
IRed
IGreen
IBlue
Common
Total
coloured
light mix
output
Figure 3.12: RGB LED scheme circuit diagram – output coloured light production
Intelligent Multi-Coloured Lighting System Design with Fuzzy Logic Controller
41
that first identify the signal value of the highest dominant colour, then divide each colour
portion signal with the highest value. Output of the configured colour decoder circuit is three
signals, which are ratios for each respective primary colour.
The circuit connects the common control signal, from the Fuzzy Logic controller, to three
multiplication parallel circuits, where the product signal controls duty cycle of each respective
colour PWM generator as illustrated in figure 3.13, which shows the basic scheme for
controlling the average current for each coloured LED.
The signal ‘colour product signal’ shown in figure 3.13, is product of the colour signal ratios
and was used as input to window shade position fuzzy logic controller.
The signal ‘summation of colour ratios’ shown in figure 3.13, is sum of the three colour signal
ratios and was used to operate an enabler switch in the LEDs Fuzzy logic Controller output
signal circuit.
Colour Decoder /
sensor
Colour product
signal (Cw)
colour red part
colour green part
colour blue part
Figure 3.13: Basic scheme for colour product and LEDs respective PWM generator
Highest value
selector
Summation of
colour ratios (Cs)
Multiplier of the
colour ratios
Colour ratio
calculator
x
/
x
/
x
/
Signal from Fuzzy Logic Controller
PWM Generator
Multiplier
Multiplier
Multiplier PWM Generator
PWM Generator
To red
LED
To green
LED
To blue
LED
Intelligent Multi-Coloured Lighting System Design with Fuzzy Logic Controller
42
3.8 Modeling and Simulation of the Lighting System in MATLAB Simulink
The lighting system software model was assembled and tested using the Simulink tools
(blocks) in MATLAB software environment. Screenshots showing the various parts of the
model are explained. Algorithms for the fuzzy logic controllers are in form of membership
function plots. The configured equivalent fuzzy membership functions are also shown with
screenshots.
3.8.1 The assembled model
A screenshot of the fully assembled model, using Simulink blocks, is shown in figure 3.14.
The following was assumed for the model:
1. Daylight contribution to the indoor light (room illumination) is directly proportional to
the window shade opening position.
2. Total sum of the three colour LEDs’ output light is the only artificial light in the room
and is directly proportional to the amount of electric lighting contributed for the room
illumination.
3. The signal for controlling opening of the window shades is directly proportional to
position of the shades and the amount of outdoor light contributing to the room
illumination. i.e.
Outdoor light to the room (Lod) = constant (kod) x window shade position control signal
(pr) . This is represented by equation (3-8).
Lod = kodpr (3-8)
4. The sum total of the LEDs output light contributing to the room’s illumination is
directly proportional to the control signal for each respective PWM generator. i.e
LEDs’ light output (LLED) = constant (kLED) x sum of the signals for the PWM
generators (SPWM). This is represented by equation (3-9).
LLED = kLEDSPWM (3-9)
Intelligent Multi-Coloured Lighting System Design with Fuzzy Logic Controller
43
5. Total room illumination level (indoor light intensity) is sum of the outdoor daylight and
the LEDs’ sum total output light. i.e. as represented by equation (3-10).
Room illumination = outdoor light to the room + LEDs’ light output
Room illumination (Ri) = Lod +LLED =kodpr + kLEDSPWM (3-10)
6. Indoor light intensity sensor signal, which is the input signal to the LEDs Fuzzy Logic
Controller, is the room illumination level measured one simulation cycle earlier. i.e
Indoor light intensity signal (Lk)= one simulation cycle delay of room illumination
(z-1Ri). This is represented by equation (3-11), where z-1 is unit delay in sampling.
Lk = z-1Ri = Ri-1 (3-11)
7. The signal for rate of change of the indoor illumination levels is the difference between
value of the room light intensity and the value of a one simulation time cycle delayed
room light intensity signal. i.e. as in equation (3-12).
Rate of change of room illumination (∆Lk) = Room light intensity signal value (Ri-1) –
one simulation time delayed (previous) room light intensity value (Ri-2).
∆Lk = Ri-1 - Ri-2 (3-12)
8. Outdoor light level signal results from an outdoor light intensity sensor output. In the
simulation this outdoor light signal level was manually input. A preset signal generator
was also be used as input to the window shade fuzzy logic controller.
9. The colour decoder/selector/sensor is a specially designed device which can produce
three signals; one for level value of colour red, another for level value of colour green,
and the other level value of colour blue. In the simulation, each colour portion level
value constant was manually input.
10. Both the movement detector and the room occupancy signal values were also manually
input.
Signal levels for each part on the model were monitored by means of connected scope-blocks
(Sc …) as shown in the screenshot of the assembled Simulink blocks in figure 3.14.
Figure 3.14: Screenshot of the assembled lighting system model in MATLAB Simulink
Lk
Lk
ΔLk
44
Intelligent Multi-Coloured Lighting System Design with Fuzzy Logic Controller
45
3.8.2 Window Shade Position Fuzzy Logic Controller - Functional Block
Figure 3.15 is a representation of the functional block for controlling the room’s window shade
opening position. Figure 3.16 is screen shot showing a section of the assembled model with simulink
blocks that are used to simulate the functions of the window shade position fuzzy logic controller.
Outdoor light
(lod)
Colour
product (cp)
Cp/lod L M B
W C O M
NW C C C
Cp Fuzzification
lod Fuzzification Decision making Defuzzification
Output - Position
reference (pr)
Pr Micro-controller Window shade
position
Feedback circuit
Figure 3.15: Window shade opening position fuzzy logic functional block
Intelligent Multi-Coloured Lighting System Design with Fuzzy Logic Controller
46
Figure 3.16: Simulink model screenshot- section for the window shade position fuzzy controller
The two inputs to the window shade opening (position) fuzzy logic controller are:
- Outdoor light intensity level signal
- Colour product signal – if the required LEDs output light colour is white or not white
The fuzzy inference system (FIS) was set in the MATLAB Fuzzy Logic toolbox. Figure 3.17 is a
screenshot of the configured fuzzy logic inference system for the window shade position controller.
Figure 3.17: Screenshot of configured Fuzzy Inference System for window shade position
The selected Fuzzy Logic Inference system is Mamdani, where the output is a crisp single number
based on the centroid moment of the aggregated output membership function.
Figure 3.18 shows the required membership function (algorithm plot) for fuzzification of the input lod,
outdoor light level. The input range is on scale of 0 to 10 for convenience in the test.
Window shade position
Outdoor light
Colour product
Window shade Position
Controller
Mamdani FIS
Intelligent Multi-Coloured Lighting System Design with Fuzzy Logic Controller
47
This membership function was configured in MATLAB Fuzzy Logic toolbox and the system
membership function is shown by screenshot in figure 3.19. The Universe of Discourse, which is the
x-axis, range from 0 signal value to 10 signal value for convenience of the tests.
Figure 3.19: Screen shot of configured input Membership Function for outdoor light level
Figure 3.20 shows the required membership function (algorithm plot) for the input colour product
signal cp. The Universe of Discourse, which is the x-axis, range from 0 signal value to 1 signal value,
convenient for the light colour product range. For convenience the, light colour is considered white if
the colour parts ratio product is between 0.85 and 1. Light colour is considered as either white or not
white. Figure 3.21 is screenshot of the configured membership function.
Low Mid Bright 1
0.5
0 0.0 5 10 2.5 7.5
Outdoor light intensity (lod)
μ
Figure 3.18: Outdoor light level input – Membership function algorithm plot
Low Mid Bright
Outdoor light intensity (lod) 10 0
0
0.5
1
Intelligent Multi-Coloured Lighting System Design with Fuzzy Logic Controller
48
Figure 3.21: Screen shot of configured input Membership Function for Colour product signal
Figure 3.22 shows the controller output membership function algorithm plot for defuzzification of the
output, Pr, for window shade position. The output position reference scale is 0 to 1, with 0 standing
for fully closed and 1 for fully open window shade. Figure 3.23 is screenshot showing output
membership function of the window shade position as was configured in the Fuzzy Logic toolbox.
1
0.5
0 0.0 0.5 1.0
White
1
0.5
0.0 0.0
Closed Mid Open
0.5 1.0
Input colour ratio product number (Cp)
Window shade position reference (pr)
μ
μ
Figure 3.20: White light signal – Membership function algorithm plot
Figure 3.22: Window shade position output – Membership function algorithm plot
Not White
0.9
Not White
Input colour ratio product number (Cp)
White
1 0 0
0.5
1
Intelligent Multi-Coloured Lighting System Design with Fuzzy Logic Controller
49
Figure 3.23: Screenshot of configured output Membership Function for window shade position
The operation of the fuzzy logic controller is based on a set of decision making control rules. The
fuzzy logic rules for the window shade position controller consists of a collection of IF-THEN rules
of the form
Rk: IF x1 is F1k and x2 is F2
k THEN y is Gk (3-13)
For k =1, 2, 3… n.
Where:-
- Rk is the kth rule;
- x1, x2 are members of U, for example, and y is member of V, and are the input and
output of the fuzzy logic system, respectively;
- F1k, F2
k and Gk are labels of fuzzy sets in U1, U2 and V representing the kth antecedent
pairs and consequent pair respectively;
- n is the number of rules.
Table 3.2 shows a matrix of rules (inference engine) for controlling the room’s window shade
position. The input, colour ratio product cp, is the rows’ side label, while input outdoor light level Lod,
is the columns’ top label. There are six rules for this particular fuzzy inference subsystem.
Figure 3.24 is screenshot of the rules used in the fuzzy logic controller, as configured in the Fuzzy
logic toolbox.
Closed Mid Open
Window shade position reference (pr) 0 1
1
0.5
0
Intelligent Multi-Coloured Lighting System Design with Fuzzy Logic Controller
50
Table 3.2: Control rules for input colour ratio product signal (cp) and outdoor light level (lod).
IF Outdoor light (lod ) IS
AND Colour product (cp) IS Low Mid High
White THEN shade is
Closed
THEN shade is
Open
THEN shade is
Mid open
Not White THEN shade is
Closed
THEN shade is
Closed
THEN shade is
Closed
Figure 3.24: Screen shot of configured “IF –THEN” rules for the window shade position controller
3.8.3 LEDs’ output light intensity Fuzzy Logic Controller – Functional block
This module consists of two interdependent inputs; the indoor light intensity level signal (Lk) and rate
of change of the indoor light level (∆Lk), which is extracted from the sensed indoor light level signal.
Figure 3.25 is a representation of the fuzzy logic controller functional block for controlling the RGB
LED output light intensity. The purpose of introducing the rate change of the light level in the room
was to stabilize signal oscillations that would occur when control system tries to increase or decrease
the room illumination levels.
Indoor
Light
Light sensor
Lk
Lk
Lk
Lk
Lk-1
∆Lk
Kp
Controller output
FLED
Figure 3.25: LEDs’ output light intensity fuzzy logic controller – functional block
Fuzzy Logic Controller for the
LEDs output average power
Unit time
delay
+
-
Intelligent Multi-Coloured Lighting System Design with Fuzzy Logic Controller
51
Lk is the indoor light level measured with a photometer at the kth simulation sampling instant. ∆Lk is
the rate of change of the indoor light level at the kth sampling instant. kp is a gain factor which
determines the sensitivity of the controller to the changes in indoor light level/intensity. Z-1 indicates
a unit time delay. Figure 3.26 is a screenshot showing the Simulink blocks that form the LEDs’ fuzzy
logic controller signal connections.
Figure 3.26: Screenshot showing section of assembled model for LEDs’ fuzzy logic controller
The inputs to the LEDs’ fuzzy logic controller are monitored using the indoor light intensity (room
illumination level) feed-back scope, Lk, and rate of change of room light intensity scope, ΔLk. The
output of the fuzzy logic controller was monitored through two scopes: one immediately at the
controller out by the scope block Sc-LEDs FLC output signal, and another after the room occupancy,
movement detector, and the colour select enabler switches, Sc-LEDs FLC output signal 2.
Figure 3.27 is a screenshot of the fuzzy logic inference system for the LEDs output controller
showing the two inputs and one output.
Figure 3.27: Screen shot of the configured fuzzy inference system for the LEDs’ output controller
Lk
ΔLk
Lk
Indoor light
Rate of Change of Indoor light
LEDs output Fuzzy Logic Inference
Mamdani System
LEDs Output signal
Intelligent Multi-Coloured Lighting System Design with Fuzzy Logic Controller
52
Figure 3.28 is the membership function algorithm plot for the room light intensity level where the
universe of discourse ranges from 0 to 10. Figure 3.29 is screenshot of the configured indoor light
intensity membership function.
Figure 3.29: Screenshot of configured input Membership Function for indoor light intensity.
Figure 3.30 is the membership function algorithm plot for the rate of change of the indoor light
intensity. The universe of discourse ranges from -1 to 1. The configured membership function is
shown by screenshot in figure 3.31.
1
0.5
0 0
Very Dim Dim Mid Bright Very Bright
2.5 5 7.5 10
1
0.5
0 -1.0 0 1.0
Positive Negative
0.5 -0.5
μ
Rate of change indoor light intensity (kp ΔLk)
μ
Indoor light intensity (illumination) level
Figure 3.28: Indoor light intensity – input membership function algorithm plot
Figure 3.30: Rate of change of Indoor light intensity – membership function algorithm plot
Indoor room light intensity 10 0
0.5
1 Very Dim Dim Mid Bright Very Bright
0
Zero
Intelligent Multi-Coloured Lighting System Design with Fuzzy Logic Controller
53
Figure 3.31: Screenshot of configured input Membership Function for rate of change of indoor light
Figure 3.32 is the membership function algorithm plot for output of the LEDs’ fuzzy logic controller.
The universe of discourse range was from 0 to 2. This range was set for convenience of allowing
multiplication of the respective colour ratios, the convert the product output to a range of -1 to +1.
The available simulink PWM generator allowed input of -1 to +1 hence the LEDs’ controller output
was subtracted a 1 constant value, after colour ratio multiplication.
Figure 3.33 is the screenshot showing the configured output membership function in the MATLAB-
Fuzzy logic Toolbox.
0 0
0.5
1
Max Low Low Mid High Max High
0.5 1.0 1.5 2
Proportional value of LEDs’ output light level (FLED)
μ
Figure 3.32: LEDs’ output light intensity – output membership function algorithm
(Negative) (Zero) (Positive)
Rate of change indoor light intensity (kp ΔLk)
-1 +1 0
1
0.5
0
Intelligent Multi-Coloured Lighting System Design with Fuzzy Logic Controller
54
Figure 3.33: Screen shot of configured output Membership Function for LEDs’ light level
Table 3.3 shows a matrix of rules for controlling the LEDs average power output using the indoor
light level Lk and its rate of change ∆Lk. The input, light level Lk, is the rows’ side label while input
light level rate of change ∆Lk, is the columns’ top labels. There are 15 rules for this fuzzy inference
subsystem. The fuzzy rule in the table 3.3 consists of a collection of fuzzy IF-THEN rules of the
form:
Rx: IF Lk is FLkx and ∆Lk is F∆Lk
x THEN LEDs’ output light level is Gx. (3-14)
for x =1, 2, 3… n.
Where Rx is the xth fuzzy rule, and n is the number of rules. FLkx is the indoor light level fuzzy set,
and F∆Lk x is the indoor light level rate of change fuzzy set for the xth fuzzy rule. Gx is the expected
LEDs’ output light level for the xth fuzzy rule. Figure 3.34 is screen shot of the configured fuzzy
rules.
Table 3.3: Indoor lighting LEDs average power output control rules (decision making table)
AND Rate of change (∆Lk) IS
IF Room light (Lk ) IS Negative Zero Positive
Very Dim THEN LED output is
Max High
THEN LED output is
Max High
THEN LED output is
High
Dim THEN LED output is
Max High
THEN LED output is
High
THEN LED output is
Mid
Mid THEN LED output is
High
THEN LED output is
Mid
THEN LED output is
Low
Bright THEN LED output is
Mid
THEN LED output is
Low
THEN LED output is
Max Low
Very Bright THEN LED output is
Low
THEN LED output is
Max Low
THEN LED output is
Max Low
(LEDs’ output light level (FLED))
(Max Low) (Low) (Mid) (High) (Max High)
0
2
0
0.5
1
Intelligent Multi-Coloured Lighting System Design with Fuzzy Logic Controller
55
Figure 3.34: Screenshot of the configured “IF-THEN” fuzzy rules for the LEDs’ output controller
3.8.4 Room Occupancy, Movement detector and Colour Decoder Signals – Enabler Switches
The following three signals were configured to allow or stop the LEDs fuzzy controller output signal:
- Room occupancy signal
- Movement detector signal
- Colour signal
Each of the signals was assigned an enabler switch. The enabler switches were connected in series, as
shown by the screenshot in figure 3.35. Each enabler switch would allow passage of the LEDs’ fuzzy
logic controller output signal only when the switch control signal value is 0.6 and above.
Figure 3.35: Screenshot of a section of the assembled model showing enabler switches.
Intelligent Multi-Coloured Lighting System Design with Fuzzy Logic Controller
56
As shown by screenshot in figure 3.36, a fraction (ratio) value for each colour is first calculated and
the ratio value used is to determine if the LEDs’ output light would be white or not; if their product
output is 0.85 to 1, then the LEDs light colour is fully white. The sum of the colour ratios was used
for the colour signal enabler switch. The screen shot in figure 3.37 show that the colour fractions
(ratios) are used individually as a multiplier of the LEDs’ fuzzy controller output signal and
determine the respective LED’s PWM generation output duty cycle and hence the LED luminance
level.
Figure 3.36: Screenshot of a section of assembled model showing colour ratio calculations
The selected SIMULINK PWM generator required an input signal which ranges from -1 to +1. But a
signal with negative value, from the fuzzy logic controller, could not be multiplied with a fraction
number representing the colour intensity. To avoid this, the LEDs fuzzy logic controller output signal
level was set to range from 0 to 2. This signal range would be converted to the required -1 to +1
range by introducing a value of -1 to the final signal.
The controller’s output signal is first multiplied by each colour portion, at their respective connection
points, then a constant value of 1 is subtracted (signal off-set) from product signal of the
multiplication. This process is illustrated in screenshot of the control signal blocks in figure 3.37.
Intelligent Multi-Coloured Lighting System Design with Fuzzy Logic Controller
57
Figure 3.37: Screenshot of section of assembled model showing the respective colour ratio signals
Each signal for the respective PWM generator represents the ratio composition of the corresponding
colour.
3.8.5 LEDs’ Driver – Controller Functional Block
The LEDs’ driver is represented by a signal controlled switch for each respective colour, as shown by
the screenshot section in figure 3.38. The switch in each LED circuit opens and closes in rhythm with
the pulses from the respective colour PWM generator. The resistor in each LED circuit limits the
peak current.
Also shown in the figure 3.38 is the indoor light intensity (room illumination level) feedback circuit.
The room illumination level feedback signal, which stands in for the indoor light sensor, is a sum of
the outdoor light and the LEDs’ output light.
.
Figure 3.38: Screenshot of section of assembled model showing LEDs’ driver and the indoor light intensity level (Lk) feedback line
Lk
58
Intelligent Multi-Coloured Lighting System Design with Fuzzy Logic Controller
59
CHAPTER 4 - RESULTS AND DISCUSSIONS
4.1 Introduction
The purpose of this chapter is to simulate and confirm whether the model and control algorithms
based on the fuzzy logic can be used to meet the objectives and answer the research questions set out
in chapter 1 sections1.3 and 1.4.
Inputs to the model were in form of constant values based on Simulink constant-blocks that are
specific for outdoor light intensity, red colour, green colour, blue colour, movement detector, number
entering room, and number leaving room respectively. A sinusoidal signal generator was also used as
input for the outdoor light sensor.
Throughout the experiment, the simulation duration was set at 0.005 seconds.
Outputs of the model were monitored by means of Simulink scope-blocks. For each specific input
value and simulation time, the corresponding model signal level was monitored for the window shade
position fuzzy logic controller output, the summed up indoor light intensity (indoor light intensity
feedback), the rate of change of the indoor light intensity, the LEDs fuzzy logic controller output, the
light colour ratio product, and the LEDs’ currents.
Effects of various gain factor values for the rate of change of indoor light intensity signal, the
window shade position fuzzy logic controller output signal, and the LEDs control sum-signal were
checked and the optimum performing values fixed for the model investigation tests.
The following investigation tests were carried out:
1. Effect of gain factor values for rate of change of indoor light intensity on stability of the
indoor (room) illumination levels.
2. Effect of gain factor values for the window shade position fuzzy logic controller output on
indoor illumination levels.
3. Effect of outdoor light intensity on indoor illumination levels and the LEDs’ output.
4. Effect of different values of the Red, Green and Blue colour portions on indoor illumination
levels and the respective LED’s current pulse width.
Intelligent Multi-Coloured Lighting System Design with Fuzzy Logic Controller
60
5. Effect of zero value for the colour decoder, the movement detector, and room occupancy
signals on indoor illumination levels and the LEDs’ fuzzy logic controller output signal.
6. Effect of too high and negative values of outdoor light intensity signal on window shade
controller output signal, indoor illumination levels, and the LEDs’ fuzzy logic controller
output signal.
7. Effect of changing the shape of the fuzzy logic controllers’ membership function plots.
8. Effect of shifting the mid membership function of the Fuzzy Logic controllers from the
middle position to the right hand-side of the plot.
Each simulation test outputs were displayed on computer screen. Screenshots were taken and the
display waveforms pasted on table-forms for comparison purposes. For some investigations,
simulation model signal output values were tabulated and the results displayed in form of line graphs.
4.2 Effect of gain factor value for Rate of Change of the Indoor Light Intensity.
The objective of this test was to check how values of rate of change of the indoor light intensity (∆Lk)
affect the oscillations of the indoor light intensity (Lk) and which value has the best system stability.
This refers to figure 3.26, in chapter 3, for the model’s LEDs light output fuzzy logic controller.
Based on the LEDs output fuzzy logic controller input membership functions (figures 3.29 and 3.31),
and control rules (table 3.3), the lighting system was expected to be most stable at gain factor value
of 1.
4.2.1 Results on testing effect of gain factor value for rate of change of the indoor light
intensity on stability of the lighting system simulation model
In this investigation test, constant values of the outdoor light signal, equal values for the colour
portions, and enabling signals for the room movement detector and the room occupancy are
maintained. The simulation model input data had constant values as shown in table 4.1. Graph set 4.1
compares the screenshot waveforms and their settlement values for indoor illumination level
feedback signal, rate of change of indoor illumination levels, and output of the LED light intensity
fuzzy logic controller at various values of gain factor for the rate of change of indoor illumination
levels.
Intelligent Multi-Coloured Lighting System Design with Fuzzy Logic Controller
61
Table 4.1: Constant values – Effect of Gain factor (kp) for Rate of change of indoor light levels
Outdoor
light level
Red
colour
part
value
Green
colour
part
value
Blue
colour
part
value
Movement
detector
value
Number
entering
room
Number
leaving
room
Window
shade
position
gain
LED
light
control
sum
gain
5 1 1 1 1 2 1 10 1
The results were obtained from the time based graphical representation of the simulation on three
scopes of the MATLAB Simulink simulation model. The results are presented by screenshots and
displayed in table format for comparison purposes as shown in graphs 4.1.
At gain factor values of 10, 0.5, and 0.3 the lighting system does not settle. But at gain value of 1,
0.292, 0.2, 0.05 and 0 the lighting system settles down; about 9 for the indoor illumination level
value, about 0.3 for the LEDs’ fuzzy logic controller output signal and 0.0 (zero) for the rate of
change of indoor light intensity. However, the system settles fastest at gain value of 0.2.
The waveforms in graph sets 4.1 show that the gain factor value on output of the rate of change of the
indoor light intensity affects the stability of the lighting control system.
Intelligent Multi-Coloured Lighting System Design with Fuzzy Logic Controller
62
Graph set 4.1: Set of screenshots of respective scopes - Effect of Gain factor (kp) for Rate of change of indoor light level – Comparing
graphical shapes and values
Rate of change of indoor
light level gain at 10
Rate of change of indoor
light level gain at 1
Rate of change of indoor
light level gain at 0.5
Rate of change of indoor
light level gain at 0.3
Indoor light
level
feedback
signal
Rate of
change of
indoor illumination
levels
Output of
the LED
light
intensity
fuzzy logic
controller
0 0
1.0mSec 1.0mSec 1.0mSec 1.0mSec
10
0
0 0 0
-2.0
0
7
0.4
1.8
0
0
10
-1.0
0
2.5
0.4
1.8
10
0
0
1.0
1.8
-4.0
14
-0.4
0
1.4
0
10
0.2
1.0
1.8
62
.
Intelligent Multi-Coloured Lighting System Design with Fuzzy Logic Controller
63
Rate of change of indoor light
level gain at 0.292
Rate of change of indoor
light level gain at 0.2
Rate of change of indoor
light level gain at 0.05
Rate of change of indoor
light level gain at 0
Indoor light
level
feedback
signal
Rate of
change of
indoor illumination
levels
Output of
the LED
light
intensity
fuzzy logic
controller
10 10 10 10
0 0 0 1.0 mSec 1.0 mSec 1.0 mSec
0 0
-1.0
0 0 0 0
2.5
-1.0
0.2
1.8
1.0
1.0 mSec
1.0 mSec
1.4 mSec
0
0
0
0.3
0.7
-1.0
3.5
-0.2
0.7
0.2
1.8
0
0.8
0.2
1.8
63
.
1.0 mSec
Intelligent Multi-Coloured Lighting System Design with Fuzzy Logic Controller
64
4.2.2 Discussion on effect of gain factor value for rate of change of indoor light intensity on
stability of the lighting system
The investigation test results show that the system stability does not depend on magnitude of the rate
of change signal but on some critical values of the rate of change. The system is seen to be stable
even without input from the rate of change of the indoor illumination levels.
The system was expected to be most stable at gain value of 1, which the simulation results show not
be so another value, 0.2, which is almost zero.
The simulation results show that the lighting system is even more stable without the rate of change of
the indoor light intensity.
4.3 Effect of Window Shade Position Fuzzy Logic Controller Output Gain factor
The objective of this test was to check how the values for the model’s window shade position
controller output signal gain factor affect the overall indoor light intensity (Lk) and which gain factor
value is most suitable and realistic for the model. This refers to figure 3.38, section of the assembled
model showing LEDs’ driver and the indoor light intensity level (Lk) feedback line.
Based on the window shade position fuzzy logic controller input membership functions (figures 3.19
and 3.21), the output membership function (figure 3.23), and control rules (table 3.1), the model
window shade opening was expected to range from 0 to 10 at a gain factor value of 10. Gain factor
values above 10 would make the indoor illumination level (Lk) for input to the LED’s fuzzy
controller to be outside the range, as per the membership function in figure 3.29. Gain values of more
than 10 were expected to make the LEDs controller output signal insensitive to the input.
It was also expected that at window shade gain factor value of zero, the indoor illumination level (Lk)
would be composed of the LEDs signal only, and the Lk signal value would be 6 (which is 3 times the
set maximum LEDs fuzzy logic controller output signal value of 2 as per the model section shown in
figure 3.37 the LEDs light sum).
Intelligent Multi-Coloured Lighting System Design with Fuzzy Logic Controller
65
4.3.1 Results on testing effect of the window shade fuzzy logic controller output gain factor on
indoor illumination level feedback signal and the LEDs’ output
In this investigation test, constant values of the outdoor light signal, equal values for the colour
portions, and enabling signals for the room movement detector and the room occupancy were
maintained. The simulation model input data had zero value for the rate of change of the indoor light
intensity as shown in table 4.2. Graph set 4.2 compares the shapes and values of measured indoor
illumination level feedback signal, and output of the LEDs fuzzy logic controller for various values
of gain factor on the output of the window shade position fuzzy logic controller.
Table 4.2: Constant values – Effect of gain factor (kw) for window shade position controller output.
Outdoor
light
level
value
Red
colour
part
value
Green
colour
part
value
Blue
colour
part
value
Movement
detector
value
Number
entering
room
Number
leaving
room
Rate of
change of
indoor
light
intensity
gain value
LED
light
control
sum gain
value
5 1 1 1 1 2 1 0 1
The results were obtained from the time based graphical representation of the simulation on three
scopes of the MATLAB Simulink simulation model. The results are presented by screenshots
displayed in table format for column-wise comparison purposes. The results are also shown in line
graph 4.3, where the y-axis represents values of the indoor light intensity, the LEDs fuzzy logic
controller output, and the window shade position fuzzy logic controller output gain factor. The x-axis
of the line graph represents the gain factor value for the window shade position fuzzy logic controller
output.
Intelligent Multi-Coloured Lighting System Design with Fuzzy Logic Controller
66
Graph set 4.2: Set of screen shots of respective scopes – Effects of gain factor (kw) for window shade controller output.
Window Shade Position Fuzzy
logic controller output gain
factor of 0
Window Shade Position
Fuzzy logic controller
output gain factor of 3.76
Window Shade Position
Fuzzy logic controller
output gain factor of 5
Window Shade Position
Fuzzy logic controller
output gain factor of 7.5
Indoor light
level
feedback
signal
Output of
the LED
light
intensity
fuzzy logic
controller
0 0 0 0
1.0mSec 1.0mSec 1.0mSec 1.0mSec
0.8 0.4 0.0 0.0
0.0 0.0 0.0 0.0
1.2
1.8
4
2
6
6
8
2
4
0.8
1.8
9
6
0.6
1.8
1.0
1.0
1.0
1.0
1.8
2
8
12
4
0.4
66
.
Intelligent Multi-Coloured Lighting System Design with Fuzzy Logic Controller
67
Window Shade Position Fuzzy
logic controller output gain at
10
Window Shade Position
Fuzzy logic controller
output gain at 10.5
Window Shade Position
Fuzzy logic controller
output gain at 11
Window Shade Position
Fuzzy logic controller
output gain at 20
Indoor light
level
feedback
signal
Output of
the LED
light
intensity
fuzzy logic
controller
0 0 1.0 mSec 1.0 mSec 1.0 mSec 0 0 0 1.0 mSec
0.2
1.8
1
0
10
14
4
1.0
1.8
1.5
0
4
10
14
0
5
10
15
0.2
1
1.8
1.0
1.5
1.8
5
0
10
20
67
.
Intelligent Multi-Coloured Lighting System Design with Fuzzy Logic Controller
68
Graph 4.3 is line graph showing the relationship between the window shade position fuzzy logic
controller output gain factor value and the indoor light intensity values, and the LEDs fuzzy logic
controller output values.
Graph 4.3: Line graph – effect of the window shade controller output gain factor.
From graph set 4.2, the shapes of the plots for each monitoring point are similar for each window
shade controller output gain factor. It was also noted that the indoor illumination level values increase
with increase of the window shade controller output gain factor. At gain factor value of 0, the indoor
illumination level value first shoots up to a value of about 5.5 then settles down to 3.7, the lowest
stable value, while the LEDs fuzzy logic controller output shoots up to about 1.8 then settles to a
value of about 1.26, which is the highest stable value. At window shade gain factor value of 10, the
indoor illumination level value is about 9.5, with some noticeable oscillations, while the LEDs fuzzy
logic controller output was oscillating at about 0.25. At window shade gain factor value of 10.5, the
indoor illumination level value is about 10, while the LEDs fuzzy logic controller output value was
about 0.16, the lowest attained value. At window shade gain factor value of 11.5, the indoor
illumination level value is about 13, while the LEDs fuzzy logic controller output value was 1, a
value which was not changing even with other higher values of the window shade gain factors.
The line graph in graph 4.3, also shows that the indoor illumination level values increases with
increase of the window shade gain factor, but the LEDs’ controller output value decreases to lowest
Intelligent Multi-Coloured Lighting System Design with Fuzzy Logic Controller
69
level of about 0.16, then rises to value of 1 for all indoor light intensity values beyond 10.5 and
window shade gain factor values above 11.49.
4.3.2 Discussion on effect of the room’s window shade position fuzzy logic controller output
gain factor
All the objectives for this investigation test were fully met. The most appropriate window shade
position fuzzy logic controller output gain factor value was confirmed to be 10. The window shade
fuzzy logic controller, which is of approximation type, output range from 0.1 to 0.9 instead of 0 to 10
for exact conventional controllers. For the closed window shade, the contribution to the indoor light
intensity (Lk) was about 1 instead of zero value. And the maximum outdoor light contribution for the
Lk was about 9 instead of the exact value of 10 for the fully open window shade position.
At window shade gain factor value of 0, window’s outdoor light contribution to Lk was also 0. The
LEDs’ contribution to Lk, which was expected to have maximum value of 6, was noted to be lower at
about 5.5 at the first oscillation peak value. As per the LEDs fuzzy logic control rules in table 3.3, an
input value of 5.5 would be in the membership function set of “mid”, and the expected controller’s
output signal value would be in set of “high” whose output signal value is about 1.5. This LEDs
fuzzy logic controller output (1.5x3 representing the Lk) would be computed to the settled Lk value of
3.7 and LEDs Fuzzy logic controller output value of 1.3. This means the required room illumination
level is achieved when LEDs fuzzy logic controller output signal is at the membership function set of
“mid” level.
This investigation tests confirmed that window shade gain factor values above 10 affects sensitivity
of the LEDs’ fuzzy logic controller. For all indoor (room) light intensity (Lk) with values above 10.5,
the LEDs fuzzy logic controller output signal would be faulty and cannot be relied on because it
remains invariable at value level of 1.
4.4 Effect of Outdoor Light Intensity Levels
The objective of this test was to check how various values of the outdoor light intensity affect the
model’s window shade position fuzzy logic controller output signal, the overall room illumination
levels (indoor light intensity Lk), and the LEDs fuzzy logic controller output signals. This was in
Intelligent Multi-Coloured Lighting System Design with Fuzzy Logic Controller
70
reference to the system model design shown in figure 3.14 and the respective fuzzy logic controller
membership functions in chapter 3.
In this test, the outputs of the window shade position fuzzy logic controller were expected to follow
the “if-then” control rules in table 3.1. The outdoor light intensity values were varied from 0 to 10.
The window shade position fuzzy controller output values were expected to range from 0 to 0.3 for
closed window shade position, from 0.8 to 1 for fully open window shade position, and from 0.4 to
0.7 for mid open window shade position.
4.4.1 Results of testing effect of outdoor light intensity level on indoor illumination levels and
the LEDs’ output.
The test was carried out at constant value of the window shade fuzzy logic controller output gain
factor, zero value for rate of change of the indoor light intensity, equal level values of the colour
portions, enabled room movement detector, and enabled room occupancy. The simulation model data
points were of values as shown in table 4.3. Graph set 4.4 compares the shapes and values of
measured indoor illumination level feedback signal, and output of the LED light intensity fuzzy logic
controller for various values of the outdoor light intensity signal. The test results are also shown in
line graph 4.5, where the values of the outdoor light intensity are compared with the resulting values
of the window shade position fuzzy logic controller output, the indoor illumination levels, and the
LEDs’ fuzzy logic controller output.
A signal generator with sinusoidal output was also used as the outdoor light intensity signal. The
outdoor light intensity signal wave form and the resulting wave forms of the window shade controller
output, the indoor illumination level, and the LEDs’ controller output signals are tabulated in graph
set 4.6.
The results were obtained from the time based graphical representation of the simulation on three
scopes of the MATLAB Simulink simulation model. The results are in wave forms of the various
signals at specific monitoring points using the model scopes. The results are presented in form of
scopes’ screenshots and same displayed in table format for column-wise comparison purposes. The
results are further displayed in line graph 4.5, where the y-axis represents values of the indoor light
intensity, the LEDs fuzzy logic controller output, and the window shade position fuzzy logic
Intelligent Multi-Coloured Lighting System Design with Fuzzy Logic Controller
71
controller output gain factor. The x-axis of the line graph represents the values of the outdoor light
intensity. Graph set 4.6 displays wave forms of output signal where a 100Hz sinusoidal varying
signal, with amplitude of 10, was used for the outdoor light intensity level values.
Table 4.3: Constant values on effects of Outdoor Light intensity levels
Rate of
change of
the indoor
light level
gain factor
Red
colour
part
value
Green
colour
part
value
Blue
colour
part
value
Movement
detector
value
Number
entering
room
Number
leaving
room
Window
shade
position
gain factor
LED
light
control
sum
gain
factor
0 1 1 1 1 2 1 10 1
Graph set 4.4 and graph set 4.6, together with the line graph 4.5, show that the indoor illumination
level values increase with increase of the outdoor light intensity but following the window shade
opening position fuzzy logic controller rules. At very low outdoor light intensity levels, less than
value 2, the window shade opening signal is also low, at about 0.18. At middle levels of the outdoor
light intensity, about 4 to 6 values, the window shade opening signal is at maximum, about 0.9. At
high levels of the outdoor light intensity, about 8 to 10 values, the window shade opening signal is at
middle position, about 0.7.
Intelligent Multi-Coloured Lighting System Design with Fuzzy Logic Controller
72
Graph set 4.4: Screenshots – Effects of Outdoor Light intensity values- Comparing graphical shapes and values
Outdoor Light signal level of 0 Outdoor Light signal level
of 1
Outdoor Light signal level
of 2.5
Outdoor Light signal level
of 5
Indoor light
level
feedback
signal
Output of
the LED
light
intensity
fuzzy logic
controller
Red LED
current
pulses
0 0 0 0
0.6 0.6 0.2 0.2
1.0mSec 1.0mSec 1.0mSec 1.0mSec
0.7 0.7 0.7 0.7
1.0 1.0 1.0 1.0
1.8 1.8
4
0 0
6
1.0
1.8
4
6
1.0
1.8
0
6
9
0.8
1.0
0
10
5
1.0
72
.
Intelligent Multi-Coloured Lighting System Design with Fuzzy Logic Controller
73
Graph set 4.4 – Cont…
Outdoor Light signal level of
7.5
Outdoor Light signal level
of 10
Outdoor Light signal level
of 11
Outdoor Light signal level
of 20
Indoor light
level
feedback
signal
Output of
the LED
light
intensity
fuzzy logic
controller
Red LED
current
pulses
0 0 0 0
0 0 0 0 1.0mSec 1.0mSec 1.0mSec 1.0mSec
1.0
0.7
0.8
10 10 10 10
6
0.0
1.8
1.0
0.6
6 6 6
0.0
1.0
1.8
0.6
0.0
1.0
1.8
0.6
0.0
0.6
1.8
1.0
73
.
Intelligent Multi-Coloured Lighting System Design with Fuzzy Logic Controller
74
Graph 4.5: Line graph – effect of the outdoor light intensity level signal on other output signals.
Graph set 4.6: Set of screenshots – Effects of sinusoidal signal for Outdoor Light intensity values-
Wave forms
Signal Wave form of signal outputs
Input signal
as outdoor
light level
Sin signal,
100Hz,
amplitude
of 10.
10
5
0 0 2.5mSec 5
Intelligent Multi-Coloured Lighting System Design with Fuzzy Logic Controller
75
Window
shade
opening
fuzzy logic
controller
output
signal
Indoor
lighting
level
feedback
signal
LED
average
power
fuzzy logic
controller
output.
5 2.5 mSec. 0 0
2
1
0
10
6
0.1
0.9
0.5
2.5 mSec.
2.5 mSec.
Intelligent Multi-Coloured Lighting System Design with Fuzzy Logic Controller
76
4.4.2 Discussion on effect of outdoor light intensity level on indoor illumination levels and the
LEDs’ output.
The objective of checking how various values of the outdoor light intensity affect the model’s
functions was successful. The window shade position fuzzy logic controller output signal behaved as
expected. Graph 4.6 show that window controller output signal smoothly rise from low values to high
values, then lowers to mid values. It was also noted that there are three flat sections on widow shade
controller output graphs; the window shade closed position with output value of about 0.18, the fully
open position with output value of about 0.9, and the mid open position with output value of about
0.7. This confirmed that the window shade position fuzzy logic controller was operating in response
to the “if-then” control rules set out in table 3.1 in chapter 3.
The LEDs fuzzy logic controller output signal was also noted to follow the indoor illumination levels
but in a contrasting manner; as the indoor light intensity increases, the LEDs controller output signal
decreases. The indoor light intensity signal was noted to oscillate at particular outdoor light signal
levels. This indoor lighting oscillation behavior was as expected; the LEDs fuzzy logic controller
trying to meet the room’s light level requirements in the closed loop control signal circuit.
The test also confirmed that the LEDs’ current pulse width was increasing with the LEDs fuzzy logic
controller output signal level and vice-versa. The line graph 4.5 confirms that when the outdoor light
contribution is zero, the LEDs fuzzy logic controller output signal is at highest level and hence LEDs
output luminance level. When the window shade opening signal level is highest, the corresponding
LEDs fuzzy logic controller output signal level is, in contrast, the lowest. This is as was expected
and confirms that the design model was functional and effective in saving electric energy for lighting
a typical room when the outdoor daylight is available.
The fuzzy logic controllers do not provide the expected absolute lowest set signal values, i.e. 0, or the
highest set values, 1 for the window shade controller and 2 for the LEDs controller. This problem was
noted as weakness with fuzzy logic controllers, due to their approximation (defuzzificztion)
approach.
Intelligent Multi-Coloured Lighting System Design with Fuzzy Logic Controller
77
4.5 Effect of Different Level Values of the Red, Green and Blue Colour Portions
The objective of this test was to confirm the model’s ability to calculate ratio values of the primary
colour (red, green, and blue) levels, reproduce a signal that represents the whiteness of the selected
light (colour product) which is used as an input to the window shade position fuzzy logic controller.
It was expected that for white light signal value, the product of the colour ratios, would be about 1.
Coloured light signal values were expected to have colour ratio product of less than 0.8.
The other objective of this test was to confirm if the system model could use the primary colour ratios
to determine the respective RGB LEDs current pulse width. It was expected that for smallest colour
ratio, the respective colour LED current pulse width would also be the narrowest. The highest colour
ratio value was expected to be 1 and the respective colour LED current pulse width would be widest
and directly proportional to the controlling signal value from the LEDs fuzzy logic controller.
The colour ratio product was also expected to close the window shade if its signal value is less than
0.8. Contribution of the LEDs light to the room illumination levels was expected to be proportional to
the colour ratio product.
4.5.1 Results of testing effect of different level values of colour portions on indoor illumination
levels and the width of the LEDs’ current pulses.
The test was carried out using varying values of the three colour portions but at constant value of the
outdoor light intensity of 5, constant value of the window shade fuzzy logic controller output gain
factor of 10, constant zero value for rate of change of the indoor light intensity, enabled room
movement detector, and enabled room occupancy. The simulation model data values were as shown
in table 4.4. Graph set 4.7 compares the wave forms of indoor illumination level signal, and output of
the LED light intensity fuzzy logic controller, and the current pulse widths of each of the three red,
green and blue LEDs for various values of the input red/green/blue colour portions. Graph 4.8 is a
line graph showing the relationship of the various values of the red/green/blue colour portions with
their ratio product, “colour product”. Graph 4.9 is a line graph showing the relationship of the
red/green/blue portion value, colour ratio product signal and the window shade controller output and
the LEDs’ controller output signals. Graph 4.10 is also a line graph showing the relationship of the
various values of the red/green/blue colour portions and their respective signals for each colour
Intelligent Multi-Coloured Lighting System Design with Fuzzy Logic Controller
78
LED’s PWM generator. The results were obtained from the time based graphical representation of the
simulation on various signal level monitoring points in the simulation model. The results are in wave
forms of the various signals at specific monitoring points using the model scopes. The results are
presented in form of scopes’ screenshots. The wave forms are displayed in table format for column-
wise comparison purposes. The respective values extracted from the appropriate scopes were
tabulated and displayed in line graphs where the y-axis represents values and the x-axis represents the
colour product signal values.
Table 4.4: Constant values- Effect different signal levels of colour red, green, blue portions.
Outdoor
light
level
value
Red
colour
part
value
Green
colour
part
value
Blue
colour
part
value
Rate of
change
of
indoor
light
intensity
gain
factor
Movement
detector
value
Number
entering
room
Number
leaving
room
Window
shade
position
gain
factor
value
LED
light
control
sum
gain
factor
value
5 - - - 0 1 2 1 10 1
Intelligent Multi-Coloured Lighting System Design with Fuzzy Logic Controller
79
Graph set 4.7: Set of screen shots of respective scopes- Effect of different values of the red, green and blue colour portion signal levels.
Colour levels
Red=0:Green=1:Blue=1
Colour levels
Red=0.5:Green=0.5:Blue=0.5
Colour levels
Red=0.9:Green=0.8:Blue=0.4
Colour levels
Red=1:Green=0.5:Blue=0.25
Indoor light
level
feedback
signal
Output of
the LED
light
intensity
fuzzy logic
controller
Red LED current
pulses
Green
LED current
pulses
Blue LED current
pulses
0 0 0 0 1.0mSec 1.0mSec 1.0mSec 1.0mSec
0.8
1.0
0.7
0.7
0.8
1.0
0.7
0.8
1.0
0
0 0 0
3.5
4.5
1.0
1.3
1.8
10
5
0.2
1.0
1.8
4
0.0
1.2
1.8
3.5
1
1.1
1.4
1.8
79
.
Intelligent Multi-Coloured Lighting System Design with Fuzzy Logic Controller
80
Colour levels
Red=3:Green=1.5:Blue=0.75
Colour levels
Red=0.5:Green=0.25:Blue=0.125
Colour levels
Red=1:Green=0.5:Blue=0
Colour levels
Red=0.05:Green=0.025:Blue=0.015
Indoor light
level
feedback
signal
Output of
the LED
light
intensity
fuzzy logic
controller
Red LED current
pulses
Green
LED current
pulses
Blue LED current
pulses
0 0 0 0 1.0mSec 1.0mSec 1.0mSec 1.0mSec
0 0 0 0
0.7
0.7
0.7
1.0
1.0
1.0
0.8
0.8
0.8
3.0
4.0
1.1
1.8 1.8 1.9 1.8
1.3
1.1
1.3
3.0
4.0
3.0
1.2
1.4
3.5
1.1
1.3
80
.
Intelligent Multi-Coloured Lighting System Design with Fuzzy Logic Controller
81
Graph 4.8: Line graph – Effect of Red, Green, and Blue values on colour product signal
Graph 4.9: Line graph – Effect of white light signal on window shade controller output
Intelligent Multi-Coloured Lighting System Design with Fuzzy Logic Controller
82
Graph 4.10: Line graph –Effect of Red, Green, and Blue colour portions on respective PWM
generator input signal level
‘Colour product’ is a term used to represent the product (multiplication) of the three colour portion
calculated ratios. Colour product signal level value is a measure of the whiteness of the LEDs output
light. For colour product signal level value of 0.80 to 1, the LEDs’output light is considered white
and the window shade may open depending on the outdoor light intensity.
Graph set 4.7 of screenshots show that even though the outdoor light intensity is constant at signal
level value of 5, the window shade opening position is determined by the colour product signal level
value. For colour product signal value of about 0, the indoor illuminance is low, about 3.5, and the
LEDs fuzzy logic controller output signal value is highest at about 1.35. The LEDs’ respective
current pulse width is most narrow for the corresponding colour portion with almost zero value but
widest for the colour portion with largest value. This demonstrates that each colour LED’s average
power output is proportional to fraction of its respective colour portion level value.
Graph 4.8 is a line graph, which show that when the three red/green/blue colour portion level values
are far apart their fraction product tends to 0, but when the values are close their fraction product
Intelligent Multi-Coloured Lighting System Design with Fuzzy Logic Controller
83
tends to value of 1. Line graph 4.9 show that when the colour product values are low, from 0 to 0.6,
the window shade is closed. But colour product signal values are from 0.8 to 1, the window shade is
open. This demonstrates that the lighting system model window shade opens only when the decoded
colour signal is confirmed to be from a white light.
Graph 4.10 shows the relationship of the three colour portions and their corresponding colour signals
for controlling the respective LEDs’ PWM pulse generators. This graph shows that the respective
LEDs’ PWM pulse generator input signal is fraction of the LEDs fuzzy logic controller signal, which
is less by a constant value of 1 but of a pattern similar to that of the colour decoder signal level
values. Negative PWM generator input values, represent narrower LED’s current pulse widths.
4.5.2 Discussion on effect of different level values of colour portions on indoor illumination
levels and the width of the LEDs’ current pulses.
The test confirmed that the model is able to calculate ratio values of the primary colours (red, green,
and blue), and the colour ratio product signal used as an input to the window shade position fuzzy
logic controller. The model could recognize required LEDs’ output white light and open the window
shade for the daylight to enter in the room. White light signal was confirmed to have colour ratio
product value of more than 0.8.
The test also confirmed that model design could use the primary colour ratios to determine the
respective RGB LEDs current pulse width, and hence the LEDs’ output light colour. The smaller the
colour ratio, the narrower the respective colour LED current pulse width would be. The smaller the
LEDs current pulse width, the less the intensity of light (luminance) from the respective LED. Hence
the colour ratio signal value for each respective primary colours determine the overall colour of the
combined light from the three RGB LEDs.
The system design model demonstrated that it can effectively control colour of light produced by the
RGB LEDs in a typical room, and at the same time allow daylight to be used in the room if only
white light is required, saving electric lighting energy. The lighting system design simulation, also
demonstrated that it is sensitive to the room user’s needs for coloured light by closing the window
shades, even during day time, and prevent interference of the room’s required lighting colour from
the more bright outdoor white daylight.
Intelligent Multi-Coloured Lighting System Design with Fuzzy Logic Controller
84
4.6 Cause and effect of absence of Colour Decoder, Movement Detector, and
Room Occupancy Signals.
The objective of this test was to check and confirm if the system model could actually switch off the
LEDs by means of a signal level value from either the colour decoder (selector), or the movement
(motion) detector, or the room occupancy counter. This test was based on signal enabler switches put
in series with the output signal circuit from the LEDs fuzzy logic controller as shown in figure 3.35, a
section of the lighting system model in chapter 3. This test was also to confirm that absence of the
respective sensor output signal is caused by lack of activation on the sensor input for the colour
decoder, and the movement detector. The room occupancy counter output signal is determined by
arithmetic difference of the entry and exit counter readings.
It was expected that if a signal level value from either of the three sensors; colour decoder, movement
detector, and the room occupancy, is less than 0.5 (a set value for activating each enabler switch),
then the LEDs fuzzy logic controller output signal could automatically be blocked and the affected
enabler-switch output signal value turned to zero and hence switch off the LEDs.
4.6.1 Results of testing cause and effect of absence of the colour decoder, movement detector,
and room occupancy signals.
The test was carried out using the following parameters maintained constant: outdoor light intensity
of 5, window shade fuzzy logic controller output gain factor of 10, rate of change of the indoor light
intensity at 0. The simulation test was done for the colour decoder, the movement detector, and the
room occupancy. For the colour decoder, the three primary colour portion inputs were each given
zero value, the movement detector input given 1, and the room occupancy counter inputs given 2 and
1 for entrance and exit respectively. The colour signal enabler switch output was expected to have
zero value and the LEDs’ output current pulse width to be very narrow. Same test was repeated for
movement detection and the room occupancy respectively. Graph set 4.11 compares the wave forms
of indoor illumination level signal, and output of the LED light intensity fuzzy logic controller, and
the current pulses for the red LED (as a representative of the three LEDs). The screenshot waveforms
for the red LED’s current pulses are compared for the three tests.
Intelligent Multi-Coloured Lighting System Design with Fuzzy Logic Controller
85
Graph set 4.11: Set of screenshots of the respective scopes – Effect of zero values of colour portions (cs) (colour white signal), movement
detector signal (Md), and room occupancy signal (Ro).
Red=0:Green=0:Blue=0
Room occupancy =1
Movement detection signal=1
(Testing effect of no colour signal)
Red=1:Green=1:Blue=1
Room occupancy =1
Movement detection signal=0
(Testing effect of no movement
detection signal)
Red=1:Green=1:Blue=1
Room occupancy =0
Movement detection signal=1
(Testing effect of no room occupancy
signal)
Indoor light
level
feedback
signal
Output of
the LED
light
intensity
fuzzy logic
controller Output -2
of the LED
light
intensity
fuzzy logic
controller Red/Green/
Blue LED
current
pulses
0.4
0.0
1.0mSec 1.0mSec 1.0mSec
0
-1.0
+1.0
1.0
1.9
0 0
0
1.0
0
9.0
0.4 0.4
2.0 2.0
9.0
0 0
0 0
85
.
+1.0 +1.0
-1.0 -1.0
1.0 1.0
0.7 0.7
Intelligent Multi-Coloured Lighting System Design with Fuzzy Logic Controller
86
The waveforms displayed in graph set 4.11 show that the signal output (output 2) of the LEDs’ output
fuzzy logic controller, after the enabler switches, is zero for the three tests.
It was noted that when the three colour portion values are zero, then the lighting system model does
not give any signal at the white light signal input to the window shade position controller as well as to
the LEDs controller. The room feedback signal disappears, and the LED’s current pulses do not
occur. However, when the movement detector or the room occupancy signals is zero, the system
functions well with zero value for each colour signal to the PWM pulse generator and the LED’s
current pulses occur though with very thin width.
4.6.2 Discussion on effect of zero values of the colour decoder signal, movement detector
signal, and room occupancy signal.
The expectations of this test were partially met. The system model could actually switch off the LEDs
by means of a signal value level from the colour decoder, or from the movement detector, or from the
room occupancy counter. However, the colour decoder signal was noted to disturb the system’s
signal flows. This could be associated with the system design defect. The enabler switch for the
colour decoder signal may not have been necessary. The LEDs control signal distribution through the
colour ratio multiplier shown in figure 3.37 in chapter 3, also produces zero signal value when the
respective colour ratio signal value is zero and this could cause mathematical simulation problem.
It was also noted that the respective LED’s current pulse width could not be exactly zero as expected
for -1 input to the PWM generator. This problem could be associated with the fact that the PWM
pulse generators (PWM red, PWM green and PWM blue) shown in figure 3.38 of chapter 3 are not
ideal; cannot give zero width pulses.
4.7 Effect of Too High, Moderate, Low and Negative Values of Outdoor Light
The objective of this test was to check and confirm if signal from the outdoor light intensity sensor
with values outside the set range of the window shade fuzzy logic controller membership function
configuration does really affect the system’s controllability.
Intelligent Multi-Coloured Lighting System Design with Fuzzy Logic Controller
87
The output signal from the window shade position fuzzy logic controller was expected to be of a
constant value, same as one before outdoor light signal level had changed, without changing with
change of the outdoor light signal value that lies outside the preset controller membership function
range shown in figures 3.18 and 3.19 in chapter 3.
4.7.1 Results of testing effect of too high, moderate, very low, and negative values of outdoor
light intensity on window shade controller output signal, indoor illumination levels, and
the LEDs’ controller output.
The test was carried out using a 200Hz sinusoidal signal generator as the outdoor light intensity
signal source. The other system parameters were maintained constant with the values for each
red/green/blue input colour portion levels at 1, value of the window shade fuzzy logic controller
output gain factor of 10, zero value for rate of change of the indoor light intensity, enabled room
movement detector, and enabled room occupancy. The 200Hz sinusoidal signal was used for various
amplitudes. The test result graph set 4.12, graph set 4.13, and graph set 4.14 were used for comparing
the waveforms of the outdoor light intensity signal, the window shade position controller output
signal, indoor illumination level signal, and the LEDs’ light intensity fuzzy logic controller output
signal.
The results were obtained from the time based graphical representation of the simulation on various
specific scopes of the MATLAB Simulink simulation model. The results are in waveforms of the
various signals at specific monitoring points using the model scopes. The results are presented in
form of the scopes’ screenshots. The waveforms are displayed in table for column-wise comparison
purposes. Graph set 4.12 compares effect of outdoor light intensity of sinusoidal signal amplitude of
10 with that of 20. Graph set 4.13 compares signal amplitude of 10 with that of 7, while graph set
4.14 compares outdoor light signal amplitude of 10 with that of 3.
Intelligent Multi-Coloured Lighting System Design with Fuzzy Logic Controller
88
Graph set 4.12: Set of screen shots- Effect of too high outdoor light intensity signal – Positive and negative input signals
Outdoor Light intensity sinusoidal signal with
frequency of 200Hz and amplitude of 10
Outdoor Light intensity sinusoidal signal with
frequency of 200Hz and amplitude of 20
Outdoor light
- Input signal.
Amplitude
=10 and 20
for
comparison
Window
shade
position fuzzy
logic
controller
output
Indoor (room)
light level
Indoor LED
light level
fuzzy logic
controller
output
0 0 2.5mSec 2.5mSec
5 5
0.0
1.0
1.8
0.0
1.0
1.8
0 0
10
6
10
6
0 0
0.9 0.9
0.5 0.5
0 0
10 20
-10 -20
88
.
Intelligent Multi-Coloured Lighting System Design with Fuzzy Logic Controller
89
Graph set 4.13: Set of screen shots – Effect of moderate outdoor light intensity signal values – Positive and negative signals
Outdoor Light intensity sinusoidal signal with
frequency of 200Hz and amplitude of 10
Outdoor Light intensity sinusoidal signal with
frequency of 200Hz and amplitude of 7
Outdoor light
- Input signal.
Amplitude
=10 and 7 for
comparison
Window
shade position
fuzzy logic
controller
output
Indoor (room)
light level
Indoor LED
light level
fuzzy logic
controller
output
0 0 2.5mSec 2.5mSec 5 5
0 0
0.0 0.0
10
6
10
5
0.0 0.0
1.0
1.8
1.0
1.8
0.5 0.5
0.9 0.9
0 0
10
-10
7
-7
89
.
Intelligent Multi-Coloured Lighting System Design with Fuzzy Logic Controller
90
Graph set 4.14: Set of screenshots – Effect of low outdoor light intensity signal values- Positive and negative signals
Outdoor Light intensity sinusoidal signal with
frequency of 200Hz and amplitude of 10
Outdoor Light intensity sinusoidal signal with
frequency of 200Hz and amplitude of 3
Outdoor light
- Input signal.
Amplitude
=10 and 3 for
comparison
Window
shade position
fuzzy logic
controller
output
Indoor (room)
light level
Indoor LED
light level
fuzzy logic
controller
output
0 2.5mSec 2.5mSec 5 5
0.0
0.0
0 0
0.0
0 0.0
1.0
1.8
1.0
1.8
10
6
7
5
0.9
0.5
0.5
0.3
0 0
10
-10
3
-3
90
.
Intelligent Multi-Coloured Lighting System Design with Fuzzy Logic Controller
91
The wave forms displayed in graph set 4.12, where effect of outdoor light sinusoidal signal with
amplitude of 10 is compared with that of 20, show that the window shade position controller output
signal is low at low outdoor light input signal and rises to maximum value of 0.9 as the outdoor light
signal passes through the 4 to 6 level values then falls to mid position value of 0.5 for any other
values of outdoor light intensity beyond 9. This observation is true for both signals with amplitude of
10 and that of 20. The indoor illumination level values follow the curve form of the window shade
position controller output. The LEDs’ fuzzy logic controller output signal is observed to effect
reduction or increase of the LEDs average power output depending on the indoor illumination levels.
The wave forms displayed in graph set 4.13, where effect of sinusoidal signal with amplitude of 10 is
compared with that of 7, show that the window shade position controller output signal is low at low
outdoor light input signal and rises to maximum value of 0.9 as the outdoor light signal passes
through the 4 to 6 level values then falls to value of about 0.7 for the values of outdoor light intensity
to maximum of 7, which is the signal amplitude. This signal with amplitude of 7 does not drive the
window shade position fuzzy logic controller to maximum input range, hence the controller output
signal does not reach the mid position of 0.5. The indoor illumination level values follow the curve
form of the window shade position controller output. The LEDs’ controller output signal is observed
to effect reduction or increase of the LEDs average power output depending on the indoor
illumination levels.
The waveforms displayed in graph set 4.14, where effect of sinusoidal signal with amplitude of 10 is
compared with that of 3, show that the window shade position controller output signal is lowest, 0.05,
at low outdoor light input signal and rises to maximum value of only 0.5 as the outdoor light signal
passes through the 2 to 3 level values then falls again to its lowest value of about 0.05, as the values
of outdoor light intensity falls back to 0. This outdoor light signal with amplitude of 3 does not drive
the window shade position fuzzy logic controller to maximum input range. The indoor illumination
level values follow the curve form of the window shade position controller output. The LEDs’ fuzzy
logic controller output signal level is observed to rise and fall depending on the indoor illumination
levels.
The values of the outdoor light intensity signal are observed to be negative after 2.5 milliseconds of
the simulation start. The waveforms displayed in graph sets show that the window shade position
Intelligent Multi-Coloured Lighting System Design with Fuzzy Logic Controller
92
controller output signal is always positive, and rise to mid-point constant value of 0.5, as the outdoor
light input signal level falls from zero to maximum negative value for each test input signal
amplitude of 7, 10, and 20. But for test input signal with amplitude of 3, the window shade position
controller output signal rises to a maximum value of 0.055.
4.7.2 Discussion on effect of too high, moderate, very low, and negative values of outdoor light
intensity on window shade controller output signal, indoor illumination levels, and the
LEDs’ controller output.
The objective of this test was fully met. The signal from the outdoor light intensity sensor with values
outside the set range of the window shade fuzzy logic controller membership function configuration
does really affect the lighting system’s controllability. When the output signal for controlling the
window shade position is affected, the indoor light levels and the feedback signal to the LEDs fuzzy
logic controller are also affected.
The output signal from the window shade position fuzzy logic controller was of a constant value,
mid-point value of 0.5, for almost all outdoor light signal value that lies outside the preset controller
membership function range. However, for outdoor light signals with values which are just at the
edge, though outside the membership function range, the fuzzy logic controller output is not constant.
This phenomenon could be attributed to the shape of the end-side controller membership function
plots.
The window shade position fuzzy logic controller does not correctly respond to too high or negative
outdoor light intensity signal values. The test also confirms that LEDs fuzzy logic controller output
signal level rises and falls in contrasting rhythm of the indoor illumination level values, which follow
the curve form of the window shade position fuzzy logic controller output. The LEDs fuzzy logic
controller output signal effect reduction or increase of the LEDs average power output depending on
the indoor illumination levels.
The designed lighting system should not be used with lighting intensity signal level values that lie
outside the respective preset fuzzy logic controller membership function ranges.
Intelligent Multi-Coloured Lighting System Design with Fuzzy Logic Controller
93
4.8 Effect of Changing Shape of the Membership Functions
The objective of this test was to check and confirm if the system design control can be improved by
changing the respective fuzzy logic controller membership function plot shape. The test was to
compare and deduce which of the two shapes, triangular and trapezium, is most suitable for stability
of the LED lighting system.
It was expected that the triangular shaped membership functions to be more stable due to their
narrower top plot shape when compared with the trapezium shapes.
4.8.1 Results of testing effect of changing the plot shape of the fuzzy logic controllers’
membership functions from triangular shape to trapezium shape.
The test was carried out using a 200Hz sinusoidal signal generator as the outdoor light intensity
signal source. The other system parameters were maintained constant with the values for each
red/green/blue input colour portion levels at 1, value of the window shade fuzzy logic controller
output gain factor of 10, zero value for rate of change of the indoor light intensity, enabled room
movement detector, and enabled room occupancy. The 200Hz sinusoidal signal amplitude was 10.
The test result graph set 4.15 was used for comparing the wave forms of the outdoor light intensity
signal, the window shade position controller output signal, indoor illumination level signal, and the
LEDs fuzzy logic controller output signal. The first six rows of the table compare the shapes of the
membership function plots for the window shade position and the LEDs’ Fuzzy Logic controllers.
The results were obtained from the time based graphical representation of the simulation on various
specific scopes of the MATLAB Simulink simulation model. The results are in waveforms of the
various signals at specific monitoring points using the model scopes. The results are presented in
form of screenshots. The waveforms are displayed in table for column-wise comparison purposes.
Graph set 4.15 compares effect of changing the controller’s membership function plot shapes from
that of triangular to trapezium.
Intelligent Multi-Coloured Lighting System Design with Fuzzy Logic Controller
94
Graph set 4.15: Set of screenshots – Effect of changing from triangular to trapezium shapes of membership functions.
Triangular membership shape Trapezium membership shape
Membership function:
Input-
Room light intensity
Membership function:
Input-
Rate of change of room
light intensity
Membership function:
Output-
LEDs output
Membership function:
Input-
Outdoor light intensity
Membership function:
Input-
Colour product level
94
.
0 0 0.5 1 0.5 1 0
0.5
1.0 1.0
0
0.5
Not White White Not White White
0 5 10 0 5 10
0
0.5
1.0
0
0.5
1.0 Low Mid Bright
Low Mid Bright
0 1 2 0 1 2 0
0.5
1.0
0
0.5
1.0 Max Low Max Low Low Low Mid Mid High High Max High Max High
-1 0 +1 -1 0 +1 0
0.5
1.0
0
0.5
1.0 Negative Zero Positive Negative
Zero Positive
0 10 5 0 5 10 0
0.5
1.0
0
0.5
1.0 Very Dim Dim Bright Mid V. Bright Very Dim Dim Mid Bright V. Bright
Intelligent Multi-Coloured Lighting System Design with Fuzzy Logic Controller
95
Membership function:
Output-
Window shade position
Outdoor light - Input
signal. Amplitude =10
Window shade position
fuzzy logic controller
output
Indoor (room) light level
LEDs light level fuzzy
logic controller output
0 0 2.5mSec 2.5mSec 5 5 0.0
1.0
1.8
0
10
6
0.0
0.5
0.9
10 10
0 0
-10 -10
95
.
Mid Closed Open
0 0.5 1 0
0.5
1.0 Closed Mid High
0 0
0.5
0.5
1.0
1 Window shade position Window shade position
Intelligent Multi-Coloured Lighting System Design with Fuzzy Logic Controller
96
The wave forms displayed in graph set 4.15, where sinusoidal signal with amplitude of 10 is used for
the outdoor light intensity, show that the window shade position controller output signal is low at low
outdoor light input signal and rises to maximum value of 0.9 as the outdoor light signal passes
through the 4 to 6 level values then falls to mid position value of 0.5 for any other values of outdoor
light intensity beyond 9. It is observed that the shapes of the two sets of wave forms are similar.
However, the duration at which the window shade position controller output signal is at maximum is
longer in the trapezium membership function than with triangular shape. Another noted difference in
the two sets is the oscillation transient duration of the indoor illumination levels and the LEDs’
controller output signal. The triangular membership function set of output signal transient oscillations
settle faster than those by the trapezium membership functions.
4.8.2 Discussion on effect of changing the plot shape of the fuzzy logic controllers’
membership functions from triangular shape to trapezium shape.
The objective of this test was fully met. The system design control can be improved by changing the
respective fuzzy logic controller membership function plot shape. The test confirmed that the
narrower tipped membership function plot are more stable and more accurate than their counterparts
with flat tops. Triangular shaped membership functions are better than trapezium ones for stable
fuzzy logic control systems.
4.9 Effect of Shifting Plot Position of the Mid Membership Functions.
The objective of this test was to check and confirm if shifting the plot position of the mid
membership function of the fuzzy logic controllers, the system settles in new values.
It was expected that when the mid membership function plot for the window shade position fuzzy
logic controller is shifted to higher value in the scale range, the controller output signal also settles in
a higher value level.
Intelligent Multi-Coloured Lighting System Design with Fuzzy Logic Controller
97
4.9.1 Results of testing effect of shifting position of the outputs’ mid membership functions for
the fuzzy logic controllers.
The test was carried out using a 200Hz sinusoidal signal generator as the outdoor light intensity
signal source. The other system parameters were maintained constant with the values for each
red/green/blue input colour portion levels at 1, value of the window shade fuzzy logic controller
output gain factor of 10, zero value for rate of change of the indoor light intensity, enabled room
movement detector, and enabled room occupancy. The 200Hz sinusoidal signal amplitude was 10.
The test result graph set 4.16 was used for comparing the wave forms of the outdoor light intensity
signal, the window shade position controller output signal, indoor illumination level signal, and the
LEDs fuzzy logic controller output signal. The first two rows of the table compare the positions of
the outputs’ mid membership functions for the window shade position and the LEDs’ Fuzzy Logic
controllers.
The results were obtained from the time based graphical representation of the simulation on various
specific scopes of the MATLAB Simulink simulation model. The results are in waveforms of the
various signals at specific monitoring points using the model scopes. The results are presented in
form of screenshots. The waveforms are displayed in table for column-wise comparison purposes.
Graph set 4.16 compares effect of shifting the outputs’ mid membership function for both fuzzy logic
controllers.
Intelligent Multi-Coloured Lighting System Design with Fuzzy Logic Controller
98
Graph set 4.16: Set of screenshots – Effect of shifting the fuzzy controller output middle membership function plots.
Mid membership function plot in middle of the graph
range
Mid membership function plot shifted to right hand-side
of middle position of the graph range
Membership
function:
Output-
LEDs output
level
Membership
function:
Output-
Window
shade position Outdoor light -
Input signal.
Amplitude =10
Window shade
position fuzzy
logic controller
output Indoor (room)
light level
LED light level
fuzzy logic
controller output
0 0
2.5mSec 2.5mSec 5 5 0.0
0.0
0 0
10 10
-10 -10
0.9
0.5
1.8
1.0
98
.
Mx Low Low Mid High
10
0
6
0.9
0.0
0.5
9
5
0
1.8
1.0
0.0
Max High Mx Low Low Mid High Max High
0 1 2 0
0.5
1.0
0 1 2 0
0.5
1.0
Closed Mid Open Closed Mid Open
0 0.5 1 0 0.5 1 0
0.5
1.0
0
0.5
1.0
Wind shade position Window shade position
LEDs Output LEDs Output
Intelligent Multi-Coloured Lighting System Design with Fuzzy Logic Controller
99
The waveforms displayed in graph set 4.16, where sinusoidal signal with amplitude of 10 is used for
the outdoor light intensity, show that the window shade position controller output signal is lowest at
low outdoor light input signal for both cases. The window shade position controller output signal
rises to maximum value of 0.9 as the outdoor light signal passes through the 4 to 6 level values then
falls to mid position value of 0.5, for case mid in middle, but 0.7 for case mid shifted to right hand
side. It is observed that the shape of the two sets of wave forms are similar, apart from the higher
values of the window shade position controller output and the indoor illumination level values when
the outdoor light intensity is at high values, from 8 to 10. The LEDs’ controller output signal, when
the mid is shifted, is noted to be also at lower level in response to the indoor illumination values.
Shifting the fuzzy logic controller output mid membership function from middle of the plot to right
hand-side has the effect of shifting higher the value of the settled indoor illumination level.
4.9.2 Discussion on effect of shifting position of the outputs’ mid membership functions for
the fuzzy logic controllers.
As was expected, when the mid membership function plot for the window shade position fuzzy logic
controller was shifted to higher value in the scale range, the controller output signal settles in a higher
value level.
This test confirmed that shifting the plot position of the mid membership function of fuzzy logic
controllers the system control signals settle in new value levels. Controlling the window shade
position and the LEDs output light to provide the desired room illumination levels could also be
achieved through shifting the positions of the specific membership functions for each respective
fuzzy logic controllers. Shifting the positions of the membership functions is a one method for fine
tuning the designed lighting system controls.
Intelligent Multi-Coloured Lighting System Design with Fuzzy Logic Controller
100
CHAPTER 5 - CONCLUSION AND RECOMMENDATIONS
5.1 Introduction
The study was set out to explore and design an intelligent lighting system based on fuzzy logic
controller that uses multi-colour LEDs to produce light of the required luminance level and
appropriate colour in a typical room space considering energy efficiency requirements. This study
was based on the necessity to optimize utilization of the new generation of LEDs and the natural
daylight in both homes and work places as a strategy to save lighting related energy costs, and at the
same time improve comfort of living and working in such places. The study sought to answer these
questions:
1. How can the output of an outdoor lighting level sensor be configured and processed to
automatically control a room’s window shade position?
2. How can the output of an indoor lighting level sensor be configured and processed to intelligently
control LEDs’ luminance and maintain the required room’s illumination levels?
3. How can the output of an occupant detector that counts the number persons in a room be
configured and processed to dim off the LEDs lights if the room is not occupied?
4. How can the output of a movement detector be configured and processed to dim off the LEDs if a
movement in the room is not detected?
5. How can the output of a colour decoder/sensor be processed to accurately determine the multi-
colour LEDs’ output light colour and at the same time close the room’s window shades if the
output light is not white?
6. Can the integrated system of addressable sensors, window shade, fuzzy logic controllers, and
multi-colour LEDs provide a typical room with light of appropriate colour at required intensity
levels and still be efficient in electrical energy usage?
The empirical findings of the study are synthesized and explained in this chapter. Also explained in
this chapter is the theoretical implication of the study and the recommendations for future works.
Intelligent Multi-Coloured Lighting System Design with Fuzzy Logic Controller
101
5.2 Empirical Findings
This section will synthesize the empirical findings to answer the study’s research questions.
1. How can the output of an outdoor lighting level sensor be configured and processed to
automatically control a room’s window shade position?
In chapter 4 section 4.4, on effects of outdoor light intensity, the window shade position controller
output signal smoothly rise from low values to high values, then lowers to mid values. It was also
noted that there are three flat sections on widow shade controller output graphs; the window shade
closed position with output value of about 0.18, the fully open position with output value of about
0.9, and the mid open position with output value of about 0.7. This confirmed that the window shade
position fuzzy logic controller was operating in response to the fuzzy logic control table of
operational rules. The room’s window shade position could automatically remain closed for low
outdoor light levels and open to maximum position once the outdoor light levels start rising, then
close to middle position when the outdoor daylight is very bright.
The outdoor lighting level signal, through the Fuzzy Logic Controller, automatically controlled the
room’s window shade opening position in a manner similar to human reasoning basing it
controllability on the “IF-THEN” control rules. The lighting system design was able to automatically
harvest daylight to suit the desired room illumination level requirements.
The simulation model demonstrated how a fuzzy logic controller can be used to process an outdoor
light level signal and control a typical room’s window shade position, heuristically harvesting
daylight for energy efficient illumination of the room.
2. How can the output of an indoor lighting level sensor be configured and processed to
intelligently control LEDs’ luminance and maintain the required room’s illumination levels?
Section 4.2 of chapter 4 on effects of the rate of change of the indoor light intensity, the indoor light
level sensor output signal is demonstrated to affect the LED’s current pulse width via the fuzzy logic
controller. The results also confirm that room illuminance level stability is affected by the way the
indoor light sensor signal is configured for use in the LEDs fuzzy logic controller. However, the
Intelligent Multi-Coloured Lighting System Design with Fuzzy Logic Controller
102
system stability does not depend on magnitude of the rate of change signal but on some critical values
of the rate of change. The system is seen to be stable even without input from the rate of change of
the indoor illumination levels. This does not mean that the signal for rate of change of the indoor light
intensity is not required, but it implies that the fuzzy logic controller settings require tuning.
The room’s illumination was maintained above a certain level irrespective of absence of the outdoor
light contribution. The LEDs’ output light depends on illumination levels in the room and
configuration of its fuzzy logic membership functions. When there is no outdoor light, the room is
illuminated by the LEDs only. When the outdoor light into the room is high enough to the required
levels, the LEDs’ output luminance is at the lowest level possible, thus saving on electric energy.
However, the simulation results showed that the lowest level of the LEDs output light is not zero as
expected. This problem was associated with fuzzy logics’ weakness of approximation. Lowest value
of the fuzzy logic controller output is not zero but a number with approximate value of zero.
The simulation model design proved that an indoor light intensity level sensor signal could be
processed through a fuzzy logic controller to intelligently control a room’s LEDs light intensity and
maintain the required illumination levels.
3. How can the output of an occupant detector that counts the number persons in a room be
configured and processed to dim off the LEDs lights if the room is not occupied? Also, how
can the output of a movement detector be configured and processed to dim off the LEDs if a
movement in the room is not detected?
The simulation model design tests, in chapter 4 section 4.6 on cause and effect of absence of colour
decoder, movement detector, and room occupancy signals, demonstrated that the lighting system
LEDs could be dimmed off by a signal from either the room occupancy counter, or the movement
detector, or the colour decoder. The system model incorporated three enabler signal switches at the
output of the LEDs fuzzy logic controller. However, the use of enabler switch for zero value colour
decoder signal was found to cause disruption in the system signal flow. The simulation model did not
require colour decoder signal enabler switch because the same zero value signal is duplicated after
the multiplier blocks.
Intelligent Multi-Coloured Lighting System Design with Fuzzy Logic Controller
103
4. How can the output of a colour decoder/sensor be processed to accurately determine the
multi-colour LEDs’ output light colour and at the same time close the room’s window shades
if the output light is not white?
Chapter 4 section 4.5 on effects of different level values of colour portions, the system was found
able to calculate the respective primary colour portion signal level ratios, which are used apportioning
the average power for each respective red, green, and blue colour LED. The model simulated how the
calculated colour portion ratios could be used to differentiate a white light from coloured one and
then close the room’s window shades if required light is not white. The model design demonstrated
how an output of a colour sensor (colour decoder) with three distinct signal lines, for each specific
primary colour, can be processed to accurately determine a multi-colour LEDs’ lamp output light
colour.
5. Can the integrated system of addressable digital sensors, window shade, fuzzy logic
controllers, and multi-colour LEDs provide a typical room with light of appropriate colour at
required intensity levels and still be efficient in electrical energy usage?
Section 4.7 on effect of too high, moderate, low and negative values of outdoor light signals, section
4.8 on effect of changing shape of the membership functions plots, and section 4.9 on effect of
shifting position of the outputs’ mid membership functions for the fuzzy logic controllers, illustrated
that the appropriate window shade position for any daylight intensity level, and the LEDs’ output
luminance can easily be adjusted by simply shifting the position of the membership functions in the
plots, or adding more sets of membership functions, or changing the shape, or doing a combination of
the three. The lighting system operates well when the outdoor and indoor lighting signal level values
are within the respective fuzzy logic controller membership function set range. If the input signal
values are outside the membership function range, the controller output signal is fixed in the mid-
range and is invariant to the input changes.
The lighting system is more stable and sensitive to signal inputs if the fuzzy logic controller member
ship functions are of sharp-tipped shapes than those with flat topped shapes.
The research simulation model fulfilled the main objective of designing an intelligent lighting system
based on fuzzy logic controller that uses multi-colour LEDs to produce light of the required
Intelligent Multi-Coloured Lighting System Design with Fuzzy Logic Controller
104
luminance and appropriate colour in a room space that considers energy efficiency requirements. The
integrated system of digital sensors, fuzzy logic controllers, and the multi-colour LEDs is energy
efficient and intelligent, ensuring that the electric energy for the LEDs is used only when the outdoor
daylight is not required and only when the room is occupied and the user is not asleep. The lighting
system is sensitive to colour needs; the window shade closes when the room’s required light colour is
not white.
5.3 Theoretical Implication
The theoretical cases for lighting systems with fuzzy logic controllers need to be revisited in order to
further understand the dynamics of lighting systems and how to the designs can be made more
beneficial to mankind.
In a paper by S.D. Panjaitan [1], fuzzy logic scheme is proposed as a basis to control lighting system
in building zone where the fluorescent lamps are the controlled objects. The proposed lighting design
procedure determines the maximum number of lamps that should be used according to the room
function. Then the proposed controller is activated and deactivated according to information from
occupancy sensors, which gives information about room occupancy. This method saves electrical
energy for lighting, but may not be most appropriate for a small room which has a few number of
lighting lamps.
The paper by M.A.A. Saleh [29] also describes a fuzzy controller that controls the number of lamps
lit using the number of people inside the room and the required illuminance as control inputs. This
method also is capable of reducing the electrical energy, but not suitable for smaller rooms with only
one or two lamps.
M. T. Lah [18] proposed a modern approach to control the inside illuminance with fully automated
fuzzy system for adjusting shades, which responds constantly to the changes in the available solar
radiation, which makes decisions as it follows the human thinking process. The control algorithm
contains a cascade control with fuzzy controller as the main and conventional PID-(proportional-
integral-derivative) controller as auxiliary controller. This approach was very good for harvesting the
daylight. This design was limited only to daylight harvesting but does not consider artificial lighting
energy requirements.
Intelligent Multi-Coloured Lighting System Design with Fuzzy Logic Controller
105
The researched design lighting system with fuzzy logic controller operate in a manner similar to
human reasoning. Fuzzy logic controllers are suitable for lighting systems due to the none-linearity of
lighting brightness and different lighting requirements for different persons.
This research study proposes a design of lighting system which combines the use of the high efficacy
LEDs, the daylight harvesting techniques, and production of coloured light for more comfort and
convenience of the space user. The lighting system was designed with need for saving electric
energy in mind. Of major concern in the design was reduction of human intervention in switching off
or dimming the electric lamps. This reduced human intervention ensurs that energy saving is part of
the lighting system. The system design considers the colour decoder to be of a flexible type which is
sensitive to the room users’ need for coloured light and the associated emotional soothing effects.
A fuzzy logic controller has been found be a system controller that is easily configured to operate
automatically and in a manner similar to human reasoning, displaying artificial intelligence
capabilities.
5.4 Recommendations for further research works
The research work was limited to computer model simulation, and therefore, further research works
in implementing the system is recommended. The proposed physical implementation scheme may be
used in realizing the multi-coloured lighting system.
The system need to be built up with real hardware and confirm control of the actual required room
space illumination and test the desirable lighting colour. The fuzzy logic membership functions could
be tuned-up to confirm functionality of the ‘rate of change of the indoor light intensity’ signal in
stability of the lighting system. The colour decoder requires further checks for accuracy and
suitability.
Intelligent Multi-Coloured Lighting System Design with Fuzzy Logic Controller
106
REFERENCES
[1] S.D. Panjaitan and A. Hartoyo, A Lighting Control System in Buildings Based on Fuzzy Logic,
Telkominka Vol 9 No. 3 Dec 2011 pp 423-432.
[2] M. L. Jin and M. C. Ho, Labview–Based Fuzzy Controller Design of a Lighting Control System,
Journal of Marine Science and Technology Vol. 17, No. 2, pp. 116-121 (2009).
[3] C. S. Moo, Y. J. Chen and W. C. Yang, An Efficient Driver for Dimmable LED Lighting, IEEE
Trans On Power Electronics, Vol 27, No.11, Nov. 2012.
[4] Texas Instruments Application Report – SLAA422 Nov. 2009, Digital Addressable Lighting
Interface (DALI), Texas Instruments Inc. Available: www.ti.com/lit/zip/slaa422. Accessed in
January 2013.
[5] STMicroelectronics Application Report – Feb 2005, Digital Addressable Lighting Interface
(DALI) Lowers the Cost of Mood Lighting, Available: www.dali.ag.org and
http://www.steinel.de/en/pr. Accessed in November 2012.
[6] L. A. Zadeh, Fuzzy Sets, Information and Control, Vol. 8, pp.338-352 (1965).
[7] T. Watkons, Fuzzy Logic - The Logic of Fuzzy Sets, San Jose State University, Available:
www.applet_magic/com. Accessed in November 2012.
[8] Wikipedia, Lighting Control Systems, Wikipedia free Encyclopedia, 2012, Available:
http://en.wipedia.org/w/index/ Accessed in November 2012.
[9] Philips Lighting Academy (notes), Basics of Light and Lighting, 2008 Koninklijke Philips
Electronics N.V., Document order no. 3222 635 58631 (2008).
[10] Wikipedia, DALI (Digital Addressable Lighting Interface), Wikipedia free Encyclopedia, 2012,
Available: http://en.wipedia.org/w/index/ Accessed in November 2012.
[11] Lighting Design International Inc., Lighting Design, Available:
http://www.crystalfoundains.com/need/ Accessed in December 2012.
[12] The Mathworks Inc, Fuzzy Logic Toolbox, MATLAB software tutorial notes, (1984-2011).
Accessed in November 2012.
[13] K. K. Tan, M. Khalid and R. Yosof, Intelligent Traffic Lights Control By Fuzzy Logic, Malaysian
Journal of Computer Science, vol. 9, No. 2/12/1996.
Intelligent Multi-Coloured Lighting System Design with Fuzzy Logic Controller
107
[14] S. Mehan, Introduction of Traffic Light Controller with Fuzzy Control System, International
Journal of Electronics and Communications Technology, vol. 2, issue 3, pp 119-122, Sep 2011.
Available: www.Iject.org.
[15] Y. Ohno, Color Rendering and Luminous Efficacy of White LED Spectra, Fourth International
Conference on Solid State Lighting (Proc. of SPIE), vol. 5530, pp.88-98 (2004).
[16] N. Zheludev, The Life and Times of LED- a 100 year history, Nature Publishing Group, April
2007, Available: www.nature.com/naturephotonics. Accessed in January 2013.
[17] S. Tanabe, S. Fujita, S. Yoshihara, A. Sakamoto, and S. Yamamoto, YAG glass-ceramic
phosphor for white LED (II): Luminance Characteristics, Fifth International Conference on
Solid State Lighting (Proc. of SPIE), vol. 5941, pp.594112:1-6 (2005).
[18] M. T. Lah, B. Zuancic, J. Peternel, and A. Krainer, Daylight Illuminance Control with Fuzzy
Logic, Solar Energy 80 (2006), Available: www.sciencedirect.com. Accessed in January 2013
[19] Simmtronic Lighting Control, SPECS3 Lighting Control System, Simmtronic Ltd, application
manual, Available: www.simmtronic.com. Accessed in January 2013.
[20] Lutron Electronics co. Dimming Range Adjustment – Important Notes about your Dimmers,
Lutron Electronic Co. Inc – Application notes, Sep 2012, Available: www.lutron.com/dimflled.
Accessed in January 2013.
[21] C. Volosencu, D. I Curiac, O. Banias, C. Ferent , D. Pescaru , and A Doboli , Hierarchical
Approach for Intelligent Lighting Control In Future Urban Environments 1-4244-2577- ©2008
IEEE
[22] R. Stevenson, The LED’s Dark Secret [p. 22], Freelance journalist on Semiconductors,
Available: http://spectrum.ieee.org. Accessed in February 2013.
[23] K. Alexandridis and A. I. Dounis, Supervisor of Digital PI-like Fuzzy Logic Controllers for
Indoor Lighting Control in buildings, Department of Automation, Technological Educational
Institute of Piraeus, Piraeus, P. Ralli & Thivon 250, Greece, Tel: 2105381338
[24] John Yen, Fuzzy Logic - A Modern Perspective, Research partially sponsored by National
Science Foundation Young Investigator Award IRI 9257293, October 20, 1998
[25] Wikipedia, LED (Light Emitting Diode), Wikipedia free Encyclopedia, 2012, Available:
http://en.wipedia.org/w/index/ Accessed in December 2012.
[26] Wikipedia, Fuzzy Logic Controllers, Wikipedia free Encyclopedia, 2012, Available:
http://en.wipedia.org/w/index/ Accessed in December 2012.
Intelligent Multi-Coloured Lighting System Design with Fuzzy Logic Controller
108
[27] Wikipedia, Intelligent lighting systems, Wikipedia free Encyclopedia, 2013, Available:
http://en.wipedia.org/w/index/ Accessed in July 2013
[28] C. Zhang, N. Cui, M. Zhong, and Z. Cheng, Application of Fuzzy Decision in Lighting Control of
Cities 44th IEEE Conference on Decision and Control, and the European Control Conference
2005, pp 4100-4104, 0-7803-9568-9/05- ©2005 IEEE
[29] M.A.A. Saleh, Automated Light Controller Using Fuzzy Logic Masters thesis, CAS, Universiti
Utara Malaysia, 2010.
[30] R.D. Talebi, Application of Fuzzy Logic for Control and Energy Management of Air
Conditioning, Chilling, and Heating Systems, Text book on Building Energy Management,
Chapter 13, pp 261-290.
[31] C.M.Prades and K.Ram Mohan, Fuzzy logic Intelligent traffic light control system & Robot car,
Sri Venkateswara College of Engineering &Technology, Thiruvallur-631203, India.
[32] M.G. Shafer, E. Saputra, K.A.Bakar, F. Ramadhani, Modeling of Fuzzy Logic Control System
for Controlling Homogeneity of Light Intensity from Light Emitting Diode, Intelligent Systems,
Modelling and Simulation (ISMS), 2012 Third International Conference, pp 71-75.
[33] R. Stevenson, “The LED Lighting: Blue+Yellow=White”, Part of IEEE Spectrum's special
report: Top 11 Technologies of the Decade, No.4, summary by Richard Stevenson, Available:
http://spectrum.ieee.org/static/special-report-top-technologies-of-the-decate Accessed in August
2013
[34] ABB, “Lighting requirements for spaces, functions and activities based on EN 12464-1”,
Switchgear manual by ABB, 11th edition 2008.
[35] Colour Therapy Healing 2013, “What is colour?”, Available:
http://www.colourtherapyhealing.com/colour. Accessed in August 2013
[36] LIFX is a WiFi enabled, multi-color, energy efficient LED light bulb that you control with your
iPhone or Android. An article from- https://www.kickstarter.com/projects/limemouse/lifx-the-
light-bulb-reinvented. Accessed in March 2014.
[37] LG launched the Smart Bulb in Korea, a 100W LED bulb that pairs with iOS or Android device
over wireless or Bluetooth to perform a variety of functions. An article from http://www.droid-
life.com/2014/03/24/lg-unveils-smart-bulbs-home-lightbulbs-controllable-via-smartphone/.
Accessed in March 2014.
Intelligent Multi-Coloured Lighting System Design with Fuzzy Logic Controller
109
APPENDICES
Appendix 1: Effects of Window shade position Fuzzy logic Controller output gain factor
Table of data for window shade gain factor
Window Shade
position Fuzzy
controller
output Gain
Indoor
Light
Intensity
LED Fuzzy
Controller
output (1)
1 0.000 3.760 1.253
2 3.760 5.775 0.834
3 5.000 6.495 0.716
4 7.500 8.000 0.489
5 10.000 9.575 0.292
6 11.000 10.000 0.160
7 11.200 10.230 0.162
8 11.480 10.480 0.165
9 11.490 13.000 1.000
10 11.495 13.100 1.000
11 12.000 13.440 1.000
12 15.000 16.000 1.000
Line Graph
Intelligent Multi-Coloured Lighting System Design with Fuzzy Logic Controller
110
Appendix 2: Effects of outdoor light intensity
Table of data
Outdoor Light
Intensity
Window Shade
position Fuzzy
controller output
Indoor Light
Intensity
LED Fuzzy
Controller
output (1)
1 0.00 0.130 4.680 1.870
2 1.00 0.138 4.735 1.076
3 2.00 0.152 4.838 1.053
4 2.50 0.380 6.400 0.730
5 3.00 0.550 7.458 0.505
6 3.95 0.839 9.800 0.20
7 4.00 0.859 9.950 0.170
8 5.00 0.870 10.050 0.160
9 6.00 0.857 9.940 0.170
10 7.00 0.608 8.113 0.483
11 8.00 0.500 7.220 0.573
12 9.00 0.500 7.2198 0.573
13 11.00 0.500 7.2193 0.573
14 12.00 0.500 7.220 0.574
Line graph
Intelligent Multi-Coloured Lighting System Design with Fuzzy Logic Controller
111
Appendix 3: Effects of Colour Product (product of the primary colour’s ratios)
Table of data
Colour Product
LED Fuzzy
Controller output (1)
Window Shade
position Fuzzy
controller output
1 0.000 1.412 0.2000
2 0.000 1.2428 0.2004
3 0.120 1.2934 0.2004
4 0.222 1.2429 0.2004
5 0.375 1.1991 0.2004
6 0.375 1.2000 0.2004
7 0.450 1.1850 0.2004
8 0.450 1.1850 0.2004
9 0.500 1.1852 0.2004
10 0.630 1.1852 0.2004
11 0.720 0.9658 0.3150
12 0.810 0.4080 0.7650
13 0.855 0.4060 0.7681
14 0.862 0.4055 0.7680
15 0.898 0.4040 0.7681
16 0.903 0.4038 0.7680
17 0.942 0.4021 0.7681
18 0.947 0.40155 0.7681
19 0.948 0.40155 0.7681
20 1.000 0.40155 0.7681
21 1.000 0.40155 0.7681
Line graph
Intelligent Multi-Coloured Lighting System Design with Fuzzy Logic Controller
112
Appendix 4: Effects of different portion level values of the primary colours
Table of data
Red
Colour
Portion
Green
Colour
Portion
Blue
Colour
Portion
Colour
Product
signal
LED Red
colour
signal
LED Green
colour
signal
LED Blue
colour
signal
1 1 0 0 0.00 0.412 -1 -1
2 1 1 0 0.00 0.2428 0.2428 -1
3 1 0.3 0.4 0.12 0.2934 -0.612 -0.483
4 3 2 1 0.22 0.243 -0.1715 -0.5857
5 0.5 0.75 1 0.38 -0.4005 -0.1007 0.2
6 1 0.75 0.5 0.38 0.2 -0.101 -0.4004
7 0.5 0.9 1 0.45 -0.4074 0.0667 0.1852
8 1 0.9 0.5 0.45 0.1852 0.0667 -0.4074
9 1 1 0.5 0.50 0.185 0.185 -0.408
10 1 0.9 0.7 0.63 0.1854 0.0667 -0.1703
11 1 0.9 0.8 0.72 -0.325 -0.1295 -0.2262
12 1 0.9 0.9 0.81 -0.592 -0.328 -0.633
13 1 0.95 0.9 0.86 -0.95 -0.6143 -0.6345
14 2 1.9 2.1 0.86 -0.614 -0.632 -0.5945
15 0.9 0.95 0.9 0.90 -0.6174 -0.5952 -0.6175
16 1 0.95 0.95 0.90 -0.596 -0.616 -0.6164
17 0.8 0.85 0.85 0.94 -0.6216 -0.5979 -0.5979
18 0.95 0.95 0.9 0.95 -0.5982 -0.5985 -0.6193
19 0.9 0.95 0.95 0.95 -0.6174 -0.5982 -0.5982
Line graph