Optimal Design and Real Time Implementation of Autonomous Microgrid Including Active Load

Mohamed A. Hassan 1,2,* ID , Muhammed Y. Worku 1 and Mohamed A. Abido 3 ID 1 Research Institute, Center of Engineering, King Fahd University of Petroleum & Minerals, Dhahran 31261, Saudi Arabia; muhammedw@kfupm.edu.sa 2 Electrical Engineering Department, Faculty of Engineering, Mansoura University, Mansoura 35516, Egypt 3 Electrical Engineering Department, King Fahd University of Petroleum & Minerals, Dhahran 31261, Saudi Arabia; mabido@kfupm.edu.sa * Correspondence: mhassan@kfupm.edu.sa or mah_ali_ali@mans.edu.eg; Tel.: +966-13-860-7332


Introduction
Nowadays, different distributed generation (DG) resources-such as wind and photovoltaic arrays (PVs)-are being rapidly connected in the utility grid to overcome the environmental problems and global warming gas emissions [1].To operate a microgrid at the distribution level, constant impedance loads (CILs) and constant power loads (CPLs) are connected with DGs [2][3][4][5][6][7][8][9][10][11][12][13][14].For inverter-based microgrids, stability analysis is one of the most important concerns [4][5][6][7][8].In an autonomous microgrid, achieving accurate power-sharing while regulating the magnitude and the frequency of the microgrid is the main DGs control objective [4].For enhancing and improving microgrid dynamic performance, researchers have used different centralized and decentralized control schemes [8][9][10][11][12].The schemes advantages and disadvantages have been shortened in [8].Different centralized control schemes to coordinate between parallel multiple inverters and to maximize the DGs productions and power exchanges of a microgrid with the main grid [8,9].Centralized control in remote areas with long distance between inverters is impractical and costly to maintain a communication link [9].Therefore, decentralized schemes are used to avoid the communication link cost [10,11].These schemes are mostly based on the droop concept.Through droop control, emulating synchronous generators, sharing powers between inverter-based DGs was firstly proposed [6].Droop control schemes with many advantages such as flexibility, redundancy, and expandability can be categorized for four main groups: (1) conventional and variants of the droop control [6,13]; (2) virtual framework structure-based method [14,15]; (3) "construct and compensate" based methods [16,17]; and (4) the hybrid droop/signal injection method [18,19].The details and characters of various control schemes were illustrated in [5].Another updated revision for the power-sharing schemes was presented in [20].It was stated that load demand and the controller power-sharing coefficients dominantly distress the low frequency modes; while filter parameters, load dynamics, and the controller parameters of the inner voltage and outer current controllers distress the medium and high frequency damped modes [5].Moreover, constant load perturbation and load dynamics significantly distress microgrid stability [3,21].Considering CPLs and/or CILs, it is essential to understand microgrid dynamic behavior [22].With similar frequency range, control loop dynamic of the inverter and negative incremental resistance are the main important characteristics of the CPLs [12].These properties reduce the system damping especially when CPL consumes a significant portion of the power [23].Behind that, active load needs to be synchronized with the microgrid.Phase locked loop (PLL) is used for synchronization [24,25].Difficult tuning of the PLL parameters and its negative effect on the controller performance are almost the main PLL drawbacks [24].Moreover, the coupling effect and interactions between the PLL itself and the system impedance lead to a potential instability issue [25].Therefore, studying microgrid stability considering CPLs is very important [26][27][28][29][30][31].Large-signal study is used to explore the microgrid stability with CPL [29][30][31].A traditional Proportional Integral (PI) controller has been extensively used to control the DG inverters [29].Many studies show that fixed-gain PI controllers cannot easily acclimate to load changes and disturbances, especially in large microgrids [30].Many trial-and-error-based studies have significant drawbacks such as optimal settings difficulties and being time-consuming [12,32,33].In [12], the analysis revealed that when the active load DC-voltage controller is designed with large gains, the voltage controller of the inverter becomes unstable.In addition, the controller design problem cannot be solved systematically.Recently, different computational intelligence techniques, like particle swarm optimization (PSO), have been used for different power system problems with impressive achievement [34].Although, complexity of the control system will be increased with these algorithms, PSO advantages-like computational efficiency, simplicity, and robustness-will enhance the microgrid transient performance [3,35,36].
To study and analysis the power system dynamics, offline simulation such as MATLAB is not enough especially if the power converters with high switching frequency are included.Nowadays, real time digital simulator (RTDS) with many advantages like well-established real time simulation, fast, reliable, accurate, and cost effective study of complex power systems is used for prototyping and hardware-in loop testing [37].Microgrid test beds were implemented in the laboratory to study control strategies, unbalanced problems, and optimal structures of distributed generation microgrids [38,39].
This paper examines microgrid dynamic stability considering active load.Current, voltage, and power controllers are used to control the voltage and current of the inverter-based DGs and to share the DGs output powers.Additionally, ac current and dc voltage of the active load are controlled using two PI controllers.This paper is a modest contribution to the ongoing discussions on the degradation of the dynamic performance of the microgrid considering active load.To best of our knowledge, this is the first study to investigate the microgrid stability including active load using heuristic techniques such as PSO.The authors' attention has focused not only on achieving the microgrid stability but also on obtaining the optimal parameters.The paper has introduced a new approach to get the all parameters that affect the microgrid dynamic stability including active load.An optimal control technique is proposed.By minimizing the error deviations in the measured active power of the DG and the dc voltage of the active load, the control problem is optimally designed.To assess the effectiveness of the proposed optimal control, the considered microgrid has been modeled in MATLAB.In both ac and dc sides, different disturbances are applied to investigate the optimal Energies 2018, 11, 1109 3 of 16 control effectiveness on the microgrid stability.Comparison between the proposed controller and literature is investigated to prove its superiority.Finally, the considered microgrid has been established and implemented in a real time digital simulator (RTDS).The experimental results validate the simulation results and approve the effectiveness of the proposed controllers to enrich the stability of the considered microgrid.

