THE DESIGN OF A SMART ENERGY MANAGEMENT SYSTEM FOR MICROGRIDS

The increase in the use of renewable energy systems in recent years has led to an increase in the importance of work on micro-grids. In micro-grids, energy is consumed where it is produced. This leads to a reduction in transmission and power losses in the lines. At the same time, the negative effects of the industrial plants that disrupt the quality of power are eliminated by the micro-grid model and more efficient and reliable grids can be established. Technological developments that impact each field have also affected the electricity distribution grids. Problems such as inefficient energy transmission systems caused by high power losses, problems in the integration of renewable sources into the grid, inflexible demand, and wage problems make it difficult to meet the increasing demand with the traditional structure. In this study, a smart grid system was set up in the sample micro structure. The system consist from a photovoltaic system with a consumer and a grid system that feeds this consumer. There are a photovoltaic system and also a battery group in the applied micro grid. The power of the photovoltaic system in the micro-grid is continuously monitored by a microcontroller. The energy level information of PV panel system, the battery, and grid are supplied by voltage divider circuits to microcontroller. The information transmitted by the voltage dividers to the microcontroller is evaluated by the control algorithm. Considering account possible possibilities, the receiver is primarily fed by the photovoltaic system, in other cases fed from the grid or the battery system, thanks to the semiconductor switches used in the microcontroller control. In addition, excess energy generated by the microcontroller is transferred to the main grid. As a result of this application, the level of use of the renewable energy system has been increased and the energy cost has been reduced.


Introduction
Increasing energy demand and inadequate energy resources with the rapid increase in the world population have now led to an increase in the demand for alternative energy sources [1].
In today's fossil fuel-based thermal power plants, which have a large share in the generation of electricity, the energy requirement of the hydroelectric power plants due to the fact that the raw material is expensive and limited and the hydroelectric power plants can't provide the desired energy level due to the global warming has led to alternative energy sources [2].The most popular of these alternative energy sources is the energy derived from the sun and the wind [3][4][5].Unlike thermal and hydroelectric power plants, there is an increased interest in these energy sources because they do not harm the environment, they can be individually obtained, used and installed locally where there is a need for energy locally.Another cause of this increase is the technological developments in the field of renewable energy systems.Classical energy distribution systems are cumbersome, allow for energy losses and failures, etc., and there can be difficulties on to supplying the energy that consumers need.Due to the elimination of these disruptions and the possible technological advancement of alternative energy sources and their easy and cheap installation, it has become necessary to create mini, micro and nano grids which are more advantageous than conventional grids.
In this article, micro-grid application has been utilized which is designed in the laboratory.Photovoltaic system has been chosen as an alternative energy source.Purpose of design; the power group will be fed by the photovoltaic system to the extent possible, and in cases where this is not possible, the load group will be fed from the grid in order to avoid energy interruption.As a result of this, it is aimed to benefit economically from the energy inputs by using the maximum energy from the alternative energy and the minimum energy from the grid.In addition, energy continuity has been achieved without any disruption due to this application.In order to operate the system steadily, that is controlled by microcontroller and the proposed algorithm.

Photovoltaic Systems
The basis of photovoltaic systems is the semiconductor materials.Photovoltaic cells obtained by combining P type and N type semiconductors produce about 0.  The current expression resulted from the sunlight hitting on the cell is given in Eq.1.
Where, I PH is the photocurrent, I S is the saturation current, R L is load resistance, R S is series equivalent circuit resistance, R SH is parallel equivalent circuit resistance, V is terminal voltage, I is load current, A is diode ideality factor, k B is Boltzmann's constant and T is temperature of PV panel respectively.As it is seen, photo-current, saturation current, load resistance, series equivalent circuit resistance, parallel equivalent circuit resistance, terminal voltage, load current, diode ideality factor, Boltzman's constant and temperature of PV panel are denoted by I PH , I S , R L , Rs, R SH , V, I, A, k, and T respectively [6].Table 1 shows the electrical parameters of the PV panel system.Each of the PV panel used to the micro grid system has a power value of 65 W there are four PV panels, and the output voltage of the PV system has been designed for 24 V this voltage is input off grid inverter.The maximum power of the PV system can be calculated as, If the average sunshine duration is taken for 8 hours for the south-eastern Anatolia region, daily production is given equation 3, Since the main grid voltage in the building is 220 V AC at 50 Hz, the AC/DC, 220/24 V power supply is needed for the off grid inverter.

