A State Machine-Based Droop Control Method Aided with Droop Coefﬁcients Tuning through In-Feasible Range Detection for Improved Transient Performance of Microgrids

: The cascaded droop-voltage-current controller plays a key role in the effective operation of microgrids, where the controller performance is critically impacted by the design of the droop controller. Moreover, in critical loading (e.g.: connection/disconnection of large inductive load), the pre-set value of the droop coefﬁcient brings asymmetry in transient performance leading to instability. Hence, to improve symmetry by reducing the trade-off between transient response and stability margin, this paper proposes a state machine-based droop control method (SMDCM) aided with droop coefﬁcients’ tuning through in-feasible range detection. Here, to realize the issues and the role of the droop controller’s dynamics on the microgrid’s stability, a small-signal stability analysis is conducted, thereby, an in-feasible range of droop values is identiﬁed. Accordingly, safe values for droop coefﬁcients are implemented using the state machine concept. This proposed SMDCM is compared with the conventional constant droop control method (CDCM) and fuzzy logic-based droop control method (FLDCM) in terms of frequency/power/voltage characteristics subjected to different power factor (PF) loading conditions. From the results, it is seen that CDCM failed in many metrics under moderate and poor PF loadings. FLDCM is satisfactory under moderate PF loading, but, showed 54 Hz/48 Hz as maximum/minimum frequency values during poor PF loading. These violate the standard limit of ± 2%, but SMDCM satisfactorily showed 50.02 Hz and 49.8 Hz, respectively. Besides, FLDCM levied an extra burden of 860 W on the system while it is 550 W with SMDCM. System recovery has taken 0.04 s with SMDCM, which completely failed with FLDCM. Similarly, voltage THD with FLDCM is 58.9% while with SMDCM is 3.08%. Peak voltage due to capacitive load switching is 340 V with FLDCM and 150 V with SMDCM. These ﬁndings conﬁrm that the proposed SMDCM considerably improved the transient performance of microgrids.


Introduction
Engineers were driven to design an entirely new distribution system namely power electronic converters-based microgrids instead of traditional bulk power systems.These microgrids are low-to-medium voltage and power-rated generation systems normally constituted with renewable energy sources and are deployed locally at the load centers [1][2][3].These systems normally suffer from stability issues due to the dependency on uncertain renewable energy sources and sensitive power converters.In microgrids, usually, a trade-off exists between the improvement of transient response and transient stability margin resulting in asymmetry between them.Enhancement of this symmetry depends on control system efficacy.The general structure of the controller consists of a cascaded interconnection of power, voltage, and current controllers as shown in Figure 1 [4].
There were some literature works discussed the effective design of voltage/current controller gain parameters, such as proportional-resonant controller-based voltage controller for better stability [5], internal model control-based voltage and current controllers for better transient response [6], pole-zero cancellation technique-based design for improved transient response [7], linear active disturbance rejection control based compensators for voltage and current controllers [8], and tuning of a modified resonant current controller considering time delays based on pole placement [9].However, from the study of bandwidths, the dynamics of the power controller are found more significant than that of inner voltage-current controllers [10].From this, it is understood that a modification to the power controller can offer better chances of getting improved transient stability.Since the performance of the traditional electrical machines-based power plants under droop management has been observed as desired, the droop control logic is considered to implement a power controller in the case of inverter-based microgrids [11].As shown in Figure 1, the power/droop controller provides a reference value to the voltage controller, which in turn provides a reference value to the current controller.This indicates that the functionality of the droop controller is essential to the efficient operation of voltage and current controllers.Thus, the performance of the entire cascaded droop-voltage-current controller is majorly impacted by the design of the droop controller.This is the prime motivation for the proposed research work in this paper.There were some literature works discussed the effective design of voltage/current controller gain parameters, such as proportional-resonant controller-based voltage controller for better stability [5], internal model control-based voltage and current controllers for better transient response [6], pole-zero cancellation technique-based design for improved transient response [7], linear active disturbance rejection control based compensators for voltage and current controllers [8], and tuning of a modified resonant current controller considering time delays based on pole placement [9].However, from the study of bandwidths, the dynamics of the power controller are found more significant than that of inner voltage-current controllers [10].From this, it is understood that a modification to the power controller can offer better chances of getting improved transient stability.Since the performance of the traditional electrical machines-based power plants under droop management has been observed as desired, the droop control logic is considered to implement a power controller in the case of inverter-based microgrids [11].As shown in Figure 1, the power/droop controller provides a reference value to the voltage controller, which in turn provides a reference value to the current controller.This indicates that the functionality of the droop controller is essential to the efficient operation of voltage and current controllers.Thus, the performance of the entire cascaded droop-voltage-current controller is majorly impacted by the design of the droop controller.This is the prime motivation for the proposed research work in this paper.
Droop control is indeed a proportional controller, where the droop gain determines the allocation of steady-state power in the system.Corresponding to each unit, droop control subtracts proportionate values of active power from frequency (P-ω droop) and reactive power from voltage magnitude (Q-V droop).These will imitate the speed governor The layout of the microgrid includes cascaded droop, voltage, and current controllers.
Droop control is indeed a proportional controller, where the droop gain determines the allocation of steady-state power in the system.Corresponding to each unit, droop control subtracts proportionate values of active power from frequency (P-ω droop) and reactive power from voltage magnitude (Q-V droop).These will imitate the speed governor and automatic voltage regulator control loops respectively [12].In this conventional droop control strategy, depending on the deviation from the scheduled value of active power, the inverter output frequency is controlled automatically [13].This approach functions extremely well for inductive lines but poorly for resistive lines.Another notable disadvantage of droop control is the load-dependent frequency variation.As a result, there is a phase difference between the frequency of the inverter output voltage and the frequency of the utility main's input voltage [14].As the droop value used in this conventional method is constant, it is referred to as the "constant droop control method (CDCM)" in this paper.
As a result of large changes in load and greater power needs, the low-frequency dominating modes of the microgrid move closer to the unstable zone.This causes the system to become more oscillatory and may potentially cause it to become unstable.The role of P-ω and Q-V droop control on the microgrid's transient stability was studied in [15,16].It has been identified in [16] that the transient stability is positively correlated to the Q-V droop factor, whereas, the P-ω droop factor has a negative correlation with it.A sensitivity analysis was conducted, and the effects of the load characteristics on voltage and frequency transients are compared [17].This sort of analysis has provided a deeper insight into CDCM.Significant efforts were made to enhance the droop control approach in overcoming the disadvantage of frequency change indicated with CDCM, particularly during transient conditions.Recent developments in this area have led to the design of variable droop coefficient adjustment techniques.Several offline/online-based variable droop coefficient design methods were attempted in the literature to address this issue.
In the offline tuning category, several works on droop gain adjustment based on the frequency and the rate of change of frequency to improve the transient response were discussed in the literature [18,19].Further, the method based on the alternating principle discussed in [19] proved itself as an effective strategy for system stabilization.Further, it proved that the damping produced from the alternating principle is efficacious and produces similar outcomes under all conditions.This ensures the elimination of any transients before appearing.However, these offline techniques are very much dependent on the knowledge of the system's mathematical model.
Whereas, in the online tuning category, fuzzy logic techniques and artificial neural networks are state-of-the-art methods that were used effectively [20][21][22][23][24][25][26].Here, the dependency on the mathematical model of the system is very minimum.Fuzzy logic has proven to be a successful method for enhancing power quality in microgrids [22,23].Focusing on the application of fuzzy logic for droop control in microgrids for enhancement of transient response, [24] has presented a "fuzzy logic-based droop control method (FLDCM)" based on the frequency and the rate at which the frequency changes.Further, a novel dynamic fuzzy logic controller for P-V droop and Q-ω droop is presented in [25].However, in this work, the knowledge of the mathematical model of the system is not included in fixing the fuzzy values.Without this knowledge, stability analysis cannot be conducted.In the absence of stability analysis, tuning of droop coefficient values simply based on experience can sometimes drive the system to instability.This issue is addressed in [26], where stability analysis was used to tune the fuzzy inference system so that the range of coefficients offered by fuzzy logic control ensures a large damping ratio to counteract the dynamics of dc voltage.However, the fundamental disadvantage of deploying fuzzy logic algorithms is they suffer from long computing times and computing burdens in real-time online applications.
Besides, a state machine-based design was discussed in [27,28] to coordinate numerous power sources, avoid transients, and minimize the effects of rapid changes in power demand.Experimentation has shown that state machines have a very minimal computing burden and are thus highly quick when compared to fuzzy logic and neural network approaches.Also, in the development of state machines, the given problem is addressed by decomposing into a finite number of states, where each of these states is associated with a specific outcome.Depending on the inputs it receives, the states within the state machine turn active alternatively.This condition is similar to the advantage presented by [19].So, in view of these advantages, a state machine-based approach is adopted for the design of the droop controller in this paper.
With the help of a small-signal model, it is simple to carry out the stability analysis of the system with respect to changes in the parameters.For this purpose, an accurate small signal state-space model of the whole microgrid which includes the droop controller, network, and loads is utilized.From this analysis, the main control parameters of the inverter as well as their optimal bands, which have a substantial impact on system stability and dampening of oscillations associated with transient disturbance can be found [29][30][31].Fo-cusing on the role of droop coefficient value on microgrid stability, the authors in [32] have presented a method of control with two degrees of freedom that combines the traditional droop with a transient droop.In this paper, a complete small signal model of the studied microgrid is formulated and stability analysis is conducted to realize the role of droop coefficient value on the system stability when subjected to sudden connection/disconnection of large inductive loads.From this analysis, an infeasible range of droop coefficients leading to instability is identified and these values are purposefully avoided during the design stage itself of the proposed state machine-based droop controller.In the next stage, the selection of droop coefficient values which are designated as a specific outcome of a particular state of this state machine was carried out as similar to the fuzzy logic-based design.
In summary, to the best of the authors' knowledge, it is understood that a simple, fast, and robust droop control method for improving the transient performance of microgrids is not yet fully explored.With this motivation, this paper proposes a robust alternating "state machine-based droop control method (SMDCM)" whose droop coefficient tuning was carried out in offline mode based on the identification of an in-feasible range of values to enhance stability.Further, the proposed SMDCM is compared with conventional CDCM and FLDCM to prove its superiority in enhancing the said kind of symmetry.
The remaining sections of this paper are organized as follows.Section 2 describes the problem identification through a mathematical model and small signal stability analysis.Section 3 describes the identification of the in-feasible range of frequency droop coefficient values.Section 4 describes the implementation of the proposed SMDCM.Section 5 presents a case study to compare the conventional and proposed methods followed by a discussion and analysis.Finally, cumulative remarks and achievements of this paper are presented as the conclusion in Section 6.