System Description
This section reviews the microgrid mathematical model of including the active load [3,12].

Autonomous Microgrid Model
Three inverter-based DGs are feeding two loads (CPL and CIL) through two transmission lines filters and coupling inductances as illustrated in Figure 1.In the autonomous mode, feeding the load with the predefined frequency and voltage values is the main objective of the inverter controller.Therefore, three controllers have been used to achieve this goal.Three controllers are presented to control the three inverters of the DG units.Firstly, emulating the synchronous generator, droop control is used to share the powers between DGs as given in Figure 2. Secondly, two PI controllers are employed to control the DGs' output voltage and current as shown in Figure 3.It is worth mentioning that each DG inverter is assumed to be connected to a constant dc power source, so there no need to regulate the dc-link voltage otherwise, a controller should be introduced to regulate the dc-link voltage [40].Meanwhile, our objective in this paper is to study the dynamic performance of the ac side of the inverter-based DG.The instantaneous real (P m ) and reactive powers (Q m ) are calculated using measured output current (i o ) and output voltage (v o ) is used to obtain the as given The average real P c and reactive powers Q c are obtained using a low pass filter as given in Figure 2.
where ω c is the cut-off frequency of the low-pass filter.As shown in Figure 2, the frequency ω is obtained from the active power while the d-axis reference voltage v * od is obtained from the reactive power as where ω n is the nominal angular frequency of DG, V n is the nominal magnitude of the DG voltage and m p and n q are the droop controller gains.
Voltage and current controllers' state equations are shown where L c and r c are the inductance and resistance of the coupling inductor respectively, F is feed-forward gain, C f is the filter capacitance, and K pc , K ic, K pv , and K iv are the PI controller parameters.
where Lc and rc are the inductance and resistance of the coupling inductor respectively, F is feedforward gain, Cf is the filter capacitance, and Kpc, Kic, Kpv, and Kiv are the PI controller parameters.
The LC filter and coupling inductance state equations are written as 1 () ) 1 () 1 () 1 () 1 () Actually, this model uses different frequency variables: ω, ω0, ωn, and ωCOM.The variable ω denotes an arbitrary time varying frequency which used in Equations ( 8)-( 13) to obtain the drop voltage in the coupling inductances.While nominal system frequency denoted by ωn is used to obtain the reference values (Equations ( 6) and ( 7)).The other values denoted by ω0 and ωCOM are the value of the frequency at time zero and the common system reference frame frequency, respectively [3].As shown in Figure 4, each DG has to be modeled on its local rotating (dqi) reference frame, and then all DGs will have common reference frames (DQ).Therefore, all related DG voltages and currents can be represented on DQ as

