Study and Analysis of an Intelligent Microgrid Energy Management Solution with Distributed Energy Sources

Swaminathan Ganesan 1 ID , Sanjeevikumar Padmanaban 2,* ID , Ramesh Varadarajan 1 ID , Umashankar Subramaniam 1 and Lucian Mihet-Popa 3 ID 1 School of Electrical Engineering, Vellore Institute of Technology (VIT) University, Vellore, Tamilnadu 632014, India; gswami@yahoo.co.in (S.G.); vramesh@vit.ac.in (R.V.); umashankar.s@vit.ac.in (U.S.) 2 Department of Electrical and Electronics Engineering, University of Johannesburg, Auckland Park, Johannesburg 2006, South Africa 3 Faculty of Engineering, Østfold University College, Kobberslagerstredet 5, 1671 Kråkeroy-Fredrikstad, Norway; lucian.mihet@hiof.no * Correspondence: sanjeevi_12@yahoo.co.in; Tel.: +27-79-219-9845


Introduction
The traditional bulk power generation, transmission and distribution system is facing a lot of technological challenges to fulfil the growing demand and increased penetration of distributed energy resources.The existing infrastructures are also outdated, which hinders the integration of newer technology for capacity enhancement and sophisticated monitoring and control.Hence the need has arisen for distributed generation which can co-exist with existing bulk power networks [1].In recent years, there has been significant growth in renewable energy generation through wind and solar resources.A microgrid is a miniature version of the bulk power system with distributed energy resources capable of serving as an independent electrical island separated from the bulk power system [2].Microgrids employ environmentally benign energy sources like solar, wind, and fuel cells [3].The higher the penetration of sustainable energy sources the more the socio-economic benefits will be.The recent advances in control and communication technology facilitate robust and intelligent control of microgrids [3][4][5].In emerging economies, to encourage independent sustainable energy generation, there is a strong regulatory framework which in turn will constitute the microgrid building blocks.
The Figure 1 depicts the microgrid architecture under consideration for an energy management system (EMS).The proposed microgrid system comprises sources like the utility grid, a diesel generator, photovoltaic (PV) generator, and a battery energy storage system (BESS) [3,6].The loads are classified    Critical unmanaged loads (Three phase) 400 V, 3 PH + N: 6.45 kVA, PF 0.85 (Miscellaneous Loads) The communication network will carry the control and feedback signals over the network.This will facilitate having proper co-ordination and control among the loads, sources and utility.All the measured critical parameters of the respective devices connected to the network will be transmitted to the central/local controller over the specified communication protocol for processing and take appropriate decisions and actions based on the control algorithm.The parameters to be measured are defined in the EMS data flow diagram in Figure 2. The Modbus RTU protocol has been deployed to acquire the data from various sources and loads.The EMS controller gets the weather forecast and cost of energy from the utility and then computes the energy forecast based on the historical   Critical unmanaged loads (Three phase) 400 V, 3 PH + N: 6.45 kVA, PF 0.85 (Miscellaneous Loads) The communication network will carry the control and feedback signals over the network.This will facilitate having proper co-ordination and control among the loads, sources and utility.All the measured critical parameters of the respective devices connected to the network will be transmitted to the central/local controller over the specified communication protocol for processing and take appropriate decisions and actions based on the control algorithm.The parameters to be measured are defined in the EMS data flow diagram in Figure 2. The Modbus RTU protocol has been deployed to acquire the data from various sources and loads.The EMS controller gets the weather forecast and cost of energy from the utility and then computes the energy forecast based on the historical  The communication network will carry the control and feedback signals over the network.This will facilitate having proper co-ordination and control among the loads, sources and utility.All the measured critical parameters of the respective devices connected to the network will be transmitted to the central/local controller over the specified communication protocol for processing and take appropriate decisions and actions based on the control algorithm.The parameters to be measured are defined in the EMS data flow diagram in Figure 2. The Modbus RTU protocol has been deployed to acquire the data from various sources and loads.The EMS controller gets the weather forecast and cost of energy from the utility and then computes the energy forecast based on the historical consumption patterns.The forecast of renewable energy generation is estimated by the EMS controller using the weather data input.The decisions for controlling loads and DES are sent to the respective devices through RS485 or the TCP/IP protocol based on the device compatibility.Table 2 lists various parameters that are acquired from the sources and loads connected in the microgrid system to EMS controller and the respective output command.Figure 3 presents the single line representation of the data flow from all the connected devices in the microgrid network to the EMS controller.Figure 4 presents the communication architecture used in the microgrid system.The communication is divided into three parts: (i) device level; (ii) unit level and (iii) system level.Device level communication is point to point data transfer, unit level communication is controller to controller data exchange, and system level communication is like unit level, but over a long distance and bulk data exchange between microgrid networks.For system level communication, the IEC 61850 protocol has been considered, whereby the IEC 61850 9-2 process bus protocol facilitates Generic Object Oriented System Event (GOOSE) messages for data exchange with the EMS controller.For device level, since it is shorter distance the RS485 Modbus protocol has been considered.Modbus TCP has been considered for unit level communication.Further, this proposed communication architecture has a provision to be expanded for ZigBee and Wi-Fi protocols as per IEEE 802.15.4.
Energies 2017, 10, 1419 4 of 21 consumption patterns.The forecast of renewable energy generation is estimated by the EMS controller using the weather data input.The decisions for controlling loads and DES are sent to the respective devices through RS485 or the TCP/IP protocol based on the device compatibility.Table 2 lists various parameters that are acquired from the sources and loads connected in the microgrid system to EMS controller and the respective output command.Figure 3 presents the single line representation of the data flow from all the connected devices in the microgrid network to the EMS controller.Figure 4 presents the communication architecture used in the microgrid system.Presently there are many microgrid architectures under research, and the focus is predominantly on developing energy management solutions through sophisticated artificial intelligence technologies [5] for achieving superior economic benefits, but the same amount of focus is not present in developing coordinated control of DER, grid and loads with centralized controllers [10].Having precise control at the individual device or source level and at the network controller level will facilitate the faster response, seamless transition of load sharing between sources, and more reliable operation of microgrids [4].Keeping this in mind, the authors proposed a microgrid  Presently there are many microgrid architectures under research, and the focus is predominantly on developing energy management solutions through sophisticated artificial intelligence technologies [5] for achieving superior economic benefits, but the same amount of focus is Energies 2017, 10, 1419 5 of 21 not present in developing coordinated control of DER, grid and loads with centralized controllers [10].
Having precise control at the individual device or source level and at the network controller level will facilitate the faster response, seamless transition of load sharing between sources, and more reliable operation of microgrids [4].Keeping this in mind, the authors proposed a microgrid energy management system (EMS) to establish control at the device level and overall system level with the help of state of art communication technology [11,12].In load level control, the proposed EMS enables precise management of power flows by forecasting renewable energy generation, estimating the availability of energy at storage batteries, and invoking the appropriate mode of operation, based on the load demand to achieve efficient and economic operation.The predefined mode of operation is derived out of an expert rule set and schedules the load and distributed energy sources along with the utility grid.In system level control, the focus is mainly on system stability and power sharing.The proposed new controller ensures the stability of the system during transition modes and steady state operating conditions which are validated with different load and source dynamics within the microgrid system.The connection and disconnection of PV generator from the grid in islanded mode and corresponding power sharing of diesel generator (DG) and battery energy storage system (BESS) are recorded and validated for conformance to the intended operation to ensure optimum power flow from different sources to loads.

