Performance Analysis of Grid Connected and Islanded Modes of AC / DC Microgrid for Residential Home Cluster

This paper presents performance analysis on hybrid AC/DC microgrid networks for residential home cluster. The design of the proposed microgrid includes comprehensive types of Distributed Generators (DGs) as hybrid power sources (wind, Photovoltaic (PV) solar cell, battery, fuel cell). Details about each DG dynamic modeling are presented and discussed. The customers in home cluster can be connected in both of the operating modes: islanded to the microgrid or connected to utility grid. Each DG has appended control system with its modeling that will be discussed to control DG performance. The wind turbine will be controlled by AC control system within three subcontrol systems: 1) speed regulator and pitch control, 2) rotor side converter control, and 3) grid side converter control. The AC control structure is based on PLL, current regulator and voltage booster converter with using of photovoltaic Voltage Source Converter (VSC) and inverters to connect to the grid. The DC control system is mainly based on Maximum Power Point Tracking (MPPT) controller and boost converter connected to the PV array block and in order to control the system. The case study is used to analyze the performance of the proposed microgrid. The buses voltages, active power and reactive power responses are presented in both of grid-connected and islanded modes. In addition, the power factor, Total Harmonic Distortion (THD) and modulation index are calculated.


Introduction
Smart Grid will be the future electricity distribution system.This intelligent system consists of advanced digital meters, distribution automation, communication systems and distributed energy resources [1].Self-healing, high reliability and power quality, providing accommodations to a wide variety of distributed generation and storage options are some of the functionalities for a desired Smart Grid [2].If photovoltaic generations, fuel cells, wind turbines and gas cogenerations are installed into utility grids directly then they can cause a variety of problems such as voltage rise and protection problem in the utility grid.In order to avoid these problems, the new concept in power system has been introduced and that is called microgrid [3] [4].Renewable "Distributed Energy Resources" (DERs) can consist of small Photovoltaic (PV) generators and small wind turbines that can be installed anywhere such as customers' place.Microgrids consist of DER, including Distributed Generation (DG) and Distributed Storage (DS).In disasters, current distribution systems can face challenges to provide the required energy supply.Using the proposed microgrid in parallel with the grid, the distribution system can recover faster.Microgrids have the ability to be switched in and out of the transmission system.They can also operate independently from the system for a period of time.Therefore, microgrids can be either in grid-connected mode or islanding mode.Because of their ability to operate in islanding mode, main use of microgrid can be providing power in an emergency to the residential community.The use of microgrids can improve power delivery and it allows utilities grid to deliver power in urban areas.Microgrid can be connected to the main grid single Point of Common Coupling (PCC).Microgrids can work islanded or grid-connected.Islanding means that the microgrid continues to operate independently when disconnected from the grid.Microgrid is easily islanded by opening the circuit breaker at PCC.When islanded, microgrid should be able to supply the power to its loads without disruption.Microgrid should have the ability to resynchronize with grid when the condition caused islanding has been corrected [5]- [11].
There are many recent control methods for nonlinear-feedback control of power systems with application of power electronics.The dynamic model of voltage source converters (VSC) is a nonlinear one and VSCs enable connection of distributed power generation units to the grid.One of recent control methods in ref. [12] will depend on an H-infinity control problem for the voltage source converter that makes use of a locally linearized model of the converter.The H-infinity control will enable to compensate for the linearization errors, and also to eliminate the effects of external perturbations.The current paper will concern with PV controlling and Wind Turbine (WT) controlling.The proposed control action concerns with the PI portion to find optimal gain settings those dynamically minimize the error value between the reference value and the feedback one.More details will be shown in control design section.
The emphasis of the paper is to have a comprehensive modeling and analysis of the microgrid with both AC and DC operation.And in the same moment, the application of various control strategies for DC side (represented in Maximum Power Point Tracking (MPPT) for PV) and AC side (represented in Pitch control and rotor side converter for wind turbine).

Microgrid for Home Cluster
Figure 1 shows how a microgrid can be connected to a home cluster.Home cluster is the combination of dif- ferent houses together that can share the power between each other.The figure shows that the microgrid is connected to the AC line.The microgrid can be connected to the DC line as well but since the houses are connected to the AC line, for the simplicity this figure only shows the AC line.In the proposed home cluster, there are ten houses that are chosen in a small community for this project.These houses are located in Ontario, Canada.The average consumed energy for a household in Ontario is 11,221 KWh.These houses can be considered as one load.The microgrid can be connected at the main feeder from the utility and tied into the distribution system to the individual homes in a way that is approved by the utility.All microgrids have the ability to disconnect from the grid and they can operate on their own for a period of time.Being able to operate in the islanding mode is one of the key features of microgrids.The power loss for an extended period can have negative effects on the economy.Therefore, microgrids can have an important role in the power system.They can distribute power in consumption loads and they can improve power quality to the main grid.Because of their ability to operate in islanding mode, the main use of microgrid can be providing power to the residential community.