(
) The LC filter and coupling inductance state equations are written as Actually, this model uses different frequency variables: ω, ω 0 , ω n , and ω COM .The variable ω denotes an arbitrary time varying frequency which used in Equations ( 8)-( 13) to obtain the drop voltage in the coupling inductances.While nominal system frequency denoted by ω n is used to obtain the reference values (Equations ( 6) and ( 7)).The other values denoted by ω 0 and ω COM are the value of the frequency at time zero and the common system reference frame frequency, respectively [3].As shown in Figure 4, each DG has to be modeled on its local rotating (dq i ) reference frame, and then all DGs will have common reference frames (DQ).Therefore, all related DG voltages and currents can be represented on DQ as Energies 2018, 11, 1109 6 of 16

Active Load Model
Active load model with its controllers is given in Figure 1.In the following model, the active load has its own dq reference frame as each inverter has.The active load should be synchronized with the microgrid to share its angles.A traditional PLL shown in Figure 5 is used for this purpose.The input variable of the active load model is the input voltage while the output variable is the current drawn from the DG units [12].The active load input current (i lALDQ ) is converted from the common reference frame "DQ" to the active load reference frame dq AL using PLL.
where δ i is the angle between the dq active load frame and common reference frame DQ.
To set the dq system frequency equal to the grid frequency, the regulator is arranged to maintain one component at zero by changing the frequency of dq system rotation [26].The three-phase voltages are transformed into αβ stationary reference frame then the frequency and the inverter phase reference θ will be estimated as given in ( 21) & (22).The angle θ is controlled to transform from abc to dq and vice versa.
where k p PLL and k I PLL are the PLL controller parameters.
As shown in Figure 6, to regulate the DC voltage and control the AC current of the active load, two PI controllers are proposed.
Tuning these controller parameters is very important to get reasonable steady-state response.Firstly, the voltage controller can be used to get the AC reference current by minimizing the error between the measured DC voltage and the DC reference voltage.Similarly, the current controller can be used to get the AC reference voltage by minimizing the error between the measured AC current and the AC reference current.A negative sign to the inverter current should be added to the voltage controller state-space equations because the active load is receiving current from the DGs.For decoupling the inductor current in the DQ axes, feed-forward terms will be involved as shown in Figure 6.Meanwhile, the state-space equations of the DC capacitor circuit can be given.
where C dc and R dc are the dc load capacitance and resistance and i conv is the DC current of the active load.
Considering ideal power converter, the internal power losses can be neglected.Therefore, the state-space equations of the switching bridge can be written as

Problem Formulation
Controller gains may cause poor damped responses and even the instability of the microgrid [3].To enhance the microgrid transient performance, the controller parameters of inverters and active load, PLL gains, and power-sharing coefficients would be tuned carefully.In this paper, an optimization technique is used to obtain the parameters affecting the microgrid stability.The design problem is expressed as