Problem Formulation
In this section, the role of the droop coefficient value on the frequency stability of the microgrid followed by connect or disconnect of a large reactive load is investigated.Based on this, the setbacks associated with the conventional CDCM and the conventional FLDCM are highlighted.This investigation is carried out by conducting a small signal stability analysis on the mathematical model of the microgrid that is controlled by the cascaded droop-voltage-current-based controller.

Mathematical Model of Cascaded Droop-Voltage-Current Control
In a microgrid that is powered by inverters, the power stage is comprised of several sources of energy, along with DC-AC converters and optional energy storage.The inverters can provide a variety of capabilities, including voltage and frequency control as well as an improvement in power quality.In grid-connected mode, the local loads are fed jointly by the inverter and the grid, whereas in standalone mode, the local loads are fed only by the inverter.When compared to the bandwidth of the droop control, the bandwidth of the voltage-current control loop is significantly higher.Therefore, the dynamics of the droop controller are more significant than the inner voltage and current controllers.As a result, the references that are produced by the droop control technique are responsible for governing the magnitude and frequency of the inverter output voltage.The active power (P) and reactive power (Q) output of the inverter are expressed as Equations ( 1) and (2) respectively.
where E is the magnitude of the inverter output voltage, δ is the load angle or phase angle associated with E, V is the magnitude of the PCC voltage, R is the resistance of line impedance and X is the inductive reactance of the line impedance.By introducing small disturbances around the equilibrium point, Equations ( 1) and (2) can be linearized as shown in Equations (3) and (4) respectively.
The first-order partial derivatives of Equations (3) and ( 4) indicate the sensitiveness of P and Q concerning the changes in δ and E. These are shown as Equations ( 5) to (8).
To simplify, consider a case where the nature of the line impedance is primarily inductive.In this case, the assumption can be safely considered.Applying these conditions to Equations ( 5) to (8), the simplified relations are shown as Equations ( 9) to (12).
By observing Equations ( 9) to (12), the following comments can be made.The active power P is more sensitive to frequency fluctuations.This is because active power P is more sensitive to power angle and, as a result, frequency fluctuations.In comparison, reactive power Q is more sensitive to changes in output voltage magnitude.As a result of this, P-ω and Q-E droop control techniques are extremely popular in the field of power systems.Their expressions are shown as Equations ( 13) and (14).
where, ω is the frequency of the inverter output voltage, ω* is the angular frequency reference, P* is the active power reference and Q* is the reactive power reference, kp is the droop gain of the P-ω droop controller, and kq is the droop gain of Q-E droop controller.

Small Signal Stability Analysis
Since it is simple to forecast how the system will react to changes in the parameters, the small-signal model is utilized extensively in estimating the transient stability of the inverter-controlled microgrid.Using this method to choose critical control parameters is advantageous.In addition, the small signal modeling and stability are affected by the configuration of the microgrid, the different operation modes, the locations of the load, and the connections made to the inverters.This method of analyzing small signals has a long history of application.Recent developments have allowed it to be applied in microgrid systems.In the research that has been done in [33][34][35][36][37][38], a comprehensive small-signal model microgrid is constructed.The results of this model are quite accurate when used to predict the stability and dynamics of the system.

Small Signal Model
In the small signal model, that was presented by [33], ω in X = ωL is believed to be static, rather than dynamic (where L is the inductance of the line impedance).This is the model's basic drawback.To circumvent this constraint, a model that is based on dynamic phasors is utilized [36][37][38].Accordingly, the corresponding equations for P and Q in their dynamic form as suggested in [36] are given as Equations ( 15) and ( 16) respectively.Equations (17) to (20) are the linearized forms of Equations ( 13) to (16), respectively.
where k pd is ∂P ∂δ , k pe is ∂P ∂E , k qd is ∂Q ∂δ and k qe is ∂Q ∂E , which are first-order partial derivatives.These are derived as given through Equations ( 21) to (24) respectively.
A low-pass filter with a cut-off frequency (ω c ) is commonly employed in the measurement of the active and reactive power output of the inverter.Assuming ω * , E * , P * , and Q * to be constant, their deviation term can be neglected.Considering these assumptions, the dynamics of the frequency and voltage can be expressed as Equations (25) to (27).