Classification of Loads
The connected loads in the microgrid are classified into multiple clusters to have efficient load management.The major classification is in three clusters: (i) secured critical loads; (ii) non-secured-critical loads and (iii) non-secured, non-critical loads [13].Typically, all critical loads are a non-shedable loads, which must be served at all the time irrespective of the source of generation and cost of energy [14].Loads that are classified as non-critical can be scheduled to achieve economic operation.Under these two major classifications, there are subsets that are distinguished as forecastable and non-forecastable loads [15].This piece of information will help in realizing economic demand and response management (DRM) [16].

Control of Air Conditioning Loads
The cooling system is one of the major and critical energy consuming loads in any premise.Efficient management of this critical load is important to achieve economic operation.The control algorithm of a cooling system is based on an analogy between the caloric behaviour and electro kinetics and steady state operating conditions have been considered for modelling.The generation of cold source is equivalent to the cold energy stored in the walls and in the atmospheric air, during this process, there will be a loss of energy.The cooling production can be derived using Equation (1), where Tout is the outdoor temperature, T(t) is the indoor temperature, C is the total thermal building Capacity, R th is the total thermal building resistance, φ s is the building cooling production.In Equation ( 3), τ = R th C is the building time constant.
During load shedding operation, the cooling production is stopped: φ s = 0.
Energies 2017, 10, 1419 6 of 21 Figure 5 shows the cycle diagram for cooling system load management, where based on the occupancy and temperature sensor input the load will be operated as per the cycle diagram.During time interval T1, the shedding command for the cooling system is activated, which will allow the room temperature to rise, but this will be maintained so as to not to reach the discomfort zone.The entire cooling system will remain shut off during the time interval T2, this is the maximum time interval for shedding affecting the comfort of occupants.During time interval T3, the shedding command will be withdrawn and temperature will start reducing till the cool set limit is reached.T4 time interval is minimum time duration required to restore the comfort temperature level.Equation ( 4) helps to calculate T2, while the production is stopped: φ s = 0 and Equation ( 5) helps to calculate T4.The main objective of this algorithm is to determine the time interval to attain T cool after T2 duration, where temperature is equal to T warm .The flow chart for the cooling system control based on the mode of operation and cost of energy is shown in Figure 6.When the grid is available (Is Grid ok = 1), then the controller will look for the cost of energy, and based on the user set point for high, low and medium cost values through the user interface, the controller will activate the respective mode of operation.
Energies 2017, 10, 1419 6 of 21 command will be withdrawn and temperature will start reducing till the cool set limit is reached.T4 time interval is minimum time duration required to restore the comfort temperature level.Equation ( 4) helps to calculate T2, while the production is stopped: and Equation ( 5) helps to calculate T4.The main objective of this algorithm is to determine the time interval to attain Tcool after T2 duration, where temperature is equal to Twarm.The flow chart for the cooling system control based on the mode of operation and cost of energy is shown in Figure 6.When the grid is available (Is Grid ok = 1), then the controller will look for the cost of energy, and based on the user set point for high, low and medium cost values through the user interface, the controller will activate the respective mode of operation.) command will be withdrawn and temperature will start reducing till the cool set limit is reached.T4 time interval is minimum time duration required to restore the comfort temperature level.Equation ( 4) helps to calculate T2, while the production is stopped: and Equation ( 5) helps to calculate T4.The main objective of this algorithm is to determine the time interval to attain Tcool after T2 duration, where temperature is equal to Twarm.The flow chart for the cooling system control based on the mode of operation and cost of energy is shown in Figure 6.When the grid is available (Is Grid ok = 1), then the controller will look for the cost of energy, and based on the user set point for high, low and medium cost values through the user interface, the controller will activate the respective mode of operation.) Figure 7 shows the typical cooling load control during time interval T2, where the load will be in off condition.Here the T cool limit is set to 25 • C, T warm limit is set to 30 • C, Total thermal resistance R th = 0.00018 K/W, building time constant τ = 30, with these parameters, the experimental results are confirmed to be 38 min of T2, which means the cooling load was in off state with the occupancy of two people.
Energies 2017, 10, 1419 7 of 21 Figure 7 shows the typical cooling load control during time interval T2, where the load will be in off condition.Here the Tcool limit is set to 25 °C, Twarm limit is set to 30 °C, Total thermal resistance Rth = 0.00018 K/W, building time constant τ = 30, with these parameters, the experimental results are confirmed to be 38 min of T2, which means the cooling load was in off state with the occupancy of two people.