Objective Function and Problem Constraints
The optimal controller parameters and optimal power-sharing coefficients are designed based on time domain simulation.The problem constraints are the parameter bounds.Therefore, the design problem can be formulated as the following optimization problem Minimize J Subject to {K min ≤ K ≤ K max , m p min ≤ m p ≤ m p max , and n q min ≤ n q ≤ n q max } (28) where where J is a weighted objective function, are the controller parameters constrained as K min ≤ K ≤ K max , m p and n q are the power-sharing parameters, t is minimum settling time, P ref is the reference active power of the DG and V * dc is DC reference voltage.
In the optimization procedure, the goal is to minimize J to make sure that DG inject the required active power and make sure that the dc voltage of the active load is close to the reference dc voltage.PSO starts randomly assuming their particles (controller parameters in this work).Using these parameters, the cost function J is calculated.This cost function depends mainly on the variations of P ref and V * dc as it is mentioned in Equation ( 29).This step will be repeated and after each step, the cost function will be compared with the minimum calculated cost function until it arrives to the lowest cost function.The corresponding parameters to this lowest cost function will be selected to be the optimal controller parameters.

Particle Swarm Optimization
In this work, PSO is utilized to obtain the optimal parameters.In 1995, stimulated by social behavior of bird gathering or fish training, Eberhart and Kennedy developed PSO as a population based stochastic optimization method [35].It is worth mentioning that balancing between local and global search methods can be achieved using PSO.It has different advantages over other traditional optimization techniques [3].In a PSO algorithm, the population has n particles that represent candidate solutions.Each particle is an m-dimensional real-valued vector, where m is the number of optimized parameters.Therefore, each optimized parameter represents a dimension of the problem space.The PSO technique can be summarized as follows:

1) Initialization
Starting by time counter setting then randomly n particles and their initial velocities will be generated.The objective function of each particle will be evaluated.From the obtained objective functions, the global best function J best will be selected as the lowest objective function.Meanwhile, its associated global best particle x best will be selected as well.To control the impact of the previous velocity on the current velocity, the inertia weight will be initiated.

2) Time Updating
The time counter will be updated.

3) Weight Updating
The inertia weight will be updated as follows w(t) = αw(t − 1) where α is a decrement constant smaller than but close to 1;

4) Velocity Updating
At each time step, each particle velocity is modified depending mostly on its current velocity and the distances between the particle and its personal and global best positions.
where r 1 and r 2 are random numbers between 0 and 1; w is the inertia weight; c 1 and c 2 are the 'trust' parameters; g best is the best swarm position; and p best is the best position for particle i.
It is worth mentioning that the second term represents the cognitive part of PSO where the particle changes its velocity based on its own thinking and memory.The third term represents the social part of PSO where the particle changes its velocity based on the social-psychological adaptation of knowledge.In previous research, a variety of inertia weight strategies were proposed and developed to improve the performance of the PSO algorithm.However, the random values for most modified PSO algorithms are always generated by uniform distribution in the range of [0, 1].Obviously, the random values represent the weights of two distances for updating the particle velocity.If the range of random values is small, these two distances have little influence on the new particle velocity, which means that the velocity cannot be effectively increased or changed to escape from local optima.In order to improve the global optimization ability of the PSO algorithm, it is necessary to expand the range of random values [41].

5) Position updating
Based on the updated velocities, the new particle position at iteration n + 1 is given where k i n+1 and v i n+1 are the particle position and its velocity vector at iteration n + 1.

6) Individual Best Updating
For each particle, the cost function J will be determined according to the updated position and then it will be compared with the previous one.If this cost function at this time is less than the previous one, it will be selected as the global best J j * .An individual best will be also selected as a global best.

7) Global Best Updating
From the all values of the global best J j * , the minimum value will be selected as follows: If J min > J ** then update global best as X ** = X min and J ** = J min .

8) Stopping Criteria
PSO will stop searching if the number of iterations exceeds pre-specified number or if the number of iterations exceeds the maximum allowable iterations.