Influence of Reactive Load and Droop Coefficient on System Stability
Considering the interruption of large inductive kind of loads, connection or disconnection causes more serious stability issues.A sudden connection or disconnection of a large inductive load can be treated as turning an existing healthier system into a weaker system.This can be attributed to a large change in the grid inductance.This plays a major role in the stability of the microgrid.Hence, the stability issue associated with the connection/disconnection of large inductive loads is studied in this work.It is observed that frequency exhibits large overshoots and undershoots resulting in a stability crisis.Based on the regulations as allowed by the authorities, the maximum allowable frequency droop value is set to 0.0001.To understand the role of this droop coefficient on the change in line inductance, the small signal model derived in this section is utilized.The corresponding change of frequency (∆ω) is shown in Figure 2.

Influence of Reactive Load and Droop Coefficient on System Stability
Considering the interruption of large inductive kind of loads, connection or disconnection causes more serious stability issues.A sudden connection or disconnection of a large inductive load can be treated as turning an existing healthier system into a weaker system.This can be attributed to a large change in the grid inductance.This plays a major role in the stability of the microgrid.Hence, the stability issue associated with the connection/disconnection of large inductive loads is studied in this work.It is observed that frequency exhibits large overshoots and undershoots resulting in a stability crisis.Based on the regulations as allowed by the authorities, the maximum allowable frequency droop value is set to 0.0001.To understand the role of this droop coefficient on the change in line inductance, the small signal model derived in this section is utilized.The corresponding change of frequency (∆ω) is shown in Figure 2. The frequency droop coefficient value (kp) is fixed at 0.0001 and with the normal inductance of 0.001 H, the frequency is settling to zero without any oscillations at 6 s.A little undershoot is noticed in the beginning.This can be noticed in Figure 2a.With L = 0.0001 H and kp at the same value, frequency is experiencing damped oscillations and finally settles around to zero at 10 s.This is shown in Figure 2b.However, it is substantial The frequency droop coefficient value (kp) is fixed at 0.0001 and with the normal inductance of 0.001 H, the frequency is settling to zero without any oscillations at 6 s.A little undershoot is noticed in the beginning.This can be noticed in Figure 2a.With L = 0.0001 H and kp at the same value, frequency is experiencing damped oscillations and finally settles around to zero at 10 s.This is shown in Figure 2b.However, it is substantial to notice from Figure 2c that with L = 0.00001 H and kp at the same value, the frequency is experiencing a large instability beginning from 7 s.

Summary of the Problem
A sudden connection/disconnection of a large inductive load makes the microgrid weak.This weakening can be attributed to a function of fall in the line inductance (L).Under this situation, even the normal value of kp that was set based on the regulatory authority guidelines can lead to serious transients in frequency leading to system instability as understood from Figure 2.

Identification of In-Feasible Range of Values for Frequency Droop Coefficient
Based on the small-signal model presented in Section 2, this section investigates the in-feasible range of kp values that can disturb the system stability after a sudden drop of a large inductive load.This in-feasible range identification was done by testing the system with different kp and L values.For this, the root locus plots given in Figure 3 are drawn.
Of all the poles, those which are nearer to the zero axis are the dominant poles of this system.The dynamic behavior of the system is determined by the location of these dominant poles.Hence these dominant poles shown as encircled with red color in Figure 3a-c are considered for the study.Their position in the s-plane determines the stability of the system.From Figure 3a, it can be understood that with L = 0.001 H and for all the values of kp ≤ 0.0001, all the poles of the system are lying in the left half of the s-plane ensuring the stability of the system.Also, the poles are lying on the real axis presenting a completely damped response.From Figure 3b, it can be noticed that with L = 0.0001 H, the poles are much nearer to the right half of the s-plane when compared to the situation with L = 0.001 H.Moreover, the poles are exhibiting an oscillatory response.The situation comes more unstable with L = 0.0001 H, as shown in Figure 3c.with the values of kp = 0.00008, 0.00009, and 0.0001, the poles moved to the right half of the s-plane leading to instability.It has been verified that for these 3 values of kp, the system remains unstable with further lower values of L. Based on these observations, the present system is vulnerable to a zone of values 0.00008 ≤ kp ≤ 0.0001 under disconnection of large reactive power loads.This infeasible region is further studied in light of CDCM where a constant droop value is used, whereas in FLDCM an adaptive droop value is deployed.

Limitations of Constant and Adaptive Droop Control
As a summary of the aforesaid analysis, the following reasons can be attributed to the system instability when constant (or adaptive)-droop control methods are employed.

I
Conventional CDCM: In this scheme, a constant value is assigned to kp.A large value of kp implies a better transient response.The maximum value of kp which is however been limited by the regulatory bodies is adopted.This fixed value is acceptable to the system in terms of normal operating conditions.But in the case of transient conditions, especially when there is a change in line inductance, the same value of kp which proved to be good in normal conditions will now become detrimental.

I
Adaptive Droop Control: This paper considers conventional FLDCM under this scheme for comparison with the proposed paper.When compared to CDCM, an adaptive droop scheme offers better transient performance.However, it is very much possible that kp values can fall in the in-feasible range leading to instability.Another major limitation is a requirement of an indispensable large computational effort.
To overcome these limitations, SMDCM is proposed in this work.In this proposed method, the droop values are set in such a way that, under transient conditions, the controller will not generate a value such that the resulting kp value will not fall in this in-feasible region.Of all the poles, those which are nearer to the zero axis are the dominant poles of this system.The dynamic behavior of the system is determined by the location of these dominant poles.Hence these dominant poles shown as encircled with red color in Figure 3a-c are considered for the study.Their position in the s-plane determines the stability of the system.From Figure 3a, it can be understood that with L = 0.001 H and for all the values of kp ≤ 0.0001, all the poles of the system are lying in the left half of the s-plane ensuring

Proposed State Machine-Based Droop Control Method (SMDCM)
As discussed in the literature, there were two approaches are being followed to design the droop coefficient value, namely, constant/fixed droop coefficient (named CDCM) [13] and adaptive droop coefficient tuning through fuzzy logic concept (named FLDCM) [24].To overcome the limitations of these conventional methods that are discussed in Section 3.1, Symmetry 2023, 15, 1 10 of 29 this section describes the proposed SMDCM, which is an alternating droop value adjustment method.This is implemented using state flow control concepts to resolve frequency transient performance issues in microgrids.

Frequency Droop Controller Coefficient and the Role of SMDCM in its Design
Instead of using a fixed frequency-droop controller coefficient that was defined by conventional CDCM, this paper adopts the design of the adaptive droop coefficient (kp) as a sum of the fixed value (Fd) and the variable value (Md), which was defined in [24] and given by Equation (28).In this, the Dp represents the maximum droop coefficient that is conventionally calculated by CDCM in terms of maximum and minimum frequencies (ω max and ω min ) and Md is the variable parameter that is proposed to be designed by the SMDCM in this paper, which was conventionally done by fuzzy logic in [24].

