Energy Management of a Fuzzy Control System in a Microgrid

. Micro-grids can be considered as the ideal way to integrate renewable energy sources into electricity generation and to give consumers the opportunity to participate in the electricity market as consumers and producers. Our study aims to implement a micro-grid with solar and wind power generation and storage systems. However, the integration of a battery storage system into a micro-grid requires a thorough control of charge and discharge techniques due to the different load conditions. In this study, the proposed system can transfer electricity to and from the main grid. Although, the objective of the simulation is to control at the same time the energy input and output of the principal grid in order to maximize the profit and minimize the cost. To cope with the uncertainties of the system, a fuzzy logic controller for charge-discharge as well as a scheduling of battery energy storage systems is simulated on Matlab, in order to ensure the energy availability on demand and to take a proper decision whether to store or sell energy.


Introduction
In terms of energy, micro-grid (MG) systems can provide real answers to the energy transition challenges. They offer an optimized access to renewable, sustainable and resilient energy. A MG system integrate loads, decentralized energy sources, Renewable Energy Sources (RES), control and storage system. It is connected directly to the main grid, certain units can work as stand-alone units in "island mode" in case of an outage. The benefits of using MG lie in optimizing the energy management, reducing energy costs, improving the environmental footprint, and increasing energy coverage [1]. However, besides producing electricity the system can also store electricity in batteries to be distributed locally, known as ESS (Energy Storage Systems.). Most conventional control methodologies for chargedischarge storage are generally associated with complexity, loading time cycle, efficiency, temperature, and self-discharge or overcharge problems. An approach to defeat these challenges is proposed as a fuzzy logic-based control system for BESS (Battery Energy Storage System) charge-discharge control.
In contrast to Boolean logic, fuzzy logic (FL) is a general logic where the truth of a variable is a real number from 0 to 1, rather than being true or false. It's a way to present the change or the imprecision in logic; a way of using the natural language in logic; an approximate reasoning. They exist many review studies on FL. In [2], the authors review some of the FL applications in hydrology and water resources. They suggest that the hybridfuzzy modelling approach performs well in several Hydrology applications in comparison to FL models. On the other hand, the authors of [3] present the advantages of Fuzzy sets, fuzzy logic and fuzzy based inference systems for wireless tracking problems. They review and discuss several techniques and methodologies related to fuzzification. While in the study [4], it reviews a number of fuzzy logic-based model applications for renewable energy systems. In the last few years, the FL based models are proved to be widely adopted for location assessments, PV/wind power installation, PV/wind power tracking points [5]. The review shows that FL control based systems provides an accurate results.

Fuzzy Logic model: case study
In this paper, we will represent a MG system consisting of diesel generators, fuel cells, wind turbines, photovoltaic panels, battery storage and local demand. The system is based in Fez, Morocco [6]. Consider the fact that the MG is connected to the main network. The system has about 8 solar photovoltaic panels. These PV modules are connected directly to a wind turbine to ensure the availability of energy during uncertain weather conditions.
• To calculate the output power of the solar modules we used this following equation [7][8]: Where, PPV: The output power of the module at irradiance GING; PSTC: The module maximum power at standard test condition (STC); GINC: The incident irradiance; Tc: The cell temperature; Tr: The reference temperature; Tair: The ambient temperature. We have assumed for our case the use of the solarex MSX-83 whose output features are shown in table 1.  • In the other hand the wind speed can be calculated using the following equation [10][11]:

Parameters
Where, Pwind: The potential wind power output; UZ : The wind speed at the hub height of Z. The following table 2, lists all variables selected for the above equation according to the V90-3.0 MW wind turbines.
• And finally equation (4) is adopted to calculate the State of Charge (SOC) of the battery. Based on capacity, efficiency (>90%), size, cost, charging time and storage life cycle, we opted for the lithium-ion battery [13][14].
Where, C: The battery capacity; Cref: The battery reference capacity.

Fuzzy Logic structure
We present (Fig. 1) a flowchart detailing the storage management approach phases to address the issue, figure 1. There are two parts defining the structure: the forecasting and the decision making using Matlab. For the first phase, to estimate the power generated by the PV and wind, we considered as input a real-time data of wind-speed, irradiations, and temperatures of Fez, Morocco. The forecasting is applied in Zaitun time series software. However, in the next phase, the storage decision is based on four options: charge batteries, discharge batteries, buy electricity, sell electricity. The decision is taken based on ΔP and the SOC (State of Charge).   [12].

Parameter
The FL control input, ΔP, can be calculated by equation (5), as it's the difference between the load demand and the total available power from the distributed sources. In our simulation, the decision depends on ΔP. For example, in the case where ΔP is positive, then we will have enough power to use and a surplus to store.

Results
To represent the first input ΔP we considered four functions in our simulation: very small   Figure 3 represents the plot results of our fuzzy simulation. There are 20 rules in all which define one rule for every plot line. By shifting the red lines on the inputs, its output decision value might be varied or re-generated. If we consider Figure 3, SOC equals 70.2 with ΔP 15, and both inputs within the very large row, resulting an output decision where the system must charge the battery. The output rows identify the combination from all rules to provide an aggregated and defuzzified output. In this example, it's shown a defuzzified value of about 37%.

Conclusion
In this paper, we estimated a MG supplied by a RES and batteries for efficiency optimization. First, we predicted the RES produced energy with the help of Zaitun time series software. Afterward, a fuzzy logic technique were used to choose one among four decision options possible, that would meet the cost benefit ratio to a minimum. This study focus is to improve the performance of battery energy storage system, and thus ensure MG reliability by effectively managing the battery state of charge.