PSO Implementation
A MATLAB code is built to emulate the proposed PSO-based approach.Based on our experience, PSO performance is mainly affected by the initial inertia weight and the maximum allowable velocity.To obtain the effective values of these parameters, several runs have been done.Using uniform distribution, the random values r 1 and r 2 could be generated in the traditional PSO [41].In addition, to get the global optima effectively and quickly without falling into the local optima, large-scale random values should be selected in the PSO algorithms.However, a range of [-1, 1] is more beneficial to improve the global searching capability in a low dimensional practical optimization problem [41].For PSO algorithm with different types of random values, the impact of random values on the particle velocity was discoursed in details [41].Actually, to achieve an efficient PSO performance, these parameters should be carefully selected [36].In this work, the following PSO parameters are assumed as given:

Time Domain Simulation
An autonomous microgrid shown in Figure 1 has been modeled.Three inverter-based DGs (10 kVA) are connected with CIL (5.8 kW) and CPL (7.3 kW) through coupling inductances, filters, and two transmission lines.Assuming an ideal source from the DG side, the dc bus dynamics can be neglected.With the realization of high switching frequencies (4-10 kHz), the switching process of the inverter may also be neglected [40].The system parameters are given in Table 1.Based on time-domain simulation, the error in the measured active power and DC voltage will be curtailed using a weighted objective function.The optimal parameters of the proposed active load and inverter controllers, PLL gains and power-sharing coefficients are presented in Table 2. Fault and step change disturbances have been applied on both ac and dc sides to explore and assess the effect of the optimal parameters on the microgrid stability.Through the time domain simulations, the microgrid performance has been examined firstly when three-phase fault occurred at active load bus. Figure 7 shows the satisfactory damping characteristics of the proposed microgrid under the fault disturbance at active load bus. Figure 7a,b depict the responses of the active power of the three DGs respectively and the DC output voltage of the DC side of the active load.To feed this fault, the output powers of the three DGs have been increased sharply after the fault immediately.Additionally, the output power of DG3 is much greater than the output powers of the DG1 & DG2 because the fault occurred at active load bus which is closed to DG3.Secondly, the microgrid performance has been examined when a three phase fault is applied at line 2 at t = 0.3 s then fault is cleared at t = 0.6 s.During this period, DG1 and DG2 respond to support the passive load by its demand while DG3 is isolated to feed the active load by its powers.Figure 8 shows the adequate damping characteristics of the proposed controller.The DGs output powers response is illustrated in Figure 8a while Figure 8b depicts the DC voltage response of the active load for this disturbance.It can be observed from the given results that the system performance has a good overshoot and settling time performance.Moreover, the results depict impressively enhanced damping characteristics.Thirdly, the controller capability is investigated and the microgrid performance is examined when the microgrid loses DG1.It means that both loads have to receive their powers from DG2 and DG3. Figure 9a,b illustrates the response of the output real power of the three DGs and the DC voltage response of the active load.Additionally, DG1 and DG2 are capable of feeding both loads after the microgrid is disturbed.After losing DG1, the results show reasonable damping characteristics of the proposed controller.From Figure 9a, at the steady state operation, the output active powers of the three DGs are 0.41, 0.43, and 0.43p.u.respectively.Therefore, the total output power is equal to 1.27p.u.While after the microgrid is cleared from the fault disturbance, the output active powers of the three DGs are 0.0, 0.37, and 0.9p.u.respectively.Therefore, the total output power is equal to 1.27p.u.This means that the total output powers of all DGs before and after fault are equal.Therefore, the two DGs (DG2 and DG3) can share the same power that the three DGs (DG1, DG2, and DG3) have shared before the microgrid lost DG1.In addition, as it was mentioned before in Section 2, each DG inverter is assumed to be connected to a constant dc power source, so there no need to regulate the dc-link voltage otherwise, a controller should be introduced to regulate the dc-link voltage [40].Otherwise, DG3 output power could not be reached to this value since each DG source has a limited output power.For example, if DG3 represents a photovoltaic plant, the output power increase could not be available for many different reasons such as temperature and dc voltage regulations.Fourthly, the microgrid performance has been examined when the CPL voltage stepped down to 0.5p.u.The DGs output power and active load DC voltage responses are provided in Figure 10a,b.
It can be observed from the given results that the system performance has a good overshoot and settling time performance.Furthermore, the results depict impressively enhanced damping characteristics.Figure 10 shows reasonable damping characteristics of the proposed controller.It is worth mentioning that if the microgrid has a protection system, the protection system should respond very quickly for such a big disturbance.However, the main goal of this study is to check the effectiveness of the proposed controller for such disturbance like this.Fifthly, to guarantee the controller capability, another disturbance has been applied at dc side of the active load.Through the time domain simulation, the proposed controller has been explored when the DC reference voltage stepped up by 5%. Figure 11a,b show the DGs output power response and the DC voltage response of the active load respectively.To demonstrate its superiority, the proposed optimal controller is finally compared with the controller presented in [12].The DC voltage response of the active load in both cases when a three-phase fault occurred at CPL bus is shown in Figure 12.The optimal parameters of are used to show the priority of the proposed case.From the controller results shown, the proposed controller has improved dynamic performance after getting disturbed.