Description of the Proposed SMDCM
The structure of the proposed SMDCM for the design of the variable part (Md) of the frequency droop coefficient (kp) is given in Figure 4.It includes two parts, one is the peak detection unit and the second is the state machine, whose operations are described below.

Description of the Proposed SMDCM
The structure of the proposed SMDCM for the design of the variable part (Md) of the frequency droop coefficient (kp) is given in Figure 4.It includes two parts, one is the peak detection unit and the second is the state machine, whose operations are described below.

Description of the Peak-Detection Mechanism
In this paper, a continuous type of three-phase phase-locked-loop is used for providing information about the frequency of the bus voltage to the proposed peak detection unit.The proposed peak detection unit involves both maximum and minimum peak detection mechanisms.To understand the operation of this unit, a typical frequency characteristic during transient conditions is considered as shown in Figure 5. Initially, the maximum peak detector detects the maximum local peak (PP1), and the minimum peak detector detects the minimum local peak (NP1) in the frequency waveform.This information is retained in memory as an earlier maximum peak and earlier minimum peak respectively.Further, the maximum peak detector detects the successive maximum value (PP2) and compares this value with the already recorded PP1 value, thus, calculating the sign of their difference (PPdiff_sign).Similarly, the minimum peak detector detects the successive minimum peak value (NP2) and compares this value with the already recorded NP1 value, thereby, calculating the sign of their difference (NPdiff_sign).In the next cycle, the earlier PP2/NP2 values are treated as PP1/NP1 and the newly acquired value will be updated for PP2/NP2, thereby, updating the signs of PPdiff_sign and NPdiff_sign.This process will continue, and these two signs are supplied as the control inputs to the proposed state machine implementation along with the information of the measured frequency (freq) as shown in Figure 4. Further, the "PPdiff_sign" is precisely indicated as "PPdiff_neg" (when PP1 > PP2) and "PPdiff_pos" (when PP1 < PP2).Similarly, the "NPdiff_sign" is precisely indicated as "NPdiff_neg" (when NP1 > NP2) and "NPdiff_pos" (when NP1 < NP2).It is worth noting that the accuracy of the peak detection unit depends on the sampling frequency chosen.However, the value of this sampling frequency brings in a trade-off between the accuracy of peak detection and the overall computational time.In view of this trade-off, a moderate and fixed value of 10 kHz is chosen as the sampling frequency for this work.

Description of the Peak-Detection Mechanism
In this paper, a continuous type of three-phase phase-locked-loop is used for providing information about the frequency of the bus voltage to the proposed peak detection unit.The proposed peak detection unit involves both maximum and minimum peak detection mechanisms.To understand the operation of this unit, a typical frequency characteristic during transient conditions is considered as shown in Figure 5. Initially, the maximum peak detector detects the maximum local peak (PP1), and the minimum peak detector detects the minimum local peak (NP1) in the frequency waveform.This information is retained in memory as an earlier maximum peak and earlier minimum peak respectively.Further, the maximum peak detector detects the successive maximum value (PP2) and compares this value with the already recorded PP1 value, thus, calculating the sign of their difference (PPdiff_sign).Similarly, the minimum peak detector detects the successive minimum peak value (NP2) and compares this value with the already recorded NP1 value, thereby, calculating the sign of their difference (NPdiff_sign).In the next cycle, the earlier PP2/NP2 values are treated as PP1/NP1 and the newly acquired value will be updated for PP2/NP2, thereby, updating the signs of PPdiff_sign and NPdiff_sign.This process will continue, and these two signs are supplied as the control inputs to the proposed state machine implementation along with the information of the measured frequency (freq) as shown in Figure 4. Further, the "PPdiff_sign" is precisely indicated as "PPdiff_neg" (when PP1 > PP2) and "PPdiff_pos" (when PP1 < PP2).Similarly, the "NPdiff_sign" is precisely indicated as "NPdiff_neg" (when NP1 > NP2) and "NPdiff_pos" (when NP1 < NP2).It is worth noting that the accuracy of the peak detection unit depends on the sampling frequency chosen.However, the value of this sampling frequency brings in a trade-off between the accuracy of peak detection and the overall computational time.In view of this trade-off, a moderate and fixed value of 10 kHz is chosen as the sampling frequency for this work.

Description of the State Machine for Generating Variable Droop Value
Based on the values of the three control inputs (freq, PPdiff_sign, NPdiff_sign), the state machine provides a variable value of Md as output.For the control input 'freq', the value of the nominal frequency (NF) is set to 50 Hz.This NF acts as pivot frequency based on which the tolerance values, namely, upper-frequency limit (UFL) and lower-frequency limit (LFL) are set.In this paper, the values for this UFL and LFL are set to 50.3 and 49.7 respectively to set a tight frequency tolerance.Based on these values, three frequency zones are defined in this work, namely, Zone-1 (freq_Normal), a normal-frequency zone whose range is defined as UFL ≥ freq ≥ LFL, Zone-2 (freq_BeyondNormal), a beyond-normal frequency zone whose range is defined as freq > UFL, and Zone-3 (freq_BelowNormal), a below-normal frequency zone whose range is defined as freq < LFL.The implementation of the proposed state machine is shown in Figure 6.Fifteen states are used in this state machine to implement the proposed logic under three different frequency zones that are defined above.For easy recognition, the numbering of various states and zones is shown as highlighted labels in Figure 6.The transitions between these states involve an alternating way of changing the Md values that are discussed in Section 4.3.It should be noted that six different values of Md (Md-I to Md-VI) are designed for the abovementioned fifteen states.
The working of the proposed state machine is explained through a series of flow charts shown in Figure 7, wherein all the fifteen states are classified under 3 levels based on the control input that regulates a particular level.In the first level, the control input "freq" determines the selection among the states I, II, and III.In the second level, the control input "PPdiff_sign" determines the selection among the states IV-IX.Similarly, in the third level, the control input "NPdiff_sign" determines the selection among the states X-XV.Here, the transition between one state to another state depends on the frequency transients that occur in the system, which further affects the condition of the three control inputs.Such conditions of the control inputs along with their corresponding fifteen states and six outcomes are summarized in Table 1.

