1. Introduction
Consumer safety, resiliency, reliability, and power quality are under threat as demand rises and the power system infrastructure ages. Governments must invest heavily in the construction and modernization of power system infrastructure. As a result, renewable energies (REs) account for many electrical networks such as microgrids [
1]. Many downsides have arisen due to the increased prevalence of REs, including dynamic, control, and energy management issues. Surplus power generation (SPG) has emerged as a critical topic in recent years, owing to REs’ unpredictable behavior and increased penetration [
2].
However, meteorological conditions, such as wind speed, temperature, and solar irradiation, impact RE generation efficiency, which can cause multiple problems in an electrical grid. Therefore, the more efficient and secure microgrid (MG) solution necessitates using a hybrid grid approach built on RE [
3].
An MG utilizes a combination of energy sources (renewable and non-renewable) and energy storage systems (ESSs) to fulfill load demand. An MG can be linked to the primary grid through a power converter or operated independently [
3]. MGs function independently in an isolated mode when a fault occurs in the primary grid. As shown in
Figure 1, an MG consists of power sources, a storage system, balanced and regulated electrical loads, and intelligent devices such as circuit breakers (CBs) and inverters.
The discounted power production of renewable sources causes microgrid imbalance, which reduces the importance of a microgrid for residential use. Therefore, it is crucial to include an energy management system and demand response mechanism for system stability and reduction of electricity bills, as mentioned in [
4].
The energy management system is a multiobjective, complicated control system that deals with challenges from various technological fields, time ranges, and physical levels. Load power-sharing, voltage/frequency and power quality regulation, market participation, short- and long-term scheduling, and so on are all areas of interest [
5].
The MG central controller is an MG brain used for improving its performance, calculating optimal values, achieving voltage and frequency control, and balancing load. The principal objective is to keep the system’s voltage and frequency under strict supervision. The MG is automatically reconnected following islanding, utilizing frequency differences between the islanded mode and the main grid [
6]. The microgrid control system ensures that all control functions are performed. Its objective is to ensure that power is distributed evenly and precisely across the system and manage voltage and frequency. The EMS functions can be performed centrally or dispersed.
In centralized control, all data are collected by a single MGCC unit that can calculate the necessary computations and specify the control procedures and actions. This strategy necessitates extensive communication between the MGCC and the other substation units. On the other hand, decentralized control uses the local controller to operate the unit [
7].
The microgrid of distributed energy should be monitored and controlled to meet the following requirements [
8]:
sharing the load consumption among the power sources;
in island mode, voltage and frequency control;
reconnection to the electrical grid and islanding;
optimal power production and consumption in the microgrid;
power distribution system components are monitored in real-time.
Control levels in a hierarchical control structure can be used to balance entirely centralized and completely dispersed control [
9]. The three control levels that apply to a microgrid’s hierarchical control are as follows:
The primary control is based on droop control, which shares the microgrid’s load among power sources.
Secondary control corrects steady-state errors caused by droop control and makes sure that DER sources in the microgrid are sent out at the best times.
Tertiary control manages power flow between the microgrid and the power grid to optimize grid-coordinated operations.
The concept of MGs cannot be widely adopted unless an active energy management system (EMS) is implemented to achieve an efficient and reliable control procedure [
10].
A recent study indicates that between 20 and 30 percent of building energy usage could be reduced with optimal operation and management and without structural changes to the energy supply system. Through a proper energy management system, it is feasible to reduce the energy consumption of buildings [
11] significantly.
An EMS is used to maximize the performance of dispatchable energy sources such as wind, photovoltaic, storage systems, and demand-side management across the main grid and power exchanges across microgrids [
12].
Furthermore, extending the usage of the RES in microgrids has increased uncertainties and created new uncertainty parameters in the operation of MGs, and decreased the system’s stability. As a result, traditional EMSs in MG research based on deterministic modeling is no longer suitable for mitigating risks. As a result, new techniques and models based on EMSs in advanced networks are being created to analyze the EMS in microgrids under various uncertainties [
13].
The microgrid type, the elements employed, and the geographic area influence how each control strategy is implemented. While centralized and decentralized control approaches have many advantages (low-performance complexity), they also have drawbacks in reliability, expandability, and flexibility [
14].
Both the MG and EMS are critical in resolving challenges associated with DER unit integration. For instance, both the MG and EMS are essential in resolving issues related to integrating DER units such as photovoltaic (PV) systems, wind turbines, microturbines systems, and fuel cells and batteries into power systems. Examples include photovoltaic (PV) systems, wind turbines, microturbines fitted with a combined heat and power (CHP) system, and hybrid power systems comprised of fuel cells and batteries [
15].
Advanced energy management systems are essential for flexibility since they monitor and control energy production, storage, and consumption in smart microgrids while considering user comfort and economic and environmental concerns [
16]. The advancement of energy management in the microgrid for energy management, control, and monitoring has been described in several study methodologies in the literature. In recent research, we suggested multiple control approaches for microgrid control, including PI/PID linear control, fuzzy logic, and artificial neural network control for energy management, voltage, and frequency regulation [
17]. The simulation results demonstrate that the fuzzy logic controller outperforms alternative solutions. As a result, we shall develop the same controller for more complex cases in this study.
Microgrid applications have been linked to various monitoring systems to provide real-time data to prosumers and power producers. The Internet of Things (IoT) is one of these emerging technologies that has gained appeal in this industry due to its ease of integration and low cost [
18].
IoT technologies are based on an embedded system capable of reading electrical characteristics from sensors connected to the electrical system and transferring these data to a cloud server over a TCP/IP Internet connection [
19]. Large-scale distributed electrical generation systems necessitate long-range wireless technology. Despite all of the enticing features of IoT technology, such approaches have limited reach and throughput and can only transport tiny amounts of data. Large-scale distributed electrical generation systems necessitate long-range wireless technology. Despite the allure of IoT technology, such approaches are restricted in coverage and throughput and can only be utilized to transport tiny amounts of data [
20,
21].
Deploying IoT nodes in a private network with a star topology is another way to overcome range limitations. A local gateway uses any wireless device that supports TCP/IP connections to transfer data from nodes to a remote server [
22].
Data acquisition units (DAQs) are another approach used for microgrid monitoring [
23]. These are small electronic devices that are physically coupled to a processing unit and are used to gather and transfer data. The processing unit handles data gathering, display, analysis, and possible transfer to other destinations utilizing various communication protocols. Because DAQs are not designed to communicate data outside the processing unit, they are substantially faster than the IoT. DAQs in smart grid monitoring systems have received much attention in the literature [
24,
25].
The nonintrusive load monitoring (NILM) algorithm is applied and used in many studies as a monitoring system to analyze and control microgrids [
26,
27]. NILM is a technique for identifying the power consumption of different appliances and their activation intervals by disaggregating the power consumption profile of the house, which avoids the installation and maintenance costs of separate sensors for single devices, which are required in intrusive techniques [
28].
Numerous research has been conducted on developing intelligent energy management systems for microgrids. An energy management system for a microgrid was proposed in [
29] based on particle swarm optimization (PSO). In [
30], the authors developed an intelligent monitoring system based on the Arduino device that monitors the system’s current and voltage and the interface for data analysis. Ref. [
31] described an intelligent house management system based on IEEE 802.15.4 and ZigBee sensor networks that enable an indoor network’s more thoughtful and autonomous establishment.
The Internet of Things (IoT) allows intelligent microgrids to share information with more users while also improving connectivity across a variety of infrastructures [
32]. The Internet of Things (IoT) is the fourth generation of supervisory control and data acquisition (SCADA), a monitoring and control system that communicates with the outside world through an Internet gateway. The cloud system is the best solution for storing IoT data. A cloud system is a database hosted by a third party and sends data via the Internet. Cloud systems have numerous advantages, including extensive data storage, high dependability, low cost, and remarkable scalability to handle increasing labor volumes.
In [
33], the LabVIEW simulator and an Open Platform Communications (OPCs) interface provide a remote monitoring tool for an experimental microgrid. This article discusses intelligent microgrid monitoring in which all system components are connected to a central server through a long-range bridging WLAN.
The microgrid would require an effective measuring and communication system to monitor the power and cost profile regularly and quantify power losses. The authors reported microgrid management for frequency/voltage regulation and proportional reactive/active power-sharing for hybrid DGs in [
34]. To generate the model-suggested communication structures, this article employs data flow between the MATLAB software program and the open-source IoT framework ThingSpeak. To imitate real-time cloud communication, ThingSpeak was chosen.
In Ref. [
35], a real-time data monitoring system of a microgrid is proposed using the ThingSpeak platform. The remote monitoring center can access microgrid data for data analysis. ThingSpeak [
36] is a cloud-based IoT analytics software that enables you to aggregate, visualize, and analyze live data streams. You may transmit data to the ThingSpeak platform from your devices and build real-time data visualizations. It can perform online data stream analysis and processing and immediately visualize data presented by system gateways. ThingSpeak is frequently used in IoT systems that require analytics for prototyping and proof of concepts (
Figure 2).
This paper will propose a robust control strategy for microgrid energy management for multiple scenarios of load demands. The fuzzy logic controller is used for the EMS as the primary controller to stabilize the microgrid bus (frequency/voltage/power). In addition, the microgrid system is supervised at all times using a real-time monitoring platform (Thingspeak).
The remainder of this paper is organized as follows:
Section 2 presents the system description, in which we will explain the modeling of each microgrid element, the proposed energy management strategy, and the parameters of each component.
Section 3 discusses the results of the simulation. This paper ends with a conclusion.
2. System Description
The microgrid proposed for a residential home used in this work is shown in
Figure 3. It has a photovoltaic panel, a small wind turbine, a battery storage system, and home AC and DC loads.
The hybrid microgrid is configured as shown in
Figure 4. All renewable energy sources integrate the DC bus’s electrical power and use the inverter, and power is always available for the AC loads. Solar and wind power sources are the primary source for the home. The battery storage system (BSS) guarantees the balance at the microgrid between the produced energy and the loads required.
The hybrid microgrid system proposed in this work comprises multiple power sources, converters, loads, and controllers. The signal (S1–S4) presents the output of the proposed energy management system used in the control system power converter.
2.1. Wind Turbine System
The mathematical model of the proposed wind turbine is presented in the following equations: A wind turbine is a device that transforms wind kinetic energy into mechanical energy, known as wind power. The following equations can represent the mechanical power generated by a wind turbine [
37].
where
υ indicates wind speed, β epresents the pitch angle,
ωt signifies the turbine speed,
R denotes the blade radius,
Cp denotes the power coefficient,
λ means the tip–speed ratio,
ρ indicates water density, and A means blade area.
The wind conversion system uses a PSMG, which has the following features [
37]:
where:
Idq . represents the vector of stator current.
Te represents the electromagnetic torque.
represents the viscous friction coefficient.
Ldq represents the dq inductances matrix.
J is the moment of inertia.
ψdq ; the flux linkages vector is represented by this variable.
Vdq represents the voltage stator vector.
Rdq is the stator resistance matrix.
As shown in
Figure 5, the wind turbine system comprises a wind turbine, a synchronous permanent magnet generator, and a power converter that uses the maximum power point tracking (MPPT) algorithm to extract maximum power from the wind generator. As a result, the model for the wind energy converter is as follows [
37]:
where
denotes the wind current rectified,
denotes the inductance,
denotes the current of the inductor,
denotes the voltage input rectified,
denotes the control signal,
denotes the link voltage, and
and
denote dynamics uncertainty in the energy stage parameters.
The wind energy system (WES) is the most readily available and promising source of electrical energy. The wind’s kinetic energy is used to spin turbines that generate mechanical energy. Mechanical energy is converted to electrical power by the generators. Therefore, wind energy is produced according to the linear relationship with wind speed.
The permanent magnet synchronous generator (PMSG) is directly connected to the wind turbine, and the generated output voltage is rectified using a three-phase diode bridge. The MPPT technique based on the P and O algorithm is implemented using a DC–DC boost to follow the wind turbine’s maximum power point. The parameters of wind system are presented in
Table 1.
2.2. Photovoltaic Solar System
A photovoltaic generator is a system for producing and managing energy from photovoltaic collectors, and it mainly consists of a set of interconnected modules built from semiconductor materials. A diode connected in parallel with a current generator and two resistors, one in series and the other in parallel, as
Figure 6 below shows, is developed and validated in [
38] and used as subsystems in MATLAB/Simulink. The characteristics of Solar panel used is shown is
Table 2.
The following model equations of the current of the PV cell are obtained using Kirchhoff’s law [
38]:
with
and
Voltages at the module’s terminals and the current delivered by Ns solar cells in sequence are shown in Equation (15) [
38].
where:
VT is the thermal tension,
Rsh is the shunt resistance,
Rs is the series resistance,
Iph is the photocurrent created by the cell (A),
I0 is the reverse saturation current of the diode (A),
T is the temperature of the cell,
n is the ideality factor of the diode,
q is the charge of the electron, and
k is Boltzmann’s constant.
2.3. Battery Storage System (BSS)
The BSS is a backup system used to balance the system when RESs are not enough to satisfy the load demand or in case of energy surplus. As illustrated in
Figure 7, the battery storage system comprises a Li ion battery, a bidirectional DC–DC converter, and a charging and discharging control system.
The state of charge (
SOC) of the battery is defined as [
39]:
Qbat is the battery’s capacity (Ah), and
ibat is the current absorbed by the battery (A). The battery has two modes of operation—charging and discharging—and both solar and wind power are used. The battery’s SOC is limited to between 20% and 80% of its power in ampere-hour capacity. A battery bank’s life is extended by preventing it from undercharging or overcharging. The following are the battery’s charging restrictions:
The converter employed in this study is a half-bridge IGBT with continuous conduction operation (CCM). The converter functions in boost mode; it operates in buck mode when storing excess energy at the DC bus. S2 and D1 are active in boost mode, and current flows to the DC bus. S1 and D2 are active in buck mode, and power flows to the battery [
28].
The membership functions for input error used for microgrid control are presented in
Figure 8.
We have considered three linguistic variables (negative, positive, right) for the input ‘Error,’ and for the output control, we have considered three linguistic variables (up, down, and no change). The fuzzy controller generated an appropriate switching pattern for the charging and draining of the battery. When the DC bus voltage and a reference voltage were compared, the fuzzy logic controller received four inputs.
2.4. Energy Management System
The bidirectional DC–DC converter displayed in
Figure 8 is the most critical component for energy management. Two operational modes are used for energy management between the DC bus, renewable sources, and storage devices:
When the DC BUS voltage is less than 300 V, energy flows from the battery to the bus, and the bidirectional converter works as a boost converter to discharge the battery to keep the voltage stable at 300 V in the DC bus.
When the DC BUS voltage exceeds 300 V, the energy flow is from the microgrid to the battery. The bidirectional converter works in buck mode to charge the battery in the reverse direction with the energy surplus.
The duty cycle of each direction is determined by the difference between produced and loads requested power, as shown in
Figure 9. The fuzzy logic controller block handles the duty cycle of each direction.
The electrical grid is used only in two emergency cases:
When the battery is fully charged and there is a surplus in the microgrid, this surplus will be injected into the grid
When the battery is fully discharged and the power sources are insufficient, the electrical grid provides the load demand.
2.5. Parameters
As illustrated in
Figure 5, the proposed microgrid consists of primary power sources (wind and PV) and battery storage systems to meet the AC and DC load demands. The following tables (
Table 1,
Table 2,
Table 3) show the parameters of each method.
Wind power system
Table 1.
Characteristic of the wind turbine.
Table 1.
Characteristic of the wind turbine.
Parameters | Values |
---|
Stator resistance | 0.057 ohms |
Armature inductance | 0.00014 H |
Link flow | 0.047 V×s |
Inertia | 0.000003 |
Number of poles | 3 |
Solar power system
Table 2.
Features of (Sun Power SPR-300NE-WHT-D) PV model.
Table 2.
Features of (Sun Power SPR-300NE-WHT-D) PV model.
Parameter | Value |
---|
Nominal power | 300 W |
Current at maximum power, IMPP | 5.68 A |
Open circuit voltage, Vco | 52.58 V |
Short-circuit current, Ic | 6.05 A |
Maximum power voltage, VMPP | 49.58 V |
Microgrid component specification and requirements
Table 3.
Microgrid components specification.
Table 3.
Microgrid components specification.
Symbol | Specification |
---|
DC BUS | Voltage = 300 V; P = 5 kW |
AC bus | Voltage = 300 V, P = 70 kW |
Battery | V = 200 V; Qbatt = 280 Ah |
PV PANEL | PPV = 75 kW |
Wind turbines | Pw= 20 kW |
3. Results and Discussion
The hybrid microgrid system consists of hybrid sources (DC and AC) connected to the microgrid via a power converter controlled by a PWM signal. The solar cells are (SunPower SPR-300NE-WHT-D), and 50 panels are connected in series and 10 in parallel to generate 75 kW of power. The wind turbine type is PMSG and provides a maximum power of 20 kW. The battery type is a Li ion, capacity = 280 Ah, and voltage V = 200 V. The residential loads chosen for this simulation are DC and AC loads as shown in
Table 3. As we mentioned already, the real-time monitoring system proposed was developed in the ThingSpeak platform. The communication between MATLAB/Simulink and ThingSpeak was conducted cloud-based on the ThingSpeak toolbox of MATLAB/Simulink. Therefore, the monitoring system offers users unlimited access to visualize and act on their homes only from a webpage.
Figure 10 shows the system response after applying the proposed energy management system strategy. In the next part of this section, we will discuss the results obtained from the monitoring system in two scenarios:
The simulation runs for 7 s with a 1 × 10−5 sample period to show how the suggested energy management method responds to weather conditions and load demand in the microgrid balance. The monitoring platform displays the variation from each source at the moment of access to the webpage, with results updated every 5 s. Next, this section will discuss results obtained from the ThingSpeak platform.
Figure 10 shows the solar irradiation profile proposed for this simulation. At the start of the simulation, the irradiation is set at a maximum value of 1000 w/m
2, and at t = 15:26 s the irradiation decreases to 700/m
2 and starts to increase again until it arrives at the maximum.
Figure 11 shows the wind speed profile proposed for this simulation. At the start of the simulation, the wind speed was stable at 15 m/s, then decreased to 8 m/s, and at t = 15:29 increased to 14 m/s.
As shown in
Figure 10 and
Figure 11, the proposed scenario for meteorological conditions contains multiple changes, resulting in a discontinuous production of power from renewable sources, as shown in
Figure 12 and
Figure 13.
Due to the change in meteorological conditions and the discontinuity of power production from renewable sources, the microgrid offers an unbalanced power for homes, surplus power sometimes, and lack of power in others. Therefore, the main object of the proposed EMS system is to keep the balance between the produced and required power of the microgrid. The battery storage system is the main element to guarantee this balance because it works as a power source in case of power needs and as a load in case of power surplus.
Figure 14 shows the variation in battery state of charge.
The total required loads for the microgrid are 75 kW. However, the power produced is variable all the time. At t = 15:23 s, the sum of renewable sources of power is more than 75 kW, which means power surplus in the microgrid bus, which is traduced by increasing the state of charge graph. At t = 15:27 s, the sum of solar power and wind decrease under 75 kW, which means energy is needed in the microgrid bus; therefore, the battery works as a power source at this interval to provide power for the microgrid, which means a decrease in the battery state of charge curve, as shown in
Figure 14. At t = 15:29 s, when the renewable power increases again, the battery SOC increases to store the power surplus.
As we mentioned before, the battery is the main element in microgrid balance. The main object of our work is to keep the balance at the DC bus and AC bus.
Figure 15 shows the voltage measured at the DC bus during the simulation.
Figure 16 shows the power measured at the AC bus during the simulation.
The measurement of voltage and power at AC bus and DC bus shows that the microgrid bus is stable on required values, which shows the EMS’s efficiency.
Figure 17 shows the frequency variation of voltage at the AC bus.
The frequency variation in the merging of the limits is 0.02, except at the start of the simulation, referred to as the transitory regime and ignored. The simulation results demonstrate the suggested FL controller’s efficacy and robustness in the face of all possible changes in climatic circumstances.
The same meteorological condition is used in the second scenario, with variable required loads in AC bus. At the beginning of the simulation, P = 55 kW at t = 11:17, the load required is P = 80 kW, and at t = 11:21, the load demand is 25 kW. This change in loads will make the system more complicated. This scenario is used for the validation of the proposed EMS.
Figure 18 shows the variation in battery state of charge in this scenario. As we mentioned already, the battery is the main element for implementing the EMS.
Figure 18 shows that the battery charge and discharge are based on the same explanation in Scenario 1 to keep the balance at the microgrid bus.
Figure 19 shows the voltage measured at the DC bus during the simulation.
Figure 20 shows the power measured at the AC bus during the second scenario.
As we can see from
Figure 21, the measured load at the AC bus follows exactly the required loads in each interval, showing the effectiveness of the proposed EMS in all changes in meteorological conditions and loads.
The merges of the limits occur with a frequency of 0.02. The simulation findings validate the suggested EMS and demonstrate its efficacy and robustness under various environmental and load situations.