Experimental Implementation and Results
Recently, it has been made possible to simulate electrical networks using real-time digital simulator (RTDS) to verify the theoretical simulation [38,39].The simulation could be performed faster in RTDS since it works continuously in sustained real-time.Microgrid elements such as loads, converter bridges, filters, and lines can be modeled inside the RTDS environmental using their physical representation built in a standard library blocks.Additionally, each power system component has its detailed model, which is already built in RTDS library.This model can resemble the real system.The converter (inverter/rectifier) bridge is ideally modeled.The inverters controllers and active load controllers are implemented in the RTDS using the optimal parameters obtained from PSO.The performance of the proposed controllers has been comprehensively tested.RTDS is used to analyze the microgrid described previously in Section 2. The microgrid setup including the inverter-based DGs and active load circuits is simulated using the RTDS.In real time, the controller performance of the autonomous microgrid is assessed using the optimal controller parameters.The effectiveness of the proposed approach for stability enhancement is investigated.With step up and down changes of the DG1 reference voltage, Figure 13a,b shows the DG1 output voltage and its reference respectively.The results show the controller effectiveness under the sever disturbances.Similarly, step up and down changes for the reference voltage of DG3 is applied to investigate the controller effectiveness.Figure 14a,b depict the output voltage of the DG3 and its reference due to this change.As shown in the RTDS results, the capability of the controller to track the reference during the step change is satisfactory without significant overshoot and delay time.Fourthly, the microgrid performance has been examined when the CPL voltage stepped down to 0.5p.u.The DGs output power and active load DC voltage responses are provided in Figure 10a, b.It can be observed from the given results that the system performance has a good overshoot and settling time performance.Furthermore, the results depict impressively enhanced damping characteristics.Figure 10 shows reasonable damping characteristics of the proposed controller.It is worth mentioning that if the microgrid has a protection system, the protection system should respond very quickly for such a big disturbance.However, the main goal of this study is to check the effectiveness of the proposed controller for such disturbance like this.Fifthly, to guarantee the controller capability, another disturbance has been applied at dc side of the active load.Through the time domain simulation, the proposed controller has been explored when the DC reference voltage stepped up by 5%. Figure 11a, b show the DGs output power response and the DC voltage response of the active load respectively.To demonstrate its superiority, the proposed optimal controller is finally compared with the controller presented in [12].The DC voltage response of the active load in both cases when a three-phase fault occurred at CPL bus is shown in Figure 12.The optimal parameters of are used to show the priority of the proposed case.From the controller results shown, the proposed controller has improved dynamic performance after getting disturbed.

