Smart Grid Protection
Smart Grid Protection
By:
Supervised:
I
DEDICATION:
Praise be to God, and prayers and peace be upon the best of people, and he who deserves
prayer, and he who does not thank God does not deserve eternal blessings.
For the high forehead, who gave us his life, to see us grow before him, and to bear the
loneliness of this world, while we are safe in his house under his shadow, Dear father.
To the one who got pregnant, stayed up and got tired, to whom and to whom we are, for a
tender chest and a warm heart, To the hand that wiped our shoulders the tiredness of the
road, who lit up these hearts with its light, For the one who gave up everything, Tender
mother.
For those who gave, and sincerity was their training, and the fear of God was in their eyes,
for the doctors, professors, and every teacher had the credit for us that We arrived here for
the supervisor Dr. Ja`far Jallad, for the Dean of the College of Engineering and
Technology, Dr. Motamed Al-Khatib, and for the head of the department Dr. Mahmoud
Salah.
To our homeland Palestine, the great martyrs and prisoners are a symbol sacrifice;
Kadoorie University; Our friends and colleagues who stand with us through all obstacles
and issues.
We hope that you will shower us with prayers, that this stop is not the end of the road, but
rather the beginning of a long journey that begins Now.
II
ACKNOWLEDGMENT:
Firstly, all thanks and praise to ALLAH for his guidance and benevolence. That has given
a success for us to complete this project.
We extend our sincere thanks and appreciation to the project's supervisor: Dr. Ja`far Jallad,
for his continuous support and for the follow-up of the project closely, and for his
comments and his orientation, which were always in place.
Additionally, our sincere thanks to our University, The Palestine Technical University –
Kadoorie, and specifically to the College of Engineering and Technology, in all its
departments, branches and employees, including academics, doctors and instructors, and
all those who contributed even a little to complete this project successfully.
Finally, we cannot fail to thank the anonymous soldiers who have done their best day and
night until they saw the light of our project, dear parents, friends and colleagues
III
ABSTRACT
IV
الملخص
يعنى ھذا المشروع بإعداد نظام حماية متين لحماية الشبكة من الخطأ وإعادتها
إلى الحالة الطبيعية في وقت قصير ومنع أي ضرر على النظام حيث ستضيف
الشبكة الذكية مرونة إلى نظام الطاقة الكهربائية ,وتعمل على زيادة موثوقية
الشبكة.
ستعمل المرحالت على تقليل االنقطاعات وتقليل التأثيرات عند حدوثها ويضمن
التعافي السريع للشبكة و جعل نظام الطاقة الكهربائية أفضل استعدادًا لمواجهة
حاالت الطوارئ .وتم اضافة مجموعة مرحالت و قواطع للشبكة و برمجتها من
خالل االردوينو و ربطهم بقطعة ESP32وتمعرض حالة العمل على شاشة
العرض.
V
CONTENTS
VI
.NO Content page
2.1 .Relay components 10
2.2 .Relay Connection Points 10
2.3 .Over and under voltage 11
2.4 .Block Diagram of Over-Under Voltage Circuit 13
2.5 .Block diagram of an over-current relay 14
2.6 Instantaneous time over-current relay characteristic 14
2.7 Definite time over-current relay characteristic 15
2.8 .Inverse Time Over Current 15
2.9 Need for directional relay 17
2.10 .Single-end-fed parallel feeder needs directional OC protection 18
2.11 Phasor diagram for a directional relay based on induction 19
.principle
2.12 Load encroachment on the tripping characteristic of a mho 22
.relay
3.1 .Reflow Profile 25
3.2 ESP32-WROOM-32 26
Pin Layout.
4.1 Network in MATLAB 32
4.2 .Generator1 in grid 33
4.3 .Generator2 in grid 34
4.4 .Transmission lines in grid 34
4.5 .FrequencyCB1&2 in grid 35
4.6 .Frequency Relay Connecting in grid 36
4.7 .Frequency Relay Block 36
4.8 .Bus in grid 37
4.9 .Three-phase transformer in grid 38
4.10 .Load in grid 39
4.11 .ESP32 connection in grid 39
4.12 .Over voltage CB in grid 40
4.13 .Under voltage CB in grid 40
4.14 .Over current CB in grid 41
4.15 .Over voltage relay in grid 42
4.16 .Overvoltage relay block 43
4.17 .Under voltage relay in grid 43
4.18 .Undervoltage relay block 44
4.19 .Overcurrent relay in grid 44
4.20 .Instantaneous overcurrent relay relay block 45
4.21 .Three phase fault in grid 45
4.22 .The voltage signal is in the normal position 47
4.23 .The load signal is in the normal position 48
4.25 signal frequency1 49
4.26 signal relay over frequency 49
4.27 .voltage in case over frequency 50
4.28 .load in case over frequency 50
4.29 signal frequency G1 51
4.30 .signal relay under frequency
VII 51
4.31 .Buss voltage in case under frequency 52
4.32 .load in case under frequency 52
TABLE OF THE TABLE
.NO Content page
2.1 .Fault statistics with reference to type of fault 8
2.2 .Fault statistics with reference to power system elements 8
3.1 .ESP32-WROOM-32 Specifications 24
3.2 .Pin Definitions 27
4.1 Values of generator1 in grid 33
4.2 Values of generator2 in grid 34
4.3 .Values of Transmission lines in grid 35
4.4 .Initial status CB in grid 35
4.5 .Values of Frequency Relay in grid 36
4.6 .Values of voltage and current in grid 37
4.7 .Types and values of transformer in grid 38
4.8 .Types and values of load in grid 39
4.9 .Output from OR 41
4.10 .status of circuit breaker in grid 42
4.11 .values setting overvoltage relay in grid 42
4.12 .values setting under voltage relay in grid 44
4.13 .values setting instantaneous overcurrent relay in grid 45
4.14 .values setting three phase fault in grid 46
VIII
CHAPTER ONE: INTRODUCTION
1.1 Background
The Power System It is a network of transmission lines, substations, transformers, and
other components that transport electricity from the power plant to customers.
In short, what makes the grid smart is the digital technology that allows for two-way
communication between the utility and its customers, as well as sensing along transmission
lines. It will consist of controls, computers, automation, and new technologies and
equipment working together. These technologies will interact with the electrical grid to
respond to rapidly changing electric demand digitally.
A Smart Grid is an electricity network that can integrate the behavior and actions of all
users connected to it - generators, consumers, and those who do both - to ensure an
economically efficient, sustainable power system with low losses and high levels of
quality, supply security, and safety.
A smart grid makes use of cutting-edge products and services, as well as intelligent
monitoring, control, communication, and self-healing technologies.
The Smart Grid will usher in a new era of energy industry reliability, availability, and
efficiency, benefiting both our economic and environmental health.
The application of digital processing and communications to the power grid is a common
element in most definitions of the smart grid, making data flow and information
management central to the smart grid.
1- Improvement of infrastructure (strong grid) & Technology
2- Provision of a digital layer, which is the essence of the smart grid.
3- Enabling of business investments in smart technology.
4- Training and Education of consumers.
5- Development of standards and regulations.
Power System Protection is an enthralling topic. A power system protection scheme is
designed to continuously monitor the power system to ensure maximum electrical supply
continuity with minimal damage to HFE, equipment, and property. Understanding the fault
characteristics of individual power system elements is required when designing protective
schemes. It is also necessary to be familiar with the tripping characteristics of various
1
protective relays. The protection engineer's job is to design such schemes that achieve the
best possible match between the fault and tripping characteristics.
The design must ensure that relays detect undesirable conditions and trip to disconnect the
affected area, while remaining restrained at all other times. However, statistical evidence
suggests that a large number of relay trips are caused by incorrect or inadequate settings
rather than genuine faults. As a result, students must be equipped with solid concepts of
power system protection in order to deal with unforeseen circumstances in real life.
Our project is to connect a protection system with the network so that the protection
system deals with any type of error by a piece (ESP32) that acts as a controller connecting
the network and the protection system (Relays: over voltage relay, under voltage relay,
over current relay, over frequency relay and under frequency relay), It receives values from
the network (current values, voltage values, frequency values) and accordingly sends
signals to required relay to separate the circuit or not if there are errors.
1.2 Motivation
Every unusual circumstance that affects the electrical system, such as over load,
short circuit, under load, under voltage, over voltage, if there is a significant
increase in the load, this will lead to a decrease in the frequency and the speed of
the generator increases, which leads to damage to equipment or injury to
operators, and this malfunction often results in the passage of a very large current
greater than the rated values in a part of the system
• remote control.
• make electric power system better prepared to address emergencies such as.
• This will minimize outages and minimize the effects when they do happen and
ensures fast recovery.
2
• Because of the electric power system two-way interactive capacity, the Smart Grid
technologies will detect and isolate the outages, containing them before they
become large-scale blackouts.
1.4 Methodology
The system was simulated on MATLAB to test the control system designed for
frequency, current and voltage disturbances. We will be using an ESP32
microcontroller with LEDs attached to it, to represent the load buses. The idea of
using the ESP32 is that it can connect directly to a Wi-Fi network which will
make it the perfect choice for processing, transmitting and then publishing the
physical data to the internet cloud. We will also create an online user interface to
access our system to monitor and control it.
3
-Energy Management Systems Using Smart Grids: An Exhaustive Parametric
Comprehensive Analysis of Existing Trends, Significance, Opportunities, and
Challenges
Energy management systems can efficiently increase the balance between supply and
demand while reducing peak load during unscheduled periods. The energy management
system can handle distributing or exchanging energy among the many energy resources
available and economically supplying loads in a stable, safe, and effective manner under all
power grid operating situations. This article examines the energy control system’s
structure, goals, benefits, and challenges through an in-depth investigation of the various
stakeholders and participants involved in this system. This review provides a detailed
essential analysis of the operation of several programs used inside the power management
system, such as demand response, demand management, and energy quality management.
It also includes a summary of the smart grid’s functionalities, features, and related
techniques and has discovered research gaps, challenges, and issues. Furthermore, in this
article, the authors review the literature on the enabling technologies of smart grid and
investigate the energy management system, which is among one of the major emerging
technologies and quantifications of the various uncertainty techniques. In this paper, the
authors also discussed the comprehensive review of researchers’ efforts and contributions
to the smart energy management system in the smart grid. It also compares and evaluates
the key optimization approaches utilized to achieve the remarkable aims of energy
management structures while also fulfilling a variety of constraints.
The energy management system of SGs is the subject of this research. (Khan, Nitasha,2022)
4
-Modeling and Simulation of Under -Frequency Relay for Generator Protection
This transfiguration has impersonated new challenges in well-established power system
practices, coordination of protection systems and especially on the design. The power
system is continually laying unexpected contingencies which cause inequality between
load demand and generated power. Such uncertainties cause the disturbance in the power
system frequency. The only way to maintain power system frequency by balancing load
and generation.
We have noticed that when the load on the system is increased, the designed model shed
the extra load and are modeled through under frequency relay by comparing the frequency
responses of the power system.( Emon, Ahsan and Koondhar, Mohsin and Memon, Imdad
and Memon, Munawar and Koondhar, Masood and Abid, S and Bukhari,2021)
There was only one industrial circuit breaker available in the lab. This use of the breaker
circuit has saved a lot of costs since most of the components used in the design were
already available in the lab. Based on the cost-effective design, it is planned to design a
similar circuit that can demonstrate the operation of differential current protection relay
based on SEL-387A Current Differential Relay. ( Khattak, Khalid Daud,2019)
-Design and Development of an IoT Smart Meter with Load Control for Home
Energy Management Systems.
Electricity consumption is rising due to population growth, climate
change, urbanization, and the increasing use of electronic devices. The trend of the Internet
of Things has contributed to the creation of devices that promote the thrift and efficient use
of electrical energy. Currently, most projects relating to this issue focus solely on
monitoring energy consumption without providing relevant parameters or switching on/off
electronic devices. Therefore, this paper presents in detail the design, construction, and
validation of a smart meter with load control aimed at being part of a home energy
management system.( Munoz, Omar and Ruelas, Adolfo and Rosales,2022)
5
With its own electronic design, the proposal differs from others in many aspects.
6
CHAPTER TWO: Protective system
2.1 Characteristics of the protection system.
A system which is responsible for protecting electrical systems from faults by isolating the
faulty part from the rest of the system, so power is not disconnected from healthy parts and
this increases system reliability and efficiency.
Selectivity:
In detecting the fault and isolating the faulty element, the protective system must be
very selective. Ideally, the protective system should zero-in the faulty element and
isolate it, thus causing minimum disruption to the system.
Speed:
he longer the fault persists on the system, the larger is the damage to the system and
higher is the possibility that the system will lose stability. Thus, it helps a lot if the e
entire process of fault detection and removal of the faulty part is accomplished in as
short a time as feasible.
Reliability and Dependability:
A protective system is of no use if it is not reliable. There are many ways in which
reliability can be built into the system. Good engineering judgement plays a great
part in enhancing the reliability of the protective system.
7
Table 2.1 Fault statistics with reference to type of fault
Further, the probability of faults on different elements of the power system are different.
The transmission lines which are exposed to the vagaries of the atmosphere are the most
likely to be subjected to faults. Indoor equipment is least likely to be subjected to faults.
The fault statistics is shown in Table 2.2.
Table 2.2 Fault statistics with reference to power system elements.
The severity of the fault can be expressed in terms of the magnitude of the fault current and
hence its potential for causing damage. In the power system, the three-phase fault is the
most severe whereas the single line-to-ground fault is the least severe.
8
The devices used to implement the protection scheme are called protection devices. The
devices used to implement the protection scheme is called protection devices and we will
mention them and what is the role each one does as follow.
Circuit Breakers: are the most powerful devices in the system as they are responsible for
closing/ opening the system based on relays command which will be discussed in the next
few lines.
Batteries: they are very important in any protection system as they are the backup
.supply for protective devices so as to be able to operate even in case of power loss
Protective Relays: are the brain of a protective system, they use the measurements from CT
and VT to check whether the system is working properly or there is some kind of fault. In
case of faults the relay sends a trip signal to one or many circuit breakers to disconnect the
.faulty part from the rest of the system
Relay:
It is an electrical element that works with the same principle as a normal switch, but in an
electromechanical way (electrical and mechanical) by giving a direct or alternating current
signal on the relay coil in order to generate a magnetic field, and accordingly the internal
contact points are changed in the sense of opening closed points and closing open points.
Relay components:
The relay consists from the inside on the following parts:
Magnetic coil: works to attract contact points by applying a potential difference on its
two ends.
Open and closed contacts: Its function is to connect or disconnect the current passing.
A spring or spring that is responsible for returning the contact points to their normal
position when the electric current is disconnected from the relay or relay coil.
External parties to connect.
9
Figure 2.1: Relay components.
DPST: stands for (Single Pole Double Throw) contains two poles or two switches with one
switch, and they are in the open state (NO / Normally Open) when the current is cut off
from the relay coil.
SPDT: stands for (Single Pole Double Throw) It contains one pole with two shunts
through which it is possible to choose between the two points (NO or NC) connected with
the common point (C / Common terminal).
DPDT: means (Double Pole Double Throw) contains two poles with two diversions.
10
After having an overview about the components of protection which can be implemented
to protect the system from many faults, now we mention the most severe faults which
can occur in any electrical system and Which we discussed in our project.
Types of electrical protection:
Over and under voltage protection.
Overcurrent protection.
Over and under frequency protection.
11
Overvoltage
Often, there is a misconception where a voltage higher than the usual rated voltage amount
is equivalent to higher output or efficiency. In reality, it is not the case and it only
results in more harm than good.
To be more precise, it’s when a supply voltage of 10 % and above the rated motor voltage
occurs. When overvoltage first occurs, it will usually impact the sensitive system
components – motherboards and circuit boards. All these tiny electronic circuits are unable
to cope with any extra voltage and current peaks. Additionally, it also leads to overheating
due to the conversion of extra heat instead of operational output like torque. All these heats
will continue accelerating and eventually cause the deterioration of bearing and insulation
systems
Overvoltage protection is a measure taken to prevent damage to electrical equipment
caused by excessively high voltage levels. In high voltage systems, such as those found
in power transmission and distribution, over voltages can occur due to a variety of
factors, including lightning strikes, switching transients, and fault conditions. These
high voltage events can cause electrical equipment to fail or malfunction, leading to
costly repairs and potential service disruptions.
There are several methods for protecting electrical equipment from over voltages in high
voltage systems. One common method is the use of overvoltage protectors, such as
surge arresters or varistors, which are designed to divert excess voltage away from
sensitive equipment. Another method is the use of transformers with tap-changing
capability, which can adjust the voltage level of the incoming power to within a safe
range. Protective relays and fuses are also commonly used to detect and interrupt the
flow of electrical current in the event of an overvoltage.
It is important to properly design and maintain overvoltage protection systems in high
voltage systems to ensure the reliability and safety of the electrical equipment. This
may involve regular testing and maintenance of protection devices, as well as careful
analysis of the system to determine the most appropriate protection methods and
devices.
Under voltage
Under voltage happens when the average voltage of equipment falls below the rated
voltage amount. Frequent under voltage can result in a degradation in equipment
performance and reliability.
The winding suffers a substantial amount of wear and tear in the winding and reduces the
lifespan of the equipment. Insufficient voltage means that the equipment has to draw
extra current in order to meet the power requirements. As a result of being unable to
fulfil these needs – the equipment is not able to perform as how it normally does.
12
Especially if the scale of application for the equipment is used on industries and
transmission distribution, the consequences are even dire as the generators,
transformers, compressors, loads and static capacitors connected to the grid are
programmed to operate at the specified voltage and at maximum load as much as
possible.
When it’s not running on the rated voltage, the equipment won’t be operating at its best
ability and instead will start to show signs of breaking down eventually.
An equipment is designed to run within a specific voltage range that is generally +/-
10 percent of rated voltage; anything too high or low will shorten the lifespan of the
machinery.
Causes of issue:
1. The problem of diesel engine generator speed regulation
2. The varistor or rectifier bridge diode on the generator winding is damaged
3. Malfunction of generator regulator board
4. The voltage sampling line is loose, and no voltage can be measured at this time.
5. Ground fault
13
Figure 2.5: Block diagram of an over-current relay.
:types of Over Current relays, such as
1. Instantaneous over current relay.
2. Definite time over current relay.
3. Inverse time over current relay.
The construction and operation of an instantaneous over current relay are quite simple.
In most cases, a magnetic core is wound by a current coil. When there is insufficient
current in the coil, the NO contacts remain open because a piece of iron is fitted in the
relay by hinge support and a restraining spring. When the current in the coil exceeds a
predetermined value, the attractive force is strong enough to pull the iron piece towards the
magnetic core, and the no contacts close.
The pickup setting current is the pre-set value of current in the relay coil. This relay is
known as an instantaneous over current relay because it operates as soon as the current in
the coil exceeds the pick upsetting current. There is no deliberate time delay used.
However, there is always an inherent time delay that we cannot avoid. In practice, an
instantaneous relay has an operating time of a few milliseconds.
14
2. Definite Time Over Current Relay:
This relay is built by intentionally delaying the detection of the current value after crossing it. A
definite time overcurrent relay can be set to issue a trip output exactly one second after it picks up.
As a result, it has a time setting adjustment as well as a pickup adjustment. The characteristic and
the block diagram are shown in Figure 2.6.
15
Figure 2.8: Inverse Time Over Current.
Overloading the circuit, a short circuit, ground fault, or arc fault can lead to an overcurrent.
Possible causes of overcurrent in an electric circuit: short circuit, Excessive load, Design fault,
arcing in circuits, lose connection, Voltage drop, And Earth Faults.
Circuit’s Overloading
When a circuit is subjected to an overcurrent, a circuit overload takes place. The breaker
will trip if overloaded a circuit by plugging too many appliances into one socket. A
surge power draw is another typical sort of overload; this occurs when a motor needs a
lot of electricity to start up.
Short Circuits
In a short circuit, a “hot” wire touches another “hot” wire or touches a neutral wire, there is
a lower resistance along the short circuit path than along the normal path of the circuit,
allowing a lot of currents to flow, resulting in excessive wire heating.
Ground Faults
When a hot wire comes into touch with a grounded item, such as the metal casing of a tool
or appliance or an electrical box made of metal (when placed as part of a grounding
system), a ground fault frequently results.
Arc Faults
Electric discharge leaps from one conductor to another is called an arc fault. This can occur
when a hot wire meets a neutral or ground wire or when a hot wire has a minor break
and only occasionally makes contact.
Loose Connection
Arcing can also be brought on by a loose wire connection on an outlet or other equipment.
High current flow and intense heat are produced by arc faults due to lose connection,
which can melt wire insulation or cause fires.
Each electric device consumes a certain amount of electric current while operating.
However, circuit overload will occur if you use more power than the circuit is designed
for, or short circuits occur in the device or any other fault that’s mentioned above, the
reason doesn’t matter, the overcurrent effect is the same.
In addition to the heat loss from increasing current, the rising current can also damage the
circuit, burn resistors and electronic components, damage electric equipment and home
appliances, and even cause fire to break out around the circuit
16
2.6 Directional Over-Current Relay.
Figure 2.10 shows a double-end-fed power system. The zones to be generated by the relays
are also shown. Consider that we have only over-current relays at our disposal. Will it be
possible to implement the desired zones using simple over-current relays?
In order to answer this question, let us focus on OC relays at bus C. Note that OC relays
operate on the magnitude of fault current and cannot sense the direction of the fault.
Consider fault F, as per the desired zones, only CBs 4 and 5 should trip. However, it can be
easily seen that if plain OC relays are used, CBs 3, 4, 5, and 6 will all trip as the fault will
be seen by OC relays at these locations. Thus, the desired zones are not generated.
17
If directional relays are not provided, in conjunction with OC relays, then the desired zones
will not be generated. This will result in both lines being tripped out for any fault on any
one of the lines.
It may be noted that directional relays with tripping direction away from the bus will be
required at locations '2' and '3' in Figure 2.10. However, at locations '1' and '4', non-
directional over-current relays will suffice. Since directional relay units cost more and also
need the provision of PTs, they should be used only when absolutely necessary.
18
Figure 2.11 Phasor diagram for a directional relay based on induction principle.
Vpc is the voltage applied to the pressure coil. The current drawn by the pressure coil Ipc.,
lags the voltage by a large angle &Pc.
As the fault moves from the forward to the reverse direction, the current undergoes, a large
change in its phase whereas the phase of the voltage does not change substantially.
Thus, voltage signal is the reference against which the phase angle of the current is
measured.
now in a relay based on induction principle, the two fluxes responsible for torque
production, @pc and @cc should be shifted in phase by 90”, for them to produce
maximum torque.
The torque becomes zero when the current phasor is -+90 away from the MTA.
19
2.7 Over and under frequency protection.
Under-frequency:
Under-frequency is generally caused by a system event rather than in the generator itself.
The effect on the generator, however, is almost always an attempt by the system to
extract excessive current from the stator and to drag the rotor speed down. This also
has the effect of depressing the stator terminal voltage.
over-frequency:
generator is an energy conversion device that converts mechanical energy into electrical
energy, with the mechanical energy provided by a steam turbine, diesel engine, or gas
turbine. The frequency is stable around 50Hz or 60Hz under normal conditions. Under
normal conditions, the turbo-generator rotates at its rated speed. Increasing the speed of
the turbine during an abnormal condition causes an increase in frequency in the
generator.
Over-frequency is the result of an instantaneous load reduction when the generator is
synchronized to the system, or from excessive turbine torque when the generator is in
the open-circuit condition before synchronization with the grid Over frequency
protection is used to protect the generator from over speeding of generator’s rotor,
reduce the eddy current losses as the frequency increases.
The abnormal over frequency on the machine could be caused by improper speed control
adjustment or speed controller disoperation, a severe grid disturbance, or a sudden load
through off.
The frequency relay is used for the protection of power generators and other AC equipment
against over frequency and under frequency. The operation of the relay depends on the
definite time principle, on the rate of frequency change principle, or on a combination
of these two principles.
FREQUENCY RELAYING:
The relay which operates based on the frequency and produces a tripping
signal when the magnitude of frequency drops below a predetermined value is
known as under frequency relay. Under frequency relays are either
electromagnetic type or static type.
20
Under frequency relays are usually installed at distribution substations where
selected loads can be disconnected which will balance load and generation.
The first line of these relays is set just below normal operating frequency
range (59.4-59.7Hz).
21
.Load Effect 2.9
The ability to detect low-grade faults is limited by the necessity of not tripping during
emergency load conditions. On distribution and sub transmission systems, overcurrent
relays must be set sufficiently above load and below fault currents to allow for both
dependability and security. On higher voltage systems, distance relays must not encompass
.the load impedance (Figure 2.6)
22
CHAPTER THREE: HARDWAER.
Overvoltage occurs when the voltage in a system exceeds the maximum voltage that the
device can handle. This may result in equipment damage and power outages.
The ESP32 monitors the voltage if any of the phases is higher than a pre-set maximum
voltage, preventing damage from overvoltage, it also monitors the voltage if any of the
phases are below the pre-set minimum voltage, preventing damage from under voltage.
An under voltage condition can occur when the voltage in the system drops below the
level required to operate the device, then the relay will be released.
ESP32-WROOM-32 is a powerful, generic Wi-Fi+BT+BLE MCU module that targets a
wide variety of applications, ranging from low-power sensor networks to the most
demanding tasks, At the core of this module is the ESP32-D0WDQ6 chip*. The chip
embedded is designed to be scalable and adaptive. There are two CPU cores that can be
individually controlled, and the CPU clock frequency is adjustable from 80 MHz to
240 MHz also power off the CPU and make use of the low-power co-processor to
constantly monitor the peripherals for changes or crossing of thresholds. ESP32
integrates a rich set of peripherals, ranging from capacitive touch sensors, Hall sensors,
SD card interface, Ethernet, high-speed SPI, UART, I²S andI²C.
The integration of Bluetooth, Bluetooth LE and Wi-Fi ensures that a wide range of
applications can be targeted, and that the module is all-around: using Wi-Fi allows a
large physical range and direct connection to the Internet through a Wi-Fi router, while
using Bluetooth allows the user to conveniently connect to the phone or broadcast low
energy beacons for its detection. The sleep current of the ESP32 chip is less than 5 µA,
making it suitable for battery powered and wearable electronics applications. The
module supports a data rate of up to 150 Mbps, and 20 dBm output power at the
antenna to ensure the widest physical range.
The module does offer industry-leading specifications and the best performance for
electronic integration, range, power consumption, and connectivity.
RF certification FCC/CE-RED/IC/TELEC/KCC/SRRC/NCC
23
Wi-Fi certification Wi-Fi Alliance
AFH
power supply
perature range
24
Table 3.1: ESP32-WROOM-32 Specifications
Figure3.1: Reflow
Profile
25
3.2Pin Layout.
26
3.3Pin Description.
ESP32-WROOM-32 has 38 pins. See pin definitions in Table 2.
Table 3.2: Pin Definitions
27
Name No. Type Function
IO25 10 I/O GPIO25, DAC_1, ADC2_CH8, RTC_GPIO6, EMAC_RXD0
IO26 11 I/O GPIO26, DAC_2, ADC2_CH9, RTC_GPIO7, EMAC_RXD1
IO27 12 I/O GPIO27, ADC2_CH7, TOUCH7, RTC_GPIO17, EMAC_RX_DV
GPIO14, ADC2_CH6, TOUCH6, RTC_GPIO16, MTMS, HSPICLK,
IO14 13 I/O
HS2_CLK,
SD_CLK, EMAC_TXD2
GPIO12, ADC2_CH5, TOUCH5, RTC_GPIO15, MTDI, HSPIQ,
IO12 14 I/O
HS2_DATA2,
SD_DATA2, EMAC_TXD3
GND 15 P Ground
GPIO13, ADC2_CH4, TOUCH4, RTC_GPIO14, MTCK, HSPID,
IO13 16 I/O
HS2_DATA3,
SD_DATA3, EMAC_RX_ER
SHD/SD2* 17 I/O GPIO9, SD_DATA2, SPIHD, HS1_DATA2, U1RXD
SWP/SD3* 18 I/O GPIO10, SD_DATA3, SPIWP, HS1_DATA3, U1TXD
SCS/CMD* 19 I/O GPIO11, SD_CMD, SPICS0, HS1_CMD, U1RTS
SCK/CLK* 20 I/O GPIO6, SD_CLK, SPICLK, HS1_CLK, U1CTS
SDO/SD0* 21 I/O GPIO7, SD_DATA0, SPIQ, HS1_DATA0, U2RTS
SDI/SD1* 22 I/O GPIO8, SD_DATA1, SPID, HS1_DATA1, U2CTS
GPIO15, ADC2_CH3, TOUCH3, MTDO, HSPICS0, RTC_GPIO13,
IO15 23 I/O
HS2_CMD,
SD_CMD, EMAC_RXD3
GPIO2, ADC2_CH2, TOUCH2, RTC_GPIO12, HSPIWP,
IO2 24 I/O
HS2_DATA0,
SD_DATA0
IO0 25 I/O GPIO0, ADC2_CH1, TOUCH1, RTC_GPIO11, CLK_OUT1,
EMAC_TX_CLK
GPIO4, ADC2_CH0, TOUCH0, RTC_GPIO10, HSPIHD,
IO4 26 I/O
HS2_DATA1,
SD_DATA1, EMAC_TX_ER
IO16 27 I/O GPIO16, HS1_DATA4, U2RXD, EMAC_CLK_OUT
IO17 28 I/O GPIO17, HS1_DATA5, U2TXD, EMAC_CLK_OUT_180
IO5 29 I/O GPIO5, VSPICS0, HS1_DATA6, EMAC_RX_CLK
IO18 30 I/O GPIO18, VSPICLK, HS1_DATA7
IO19 31 I/O GPIO19, VSPIQ, U0CTS, EMAC_TXD0
NC 32 - -
IO21 33 I/O GPIO21, VSPIHD, EMAC_TX_EN
RXD0 34 I/O GPIO3, U0RXD, CLK_OUT2
28
TXD0 35 I/O GPIO1, U0TXD, CLK_OUT3, EMAC_RXD2
IO22 36 I/O GPIO22, VSPIWP, U0RTS, EMAC_TXD1
IO23 37 I/O GPIO23, VSPID, HS1_STROBE
GND 38 P Ground
Notice:
Pins SCK/CLK, SDO/SD0, SDI/SD1, SHD/SD2, SWP/SD3 and SCS/CMD, namely, GPIO6
to GPIO11 are connected to the integrated SPI flash integrated on the module and are not
recommended for other uses.
Robust Design
Engineered for mobile devices, wearable electronics and IoT applications, ESP32 achieves
ultra-low power consumption with a combination of several types of proprietary software.
ESP32 also includes state-of-the-art features, such as fine-grained clock gating, various
power modes and dynamic power scaling.
29
High Level of Integration
ESP32 is highly-integrated with in-built antenna switches, RF balun, power amplifier, low-
noise receive amplifier, filters, and power management modules. ESP32 adds priceless
functionality and versatility to your applications with minimal Printed Circuit Board
(PCB) requirements.
ESP32 can perform as a complete standalone system or as a slave device to a host MCU,
reducing communication stack overhead on the main application processor. ESP32 can
interface with other systems to provide Wi-Fi and Bluetooth functionality through its SPI /
SDIO or I2C / UART interfaces
I2C at 100 kHz bus frequency runs slowly. The default I2C bus clock speed is 100 kHz
(100000). ...
No DAC-based audio output. Current versions of the ESP-IDF SDK do not have the
required APIs for DAC-based audio output. ...
Deep Sleep & Wake-up sources
30
CHAPTER FOUR: SOFTWARE
4.1 MATLAB
MATLAB is an advanced programming language. It is also an interactive environment for
developing algorithms and performing data analysis. It is also used in the development of
applications and models. It provides the user with a set of mathematical tools and functions
that aid in the discovery of very fast solutions based on spreadsheets or even traditional
programming languages; the most prominent of which is Java (JAVA, C ++, C), and its
popularity among control system, computational biology, and other programmers is growing.
31
him; this environment includes the processes of importing and exporting data, as well
as controlling data and files based on language.
Charts
It is a specialized graphical system based on a set of special commands for creating
data visualizations with two and three dimensions.
The mathematical function library MATLAB.
The MATLAB language is built on a vast array of algorithms and mathematical
functions, ranging from the most basic to the most complex. Its dimensions include
addition, square and cubic roots, tangent, cosine, and other functions, as well as finding
quick solutions without delay.
32
4.3 COMPONENTS OF GRID
1) Generator1.
A three-phase zero-impedance voltage supply is carried out by this block. Entry 1 (N) of the
block provides access to the common neutral (neutral) node of the three sources. It is possible
to pre-program temporal changes in the amplitude, phase, and frequency of the primary, but
we chose not to specify (none). Two harmonics are also added above the fundamental.
33
2) Generator2:
3) Transmission lines1&2:
34
Figure4.4: Transmission lines in grid
This block models a three-phase transmission line with a single PI section. The
model consists of one set of RL series elements connected between input and
output terminals and two sets of shunt capacitances lumped at both ends of the
line.
RLC elements are computed using hyperbolic corrections yielding an exact
representation in positive- and zero-sequence at specified frequency only.
4) FrequencyCB1&2:
35
FrequencyCB1:
CB 1 disconnects the first generator if the value of the frequency set by the first
frequency relay changes. At the specified time from frequency relay.
FrequencyCB2:
CB 2 disconnects the second generator if the value of the frequency set by the second
frequency relay changes. At the specified time from frequency relay1.
5) Frequency Relay:
The frequency relay (ANSI/IEEE C37.2 Device No. 81) operates when the system frequency
is below or above a set value.
36
Figure4.7: Frequency Relay Block.
6) Buss:
37
After )phase-to-ground(
Simulink
V v measurement I measurement
Bus1 25kv
Bus2 230kv
Bus3 33kv
Bus4 400v
Bus5 400v
Bus6 (load) 400v
7) three-phase transformer:
38
This block implements a three-phase transformer using three single-phase
transformers. We set the winding contact to "Yg" when you want to reach the
ground point of the Wye.
Types of transformer:
8) Load:
Constant impedance load model (constant Z): A static load model in which the power varies
with the square of the voltage magnitude. It's also known as the constant admittance load
model.
39
Configuration phase-to- Frequency(HZ) Active Reactive power
phase power(w) QL (VAR)
voltage
Y(grounded) 400v 50 1M 100K
9) ESP 32:
40
Figure4.12: Over voltage CB in grid.
CB over voltage disconnects the grid if the value of the voltage set by the over voltage relay or
take an order from ESP32 changes. At the specified time from over voltage relay.
The ESP32 is connected with the over voltage relay through an OR gate to control the over
CB.
CB under voltage disconnects the grid if the value of the voltage set by the under voltage relay
or take an order from ESP32 changes. At the specified time from under voltage relay.
The ESP32 is connected with the under voltage relay through an OR1 gate to control the over
CB.
41
Figure4.14: Over current CB in grid.
CB over Current disconnects the grid if the value of the current set by the over current relay or
take an order from ESP32 changes. At the specified time from over current relay.
The ESP32 is connected with the over current relay through an OR2 gate to control the over
current CB.
42
Over voltage CB is connected to the bus load and in series with under voltage and over
current CB, which are also connected to the load.
Overvoltage Relay (ANSI/IEEE C37.2 devices number 59) that operates when the
voltage exceeds the predetermined value.
43
Figure4.16: Overvoltage relay block.
Undervoltage Relay (ANSI/IEEE C37.2 devices number 27) that operates when the voltage is
less than the predetermined value.
44
Undervoltage Under voltage Nominal frequency (Hz)
Setting Ride Through voltage(Vrms)
Time Delay
20 0.2 230 50
45
Instantaneous Overcurrent Relay (ANSI/IEEE C37.2 devices number 50) that operates
when the current exceeds a predetermined value.
High-set (I Current Current frequency (Hz) Initial RMS
>>) Transformer Transformer value
Primary (A) Secondary (A)
x2 2500 5 50 0
46
Implements a fault (short-circuit) between any phase and the ground. When the external
switching time mode is selected, a Simulink logical signal is used to control the fault
operation.
Fault resistance Ron Ground resistance Rg Snubber resistance Rs
(Ohm) (Ohm) (Ohm)
0.001 0.01 1M
47
Figure4.23: The load signal is in the normal position.
48
signal over frequency
49
Figure4.27: Buss voltage in case over frequency.
50
signal under frequency
51
Figure4.31: Buss voltage in case under frequency.
52
References
[1] Kauhaniemi, Kimmo and Voima, Sampo. FUNCTIONAL REQUIREMENTS OF SMART GRID
PROTECTION, University of Vaasa,2012, Page 1.
[3] Khan, Nitasha. Energy Management Systems Using Smart Grids: An Exhaustive Parametric
Hindawi,2022, Page 2.
[4] Uluski, R. Using distribution automation for a self-healing grid, IEEE Power and Energy
Society General Meeting ,2012, Page 1-5.
[5] Alamin, Yousif and Yahiya, Wael and MohammedV, Mohammed. Implementation of over-voltage
& undervoltage protection system, Sudan University of Science and Technology College of
Engineering ,2017, Page 7.
[6] Emon, Ahsan and Koondhar, Mohsin and Memon, Imdad and Memon, Munawar and Koondhar,
Masood and Abid, S and Bukhari, Syed and Channa, Irfan. Modeling and Simulation of Under -
Frequency Relay for Generator Protection,2021, Page 2616-7069.
[7] Khattak, Khalid Daud. Design and Implementation of Overcurrent Protection Relays Test Bench,
Graduate Theses, Dissertations, and Problem Reports ,2019, Page 7468.
[8] Munoz, Omar and Ruelas, Adolfo and Rosales, Pedro and Acuña, Alexis and Suastegui, Alejandro
and Lara, Fernando. Design and Development of an IoT Smart Meter with Load Control for Home
53
[9] Abed, Issa and Naser, Hayder. ESP32 Microcontroller Based Smart Power Meter System Design
[10] A Arefín, Utsho and Choudhury, Md and Chakma, Sarna. Implementation of Over-Voltage &
[11] Y.G, Paithankar and S.R, Bhide. Over-current Relay, Visvesvaraya National Institute of
Technology Nagpur,2003, Page28.
[12] Y.G, Paithankar and S.R, Bhide. Sensitivity, Visvesvaraya National Institute of Technology
Nagpur,2003, Page14.
[13] Y.G, Paithankar and S.R, Bhide. Phase Faults and Ground Fault, Visvesvaraya National Institute
of Technology Nagpur,2003, Page5.
[14] Y.G, Paithankar and S.R, Bhide. Instantaneous OC Relay, Visvesvaraya National Institute of
Technology Nagpur,2003, Page29.
[15] Y.G, Paithankar and S.R, Bhide. Definite Time Over-Current Relay, Visvesvaraya National
Institute of Technology Nagpur,2003, Page30.
[16] Y.G, Paithankar and S.R, Bhide. Inverse Time Over-Current Relay, Visvesvaraya National
Institute of Technology Nagpur,2003, Page30.
[17] Y.G, Paithankar and S.R, Bhide. Directional Over-Current Relay, Visvesvaraya National Institute
of Technology Nagpur,2003, Page44.
[18] Y.G, Paithankar and S.R, Bhide. Characteristics of directional relay, Visvesvaraya National
Institute of Technology Nagpur,2003, Page45.
[19] J. Lewis Blackburn, Thomas J. Doming, FREQUENCY RELAYING, Boca Raton London New
York,2006, page559.
[20] [Link], [Link]. Directional Overcurrent Relays, BSEE City College of New
York USA,2014, Page96.
[21] [Link], [Link]. Load Effect, BSEE City College of New York USA,2014,
Page287.
54
[22] [Link], [Link]. Relay Testing, BSEE City College of New York USA,2014,
Page293.
[24][Link]
[25][Link]
[26][Link]
[27] [Link]
[28][Link]
55
56