Control of Lighting Loads
Figure 8 shows the lighting system controller.And the Figure 9 shows the control flow chart for lighting load control.The lighting load control algorithm is based on the input from a photo sensor, occupancy sensor and the energy tariff.The EMS also has the provision to override the control by selecting manual mode of operation.If daylight is partially available, then dim control mode will be invoked to reduce the energy consumption.If occupancy is not sensed, then all the lighting loads will be turned off.The lighting controller is designed using the natural light availability from the photo sensor.The optimum required illumination is derived for the total area of surface using the standard lumen method.The availability of natural light is derived from Equation (6).The lighting controller actuator command for illuminating artificial light is calculated from the difference between the required illumination and natural light availability.( 1) uk 10 .

Control of Lighting Loads
Figure 8 shows the lighting system controller.And the Figure 9 shows the control flow chart for lighting load control.The lighting load control algorithm is based on the input from a photo sensor, occupancy sensor and the energy tariff.The EMS also has the provision to override the control by selecting manual mode of operation.If daylight is partially available, then dim control mode will be invoked to reduce the energy consumption.If occupancy is not sensed, then all the lighting loads will be turned off.The lighting controller is designed using the natural light availability from the photo sensor.The optimum required illumination is derived for the total area of surface using the standard lumen method.The availability of natural light is derived from Equation (6).The lighting controller actuator command for illuminating artificial light is calculated from the difference between the required illumination and natural light availability.
Energies 2017, 10, 1419 7 of 21 Figure 7 shows the typical cooling load control during time interval T2, where the load will be in off condition.Here the Tcool limit is set to 25 °C, Twarm limit is set to 30 °C, Total thermal resistance Rth = 0.00018 K/W, building time constant τ = 30, with these parameters, the experimental results are confirmed to be 38 min of T2, which means the cooling load was in off state with the occupancy of two people.