Experimental Implementation and Results
Recently, it has been made possible to simulate electrical networks using real-time digital simulator (RTDS) to verify the theoretical simulation [38][39].The simulation could be performed faster in RTDS since it works continuously in sustained real-time.Microgrid elements such as loads, converter bridges, filters, and lines can be modeled inside the RTDS environmental using their physical representation built in a standard library blocks.Additionally, each power system component has its detailed model, which is already built in RTDS library.This model can resemble the real system.The converter (inverter/rectifier) bridge is ideally modeled.The inverters controllers and active load controllers are implemented in the RTDS using the optimal parameters obtained from PSO.The performance of the proposed controllers has been comprehensively tested.RTDS is used to analyze the microgrid described previously in Section 2. The microgrid setup including the inverter-based DGs and active load circuits is simulated using the RTDS.In real time, the controller performance of the autonomous microgrid is assessed using the optimal controller parameters.The effectiveness of the proposed approach for stability enhancement is investigated.With step up and down changes of the DG1 reference voltage, Figure 13a, b shows the DG1 output voltage and its reference respectively.The results show the controller effectiveness under the sever disturbances.Similarly, step up and down changes for the reference voltage of DG3 is applied to investigate the controller effectiveness.Figure 14a, b depict the output voltage of the DG3 and its reference due to this change.As shown in the RTDS results, the capability of the controller to track the reference during the step change is satisfactory without significant overshoot and delay time.

Conclusions
In this paper, an autonomous microgrid including active load has been modeled and analyzed.The stability of the inverter-based microgrids considering active load has been assessed.By minimizing the proposed objective function using particle swarm optimization, the control problem has been optimally designed.A weighted objective function has been used to curtail the errors in the measured active power and DC voltage based on time-domain simulations.Different AC and DC disturbances have been introduced to verify the optimal parameters effect on the microgrid stability.The proposed controllers successfully coordinate among the distributed energy resources.Results show satisfactory performance with efficient damping characteristics of the considered autonomous microgrid.Additionally, results prove the superiority of the proposed optimal controller over the controller presented in the literature.The considered microgrid including the three DGs, active loads, and their associated controllers has been developed and implemented on real time digital simulator (RTDS).The performance of three inverter-based DGs as well as the active load of the considered autonomous microgrid with the proposed controllers has been verified on RTDS.The experimental results confirm the effectiveness of the proposed controllers to enhance the stability of the proposed microgrid under different disturbances and operating conditions.

Conclusions
In this paper, an autonomous microgrid including active load has been modeled and analyzed.The stability of the inverter-based microgrids considering active load has been assessed.By minimizing the proposed objective function using particle swarm optimization, the control problem has been optimally designed.A weighted objective function has been used to curtail the errors in the measured active power and DC voltage based on time-domain simulations.Different AC and DC disturbances have been introduced to verify the optimal parameters effect on the microgrid stability.The proposed controllers successfully coordinate among the distributed energy resources.Results show satisfactory performance with efficient damping characteristics of the considered autonomous microgrid.Additionally, results prove the superiority of the proposed optimal controller over the controller presented in the literature.The considered microgrid including the three DGs, active loads, and their associated controllers has been developed and implemented on real time digital simulator (RTDS).The performance of three inverter-based DGs as well as the active load of the considered autonomous microgrid with the proposed controllers has been verified on RTDS.The experimental results confirm the effectiveness of the proposed controllers to enhance the stability of the proposed microgrid under different disturbances and operating conditions.

Figure 8 .
Figure 8. Microgrid response when a three-phase fault occurred at line 2.

Figure 10 .
Figure 10.Microgrid response when active load voltage stepped down to 0.5pu.

Figure 12 .
Figure 12.Comparison of DC voltage responses of the active load when a fault occurred at CPL bus.

Figure 12 .
Figure 12.Comparison of DC voltage responses of the active load when a fault occurred at CPL bus.

Table 1 .
System parameters

Table 1 .
System parameters

Table 2 .
Optimal parameters Figure 12.Comparison of DC voltage responses of the active load when a fault occurred at CPL bus.