Description of the State Machine for Generating Variable Droop Value
Based on the values of the three control inputs (freq, PPdiff_sign, NPdiff_sign), the state machine provides a variable value of Md as output.For the control input 'freq', the value of the nominal frequency (NF) is set to 50 Hz.This NF acts as pivot frequency based on which the tolerance values, namely, upper-frequency limit (UFL) and lower-frequency limit (LFL) are set.In this paper, the values for this UFL and LFL are set to 50.3 and 49.7 respectively to set a tight frequency tolerance.Based on these values, three frequency zones are defined in this work, namely, Zone-1 (freq_Normal), a normal-frequency zone whose range is defined as UFL ≥ freq ≥ LFL, Zone-2 (freq_BeyondNormal), a beyond-normal frequency zone whose range is defined as freq > UFL, and Zone-3 (freq_BelowNormal), a below-normal frequency zone whose range is defined as freq < LFL.The implementation of the proposed state machine is shown in Figure 6.Fifteen states are used in this state machine to implement the proposed logic under three different frequency zones that are defined above.For easy recognition, the numbering of various states and zones is shown as highlighted labels in Figure 6.The transitions between these states involve an alternating way of changing the Md values that are discussed in Section 4.3.It should be noted that six different values of Md (Md-I to Md-VI) are designed for the abovementioned fifteen states.
The working of the proposed state machine is explained through a series of flow charts shown in Figure 7, wherein all the fifteen states are classified under 3 levels based on the control input that regulates a particular level.In the first level, the control input "freq" determines the selection among the states I, II, and III.In the second level, the control input "PPdiff_sign" determines the selection among the states IV-IX.Similarly, in the third level, the control input "NPdiff_sign" determines the selection among the states X-XV.Here, the transition between one state to another state depends on the frequency transients that occur in the system, which further affects the condition of the three control inputs.Such conditions of the control inputs along with their corresponding fifteen states and six outcomes are summarized in Table 1.It is to be noted that all three control inputs appear continuously in parallel.But the priority of these control inputs in determining the state transition is different; where 'freq' has the highest priority, "PPdiff_sign" has the second priority, and "NPdiff_sign" has the last priority.To realize this, a sample operation with a test case is given below.
Since "freq" has the highest priority, the state machine's operation starts from level 1.As shown in Figure 7a, initially, the loop enters the default State-I and proceeds to check the normal frequency control input condition (i.e., 50.3 ≥ freq ≥ 49.7), and finds it as false.So, in the next step, it verifies the transient control input conditions.Thus, it verifies the condition "freq > 50.3" and finds it as true, thereby, the loop enters State II.With the further confirmation of the condition "freq > 50.3",State-II turns active and temporarily generates the outcome as "Md-VI" before the loop enters into the inner state of State-II.
The inner state of State-II is determined by the next control input "PPdiff_sign", whose corresponding operation is shown in Figure 7c.Here, initially, the loop enters the default State-VI and proceeds to check the control input condition "PPdiff_sign ≥ 0".As this condition finds as true, State-VI turns active and temporarily generates an outcome as "Md-VI" before the loop enters into the inner state of State-VI.
The inner state of State-VI is determined by the third control input "NPdiff_sign", whose corresponding operation is shown in Figure 7f.Here, initially, the loop enters the default State-XII and proceeds to check the control input condition "NPdiff_sign ≥ 0".As this condition finds as false, the loop enters State-XIII.With the further confirmation of the condition "NPdiff_sign < 0" as true, State-XIII turns active and generates the outcome as "Md-V".
This "Md-V" is the final outcome of this test case, i.e., the desired variable droop coefficient (Md) generated by the state machine.The same procedure will be followed for any other conditions of the control inputs that are given in Table 1.

Design Philosophy of the Proposed SMDCM
The philosophy behind the design of the proposed SMDCM is derived by plotting the trajectories of maximum/minimum peaks of frequency characteristics under different transient conditions.The nature of these trajectories (whether rising/falling) can be ascertained based on the outputs of the peak detection unit viz., "PPdiff_sign" (PPdiff_neg, PPdiff_pos) and "NPdiff_sign" (NPdiff_neg, NPdiff_pos).Where "PPdiff_neg" leads to a "falling trajectory of positive peaks", "PPdiff_pos" leads to a "rising trajectory of positive peaks", "NPdiff_neg" leads to a "falling trajectory of negative peaks", and "NPdiff_pos" leads to a "rising trajectory of negative peaks".
For each frequency zone, 4 combinations of trajectories can be obtained, and in total 12 such combinations can be obtained for the 3 frequency zones, as depicted in Figure 8 and defined in Table 2.In Figure 8, the dotted lines in red color represents the trajectory of maximum peaks and that in blue color represents the trajectory of minimum peaks.These trajectories of the maximum and minimum peaks provide a qualitative inference of how much compensation is required for a particular situation.This can be like some generic terms viz., very large, large, medium, small, and no compensation, etc.
Symmetry 2022, 14, x FOR PEER REVIEW 15 of 32 peaks", "NPdiff_neg" leads to a "falling trajectory of negative peaks", and "NPdiff_pos" leads to a "rising trajectory of negative peaks".For each frequency zone, 4 combinations of trajectories can be obtained, and in total 12 such combinations can be obtained for the 3 frequency zones, as depicted in Figure 8 and defined in Table 2.In Figure 8, the dotted lines in red color represents the trajectory of maximum peaks and that in blue color represents the trajectory of minimum peaks.These trajectories of the maximum and minimum peaks provide a qualitative inference of how much compensation is required for a particular situation.This can be like some generic terms viz., very large, large, medium, small, and no compensation, etc.For example, consider Zone-2 in Figure 8b.From the comparison, it can be inferred that the average value of the frequency is steeply rising in Figure 8b(E) than in Figure 8b(F).Since the frequency is already beyond UFL, a large damping for compensation is required for Figure 8b(E Thus, six different compensations are proposed to address various deviations of the frequency characteristic under different transient conditions that are given in Figure 8.These compensations are implemented through corresponding Md values as given in Table 3.The compensation and its corresponding Md value that is applied for each of the 12 conditions are mapped in Table 4.Moreover, in implementing this scheme, care is taken in fixing the values of Md-I to Md-VI such that the resultant kp value does not fall in the in-feasible region during unstable situations as discussed in Section 3. Therefore, the range of values described as zero compensation (ZC) is intentionally avoided as these values lead to kp falling to the in-feasible range.This proposed logic is implemented through the state machine.The corresponding compensation required for each of the conditions is realized by suitably activating various states of the state machine.The fifteen states of the state machine are classified under three control inputs as already shown in Table 1.It is reiterated that all three control inputs appear continuously in parallel which means that at any point in time, at least one state will be active under each of these control inputs.Because of this, a combination of any three states at any point in time corresponds to one of the twelve conditions given in Figure 8.The realization of these twelve conditions through a group of three states for each condition is shown in Figure 9.

VPC
at any point in time corresponds to one of the twelve conditions given in Figure 8.The realization of these twelve conditions through a group of three states for each condition is shown in Figure 9.For a given real-time transient frequency characteristic, the proposed SMDCM follows the following procedure to activate the corresponding states and produce the required compensation.

I
Step-1: The value of the measured frequency (freq) decides the zone out of the three zones.Thus, this reduces the choice of effective conditions from 12 to 4.

I
Step-3: The "NPdiff_sign" decides between "NPdiff_pos" and "NPdiff_neg".With this, finally, 1 condition out of the available 2 becomes active.Thus, the resultant group of three states and the necessary compensation (any of Md-I to Md-VI) is realized.

I
This value of Md will remain in a hold state till it gets updated to a new value based on the combination of the next three states.