Control of Lighting Loads
Figure 8 shows the lighting system controller.And the Figure 9 shows the control flow chart for lighting load control.The lighting load control algorithm is based on the input from a photo sensor, occupancy sensor and the energy tariff.The EMS also has the provision to override the control by selecting manual mode of operation.If daylight is partially available, then dim control mode will be invoked to reduce the energy consumption.If occupancy is not sensed, then all the lighting loads will be turned off.The lighting controller is designed using the natural light availability from the photo sensor.The optimum required illumination is derived for the total area of surface using the standard lumen method.The availability of natural light is derived from Equation (6).The lighting controller actuator command for illuminating artificial light is calculated from the difference between the required illumination and natural light availability.( 1) uk 10 .
35 .) 1 where Aw is surface area of window in square meter, τ is the light transmittance of the window, Εv is the luminance available on the window in lux, Ain is the total indoor area of surfaces in square meter, and ρ is the mean reflectance of the weighted area of all indoor surfaces.For design purpose, the following parameters have been considered in the analysis: building with a south-facing glass window of area (2.75 m 2 ), and total room area of 48 m 2 , volume 138 m 3 with reasonable thermal inertia, good light transmittance of the window glazing with τ = 0.817, the reflectance of all room inner surfaces considered as ρ = 0.4.Total electric lights of 13 lamps, 0-1000 lux, 950 W total, and a shading beam.The controller's reference set point for indoor Illuminance = {500-800} lux.With these values the controller was validated to maintain the luminous intensity to the preferred set value based on the other input parameters.Figure 10 shows the integration of lighting load control system into the EMS.If the user decides to disable automatic lighting control through EMS, override option can be used.
where A w is surface area of window in square meter, τ is the light transmittance of the window, E v is the luminance available on the window in lux, A in is the total indoor area of surfaces in square meter, and ρ is the mean reflectance of the weighted area of all indoor surfaces.For design purpose, the following parameters have been considered in the analysis: building with a south-facing glass window of area (2.75 m 2 ), and total room area of 48 m 2 , volume 138 m 3 with reasonable thermal inertia, good light transmittance of the window glazing with τ = 0.817, the reflectance of all room inner surfaces considered as ρ = 0.4.Total electric lights of 13 lamps, 0-1000 lux, 950 W total, and a shading beam.The controller's reference set point for indoor Illuminance = {500-800} lux.With these values the controller was validated to maintain the luminous intensity to the preferred set value based on the other input parameters.Figure 10 shows the integration of lighting load control system into the EMS.
If the user decides to disable automatic lighting control through EMS, override option can be used.

Control of Water Pump Loads
Water pumps constitute a considerable amount of load in a microgrid system.Hence the efficient control and scheduling of water pump control is critical for EMS.The level of water from the storage will be detected using a water level sensor, and this input is compared with the set point of the required level and the error signal is supplied to PID controller, the output of this controller is fed to servo motor and in turn operates the gave valve to increase or decrease the water flow to maintain the required level of water.Normally the set point is derived from the upper level sensor, and there will be a provision in the user interface to enter a manual value to supersede the sensor input limit.Figure 11 shows the control system block diagram for the pump controller.The input to the controller comes from the EMS, and Figure 12 shows the flow chart for the control algorithm based on real time pricing.

Control of Water Pump Loads
Water pumps constitute a considerable amount of load in a microgrid system.Hence the efficient control and scheduling of water pump control is critical for EMS.The level of water from the storage will be detected using a water level sensor, and this input is compared with the set point of the required level and the error signal is supplied to PID controller, the output of this controller is fed to servo motor and in turn operates the gave valve to increase or decrease the water flow to maintain the required level of water.Normally the set point is derived from the upper level sensor, and there will be a provision in the user interface to enter a manual value to supersede the sensor input limit.Figure 11 shows the control system block diagram for the pump controller.The input to the controller comes from the EMS, and Figure 12 shows the flow chart for the control algorithm based on real time pricing.

Control of Water Pump Loads
Water pumps constitute a considerable amount of load in a microgrid system.Hence the efficient control and scheduling of water pump control is critical for EMS.The level of water from the storage will be detected using a water level sensor, and this input is compared with the set point of the required level and the error signal is supplied to PID controller, the output of this controller is fed to servo motor and in turn operates the gave valve to increase or decrease the water flow to maintain the required level of water.Normally the set point is derived from the upper level sensor, and there will be a provision in the user interface to enter a manual value to supersede the sensor input limit.Figure 11 shows the control system block diagram for the pump controller.The input to the controller comes from the EMS, and Figure 12 shows the flow chart for the control algorithm based on real time pricing.

Modes of Operation
The microgrid operation has been classified into two major categories: On grid mode and Off grid mode.During On grid mode of operation, the entire system is powered by the utility grid as well as sustainable energy sources.The sharing of loads between DES is controlled by the EMS as per the defined control algorithm.In Off grid mode of operation, the entire microgrid will be in islanded mode from the utility grid, all the connected loads will be served from the local energy sources and storage system connected in the network.In Transition mode, all the critical loads are served by the UPS and this mode is a state in between On grid mode and Off grid mode [17].

On Grid Mode of Operation
Table 3 shows the power flow control between DES and loads based on the cost of energy.The EMS is designed for three main tariff classifications.When the cost of energy is low and PV generation is available, then all the loads are shared between the utility grid and PV source, and any surplus power is used for charging the UPS and BESS based on their SOC [4,18].When the cost of energy is medium, the available power from the PV source is completely utilized to serve the load and only for any power requirement deficit, the utility grid is used partially.BESS will also share the loads from the stored energy.During this tariff mode, no power is being used for charging UPS and BESS, assuming there are no surplus power available from DES.When the cost of energy is high, the load demand is shared by the DES as a priority and then partially from the utility grid for the deficit.Since the cost of energy is high, non-critical loads will be removed from the network and will be scheduled to operate later during off-peak time.Also, the critical loads will be operated at optimum power consumption mode to reduce the energy bill, like the cooling system will be operated to exploit thermal inertia without compromising comfort levels along with using natural cooling to the possible extent.During this mode, all forecastable loads will be served as the energy will be preserved in storage devices for the loads based on the demand pattern.