Description of Designed Microgrid for Home Cluster
The residential Microgrid (MG) system consists of Grid, protective relays, and control systems.The system is modeled using the MATLAB/Simulink SimPower Systems toolbox.Bus 1 is connected to the grid and Bus 2 is connected to AC distributed energy sources.Bus 3 is connected to DC distributed energy sources.The proposed hybrid MG consists of PV, wind turbine (WT), Fuel Cell (FC), Battery, Micro Gas Turbine (MGT), AC loads, AC distribution lines, DC distribution lines, DC loads and DC-AC-DC converters.The energy that is produced by DGs is stored in the battery.Figure 2 shows the design of the microgrid.10 houses are considered to be the load for this project.A single phase dynamic load is used as the load in the simulations.
The optimal mix and control strategies for operation of Wind and PV are considered for both DC-AC and AC-AC interface at different voltage levels with the Utility.The DC and AC key Interface buses are connected to different types of DC and AC loads like: resistance loads, DC motor load, AC loads, dynamic AC loads and three phase motor loads, the data of them appears in the appendix.
The proposed control design which operated with PV is installed and selected according to the connected bus.Proposed design will be connected to the AC side with Wind Turbine whereas another proposed design will be connected to the DC side with PV.
The rating for each proposed control design is according to the rated voltage and total current of the connected bus.Two proposed for both DC and AC sides is required for local controls for each DG unit.Each one can control its self DG, so it adapts the performance of one DG.The local control of PV, for example, may produce signal which is complementary to the signal of fuel cell local control.

Wind Turbine
The mechanical power Pm captured by the blades of a wind turbine is defined in Equation (1).
( ) ( ) where Cp is a rotor power coefficient, β is a blade pitch angle, ξ is a tip-speed ratio (TSR), ρ is an air density, R m is the radius of a wind turbine blade and V wind is a wind speed [13].
The mathematical models of a Double-Feed Induction Generator (DFIG) are essential requirements for its control system.The voltage equations of an induction motor in a rotating-coordinate are shown in Equation (2) and Equation (3).
The dynamic equation of the DFIG is shown in Equation ( 4) and Equation ( 5).
( ) The detailed modeling of the DFIG is presented by applying d-q reference frame along the reference frame is rotating with the same speed as the stator voltage.The stator and rotor voltages with the flux variables can be written as follows: where the subscripts d, q, s and r represent d-axis, q-axis, stator, and rotor respectively.L is the inductance and λ is the flux linkage.u is the voltage and i is the current. 1 ω represents the angular synchronous speed and 2 ω is slip speed.T m is the mechanical torque and T em is the electromagnetic torque [14].
In order to have an effective control system of a wind turbine, the following criteria must be met: 1) The wind power must be captured as much as possible, 2) Power quality standards such as power factor and harmonics should be met and 3) Must be able to transfer the electrical power to the grid for different wind velocities [15].Aerodynamic control, variable speed control, and grid connection control are the three subsystems of the control system.Pitch control is used to control the aerodynamics drive train.In addition, variable speed control is used to control the electromagnetic subsystem.Grid connection subsystem is controlled by output power conditioning [16] (Figure 3).
There are many recent references that are presenting comparative study of PI control action and feedback linearization control on DFIG.Those references confirm the performance of the PI controller at different operating conditions.PI control of DFIG-Based Wind Farm can take an active part to enhance the voltage control and other aspects in the system [17]- [19].

Rotor Side Controller Model
The objective of rotor-side converter controller is to govern the DFIG output real power, and to keep controlling the terminal voltage.The active power and voltage are controlled independently via u qr and u dr , respectively.Figure 4 represents the blocks of the rotor side control.
The rotor side controller section has four states: [x 1 , x 2 , x 3 , x 4 ].x 1 represents the comparison between the stator supplied power and the target reference power, x 2 represents the comparison between the rotor current of q-axis and the related reference current.x 3 represents the comparison between the stator terminal voltage and the required reference voltage, and x 4 compares between the rotor current of d-axis and its reference current.The state equations can be represented as below: ( ) ( ) ( ) ( ) where K p1 and K i1 : power regulator proportional and integrating gains; K p2 and K i2 : current regulator proportional and integrating gains; K p3 and K i3 : voltage regulator proportional and integrating gains; i dr_ref and i qr_ref : d and q axis references of current control; v s_ref : reference of terminal voltage; and P ref : reference of active power control.