Simulation Results and Comparative Analysis
The microgrid considered for this study includes a single DG unit and three threephase loads.The DG unit is connected to its load bus through an LC filter followed by line inductance L. Load1, Load2 and Load3 are the three three-phase loads of the DG unit.Each three-phase load is represented by a series RLC branch at each phase.The detailed model of the system is implemented in MATLAB software environment and the electrical and control parameters of the system are shown in Table 5; where, Kpv and Kiv are the proportional and integral parameters of the voltage controller, and Kpc and Kic are the proportional and integral parameters of the current controller.Load1 (L1) is a continuous type of RL load whose value is fixed all the time.Load2 is a momentary RL load that gets connected to the system through a breaker with a normally open condition.Three different configurations of load2 (L21, L22, and L23) are designed to create three different loading effects on the system.Similarly, Load3 (L3) is also a momentary RC load that gets connected through a breaker with the normally open condition.The details of these test load configurations are shown in Table 6.In this study, three test scenarios with various loading conditions are considered viz., Case 1 with nominal power factor (P.F.) loading, Case 2 with moderate P.F.loading, and Case 3 with poor P.F.loading.A summary of all these test scenarios with the details of various test loads acting on the system with their respective timelines during which they occur is provided in Table 7.In this work, the following is the procedure adopted in fixing the values for different loads.During the process of selecting the loads, care has been taken in fixing the values more particularly for Load2 such that during 80-90 s, the total load seen by the system is Load1 + Load2.This value of Load2 is selected in such a way that it is the boundary limit beyond which one of the considered conventional methods will fail in maintaining stability.Three different values for Load2 namely L21, L22, and L23 are identified in a systematic order.In the first test case, the value fixed for Load2 is trivial and the total load seen during 80-90 s is L1 + L21 i.e., 1500 W + j600 Var.During this time, all three methods will work without losing system stability.In the second test case, Load2 is fixed to 300 W + j800 Var such that the total load will be L1 + L22 i.e., 1500 W + j1100 Var.It is from this loading onwards, conventional CDCM has lost its stability; while conventional FLDCM and proposed SMDCM continued to show stability.In the third test case, Load2 is fixed to 300 W + j1200 Var such that the total load will be L1+L23 i.e., 1500 W + j1500 Var.It is from this loading onwards, conventional FLDCM has also lost its stability; while the proposed SMDCM successfully continued to show stability.The sizing of Load3 and its effect on system response is discussed in the sections connected with their respective test cases.Various responses of the system such as frequency, voltage, and active power are plotted with conventional CDCM, conventional FLDCM, and the proposed SMDCM and are compared separately under each test case.

Case 1 (Nominal P.F. Loading)
In this case, the test scenario is such that, load1 is set to 1200 W + j300 Var, load2 is set to 300 W + j300 Var, and load3 is set to 300 W − j300 Var.The corresponding waveforms of frequency, output power, and voltage are shown in Figure 10, Figure 11, and Figure 12 respectively.
With the conventional CDCM, the frequency waveform settled to a normal frequency value of 50 Hz, and no deviations are found with the existing fixed load.During the connection and disconnection of Load2 also, no significant changes are noticed in the frequency.A little spike appeared at 125 s when load 3 is connected.However, the frequency value is still within the limit of 50 ± 1 Hz.These are identified in Figure 10a.
It is important to know whether the spike at 125 s in the frequency graph is due to capacitive load or due to an interaction of the capacitive loading effect and inductive load disconnection effect or solely due to the inductive load disconnection effect.In this case, the spike can be attributed to the capacitive loading effect since the inductive effect of Load2 is not existing at this time.The corresponding waveform of the output power and inverter voltage is shown in Figures 11a and 12a respectively.It can be noticed from Figure 11a that, the inverter momentarily failed to deliver power at 125 s indicating no more reserve margin.
In the case of the conventional FLDCM, as can be seen from Figure 10b, no deviations and surges are found in the frequency waveform.The resultant responses of the output power and inverter voltage are shown in Figures 11b and 12b respectively.Similarly, with the proposed SMDCM, no deviations and anomalies are noticed in the frequency waveform as seen in Figure 10c.The corresponding waveform of the output power and inverter voltage are shown in Figures 11c and 12c respectively indicating no anomalies.
inverter voltage are shown in Figures 11c and 12c respectively indicating no anomalies.
The zoomed aspect of frequency, active power, and voltage waveforms at 125 s are shown in Figures 10d, 11d, and 12e respectively.The condition of voltage corresponding to switching at 80 s is shown in Figure 12d, where there is no deviation observed with all the methods.
From all these responses, it can be observed that the proposed SMDCM has shown superior performance in frequency, active power, and voltage characteristics when compared with the conventional CDCM and FLDCM.

Case 2 (Moderate P.F. Loading)
In this case, the test scenario is such that, load1 is set to 1200 W + j300 Var, load2 is set to 300 W + j800 Var, and load3 is set to 300 W − j300 Var.The corresponding waveforms for frequency, output power, and voltage are shown in Figure 13, Figure 14, and Figure 15 respectively.With the conventional CDCM, the frequency waveform settled to a normal frequency value of 50Hz, and no deviations are found with the existing fixed load.No major changes can be noticed in the frequency soon after the connection of Load2.However, from 86.6 s, the frequency waveform is seeing a noticeable distortion.These are identified in Figure 13a.The distortions are beyond the limit of 50 ± 1 Hz.Thus, it is justified from this that the larger the inductive load, the larger will be the instability.The corresponding output power and inverter voltage are shown in Figures 14a and 15a respectively.From Figure 14a, it is seen that the inverter failed to exhibit any reserve margin to maintain stability from 86.6 s onwards as indicated by repeated falling of power to zero.The voltage is completely distorted after 86.6 s as noticed in Figure 15a.
With the conventional FLDCM, as can be seen from Figure 13b, no deviations and The zoomed aspect of frequency, active power, and voltage waveforms at 125 s are shown in Figure 10d, Figure 11d, and Figure 12e respectively.The condition of voltage corresponding to switching at 80 s is shown in Figure 12d, where there is no deviation observed with all the methods.
From all these responses, it can be observed that the proposed SMDCM has shown superior performance in frequency, active power, and voltage characteristics when compared with the conventional CDCM and FLDCM.