Modes of Operation
The microgrid operation has been classified into two major categories: On grid mode and Off grid mode.During On grid mode of operation, the entire system is powered by the utility grid as well as sustainable energy sources.The sharing of loads between DES is controlled by the EMS as per the defined control algorithm.In Off grid mode of operation, the entire microgrid will be in islanded mode from the utility grid, all the connected loads will be served from the local energy sources and storage system connected in the network.In Transition mode, all the critical loads are served by the UPS and this mode is a state in between On grid mode and Off grid mode [17].

On Grid Mode of Operation
Table 3 shows the power flow control between DES and loads based on the cost of energy.The EMS is designed for three main tariff classifications.When the cost of energy is low and PV generation is available, then all the loads are shared between the utility grid and PV source, and any surplus power is used for charging the UPS and BESS based on their SOC [4,18].When the cost of energy is medium, the available power from the PV source is completely utilized to serve the load and only for any power requirement deficit, the utility grid is used partially.BESS will also share the loads from the stored energy.During this tariff mode, no power is being used for charging UPS and BESS, assuming there are no surplus power available from DES.When the cost of energy is high, the load demand is shared by the DES as a priority and then partially from the utility grid for the deficit.Since the cost of energy is high, non-critical loads will be removed from the network and will be scheduled to operate later during off-peak time.Also, the critical loads will be operated at optimum power consumption mode to reduce the energy bill, like the cooling system will be operated to exploit thermal inertia without compromising comfort levels along with using natural cooling to the possible extent.During this mode, all forecastable loads will be served as the energy will be preserved in storage devices for the loads based on the demand pattern.

Off Grid Mode of Operation
During Off Grid mode of operation, the utility gird will be completely shut off from the microgrid network, and only DES will be present.There are three different combinations of DES operation in Off Grid mode [3,19].Considering sufficient PV generation is available, during this time, UPS will serve all secured critical loads and BESS will be charged to serve during intermittency periods.All non-critical loads will be erased from the network as it will be scheduled during surplus power flow.When the BESS is drained, then the DG will be turned on and during this period, PV and DG will share the load.UPS will serve all the secured critical loads and simultaneously will charge its back up.Non-critical loads will be curtailed as they will only be served partially due to higher cost of DG power generation.Table 4 shows the power sharing among DES during Off Grid mode [20].

Stability and Power Sharing
In Off Grid mode it is essential that all the connected DES synchronize properly and form a grid.For grid tied inverters, a reference voltage source is required for pumping PV power into the microgrid [21].In the proposed network, the UPS will provide the reference voltage and help the PV inverter to build power.Once the grid is formed, the stability of the grid is to be maintained by proper control of voltage (V), frequency (F), active power (P) and reactive power (Q).The grid impedance will be checked by PV inverters to sense the grid presence.The PV inverter's active power (P) is controlled as a function of frequency (F) to ensure sustained operation in islanded mode.Figure 13 shows the graph for power versus frequency control to maintain the microgrid stability.When the microgrid frequency reaches a F start (50.2Hz) then the PV inverter starts to reduce the active power generation.Further, if the microgrid frequency increases and reaches a maximum allowable limit F stop (54 Hz), then the PV inverter disconnects from the microgrid network.The slope will define the derating as % power reduction with regards to change in frequency.The slope can be configured by the user through the HMI.
Energies 2017, 10, 1419 12 of 21 The generic power equation for a generator and corresponding output is given in Equation ( 7), where Pe is electric power delivered to Load, E and V are generated voltage and terminal voltage at load respectively. is the angular displacement between E and V. From Equation ( 8), it is understood that, the reactive power (Q) controls the voltage (V), when reactive power increases, the output voltage decreases.Figure 14 shows the relation between frequency versus active power and voltage versus reactive power.
Here,  is the angular velocity of the generator (DG or PV generator output), MG  is the angular velocity of the microgrid at the point of common coupling (PCC) [22].The microgrid output power (P) is controlled by changing the frequency of the PV inverter or prime mover input to the DG, and similarly the reactive power (Q) is controlled by changing the output voltage or excitation to the DG.In Off grid mode, the secondary control is vital to ensure the stability as the sources are not stiff and will easily fall out of sync [23]: Table 5 lists the voltage and frequency trip limits and corresponding disconnection and reconnection time for an Indian grid; these limits are critical for both on grid and Off grid mode of The generic power equation for a generator and corresponding output is given in Equation ( 7), where P e is electric power delivered to Load, E and V are generated voltage and terminal voltage at load respectively.δ is the angular displacement between E and V. From Equation ( 8), it is understood that, the reactive power (Q) controls the voltage (V), when reactive power increases, the output voltage decreases.Figure 14 shows the relation between frequency versus active power and voltage versus reactive power.
Here, ω is the angular velocity of the generator (DG or PV generator output), ω MG is the angular velocity of the microgrid at the point of common coupling (PCC) [22].The microgrid output power (P) is controlled by changing the frequency of the PV inverter or prime mover input to the DG, and similarly the reactive power (Q) is controlled by changing the output voltage or excitation to the DG.In Off grid mode, the secondary control is vital to ensure the stability as the sources are not stiff and will easily fall out of sync [23]: Energies 2017, 10, 1419 12 of 21 The generic power equation for a generator and corresponding output is given in Equation ( 7), where Pe is electric power delivered to Load, E and V are generated voltage and terminal voltage at load respectively. is the angular displacement between E and V. From Equation ( 8), it is understood that, the reactive power (Q) controls the voltage (V), when reactive power increases, the output voltage decreases.Figure 14 shows the relation between frequency versus active power and voltage versus reactive power.
Here,  is the angular velocity of the generator (DG or PV generator output),