Grid Side Controller Model
The objective of grid side controller is to keep controlling the DC coupled voltage, and the reactive power.Figure 5 represents the model of grid side control.The grid side controller section has three states: [x 5 , x 6 , x 7 ].x 5 controls to the error between the DC voltage and its required reference.x 6 and x 7 controls to the error between the current in d-and q-axis and their reference values.
where K pdg and K idg : DC-voltage regulator proportional and integrating gains, K pg and K ig : current regulator proportional and integrating gains, v DC_ref : reference of DC coupled voltage, i qg_ref : reference of q-axis current.

Pitch Control Model
The objective of pitch control is to keep the wind turbine speed in the optimal zone; it is characterized as shown in Figure 6.
In order to control the wind turbine, the control system is designed.The control system has three sub control systems.The first one is side converter control.The next one is grid side converter control rotor and the last one is speed regulator and pitch control.
The control system consists of V dc-ref , V dc , I d (the current in d-axis), I d-ref , I q (the current in q-axis), I q-ref , V d-ref , V q-ref , I dr (the rotor current in d-axis), I dr-ref , I qr (the rotor current in q-axis), I qr-ref , dq to abc transformation block, PWM generator and PI controller.These control systems were designed in MATLAB in order to control the wind turbine in the microgrid.
From the rotor side of the DFIG, the turbine speed reference signal is taken while the active power P is taken from the stator side.Both of them will be shared in the optimization search to share the error value between the reference and the actual to activate the control action of the q axis reference currents control.The same will be done with regard to the system power factor control, the reactive power Q (both from the stator and the rotor sides) and the direct axis currents control.
The selection of the references values: turbine speed reference value w_ref and the active power reference value P_ref is set by estimating the required value to be stabilized in.It is adapted according to the rated value of the speed and the power.
The proposed controller is applied to find optimal gain settings those dynamically minimizes the error value between the reference value and the feedback one.There control strategy for each one will have four variables: VS and IS are the voltage and current of the input signals at the bus connected to the controller whereas VL and IL are the voltage and current of the output signals at the bus connected to the controller.The error signal will be sum of loops for: Load Voltage Stabilization, RMS-Current Minimization, and Dynamic Damping Loop for power oscillations and Load Ripple Current Damping.
The pattern search optimization algorithm, in MATLAB platform, is implemented for tuning PID controller gains KP, KI and KD.
There are some regulators; those will adapt the operation of the loops.Voltage regulator is applied to regulate voltage by keeping and measuring the load voltage to near unity.Also, current regulator is applied to face any sudden current variation and to reduce oscillations.

PV Panel
The following Equations ( 6)-( 9) are used in order to model the PV panel [14] (Figure 7, Table 1).ln 1 exp 1 ( ) ( ) A boost converter is applied to step up and convert the voltage of the PV module.The boost converter is shown in Figure 8, the output voltage is defined by the relation ( ) , where K is duty cycle.The state matrix have x 1 = i L , x 2 = V c with u = V in ; and can be described by:

PV Module: MPP Tracking
The output power of the PV is calculated by P = VI.The voltage of the PV and the current are represented by V and I respectively.In order to get the maximum output power point the conventional MPPT algorithms use dv/dp.The reference voltage is increased or decreased according to the operation region which is determined by measured P ∆ and V ∆ [20].Figure 9 shows the control system of the PV module.I pv and V pv are the inputs of the MPPT and the output is V ref .The error will be the difference between V pv and V ref and that is the output of PWM.
There are many methods to get the MPP.These methods have various criteria like effectiveness, complexity, cost and others.The Perturb and Observe (P & O) is the most common method due to its ease of implementation.In the P & O algorithm, the operating voltage of the PV array is perturbed by a small increment, and the corresponding change in power, ΔP, is measured.If ΔP is positive, then the perturbation of the operating voltage transfer the PV array's operating point near to the MPP.Thus, further voltage perturbations in the same direction (that is, with the same algebraic sign) should transfer the operating point directed to the MPP.
An inverter is used on the AC side of the microgrid.In order to control the inverter, the control system is designed.Figure 10 shows the control system of the inverter.The control system consists of PLL, Park Transformation block, DC voltage regulator, current regulator and a PWM generator.Figure 3 shows the inverter control.In addition, AC/DC converter is used in order to connect the AC side to the DC side.A boost converter is used to connect to the PV array block and boost the voltage up to the VSC converter which then connects to the inverter.In addition, a MPPT controller is also designed to try and optimize the PV power output.
The control objective of the boost converter in grid connected mode is tracking the MPPT of the PV array.The boost converter regulates the PV terminal voltage.The control objective of back-to-back AC/DC/AC of the DFIG is regulating rotor side current.In order to achieve MPPT and to synchronize with AC grid, the rotor side needs to be regulated.In grid connected mode, the battery does not a significant role since the power is regulated and balanced by the utility grid.There are some regulators; those will adapt the operation of the loops.Voltage regulator is applied to regulate voltage by keeping and measuring the load voltage to near unity.Also, current regulator is applied to face any sudden current variation and to reduce oscillations.
According to Xiong Liu, Peng Wang and Poh Chiang Loh when the microgrid is in islanding mode, based on system power balance, the boost converter and the back-to-back AC/DC/AC converter of the DFIG can operate either MPPT or off-MPPT.The main converter behaves as a voltage source in order to provide a stable voltage and frequency for the AC grid.It can operate either in inverter or converter mode.By acting as either an inverter or converter, the power exchange between the AC and DC link can be smoother.Based on power balance in the system, the battery converter can be in charging or discharging mode.System operating condition can determine the DC-link voltage and the voltage can be maintained by either the battery or the boost converter.

