Greetings
Greetings
Good morning to everyone attending and to our esteemed jury, my name is Sendelzereg Houssem
and I am Harchaoui Yahia, and today we will present our master’s project entitled “IoT-Based Battery
Monitoring System for Improving Microgrid Management”. This presentation will cover the following
points READ THE OUTLINE AND HIGHLIGHT EVERY POINT.
Introduction:
Even if the traditional power grid has supported the electrical needs of humanity for generations, it is
now necessary to install drastic changes and advancements to avoid the over-utilization of this
system. MGs and SGs are introduced as the future of the PowerGrid system, and this study will focus
on enhancing the Battery management system of a MG by incorporating IoT technology.
Smart Grids:
Smart Grids are large interconnected power systems that envelop geographical locations such as
whole cities or countries. Smart grids are systems that integrate advanced equipment, services, and
technologies for communication, control, monitoring, and self-diagnosis within the network.
As u can see in this figure, A control unit is the brain center of the grid, managing every entering and
leaving data.
• Better communication
Micro Grids:
Some engineers consider Micro Grids to be a miniature unit of a SG. After all, they both share a
similar set of characteristics such as resilience better communication or any characteristics
mentioned in the previous slide; however, MGs only manage a very restricted area such as a home or
a small neighborhood
As shown in this figure, MGs are the combination of distributed energy sources such as solar panels,
a control unit, and a load. A MG has multiple operation modes such as the islanded mode or the
connected mode.
Even though SGs and MGs are impressive concepts in theory, achieving reliable two way data
communication is IoT integration in Modern Grids is the most efficient way to ensure the
implementation of the “smart” characteristic, IoT technology is ideal to maintain interconnectivity
between power grid systems.
Fully aware: IoT promotes interconnecitivity between the devices of a network, which means that
data comes from various points of a same network.
• Reliable transmission: Value and time accurate data are a main focus of IoT, any inconsistencies in
data are not permitted and considered fatal faults of a system.
• Intelligent processing: The usage of cloud storage allows a more efficient data processing.
Smart grids being large networks with multiple infrastructures, IoT integration allows an
improvement of each aspect. This figure is a diagram of the subsystems of a SG, let us go over the
benefits of IoT integration in these sub systems.
Implementing IoT to a large network such as a SG may be challenging, instead we focus on enhancing
each MG to meet higher standards.
Contrarily to SGs, MGs do not have as many subsystems to consider, thus, this figure only shows the
implementation of IoT technology on a smaller scale mainly impacting the control and data
acquisition aspects of the grid. This figure represents the architecture of an IoT connected MG:
The generation and energy storage side is connected to the load side through an IoT server, or cloud.
If we focus on one of the loads, for instance a prosumer in this architecture is considered an asset,
and its associated architecture is named after the asset for instance the architecture tied to a solar
panel would be named internet of solar panel. The internet of prosumer may use a MCU to collect
data from his used appliances, and his personal generation unit such as a solar panel in this case and
carry it through a Wireless Sensor and Actor Network such as WiFi or Zigbee to the MCU and to the
IoT server.
Given the importance of flexibility and resilience in a MG, the availability of an energy storage system
in a necessity. Our study will focus on the use of a battery energy system.
The operation principle of a battery is based on converting chem to elec energy using RedOx
chemical reactions. The microunit responsible for storing energy is called a cell, each cell has two
electrodes: The cathode (positive), the anode (negative), and an electrolyte separating the two
plates, as displayed in Figure 3.1. The voltage of a battery cell at rest (battery is neither in charge nor
discharge) is equivalent to the cell’s emf and is labeled open circuit voltage (OCV). As stated before,
the operation principle of a battery is related to electrochemical reactions. During discharge, an
oxidation reaction is started at the anode, which produces an electron release and positively charge
ions. These electrons are consumed by the cathode, creating an electric current. The interaction of
positive and negative ions in the electrolyte maintains an electric neutrality stopping electrons from
going back.
While many battery concepts exist such as voltage current or efficiency, any battery user focuses on
seeing a clear SOC. the SOC represents the ratio of remaining capacity over the rated or maximum
capacity, however this ratio is heavily affected by temperature, aging and the discharge rate. The
DoD is considered a complimentary notion to the SOC since the addition of the SOC and DOD is
equation to a 100%. For instance, if a battery with a rated capacity of 100Ah discharges to 80Ah, it
has a SOC of 80% and a DOD of 20%. This project follows a mathematical and experimental approach
supported by algorithmic methods. There are two main mathematical approaches to determine the
SOC of a battery OCV and coulomb counting.
OCV:
Define from 3 squares, The methodology of this technique is to disconnect the battery for a time
period of approximately 2 hours in order to reach chemical equilibrium, then measure the OCV and
extract the SOC or DOD depending on the provided discharge slope. This figure shows the discharge
slopes of a Lithium Ion and a Lead acid battery, if we were to use the OCV method we would use
these plots to match each measured voltage with a DoD, and thus a SOC.
This technique is heavily affected by voltage measurement inaccuracies that can be caused by:
internal resistance, sudden chemical reactions, voltage drops in high current batteries.
In addition, certain discharge curves are inadequate to using this method, for instance the discharge
curve of the Li-Ion battery exhibits a very flat behavior which means extracting the SOC for a certain
voltage value leads to measurement errors.
Coulomb counting:
Coulomb counting refers to the technique of determining the remaining charge in a battery by
continuously integrating the current flow. The mathematical law to the coulomb method is:
Explain each parameter starting with: coulombic efficiency is the ratio of the discharged capacity of a
discharge current and charging current (𝜂𝐶 (%) = 𝑄𝑑𝑖𝑠𝑐ℎ𝑎𝑟𝑔𝑒𝑑 𝑄𝑐ℎ𝑎𝑟𝑔𝑒𝑑 × 100)
battery over its charged capacity and it is impacted by many parameters such as Temperature SOC
The limitations that arise from this method are determining the initial SOC, and the accumulation of
integral computations that cause mathematical inaccuracies.
CC with OCV calibration:
This method is a mix of the two techniques mentioned before, its aim is to mitigate each of their
limitations, we use the OCV to determine the initial SOC and carry on with the coulomb counting
technique. However, it exhibits a set of downsides such as the difficulty of estimating the initial SOC
when the battery discharge slope is flat. For instance in the discharge curve of the Li Ion battery we
notice that determining the initial SOC with the OCV technique between 80 and 30% is difficult, thus
we have to fully charge or discharge the battery to avoid any flat regions.
The designed circuit is shown in this schematic, a battery a microcontroller, an IoT platform and a
Load. The chosen IoT platform was blynk for its interactive data display and mobile and computer
versatility.
ADCs are a crucial factor in choosing a MCU in a circuit, thus we compared between the Arduino and
ESP32 ADCs to observe the linearity and noise tolerance of each.
Graphs:
Arduino noise tolerance the arduino ide was used to plot 200 serial samples, the comparison only
takes into account the shape of each plot and not actual computed data, the graphs have been
scaled down to ensure a clearer read. Surpsingly, the Arduino ADC has a greater noise tolerance.
Espressif system has devised a plan to mitigate the ADC non-linearity using a calibration software,
this software is commonly known as application programming interface (API) the effect of this API is
clearly noticeable in this figure.
Using an external ADC: By utilizing the SPI or I2C interface, connect an external ADC with an
adequate resolution depending on the needs of the circuit. Oversampling: Instead of using an ADC of
higher resolution, it can be virtually augmented via oversampling. It involves multiple readings of a
same input and averaging them for a more accurate result. The Arduino IDE can be used to achieve
oversampling using the analongRead() command.
In order to avoid system complexity, we opt for using the ESP32 MCU implemented with the
mentioned API to mitigate linearity errors. In addition to the WiFi compatibility which is considered
the preferred network in a MG for its range and its data rate.
Selected sensors:
WE chose this current sensor because it is a bidirectional hall effect sensor, and its ability to be
placed in series with the load.
In order to ensure a correct estimation of the Battery SOC, we try to implement a SOC computation
algorithm using Matlab and Simulink. The point of this method is to derivate a polynomial that
mimics the behavior of the battery depending on its type and rated characteristics.
The Simulink model shown here is meant to simulate the battery behavior and compare it with the
computed output and ensure a low error.
Battery a battery model provided by Simulink with a modulable rated conditions and discharge
current and battery type
Load current The Controlled Current Source block converts the Simulink input signal into an
®
equivalent current source. The generated current is driven by the input signal of the block.
Current shunt The Current Measurement block is used to measure the instantaneous current flowing
in any electrical block or connection line. The Simulink® output provides a Simulink signal that can be
used by other Simulink blocks.
Pack voltage The Voltage Measurement block measures the instantaneous voltage between two
electric nodes. The output provides a Simulink® signal that can be used by other Simulink blocks.
- Coulomb counter A simple integrator with a gain, current as input and initial SOC as
initial condition.
- Saturation inserts an upper and lower limit to the signal in our case the upper limit is
100 and lower is 0
The scope then generates a slope of the estimated SOC of our coulomb counter, the modeled SOC of
the Simulink battery and an error slope.
We can see that the estimated and simulated SOC are the same, giving a 0 error, This is only possible
because both SOCs are results of simulation. The voltage decreases during the discharge and reaches
0 at the same time as the SOC.
A polynomial is generated using the polyfind function of matlab to mimic the SOC behavior, the red
line is the polynomial while the blue line is the estimated SOC. This polynomial is used to compute
the SOC in the simulated proteus circuit.
We also compared the results of this method with previously acquired measurements found using
the OCV method to confirm the accuracy of our algorithm. Analyzing this table we notice that the
practical battery measurement reach full discharge at a lower voltage than the simulated battery, this
is caused by the aging of the battery and the multiple charge discharge cycles that already went by.
The error percentages are extremely low for voltages ranging from 13 to 11