is the angular velocity of the microgrid at the point of common coupling (PCC) [22].The microgrid output power (P) is controlled by changing the frequency of the PV inverter or prime mover input to the DG, and similarly the reactive power (Q) is controlled by changing the output voltage or excitation to the DG.In Off grid mode, the secondary control is vital to ensure the stability as the sources are not stiff and will easily fall out of sync [23]: Table 5 lists the voltage and frequency trip limits and corresponding disconnection and reconnection time for an Indian grid; these limits are critical for both on grid and Off grid mode of Table 5 lists the voltage and frequency trip limits and corresponding disconnection and reconnection time for an Indian grid; these limits are critical for both on grid and Off grid mode of operation [24].When the line to neutral voltage limit falls below 195.5 V, then within two seconds the system should disconnect, similarly when the line to neutral voltage goes above 310 V, then within 2 s the system should cease operation to avoid any damage to the connected equipment.The same conditions have been tested and validated for reliable operation and control.

Simulation Results
The proposed microgrid network shown in Figure 1 has been modelled in MATLAB/Simulink brick by brick and the simulation results are presented in Figures 15 and 16.In the simulation, all the individual sources and loads are modelled using the Simulink libraries.The sources and loads are integrated and simulated for the different operating scenarios.Figure 15 shows the simulation results of On grid mode.From 0 to 0.6 s, only the utility grid and PV generation sources are supplying the entire load and charging the storage units, at t = 0.6 s, the storage unit started sharing loads by discharging its stored energy, hence reducing power drawn from the utility grid.Initially BESS charge was 77 percentage of its full capacity and UPS was at 80 percentage of full charge.From 0 to 0.6 s, the cost of energy from utility is low, at 0.6 s; the system goes to islanded mode of operation, hence the utilization is optimized to ensure reliable operation.During this entire period, DG is in off condition, and the results are captured for active and reactive power supply from all the sources.
Figure 16 shows the simulation results for change in mode of operation from Off grid to On grid mode of operation.From 0 to 0.6 s, the system operates in islanded mode, at t = 0.6 s, the utility grid is restored and the entire network is supported by PV and utility.In the absence of the utility grid, the UPS will continue to provide the reference voltage to the PV inverter and that will ensure continuity of PV generation.All the secure loads are served from the UPS and non-critical loads are curtailed to preserve energy.DG is in off condition during this period.Initially the SOC of the BESS is considered as 77 % and that of the UPS is 80 %.From time 0 to 0.6 s, the BESS discharges and load consumption is optimized to serve all critical loads for a longer duration.The results are confirmed to match the intended results and the transition from one mode to other mode is achieved smoothly without disturbing the system stability and dynamics.Figure 17 shows the results for a change in utility energy tariff, the moment the tariff increases, immediately the EMS controller changes the load sharing pattern and Figure 18 presents the results for load sharing by DES.
to match the intended results and the transition from one mode to other mode is achieved smoothly without disturbing the system stability and dynamics.Figure 17 shows the results for a change in utility energy tariff, the moment the tariff increases, immediately the EMS controller changes the load sharing pattern and Figure 18 presents the results for load sharing by DES.   to match the intended results and the transition from one mode to other mode is achieved smoothly without disturbing the system stability and dynamics.Figure 17 shows the results for a change in utility energy tariff, the moment the tariff increases, immediately the EMS controller changes the load sharing pattern and Figure 18 presents the results for load sharing by DES.Figures 17 and 18 present the response of various sources and the control action by the EMS for the change in tariff for the cost of energy from low to high. Figure 17 shows the grid availability; it is available throughout the simulation period.From 0 to 0.6 s the cost of energy is low and during this period, the BESS stores energy and PV source and grid share the entire load and changes the storage units connected in the network.At 0.6 s, the tariff changes and cost of energy becomes high, the change in graph 1 to 3 represents per unit value, as the increase denotes the change is three times the cost that was present till 0.6 s.Immediately the EMS controller activates economic mode of operation to optimize the consumption and save cost of operation.The charging of BESS and UPS is stopped and the load sharing is done by the BESS, PV and grid.This enables minimum consumption from the utility and facilitates economic operation.However, the consumption from the PV source is unchanged.Figure 18 shows the active and reactive power supplied by PV, BESS and utility grid for the change in tariff condition at 0.6 s.