Battery
The state-space model of the battery can be represented based on the equivalent circuit that is shown in Figure 11.
C bk is a bulk capacitor, which represents the element of charging energy storage.C surface represents the diffusion and surface capacitance, where R s is the surface resistance.R e is the end resistance and R t is the terminal surface.V Cb and V Cs represents the voltages across the capacitors, respectively.
The state-space model of the battery is presented in [14], and can be summarized as follows: (

Fuel Cell
Fuel cells run on hydrogen, which can be derived from ethanol, methane, propane or natural gas.Industrially produced pure hydrogen can run a Fuel Cell.Another way to run a fuel cell is using the hydrogen that is generated from water.In fact, the electrolysis process can decompose it to oxygen and hydrogen gas.In order to do this electrolytic process, solar or wind energy can be used to generate the power for electrolyzing.Because of their cleanness, high efficiency, and high reliability, they are used in DG [18] [20]- [23].The conditions for control method reliability are concerned with the microgrid size which can be considered as a function of reliability.Another condition is the ability of the system to supply the loading patterns without loss of its requirements as power and/or achieving certain level of the voltage profile.The dynamic response for the system output variables can be analyzed with respect to time specifications.The performance characteristics of a controlled system are specified in terms of the transient response.In specifying the transient response characteristic, it is common to specify the following terms: Delay time (td), Rise time (tr), Peak time (tp), Max over shoot (Mp) and Settling time (ts).Those parameters can be initial proof of the system stability.Another system plot can indicate the stability is the system Bode plot as frequency response for the system.
Many nonlinear control approaches consider the representation of the controller dynamics and voltage source converter dynamics in the dq reference frame and use PI compensators.Other control approaches work with input-output linearization, as well as input-state linearization to convert the nonlinear system to a decoupled linear one.Traditional control methods and adaptive AI control methods can be been presented and found in ref. [24] [25].

Microgrid Simulations and Analysis
The operations of this microgrid were investigated in two different modes.The first one is the Grid-Connected Mode and the second one is Islanded Mode.The simulation platform will be MATLAB/SIMULINK/SIMPOWER SYSTEM.Some figures are taken from the software used for the system modeling and simulation and are shown bellow in Figures 11-13.

Grid-Connected Mode (Case Study 1)
In this mode, the main converter operates in the PQ mode.The power is balanced by the utility grid.The battery is fully charged.AC bus voltage is maintained by the utility grid and DC bus voltage is maintained by the main converter.In this mode the voltage of the PV is 281.69V and its power is 274.17KW.Figures 14-16 show the voltage in different buses when the microgrid is connected to the grid.Figure 17 and Figure 18 show the active and reactive power in the grid connected mode.The THD (%) at different buses is shown in Table 3. Power factor at different buses is shown in Table 4.The modulation index for this mode is 0.61.
To stress the effect of PI control, simulation figures, Figure 19 and    MATLAB platform is applied for the stability analysis.The MATLAB power_analyze command will get the equivalent state-space of the Sim Power Systems model.It gets A, B, C, D matrices of the state-space described by the equations: where the state vector x represents the inductor currents and capacitor voltages, the input vector u represents the voltage and current sources, and the output vector y represents the voltage and current measurements of the model.Nonlinear elements, like the switch devices, motors and machines, are acted by current sources driven by the voltages across the nonlinear element terminals.The nonlinear items generate additional current source inputs to the u vector, and additional voltage measurements outputs to the y vector.The above mentioned states are defining the A-matrix (elements and sizing).The dimension of matrix A is based on the above mentioned states.Using MATLAB code for eignvalues, the real parts of them are negative.Table 2 confirms that eignvalues has real parts with negative signs.

Islanded Mode (Case Study 2)
The DC bus voltage is maintained stable by the battery converter, PV and Fuel Cell.AC bus voltage is provided by the main converter and Wind Turbine.The nominal voltage and rated capacity of the battery are selected as 240 V and 65 Ah respectively.In this mode the voltage of the PV is 279.64 V and its power is 274.22 KW. Figure 21 and Figure 22 show the voltage in different buses when the microgrid is in islanding mode.Figure 23 and Figure 24 show the active and reactive power when the microgrid is in islanded mode.Table 3 shows THD at different buses.Table 4 shows power factor at different buses.Modulation index for this mode is 0.6113.Table 3 shows the THD % at different bus in different modes.All the THDs are less that 5% except at bus 2. One reason could be that there are a lot of AC loads which are connected at this bus and that cause a lot of noise.Table 4 shows the power factor at different buses in different modes.The power factor is closer to one when the microgrid is operating in Grid-connected mode.Table 5 shows the modulation index in different modes and it is   almost the same in both modes.Voltages at Bus 1 to Bus 3 are in steady state.Active power is really high at Bus 1 since it is directly connected to the grid.On the other hand, the reactive power is really low.That means that the current waveform is in phase with the voltage waveform.The active power is still high in other two buses in both modes (Grid connected and islanding mode).The reactive power is high at Bus 2 in both modes.One of the reasons could be that the current waveform is out of phase with the voltage waveform due to using inductive and capacitive loads.Increased loses and extreme voltage sag can be the side effect of the current flow that is associated with the reactive power.As a result, having a minimum allowable power factor is necessary in distribution systems.

Conclusion
This paper presents dynamic modeling of the proposed microgrid that is powered with various DGs as wind turbine, PV solar PV cell, battery and fuel cell.The proposed microgrid can operate in grid-connected mode and also, can be used in an emergency situation to provide power to a residential community at the islanded mode.The response of buses voltages is presented in both of grid-connected and islanded modes.In addition to the voltage profile, the power factor, THD and modulation index are calculated.Furthermore, active power and reactive power responses were captured for different buses in the two modes.Each DG has appended control system with its modeling that is discussed to control DG performance.PI controller is important component inside the appended control system.For wind-power system, that control system includes speed regulator, pitch control, rotor-side converter control, and grid-side converter control.To stress the effect of PI control, simulations are used to compare between the dynamic response at different operating conditions with and without tuned-adapted PI control of DIFG local cascade control.It is clear that the change of the parameters of PI controller affects on the settlement and stability of the performance.A MPPT controller based on boost converter is discussed in order to control the PV system.The proposed microgrid can recover home cluster in terms of disasters and unexpected events.This makes the overall power system more resilient.

Figure 11 .
Figure 11.Equivalent circuit of a battery.

Figure 20 ,
are used to compare between the dynamic response at different operating conditions with and without tuned-adapted PI control of DIFG local cascade control.It is clear that the change of the parameters of PI controller affects on the settlement and stability of the performance.

Figure 14 .
Figure 14.Voltage at bus 1 in grid-connected, with time.

Figure 15 .
Figure 15.Voltage at bus 2 in grid-connected, with time.

Figure 16 .
Figure 16.Voltage at bus 3 in grid-connected, with time.

Figure 17 .
Figure 17.Apparent power and power factor at bus 2 in grid-connected.

Figure 18 .
Figure 18.Active and reactive power at bus 2 in grid-connected.

Figure 23 .
Figure 23.Active and reactive power at bus 2 in islanding, with time.

Figure 24 .
Figure 24.Active and reactive power at bus 3 in islanding, with time.

Table 3 .
THD at different buses.

Table 4 .
PF at different buses.

Table 5 .
Modulation index in different modes.