Microgrid
Micro grids; is a new energy source and grid management technology that emerged at the end of the last century and is an electric grid with its own power sources, generators, which are connected to or controlled independently from interconnected grids, providing power with distributed generation.These may allow renewable energy sources to be included in the grid and to maximize the use of existing energy.A micro-grid system consisting of a part of the basic grid and industrial / commercial consumer applications can operate as a on grid or off grid mode.Distributed energy sources can be both distributed production and distributed storage energy within the micro grid [7][8].As shown in as shown in Figure 2, the residential consumer or industry has the intelligent micro grid surveyed here, so that has energy exchange capacity with the grid.
As observed in Fig. 2, the smart micro-grid studied here has residential consumer or industrial, along with power generation resources such as Wind Turbine (WT), Photovoltaic (PV) cell, and battery and generator; therefore, this grid has the capacity to exchange energy with the utility.

This text contains instructions for preparing manuscripts for the journal. (Word Style TS Normal)
Each paper has to be written according to following order: -title, -author(s),

Experimental Setup
The experimental setup and block diagram of the proposed system are shown in Figures 3 and 4.

Proposed Algorithm
In the proposed control algorithm, in the energy level of the voltage information based on the voltage received from the voltage dividers, it could be adjusted automatically which the case will work at which voltage value.The block diagrams of the proposed algorithm can be seen in Figure 8.Here the V pv information PV bus and V grid is grid voltage value.Pin 3 represents the output of Arduino control card and this pine is connected to the MOSFET which controls the relay, the relay is switched on according to the state grid or inverter, the lamp allows to operate.

Cases
Four cases have been set up to provide energy to the lamps.These cases are shown in Table 2.The program of the micro-controller has been written according to the cases.The energy in both the photovoltaic system and the grid systems is sensed by the microcontroller as analog input by voltage divider circuits.With the operation of the program in the microcontroller, these perceived values are processed by the microcontroller.In the case of energy in both systems, the energy is primarily provided by the photovoltaic system.Because the relay connected to the output pin of the microcontroller 3 is not energized for this reason, the energy for the lamp group is provided by the photovoltaic system thanks to the inverter connected to the normally closed contacts.The voltage value of 2.4 V taken from the voltage divider resistors is the ON state.PV state 1 means active state and the case is seen in Figure 9.In the case of energy only in the photovoltaic system, the energy of the lamp group is provided by the photovoltaic system, as in case 1, since the feed is primarily intended to be supplied by the photovoltaic system.If the photovoltaic system does not have energy and if there is energy in the grid, the microcontroller allows the relay to operate.The relay with the contact positions will supply energy to the lamp group by the mains power connected to the normally open contacts.

Case 4.
If there is no energy in both systems, the lamp group will be de-energized.But the microcontroller will continuously controlled the energy states of the systems, and if any energy is detected, it will control the relay to provide energy.

Conclusion
In this study, the alternative energy source has been primarily used to ensure energy continuity.The system, which is constantly controlled by the microcontroller, decides which system will feed the system according to the detected system voltage values.Thus, as long as the PV system generates voltage, the energy requirement is fed from this source.If there is no energy in the PV system, the energy demand is met from the grid.As a result, the maximum benefit from the alternative energy source is achieved and the energy from the grid is kept at a minimum level.In addition, an economic gain has been achieved.
5 V of voltage due to electron mobility when they are exposed to sunlight.The principle diagram of the photovoltaic cell is shown in Fig 1.These cells form photovoltaic systems with the desired voltage and power with serial and parallel connections.

Figure 1 .
Figure 1.Equivalent circuit diagram for solar cell.

Figure 3 .Figure 4 .
Figure 3. Experimental setup for the designed micro grid system

Figure 5 .Figure 6 .
Figure 5.The voltage divider circuit of rectifier voltage

Figure 7 .
Figure 7.The voltage divider circuit of PV Bus voltage.