Experimental Results
To test and validate the proposed microgrid energy management system, an experimental prototype microgrid setup has been developed comprising a PV generator (25 kW), BESS (10 kW), UPS (8 kW) and utility grid [25].The control of individual bricks is achieved by a TMS320F28335 programmable digital signal processor chip from Texas Instruments (Dallas, TX, USA).The overall centralized controller was developed using a model M258LF42DT Programmable Logic Controller (PLC, Modicon, Schneider Electric, Reuil-Malmaison, France).For communication between the subsystems, a TSXETG100 (Schneider Electric, Reuil-Malmaison, France) serial to TCP/IP converter communication module is used.
To set the parameters, a FDM 121 Human Machine Interface (HMI) has been used (Schneider Electric, Reuil-Malmaison, France).The energy management control algorithm has been programmed in the PLC.To emulate the load conditions, lamp load and resistive load banks were used.Figure 19 shows the experimental set up used for this analysis.Detailed testing has been done to validate the performance of EMS under different load and source operating conditions.Figure 20 shows the active power output from the PV generator in islanded mode of operation.In islanded mode of operation, with the reduction in load, the network voltage will increase.To ensure stability of operation, the active power to be derated for the increase in voltage, if the voltage increases to the cut-off limit, the PV generator to be shut off. Figure 21 shows the control of active power as a function of grid frequency in islanded mode of operation [26].Under this condition, if the generated power from DES is more than the load demand, the surplus power generated from PV source will be diverted to charge the BESS.Immediately after the battery reaches full charge level, the BESS unit will increase the frequency of its output.On detecting this increase in frequency, PV inverter active power to be curtailed as a function of frequency to follow the predefined gradient.The PV generation will ramp up if the BESS voltage level goes down.The results are in conformance to the design.Figure 22 presents the oscilloscope waveform for under frequency fault condition in islanded mode of operation, at instance 'a' the frequency has been reduced to 48.9 Hz, immediately all the loads got shut down command from EMS controller within 120 ms. Figure 23 shows a snapshot of the EMS control screen where the user can activate and deactivate the sources, and loads and change the modes of operation and set the operating parameters.

Conclusions
In this paper, a detailed study of a microgrid system has been carried out with the objective to formulate an efficient control algorithm to integrate, manage and control the various power generation sources like PV, DG, BESS, UPS and utility grid with the connected loads.The complexity lies in the smooth transition of load sharing from the PV source to a BESS or the utility grid during the clouding effect on the PV source.Since the penetration of PV sources are on the rise, the intermittency will pose a bigger concern to ensure the stability of microgrid operation during those conditions [27][28][29][30].This problem was tackled by having coordinated control of PV generation and BESS management for sharing of loads in the network.The authors have proposed a solution to effectively manage the DES and load to achieve stable operation and economic load dispatch in the

Conclusions
In this paper, a detailed study of a microgrid system has been carried out with the objective to formulate an efficient control algorithm to integrate, manage and control the various power generation sources like PV, DG, BESS, UPS and utility grid with the connected loads.The complexity lies in the smooth transition of load sharing from the PV source to a BESS or the utility grid during the clouding effect on the PV source.Since the penetration of PV sources are on the rise, the intermittency will pose a bigger concern to ensure the stability of microgrid operation during those conditions [27][28][29][30].This problem was tackled by having coordinated control of PV generation and BESS management for sharing of loads in the network.The authors have proposed a solution to effectively manage the DES and load to achieve stable operation and economic load dispatch in the

Conclusions
In this paper, a detailed study of a microgrid system has been carried out with the objective to formulate an efficient control algorithm to integrate, manage and control the various power generation sources like PV, DG, BESS, UPS and utility grid with the connected loads.The complexity lies in the smooth transition of load sharing from the PV source to a BESS or the utility grid during the clouding effect on the PV source.Since the penetration of PV sources are on the rise, the intermittency will pose a bigger concern to ensure the stability of microgrid operation during those conditions [27][28][29][30].This problem was tackled by having coordinated control of PV generation and BESS management for sharing of loads in the network.The authors have proposed a solution to effectively manage the DES and load to achieve stable operation and economic load dispatch in the entire microgrid network [15].Faster communication topologies were deployed to achieve better response time for the control commands at local as well as centralized controllers.This work can be enhanced by interlinking multiple microgrid networks with a more complex source and load system.The load management and control can be further improvised by using artificial intelligence and optimization techniques as future work.A robust control methodology has been developed and demonstrated in a deterministic way to operate the microgrid network in a sustainable mode.The proposed methodology depends on the historical data of load consumption pattern, power generation forecast, and demand forecast.

Figure 2 .
Figure 2. EMS controller Input and Output data.

Figure 3 .
Figure 3. EMS controller data flow between controller, load and sources.

Figure 4 .
Figure 4. EMS controller data flow between controller, load and sources.

Figure 4 .
Figure 4. EMS controller data flow between controller, load and sources.