Case 2 (Moderate P.F. Loading)
In this case, the test scenario is such that, load1 is set to 1200 W + j300 Var, load2 is set to 300 W + j800 Var, and load3 is set to 300 W − j300 Var.The corresponding waveforms for frequency, output power, and voltage are shown in Figure 13, Figure 14, and Figure 15 respectively.With the conventional CDCM, the frequency waveform settled to a normal frequency value of 50Hz, and no deviations are found with the existing fixed load.No major changes can be noticed in the frequency soon after the connection of Load2.However, from 86.6 s, the frequency waveform is seeing a noticeable distortion.These are identified in Figure 13a.The distortions are beyond the limit of 50 ± 1 Hz.Thus, it is justified from this that the larger the inductive load, the larger will be the instability.The corresponding output power and inverter voltage are shown in Figures 14a and 15a respectively.From Figure 14a, it is seen that the inverter failed to exhibit any reserve margin to maintain stability from 86.6 s onwards as indicated by repeated falling of power to zero.The voltage is completely distorted after 86.6 s as noticed in Figure 15a.
Symmetry 2022, 14, x FOR PEER REVIEW 23 of 32 deviations in frequency/power waveforms.This can be explained by Figure 14c that the SMDCM has provided an extra reserve margin even after 90 to 94 s.Also, no deviations/anomalies are noticed in frequency and voltage waveforms as seen in Figures 13c and 15c respectively.Voltage anomalies in the form of distortions and spikes appeared even after 90 s when FLDCM is employed; while no such issues exist with SMDCM.The occurrence of these deviations with FLDCM can be correlated with sudden droppings in power values occasionally during 90-100 s in Figure 14b.But, as shown in Figure 15c, no such deviations are noticed after 90 s, when SMDCM is employed.This confirms that SMDCM ensures a better transient response than FLDCM.The zoomed aspect of the frequency waveform after 90 s is shown in Figure 13d.The details of distortions in the waveform of active power can be found in Figure 14d.The condition of voltage corresponding to switching at 80 s and that after 86.6 s is shown in Figures 15d,e respectively.A typical example of an impact of a sudden dip in power values occasionally during 90-100 s on voltage is depicted in Figure 15f.With the conventional FLDCM, as can be seen from Figure 13b, no deviations and surges are found in the frequency waveform.The corresponding waveform of the output power and inverter's voltage is shown in Figures 14a and 15a respectively.As seen from Figure 14b, the inverter momentarily failed to deliver power at 125 s indicating a similar kind of situation with the constant droop technique in case-1.It is worth noticing that, at 80 s, the output power shows a spike appeared reaching a value of 2500 W putting more burden on the energy source feeding the inverter.After 86.6 s, little deviations are seen in frequency and power waveforms.But, the proposed SMDCM did not allow any such deviations in frequency/power waveforms.This can be explained by Figure 14c that the SMDCM has provided an extra reserve margin even after 90 to 94 s.Also, no deviations/anomalies are noticed in frequency and voltage waveforms as seen in Figures 13c and 15c respectively.Voltage anomalies in the form of distortions and spikes appeared even after 90 s when FLDCM is employed; while no such issues exist with SMDCM.The occurrence of these deviations with FLDCM can be correlated with sudden droppings in power values occasionally during 90-100 s in Figure 14b.But, as shown in Figure 15c, no such deviations are noticed after 90 s, when SMDCM is employed.This confirms that SMDCM ensures a better transient response than FLDCM.The zoomed aspect of the frequency waveform after 90 s is shown in Figure 13d.The details of distortions in the waveform of active power can be found in Figure 14d.The condition of voltage corresponding to switching at 80 s and that after 86.6 s is shown in Figure 15d,e respectively.A typical example of an impact of a sudden dip in power values occasionally during 90-100 s on voltage is depicted in Figure 15f.From Case 2, it is understood that connection/disconnection of large inductive loads brings larger instability situations.Thus, to focus on this aspect, Load3 is purposefully removed in this case and a large inductive load in the form of Load2 is introduced into the system.Thus, in the test scenario of this case, L1 is set to 1200 + j300, load2 is set to L23 i.e., 300 + j1200, and L3 is left unconnected.The corresponding responses for frequency, output power, and voltage are shown in Figure 16, Figure 17, and Figure 18 respectively.changes can be noticed in the frequency soon after with the connection of L23.However, a start in the growth of distortion in the frequency waveform is noticed from 80 s onwards.These are identified in Figure 16a.It can further be noticed from the same figure that the frequency sees a dip to 42 Hz at around 130 s leading to serious instability.It can be identified from the active power waveform as shown in Figure 17a that the inverter has failed to exhibit any reserve margin to maintain stability from 80 s onwards.Further, the voltage output of the inverter is completely distorted after 80 s as can be noticed in Figure 18a.
Similarly, when the conventional FLDCM is employed, as can be seen from Figure 16b, the frequency waveform in this case sees a spike of 54 Hz around 130 s.This is a lesser deviation when compared with the constant droop approach.However, since this value is also beyond the limit of 50 ± 1 Hz, the system can be understood as the loss of its stability.The possible reason for loss of stability is because of possible chances of the kp value falling in the in-feasible zone.The situation with power output and inverter output voltage as shown by Figures 17b and 18b further confirms, that FLDCM has failed to maintain the stability of the system in this case.With the caution of not allowing the kp value to fall into an in-feasible zone while implementing the state machine, the proposed SMDCM successfully mitigated any possible deviations in the frequency, output power, and voltage as can be noticed from Figures 16c, 17c, and 18c respectively.This proves the superiority of the proposed technique in upholding the stability of the system when subjected to connection/ disconnection of large inductive loads in the system.The zoomed aspect of distortion in voltage waveforms corresponding to switching at 80 s is shown in Figure 18d.From this figure, it is clear that there is an increasing trend from conventional to proposed methods with respect to the waveform shape, which justifies the importance of the proposed SMDCM in this paper.
As this test Case 3 leads to severe voltage distortions compared to the previous two test cases, the total harmonic distortion (THD) analysis is performed in this case.The voltage THD values with conventional and proposed methods are depicted in Figure 19.As shown in Figure 19a,b, the THD value with conventional CDCM and conventional FLDCM are obtained as 74.10% and 58.99% respectively.These values largely violated the With the conventional CDCM, the frequency waveform settled to a normal frequency value of 50 Hz, and no deviations are found with the existing fixed load.No significant changes can be noticed in the frequency soon after with the connection of L23.However, a start in the growth of distortion in the frequency waveform is noticed from 80 s onwards.These are identified in Figure 16a.It can further be noticed from the same figure that the frequency sees a dip to 42 Hz at around 130 s leading to serious instability.It can be identified from the active power waveform as shown in Figure 17a that the inverter has failed to exhibit any reserve margin to maintain stability from 80 s onwards.Further, the voltage output of the inverter is completely distorted after 80 s as can be noticed in Figure 18a.
FLDCM are obtained as 74.10% and 58.99% respectively.These values largely violated the standard 5% tolerance that is defined by IEEE 1547 standard.But, the voltage THD value shown in Figure 19c, which is obtained with the proposed SMDCM is computed as 3.08%, which adheres to the standard 5% tolerance.
The abovementioned comparative performance analysis of the conventional CDCM, conventional FLDCM, and the proposed SMDCM are summarized in Table 8 to understand the superiority of the proposed SMDCM.Similarly, when the conventional FLDCM is employed, as can be seen from Figure 16b, the frequency waveform in this case sees a spike of 54 Hz around 130 s.This is a lesser deviation when compared with the constant droop approach.However, since this value is also beyond the limit of 50 ± 1 Hz, the system can be understood as the loss of its stability.The possible reason for loss of stability is because of possible chances of the kp value falling in the in-feasible zone.The situation with power output and inverter output voltage as shown by Figures 17b and 18b further confirms, that FLDCM has failed to maintain the stability of the system in this case.
With the caution of not allowing the kp value to fall into an in-feasible zone while implementing the state machine, the proposed SMDCM successfully mitigated any possible deviations in the frequency, output power, and voltage as can be noticed from Figure 16c, Figure 17c, and Figure 18c respectively.This proves the superiority of the proposed technique in upholding the stability of the system when subjected to connection/ disconnection of large inductive loads in the system.The zoomed aspect of distortion in voltage waveforms corresponding to switching at 80 s is shown in Figure 18d.From this figure, it is clear that there is an increasing trend from conventional to proposed methods with respect to the waveform shape, which justifies the importance of the proposed SMDCM in this paper.
As this test Case 3 leads to severe voltage distortions compared to the previous two test cases, the total harmonic distortion (THD) analysis is performed in this case.The voltage THD values with conventional and proposed methods are depicted in Figure 19.As shown in Figure 19a,b, the THD value with conventional CDCM and conventional FLDCM are obtained as 74.10% and 58.99% respectively.These values largely violated the standard 5% tolerance that is defined by IEEE 1547 standard.But, the voltage THD value shown in