Figure 6 .
Figure 6.Cooling system control flow chart. dT

Figure 7 .
Figure 7.Typical cooling load off cycle during T2 time till discomfort level.

Figure 7 .
Figure 7.Typical cooling load off cycle during T2 time till discomfort level.

Figure 7 .
Figure 7.Typical cooling load off cycle during T2 time till discomfort level.

Figure 10 .
Photo sensor

Figure 11 .
Figure 11.Water pump control system block diagram.

Figure 10 .
Figure 10.Lighting load control integration with EMS.

Figure 10 .
Photo sensor

Figure 12 .
Figure 12.Water pump motor control flow chart.

Figure 12 .
Figure 12.Water pump motor control flow chart.

FratedFigure 13 .
Figure 13.Power gradient diagram for active power (P) versus frequency (F) control function in the PV inverter.

Figure 13 .
Figure 13.Power gradient diagram for active power (P) versus frequency (F) control function in the PV inverter.

FratedFigure 13 .
Figure 13.Power gradient diagram for active power (P) versus frequency (F) control function in the PV inverter.

Figure 15 .
Figure 15.Simulation results in On Grid mode during low cost of energy tariff.

Figure 16 .
Figure 16.Simulation results in Off Grid mode with PV and BESS as source.

Figure 15 .
Figure 15.Simulation results in On Grid mode during low cost of energy tariff.

Figure 15 .
Figure 15.Simulation results in On Grid mode during low cost of energy tariff.

Figure 16 .
Figure 16.Simulation results in Off Grid mode with PV and BESS as source.Figure 16.Simulation results in Off Grid mode with PV and BESS as source.

Figure 16 .
Figure 16.Simulation results in Off Grid mode with PV and BESS as source.Figure 16.Simulation results in Off Grid mode with PV and BESS as source.

Figure 17 .
Figure 17.Simulation results for power transition in on grid mode during utility tariff change from low to high.

Figure 18 .
Figure 18.Simulation results for load sharing by DES in on grid mode during tariff change from low to high.

Figure 17 . 21 Figure 17 .
Figure 17.Simulation results for power transition in on grid mode during utility tariff change from low to high.

Figure 18 .
Figure 18.Simulation results for load sharing by DES in on grid mode during tariff change from low to high.

Figure 18 .
Figure 18.Simulation results for load sharing by DES in on grid mode during tariff change from low to high.

Figure 19 .
Figure 19.Experimental test set up with EMS controller and DES with load banks.

Figure 20 .
Figure 20.Active power control for the variation in frequency in islanded mode.

Figure 21 .
Figure 21.Active power derating with increase in grid voltage in islanded mode of operation.

Figure 19 .
Figure 19.Experimental test set up with EMS controller and DES with load banks.

Figure 20 .
Figure 20.Active power control for the variation in frequency in islanded mode.

Figure 21 .
Figure 21.Active power derating with increase in grid voltage in islanded mode of operation.

Figure 21 .
Figure 21.Active power derating with increase in grid voltage in islanded mode of operation.

Figure 22 .
Figure 22.Microgrid system disconnection during under frequency fault in Off-grid mode of operation.

Figure 22 . 21 Figure 22 .
Figure 22.Microgrid system disconnection during under frequency fault in Off-grid mode of operation.

Table 1 .
System specification considered for analysis.

Table 1 .
System specification considered for analysis.

Table 1 .
System specification considered for analysis.
Modbus TCP has been considered for unit level communication.Further, this proposed communication architecture has a provision to be expanded for ZigBee and Wi-Fi protocols as per IEEE 802.15.4.
The communication is divided into three parts: (i) device level; (ii) unit level and (iii) system level.Device level communication is point to point data transfer, unit level communication is controller to controller data exchange, and system level communication is like unit level, but over a long distance and bulk data exchange between microgrid networks.For system level communication, the IEC 61850 protocol has been considered, whereby the IEC 61850 9-2 process bus protocol facilitates Generic Object Oriented System Event (GOOSE) messages for data exchange with the EMS controller.For device level, since it is shorter distance the RS485 Modbus protocol has been considered.

Table 2 .
List of parameters acquired from loads and sources to EMS controller and corresponding output control from EMS.

Table 2 .
List of parameters acquired from loads and sources to EMS controller and corresponding output control from EMS.

Table 3 .
Power sharing between DES, Grid and Loads during On Grid mode of operation.

Table 4 .
Power sharing between DES, Grid and Loads during Off Grid mode of operation.

Table 5 .
Power sharing between DES, grid and loads during Off Gr.

Power in Watts Frequency in Hz Power Vs Frequency
Experimental test set up with EMS controller and DES with load banks.Experimental test set up with EMS controller and DES with load banks.
Energies 2017, 10, 1419 17 of 21 Figure 19.Figure 20.Active power control for the variation in frequency in islanded mode.Figure 21.Active power derating with increase in grid voltage in islanded mode of operation.

in Watts Grid Voltage in Volts PV Generator Output
Active power control for the variation in frequency in islanded mode.