Conclusions
In this paper, to improve the symmetry in the enhancement of both transient response and stability of the microgrid when subjected to connection/disconnection of large inductive loads, a simple, fast, and robust technique based on the identification of an in-feasible range of droop coefficients is proposed.This proposed "state machine-based droop control method (SMDCM)" is implemented through the development of a state machine.The superiority of the proposed method is proved by comparing it with conventional CDCM and FLDCM.The salient achievements of the proposed work are given as follows.

I
Based on the time domain analysis and small signal model, a strong correlation is identified between connection/disconnection of large inductive loads and fall in equivalent line inductance.Further, the role of the droop coefficient value on stability based on the change in line inductance is studied.

I
The identification of an in-feasible range of the frequency droop coefficient values based on the eigenvalue analysis allows to avoid only those range of dangerous values; thereby, providing the user with a widened chance to pick the desired droop values.

I
Since the proposed method of fixing the droop coefficients is an offline approach, the computation time and burden are very much reduced.

I
The proposed SMDCM outperformed the conventional CDCM and FLDCM.It also provides robust control of both voltage and frequency in terms of transient stability and response.The same is proved through the comparative metrics given in Table 8.The following are the salient points that can be summarized from this table .- In terms of the frequency with Case 3 loading, both CDCM and FLDCM violated the standard limit of ± 2% limit while the proposed SMDCM scheme exhibited 50.02Hz and 49.8 Hz as maximum and minimum values respectively ensuring stability.-In terms of extra burden during Case 3, CDCM has failed the system.While, FLDCM initially had presented an extra burden of 860 W on the system, while SMDCM had presented a lesser burden of 550 W on the system.With respect to the reserve margin, also, both CDCM and FLDCM have made the system fail.While SMDCM even though it has temporarily seen zero reserve power momentarily, recovered immediately ensuring the stability of the system.-With respect to voltage characteristics, with capacitive load switching in FLDCM, the peak change in voltage is 318 V and 340 V during Case 1 and Case 2 respectively, whereas, 200 V is the maximum allowable peak change.While with SMDCM, the peak changes recorded are 158 V and 150 V respectively.With inductive load switching in Case 3, both CDCM and FLDCM failed, while with SMDCM it is just 64 V. -In terms of disturbance period, in Case 2, CDCM has failed, with FLDCM it is 16.6 s, while the same with SMDCM is 10 s only.Further, in Case 3, both CDCM and FLDCM failed, while SMDCM recovered the response in 0.04 s. -Similarly, during Case 3, the voltage THD of CDCM and FLDCM is 74.1% and 58.9% respectively.The same with SMDCM is only 3.08% which is less than the standard limit of 5%.
Thus, the above-mentioned summary indicates the superiority of the proposed SMDCM for improving the transient performance of microgrids over conventional CDCM and conventional FLDCM.

Limitation and Future Scope
This research work is particularly designed to address the drawbacks of the fuzzy logic-based droop controller coefficient adjustment method.This is the limitation of the proposed work in this paper.Further, with respect to the contribution deposited in this paper, the following extensions can be considered as future scope.

I
Design of droop coefficient with other artificial intelligence or machine learning-based methods.Their effectiveness can be tested with respect to the proposed SMDCM in this paper.Further, experimental verification of all these methods can be considered for future work.

I
Retaining the proposed state machine-based droop controller, the existing conventional voltage and current controllers can be replaced with modern compensators to further enhance the transient performance of the microgrid.

32 Figure 1 .
Figure 1.The layout of the microgrid includes cascaded droop, voltage, and current controllers.

Figure 2 .
Figure 2. Plot of change in frequency (∆ω) with a step change in active power (∆P) for various values of L at a fixed value of kp (=0.0001).

Figure 2 .
Figure 2. Plot of change in frequency (∆ω) with a step change in active power (∆P) for various values of L at a fixed value of kp (=0.0001).

Symmetry 2022 ,Figure 3 .
Figure 3. Pole-Zero plot of the system for various values of L and kp.

Figure 3 .
Figure 3. Pole-Zero plot of the system for various values of L and kp.

Figure 4 .
Figure 4. Schematic of the proposed SMDCM and its major parts.

Figure 4 .
Figure 4. Schematic of the proposed SMDCM and its major parts.

Figure 5 .
Figure 5.Typical frequency waveform under transient operating conditions.

Figure 6 .
Figure 6.Implementation of the proposed state machine for SMDCM development.

Figure 7 .Figure 6 . 32 Figure 6 .
Figure 7. Flowcharts showing the sequence of transitions among various states of the state machine.

Figure 7 .Figure 7 .
Figure 7. Flowcharts showing the sequence of transitions among various states of the state machine.

Figure 8 .
Figure 8. Various combinations of the trajectories obtained under 3 frequency zones.

Figure 8 .
Figure 8. Various combinations of the trajectories obtained under 3 frequency zones.
) than for Figure8b(F).Similarly, in the case of Figure8b(H), since the inferred trajectory of average frequency is naturally restoring to normalcy, a little extra compensation is required.This kind of reasoning is the basis of how six different numeric values are designed for Md-I to Md-VI.

Figure 9 .Figure 9 .
Figure 9. Realization of various transient conditions through the proposed combination of states.From this Figure9, the realization is done as follows.

Figure 11 .
Figure 11.Output power responses obtained with (a) CDCM, (b) FLDCM, and (c) SMDCM when subjected to Case 1.(d) zoom in of all power responses around 125 s.

Figure 12 .
Figure 12.PCC voltage responses obtained with (a) CDCM, (b) FLDCM, and (c) SMDCM when subjected to Case 1.(d) zoom in of all voltage responses around 80 s and (e) zoom in of all voltage responses around 125 s.

Figure 13 .
Figure 13.Frequency responses obtained with (a) CDCM, (b) FLDCM, and (c) SMDCM when subjected to Case 2. (d) zoom in of all frequency responses after 90 s.

Figure 13 .
Figure 13.Frequency responses obtained with (a) CDCM, (b) FLDCM, and (c) SMDCM when subjected to Case 2. (d) zoom in of all frequency responses after 90 s.

Figure 14 .
Figure 14.Output power responses obtained with (a) CDCM, (b) FLDCM, and (c) SMDCM when subjected to Case 2. (d) zoom in of all power responses around 125 s.

Figure 14 .
Figure 14.Output power responses obtained with (a) CDCM, (b) FLDCM, and (c) SMDCM when subjected to Case 2. (d) zoom in of all power responses around 125 s.

Figure 15 .
Figure 15.PCC voltage responses obtained with (a) CDCM, (b) FLDCM, and (c) SMDCM when subjected to Case 2. (d) zoom in of voltage responses around 80 s, (e) zoom in of voltage responses around 86 s and (f) zoom in of voltage responses around 95.8 s.

Figure 18 .
Figure 18.PCC voltage responses obtained with (a) CDCM, (b) FLDCM, and (c) SMDCM when subjected to Case 3. (d) zoom in of all voltage responses around 80 s.

Table 1 .
States of the proposed state machine along with their entering conditions and outcomes.

Table 2 .
Summary of various conditions based on the trajectories of positive and negative peaks.

Table 3 .
Various compensation levels and corresponding Md values.

Table 4 .
Level of compensation and respective droop coefficient applied for various conditions.

Table 5 .
Electrical and control parameters used in the simulation.

Table 6 .
Various test load configurations.

Table 7 .
Summary of test conditions.

Table 8 .
Comparison of conventional and proposed methods in various performance aspects.