# Iterative Approach for Tuning Multiple Converter-Integrated DER in Microgrids

Authors: C. García-Ceballos; S. Pérez-Londoño; J. Mora-Flórez
Journal: International Transactions on Electrical Energy Systems
 (2022)

---

## Abstract

This paper proposes an iterative approach to adjust the control parameters of multiple power converters within a microgrid, which operates in grid-connected and grid-islanded modes. The adequate control parameters are determined using an optimisation-based strategy, local measurements, and results obtained in previous algorithm iterations. The proposed objective function is based on the integral time-weighted absolute error (ITAE), modified to improve the microgrid control performance. The proposed approach addresses the control tuning complexity by considering an incremental strategy, starting from adjusting basic microgrids, continuing to the setting of intermediate microgrids, and finalising when the target microgrid control is fine adjusted. The results obtained at the CIGRE LV benchmark microgrid validate the proposal, obtaining during faults, the maximum deviations from rated frequency around 2.2% and 0.3% in grid-islanded or grid-connected cases, respectively. Also, voltage and power references are adequately followed during steady-state regardless of the microgrid operation mode, where the steady voltage profile is below 10% variation. The obtained results demonstrate the proposed approach advantages, which straightforwardly adjust multiple converters integrated into a microgrid. The main contributions are as follows: (a) the microgrid model is not required, and (b) only measurements at the point of common coupling of the distributed energy resource are used; consequently, the proposed tuning approach is especially applicable to complex microgrids. Finally, finely adjusted microgrids are required for further operation or protection studies where complex system configurations are commonly required.


---

## Body

## 1. Introduction

### 1.1. Motivation

Distributed energy resources (DER) are integrated into the electric network as these represent technical and economic benefits [1]. Nevertheless, the study of DER integration is an issue considering the compromise between the model detail and the system size; frequently, when detailed representations are considered is at the expense of the microgrid size [2–4].Power electronic devices such as the voltage source converter (VSC) are generally used to integrate DER into the AC microgrid. The VSC is a nonlinear device that requires several control layers, which are considered by the microgrid hierarchical control [5]. These control schemes are usually based on proportional-integral (PI) strategies, whose parameters are cautiously selected to obtain an adequate microgrid behaviour [3, 6–12].On the other hand, operation or protection studies require realistic microgrids, including several converter-integrated DER (CIDER), loads, and lines. Such microgrids can be operated in grid-islanded and grid-connected modes, requiring the zero and the primary control layers. The latter is used when the microgrid operates in grid-islanded mode, while the former is required under grid-connected and grid-islanded cases.As above exposed, the requirement of realistic size microgrids, which must be adequately controlled, is an issue nowadays. Even though adjusting the PI control constants is considered in many proposals, a standard process is not available, which makes the microgrid adjustment from scratch difficult. Consequently, it is desirable to obtain a simple and effective method that allows researchers to design and adjust multi-CIDER microgrids straightforwardly, and then deeper and detailed studies can be developed [13].In this way, this research is oriented to develop an off-line approach to obtain adequate CIDER control parameters within a realistic size microgrid. The approach considers decentralised control strategies, several DER models, grid-islanded and grid-connected modes, local measurements, and different microgrid operating conditions.


### 1.2. State of the Art

Most of the proposed strategies to determine the VSC control parameters aim for optimal tuning. These can be divided into three approaches:(a)
These that consider the physical model of the controlled system, where the control parameters are obtained using exact techniques or a combination of exact and nonexact techniques.(b)
These that use a transfer function equivalent model for the controlled system, where exact or nonexact tuning techniques are predominant and mixed techniques are also available.(c)
These where the controlled system model is not considered and nonexact tuning techniques are usually applied.A tuning strategy based on the model is usually preferred since the optimal solution is obtained; nonetheless, the determination of VSC and microgrid dynamic models can be challenging in realistic size microgrids. As a consequence, the last two approaches are widely considered.


#### 1.2.1. Tuning Approaches considering the Physical Component Modelling of the Controlled System

In general, the controlled system model has more parameters as the complexity and size increase. In this approach, the models describe the behaviour of the components and consider at least the small-signal system model. Nonetheless, the model complexity is not always the same in microgrids since each of these include different considerations or components. The following paragraphs present some examples. In [2], a small-signal model (SSM) described a microgrid with three VSCs, which included 55 state variables and considered internal model control (IMC) complemented with particle swarm optimisation (PSO). In [14], an eigenvalue analysis defined the PSO objective function and state equations described the main elements of the microgrid; then [14] considers both model and measures of the system. Finally, [15] propose a 2-VSC test microgrid represented by the state-space model; the search space and objective function of a modified whale optimisation (WO) technique were obtained from the eigenvalue analysis. In the two latter references, the optimisation strategy and the objective function definition were as crucial as the modelling process. However, the system size and number of VSCs were small due to model size. Furthermore, strong disturbances as short circuits were not deeply analysed.Additionally, even though [16, 17] do not consider a tuning technique, these references presented considerations for microgrid and VSC modelling; these are suitable examples of how daunting, a time-consuming and challenging task is the adjusting of an adequate microgrid model. In [17], the VSC model was analysed, and a proposal for VSC 6th order model was validated through the small-signal model and eigenvalue analysis. In [16], the IEEE37 bus system was modified to include 7 VSCs; as a result, the small-signal model of the whole microgrid reached 225th order, which was reduced to a 56-order system model. Finally, in [18], three types of controllers were tuned by using a small-signal model and the gravity centre of a stable area; however, only one VSC was considered in the test system.


#### 1.2.2. Tuning Approaches considering the Transfer Function Equivalent Modelling of the Controlled System

This approach is usually applied due to the entire microgrid model complexity; then, simplified transfer functions are considered. Usually, this tuning process does not include microgrid interaction or additional elements besides the VSC. Moreover, the simplifications to obtain TF equivalent make the obtained solutions inadequate for all operating conditions [19].Therefore, the VSC can be modelled by an equivalent first-order transfer function (TF). This tuning approach is considered in the following papers. In [10], a VSC dominant pole TF and pole placement method were considered. Also, in [20], a zero-level TF for the VSC zero control was complemented with fuzzy logic; then, the system response under small and large signal disturbances was enhanced. In [21], the state-space representation of the microgrid was simplified to a TF, and IMC was applied to obtain adequate VSC behaviour under grid transition. In [22], the grid-forming mode of operation was studied, TFs and restrictions in the frequency domain s were applied to define boundaries for the primary control parameters and also explored with different primary control strategies. In [23], the simplified microgrid TFs and eigenvalue analysis was carried away. However, it was remarked that a strict mathematical formulation of the optimisation problem was not acquirable, so the solution was obtained through a genetic algorithm (GA) and validated through eigenvalues. Additionally, even though the control parameters selection was not evident in [24], it considered the microgrid modelling using TFs, analysing stability issues and phase-locked loop (PLL) bandwidth, and it also included multiple-input multiple-output (MIMO) representation and parameters boundaries. Finally, it was usual to validate the proposals using a reduced and simplified test system in the references above.


#### 1.2.3. Tuning Approaches Which Do Not Require the Model of the Controlled System

As described in the two previous tuning approaches (model-based approaches), the microgrid model can differ from one work to another, leading to confusion when implementing and tuning a microgrid from scratch. Moreover, even with the model acquirement, a nonexact technique was usually considered since the model used to determine the control parameters was quite complex in many cases.Therefore, this third approach avoids the modelling stage for the control tuning but requires the definition of an optimisation functionOF. As the microgrid model is not considered or is unknown, OF is based on the error in the signals of interest. Also, nonexact techniques are applied, which means that the obtained solution is the best from all explored solutions. As an advantage, this is a fast and straightforward approach, where OF can be estimated using local measurements.On the other hand, nonexact techniques are a wide field of research in microgrid applications, especially when the system size conduces to a complex model. Among these techniques, [25] presented a review of the operation cost, concluding that swarm strategies had the best performance. Other proposals, as presented in [26], applied PSO to adjust the primary level control for a simplified microgrid. Additionally, in [12], the grey wolf optimisation (GWO) adjusted the control parameters for a wind turbine generator. In [6], the zero-level control for a simplified wind-battery microgrid was adjusted using GA. In [27], the PSO was applied to train a modified fuzzy controller, where tests were compared to PI controller regarding power-sharing and frequency regulation.As a result of state of the art, the main characteristics of references with control tuning strategies are summarised in Table1. This table includes for comparison purposes the system model, the applied tuning technique, the adjusted control, the signals used for control adjustment, commonly power, voltage, and frequency; in some cases, also damping coefficient ξ and the real part of eigenvalues Reλi were also used. Table 1 also includes the microgrid operating mode, the test system size, and the proposal scalability.Table 1
Comparison of some referenced microgrid tuning approaches.
ReferenceSystem modelTuning techniqueAdjusted control levelSignals for adjustmentMicrogrid modeTest system sizeScalability[2]SSMIMC and PSOZero and primaryQIslanded3 VSC-2 lineLow[12]NoneGWOZeroP, Urms, Urmsgen, and VdcConnected2 VSC-1 lineLow[10]TFPole placement methodZeroNoneIslanded2 VSC-2 lineLow[6]NoneGAZeroωgenIslanded2 VSC-0 lineLow[14]SSMPSOZeroP and ReλiBoth3 VSC-2 lineMedium[15]SSMModified WOZeroReλi and ξIslanded2 VSC-1 lineLow[20]TFFuzzyZero to tertiaryQBoth4 VSC-3 lineMedium[21]TFIMCZero and primaryNoneBoth1 VSC-1 lineLow[22]TFDefinition of gain margins and parameter rangesPrimaryNot clearConnected2 VSC-3 lineLow[23]SSM and TFGAZero and primaryP and QIslanded2 VSC-1 lineMedium[26]NoneFuzzy and PSOPrimaryP, Q, U, and fIslanded2 VSC-2 linesLow[27]NonePSO and fuzzyPrimaryP and fConnected7 VSC-10 lineMediumProposalNoneModified ITAE index and metaheuristic optimisationZero and primaryid, iq, ud, uq, and fBoth5 VSC-10 lineHighFrom the comparison table, small test systems were noticed in most cases. Some approaches, as [28, 29], used large test systems, but the use of communication systems jeopardised the overall microgrid behaviour. This last aspect is not considered in the proposal presented in this paper since primary and zero control layers are decentralised, no communication links are required, constituting an essential advantage by reducing costs and reliability issues.The comparison in Table1 allows concluding about the proposal scalability, where qualitative labels, low, medium, or high, are considered. Low scalability means a proposal that was not clearly validated nor presented to be implemented in realistic size microgrids and also a proposal that presents a high dependence of correct microgrid modelling. Medium scalability means a proposal that addressed the tuning problem with a high potentiality for implementation on realistic size microgrids, mainly for the flexibility to partially or totally dismiss the microgrid model, which is complex to obtain in realistic microgrids. High scalability is associated with a proposal that addresses the tuning problem and can be easily implemented in realistic size microgrids. Additionally, the proposal presented in this paper has adequate results with low modelling efforts and can be straightforwardly implemented in several microgrids, regardless of the operating mode.


### 1.3. Contribution

The paper proposes a straightforward approach to define the control parameters, applied to tune realistic size microgrids with several CIDERs, operating in grid-connected and grid-islanded modes. The considered CIDER representation includes the primary energy resource, the VSC, and the output filter. Additionally, as the microgrid model is not required, the proposed strategy can tune controls of complex microgrids. In the proposal, only measurements at the CIDER point of common coupling (PCC) are considered and compared with a reference signal to calculateOF, minimised through an iterative strategy based on an optimisation technique. These measurements contain information about the CIDER’s behaviour and the remaining part of the microgrid.The proposed approach allows the tune of the control parameters easily; besides, it can be applied to multiple CIDER microgrids. As the used measurements contain the microgrid response under different disturbances, the obtained control parameters allow the stable behaviour for a wide range of operating conditions. This approach speeds up other studies since an adequately tuned microgrid control is the base of upcoming operation or protection analysis.


### 1.4. Paper Organisation

This document is divided into five sections. In Section 2, the required fundamental theoretical aspects related to the control of CIDERs are exposed, while in Section 3, the proposed approach is described. Later, Section 4 presents the proposed tests, their results, and the corresponding analysis. Finally, Section 5 highlights the conclusions.


## 1.1. Motivation

Distributed energy resources (DER) are integrated into the electric network as these represent technical and economic benefits [1]. Nevertheless, the study of DER integration is an issue considering the compromise between the model detail and the system size; frequently, when detailed representations are considered is at the expense of the microgrid size [2–4].Power electronic devices such as the voltage source converter (VSC) are generally used to integrate DER into the AC microgrid. The VSC is a nonlinear device that requires several control layers, which are considered by the microgrid hierarchical control [5]. These control schemes are usually based on proportional-integral (PI) strategies, whose parameters are cautiously selected to obtain an adequate microgrid behaviour [3, 6–12].On the other hand, operation or protection studies require realistic microgrids, including several converter-integrated DER (CIDER), loads, and lines. Such microgrids can be operated in grid-islanded and grid-connected modes, requiring the zero and the primary control layers. The latter is used when the microgrid operates in grid-islanded mode, while the former is required under grid-connected and grid-islanded cases.As above exposed, the requirement of realistic size microgrids, which must be adequately controlled, is an issue nowadays. Even though adjusting the PI control constants is considered in many proposals, a standard process is not available, which makes the microgrid adjustment from scratch difficult. Consequently, it is desirable to obtain a simple and effective method that allows researchers to design and adjust multi-CIDER microgrids straightforwardly, and then deeper and detailed studies can be developed [13].In this way, this research is oriented to develop an off-line approach to obtain adequate CIDER control parameters within a realistic size microgrid. The approach considers decentralised control strategies, several DER models, grid-islanded and grid-connected modes, local measurements, and different microgrid operating conditions.


## 1.2. State of the Art

Most of the proposed strategies to determine the VSC control parameters aim for optimal tuning. These can be divided into three approaches:(a)
These that consider the physical model of the controlled system, where the control parameters are obtained using exact techniques or a combination of exact and nonexact techniques.(b)
These that use a transfer function equivalent model for the controlled system, where exact or nonexact tuning techniques are predominant and mixed techniques are also available.(c)
These where the controlled system model is not considered and nonexact tuning techniques are usually applied.A tuning strategy based on the model is usually preferred since the optimal solution is obtained; nonetheless, the determination of VSC and microgrid dynamic models can be challenging in realistic size microgrids. As a consequence, the last two approaches are widely considered.


### 1.2.1. Tuning Approaches considering the Physical Component Modelling of the Controlled System

In general, the controlled system model has more parameters as the complexity and size increase. In this approach, the models describe the behaviour of the components and consider at least the small-signal system model. Nonetheless, the model complexity is not always the same in microgrids since each of these include different considerations or components. The following paragraphs present some examples. In [2], a small-signal model (SSM) described a microgrid with three VSCs, which included 55 state variables and considered internal model control (IMC) complemented with particle swarm optimisation (PSO). In [14], an eigenvalue analysis defined the PSO objective function and state equations described the main elements of the microgrid; then [14] considers both model and measures of the system. Finally, [15] propose a 2-VSC test microgrid represented by the state-space model; the search space and objective function of a modified whale optimisation (WO) technique were obtained from the eigenvalue analysis. In the two latter references, the optimisation strategy and the objective function definition were as crucial as the modelling process. However, the system size and number of VSCs were small due to model size. Furthermore, strong disturbances as short circuits were not deeply analysed.Additionally, even though [16, 17] do not consider a tuning technique, these references presented considerations for microgrid and VSC modelling; these are suitable examples of how daunting, a time-consuming and challenging task is the adjusting of an adequate microgrid model. In [17], the VSC model was analysed, and a proposal for VSC 6th order model was validated through the small-signal model and eigenvalue analysis. In [16], the IEEE37 bus system was modified to include 7 VSCs; as a result, the small-signal model of the whole microgrid reached 225th order, which was reduced to a 56-order system model. Finally, in [18], three types of controllers were tuned by using a small-signal model and the gravity centre of a stable area; however, only one VSC was considered in the test system.


### 1.2.2. Tuning Approaches considering the Transfer Function Equivalent Modelling of the Controlled System

This approach is usually applied due to the entire microgrid model complexity; then, simplified transfer functions are considered. Usually, this tuning process does not include microgrid interaction or additional elements besides the VSC. Moreover, the simplifications to obtain TF equivalent make the obtained solutions inadequate for all operating conditions [19].Therefore, the VSC can be modelled by an equivalent first-order transfer function (TF). This tuning approach is considered in the following papers. In [10], a VSC dominant pole TF and pole placement method were considered. Also, in [20], a zero-level TF for the VSC zero control was complemented with fuzzy logic; then, the system response under small and large signal disturbances was enhanced. In [21], the state-space representation of the microgrid was simplified to a TF, and IMC was applied to obtain adequate VSC behaviour under grid transition. In [22], the grid-forming mode of operation was studied, TFs and restrictions in the frequency domain s were applied to define boundaries for the primary control parameters and also explored with different primary control strategies. In [23], the simplified microgrid TFs and eigenvalue analysis was carried away. However, it was remarked that a strict mathematical formulation of the optimisation problem was not acquirable, so the solution was obtained through a genetic algorithm (GA) and validated through eigenvalues. Additionally, even though the control parameters selection was not evident in [24], it considered the microgrid modelling using TFs, analysing stability issues and phase-locked loop (PLL) bandwidth, and it also included multiple-input multiple-output (MIMO) representation and parameters boundaries. Finally, it was usual to validate the proposals using a reduced and simplified test system in the references above.


### 1.2.3. Tuning Approaches Which Do Not Require the Model of the Controlled System

As described in the two previous tuning approaches (model-based approaches), the microgrid model can differ from one work to another, leading to confusion when implementing and tuning a microgrid from scratch. Moreover, even with the model acquirement, a nonexact technique was usually considered since the model used to determine the control parameters was quite complex in many cases.Therefore, this third approach avoids the modelling stage for the control tuning but requires the definition of an optimisation functionOF. As the microgrid model is not considered or is unknown, OF is based on the error in the signals of interest. Also, nonexact techniques are applied, which means that the obtained solution is the best from all explored solutions. As an advantage, this is a fast and straightforward approach, where OF can be estimated using local measurements.On the other hand, nonexact techniques are a wide field of research in microgrid applications, especially when the system size conduces to a complex model. Among these techniques, [25] presented a review of the operation cost, concluding that swarm strategies had the best performance. Other proposals, as presented in [26], applied PSO to adjust the primary level control for a simplified microgrid. Additionally, in [12], the grey wolf optimisation (GWO) adjusted the control parameters for a wind turbine generator. In [6], the zero-level control for a simplified wind-battery microgrid was adjusted using GA. In [27], the PSO was applied to train a modified fuzzy controller, where tests were compared to PI controller regarding power-sharing and frequency regulation.As a result of state of the art, the main characteristics of references with control tuning strategies are summarised in Table1. This table includes for comparison purposes the system model, the applied tuning technique, the adjusted control, the signals used for control adjustment, commonly power, voltage, and frequency; in some cases, also damping coefficient ξ and the real part of eigenvalues Reλi were also used. Table 1 also includes the microgrid operating mode, the test system size, and the proposal scalability.Table 1
Comparison of some referenced microgrid tuning approaches.
ReferenceSystem modelTuning techniqueAdjusted control levelSignals for adjustmentMicrogrid modeTest system sizeScalability[2]SSMIMC and PSOZero and primaryQIslanded3 VSC-2 lineLow[12]NoneGWOZeroP, Urms, Urmsgen, and VdcConnected2 VSC-1 lineLow[10]TFPole placement methodZeroNoneIslanded2 VSC-2 lineLow[6]NoneGAZeroωgenIslanded2 VSC-0 lineLow[14]SSMPSOZeroP and ReλiBoth3 VSC-2 lineMedium[15]SSMModified WOZeroReλi and ξIslanded2 VSC-1 lineLow[20]TFFuzzyZero to tertiaryQBoth4 VSC-3 lineMedium[21]TFIMCZero and primaryNoneBoth1 VSC-1 lineLow[22]TFDefinition of gain margins and parameter rangesPrimaryNot clearConnected2 VSC-3 lineLow[23]SSM and TFGAZero and primaryP and QIslanded2 VSC-1 lineMedium[26]NoneFuzzy and PSOPrimaryP, Q, U, and fIslanded2 VSC-2 linesLow[27]NonePSO and fuzzyPrimaryP and fConnected7 VSC-10 lineMediumProposalNoneModified ITAE index and metaheuristic optimisationZero and primaryid, iq, ud, uq, and fBoth5 VSC-10 lineHighFrom the comparison table, small test systems were noticed in most cases. Some approaches, as [28, 29], used large test systems, but the use of communication systems jeopardised the overall microgrid behaviour. This last aspect is not considered in the proposal presented in this paper since primary and zero control layers are decentralised, no communication links are required, constituting an essential advantage by reducing costs and reliability issues.The comparison in Table1 allows concluding about the proposal scalability, where qualitative labels, low, medium, or high, are considered. Low scalability means a proposal that was not clearly validated nor presented to be implemented in realistic size microgrids and also a proposal that presents a high dependence of correct microgrid modelling. Medium scalability means a proposal that addressed the tuning problem with a high potentiality for implementation on realistic size microgrids, mainly for the flexibility to partially or totally dismiss the microgrid model, which is complex to obtain in realistic microgrids. High scalability is associated with a proposal that addresses the tuning problem and can be easily implemented in realistic size microgrids. Additionally, the proposal presented in this paper has adequate results with low modelling efforts and can be straightforwardly implemented in several microgrids, regardless of the operating mode.


## 1.2.1. Tuning Approaches considering the Physical Component Modelling of the Controlled System

In general, the controlled system model has more parameters as the complexity and size increase. In this approach, the models describe the behaviour of the components and consider at least the small-signal system model. Nonetheless, the model complexity is not always the same in microgrids since each of these include different considerations or components. The following paragraphs present some examples. In [2], a small-signal model (SSM) described a microgrid with three VSCs, which included 55 state variables and considered internal model control (IMC) complemented with particle swarm optimisation (PSO). In [14], an eigenvalue analysis defined the PSO objective function and state equations described the main elements of the microgrid; then [14] considers both model and measures of the system. Finally, [15] propose a 2-VSC test microgrid represented by the state-space model; the search space and objective function of a modified whale optimisation (WO) technique were obtained from the eigenvalue analysis. In the two latter references, the optimisation strategy and the objective function definition were as crucial as the modelling process. However, the system size and number of VSCs were small due to model size. Furthermore, strong disturbances as short circuits were not deeply analysed.Additionally, even though [16, 17] do not consider a tuning technique, these references presented considerations for microgrid and VSC modelling; these are suitable examples of how daunting, a time-consuming and challenging task is the adjusting of an adequate microgrid model. In [17], the VSC model was analysed, and a proposal for VSC 6th order model was validated through the small-signal model and eigenvalue analysis. In [16], the IEEE37 bus system was modified to include 7 VSCs; as a result, the small-signal model of the whole microgrid reached 225th order, which was reduced to a 56-order system model. Finally, in [18], three types of controllers were tuned by using a small-signal model and the gravity centre of a stable area; however, only one VSC was considered in the test system.


## 1.2.2. Tuning Approaches considering the Transfer Function Equivalent Modelling of the Controlled System

This approach is usually applied due to the entire microgrid model complexity; then, simplified transfer functions are considered. Usually, this tuning process does not include microgrid interaction or additional elements besides the VSC. Moreover, the simplifications to obtain TF equivalent make the obtained solutions inadequate for all operating conditions [19].Therefore, the VSC can be modelled by an equivalent first-order transfer function (TF). This tuning approach is considered in the following papers. In [10], a VSC dominant pole TF and pole placement method were considered. Also, in [20], a zero-level TF for the VSC zero control was complemented with fuzzy logic; then, the system response under small and large signal disturbances was enhanced. In [21], the state-space representation of the microgrid was simplified to a TF, and IMC was applied to obtain adequate VSC behaviour under grid transition. In [22], the grid-forming mode of operation was studied, TFs and restrictions in the frequency domain s were applied to define boundaries for the primary control parameters and also explored with different primary control strategies. In [23], the simplified microgrid TFs and eigenvalue analysis was carried away. However, it was remarked that a strict mathematical formulation of the optimisation problem was not acquirable, so the solution was obtained through a genetic algorithm (GA) and validated through eigenvalues. Additionally, even though the control parameters selection was not evident in [24], it considered the microgrid modelling using TFs, analysing stability issues and phase-locked loop (PLL) bandwidth, and it also included multiple-input multiple-output (MIMO) representation and parameters boundaries. Finally, it was usual to validate the proposals using a reduced and simplified test system in the references above.


## 1.2.3. Tuning Approaches Which Do Not Require the Model of the Controlled System

As described in the two previous tuning approaches (model-based approaches), the microgrid model can differ from one work to another, leading to confusion when implementing and tuning a microgrid from scratch. Moreover, even with the model acquirement, a nonexact technique was usually considered since the model used to determine the control parameters was quite complex in many cases.Therefore, this third approach avoids the modelling stage for the control tuning but requires the definition of an optimisation functionOF. As the microgrid model is not considered or is unknown, OF is based on the error in the signals of interest. Also, nonexact techniques are applied, which means that the obtained solution is the best from all explored solutions. As an advantage, this is a fast and straightforward approach, where OF can be estimated using local measurements.On the other hand, nonexact techniques are a wide field of research in microgrid applications, especially when the system size conduces to a complex model. Among these techniques, [25] presented a review of the operation cost, concluding that swarm strategies had the best performance. Other proposals, as presented in [26], applied PSO to adjust the primary level control for a simplified microgrid. Additionally, in [12], the grey wolf optimisation (GWO) adjusted the control parameters for a wind turbine generator. In [6], the zero-level control for a simplified wind-battery microgrid was adjusted using GA. In [27], the PSO was applied to train a modified fuzzy controller, where tests were compared to PI controller regarding power-sharing and frequency regulation.As a result of state of the art, the main characteristics of references with control tuning strategies are summarised in Table1. This table includes for comparison purposes the system model, the applied tuning technique, the adjusted control, the signals used for control adjustment, commonly power, voltage, and frequency; in some cases, also damping coefficient ξ and the real part of eigenvalues Reλi were also used. Table 1 also includes the microgrid operating mode, the test system size, and the proposal scalability.Table 1
Comparison of some referenced microgrid tuning approaches.
ReferenceSystem modelTuning techniqueAdjusted control levelSignals for adjustmentMicrogrid modeTest system sizeScalability[2]SSMIMC and PSOZero and primaryQIslanded3 VSC-2 lineLow[12]NoneGWOZeroP, Urms, Urmsgen, and VdcConnected2 VSC-1 lineLow[10]TFPole placement methodZeroNoneIslanded2 VSC-2 lineLow[6]NoneGAZeroωgenIslanded2 VSC-0 lineLow[14]SSMPSOZeroP and ReλiBoth3 VSC-2 lineMedium[15]SSMModified WOZeroReλi and ξIslanded2 VSC-1 lineLow[20]TFFuzzyZero to tertiaryQBoth4 VSC-3 lineMedium[21]TFIMCZero and primaryNoneBoth1 VSC-1 lineLow[22]TFDefinition of gain margins and parameter rangesPrimaryNot clearConnected2 VSC-3 lineLow[23]SSM and TFGAZero and primaryP and QIslanded2 VSC-1 lineMedium[26]NoneFuzzy and PSOPrimaryP, Q, U, and fIslanded2 VSC-2 linesLow[27]NonePSO and fuzzyPrimaryP and fConnected7 VSC-10 lineMediumProposalNoneModified ITAE index and metaheuristic optimisationZero and primaryid, iq, ud, uq, and fBoth5 VSC-10 lineHighFrom the comparison table, small test systems were noticed in most cases. Some approaches, as [28, 29], used large test systems, but the use of communication systems jeopardised the overall microgrid behaviour. This last aspect is not considered in the proposal presented in this paper since primary and zero control layers are decentralised, no communication links are required, constituting an essential advantage by reducing costs and reliability issues.The comparison in Table1 allows concluding about the proposal scalability, where qualitative labels, low, medium, or high, are considered. Low scalability means a proposal that was not clearly validated nor presented to be implemented in realistic size microgrids and also a proposal that presents a high dependence of correct microgrid modelling. Medium scalability means a proposal that addressed the tuning problem with a high potentiality for implementation on realistic size microgrids, mainly for the flexibility to partially or totally dismiss the microgrid model, which is complex to obtain in realistic microgrids. High scalability is associated with a proposal that addresses the tuning problem and can be easily implemented in realistic size microgrids. Additionally, the proposal presented in this paper has adequate results with low modelling efforts and can be straightforwardly implemented in several microgrids, regardless of the operating mode.


## 1.3. Contribution

The paper proposes a straightforward approach to define the control parameters, applied to tune realistic size microgrids with several CIDERs, operating in grid-connected and grid-islanded modes. The considered CIDER representation includes the primary energy resource, the VSC, and the output filter. Additionally, as the microgrid model is not required, the proposed strategy can tune controls of complex microgrids. In the proposal, only measurements at the CIDER point of common coupling (PCC) are considered and compared with a reference signal to calculateOF, minimised through an iterative strategy based on an optimisation technique. These measurements contain information about the CIDER’s behaviour and the remaining part of the microgrid.The proposed approach allows the tune of the control parameters easily; besides, it can be applied to multiple CIDER microgrids. As the used measurements contain the microgrid response under different disturbances, the obtained control parameters allow the stable behaviour for a wide range of operating conditions. This approach speeds up other studies since an adequately tuned microgrid control is the base of upcoming operation or protection analysis.


## 1.4. Paper Organisation

This document is divided into five sections. In Section 2, the required fundamental theoretical aspects related to the control of CIDERs are exposed, while in Section 3, the proposed approach is described. Later, Section 4 presents the proposed tests, their results, and the corresponding analysis. Finally, Section 5 highlights the conclusions.


## 2. Control of Converter-Interfaced Distributed Energy Resources

This section briefly introduces the fundamental aspects of microgrid hierarchical control, which comprises four layers known as zero, primary, secondary, and tertiary [4, 5, 30, 31]. Zero layer control is the VSC local control, including the inner and outer loops. The primary level controls the voltage, frequency, and power-sharing. The secondary level improves the quality of voltage and frequency and is in charge of islanding detection. The tertiary level deals with the optimal power flow and the unit commitment in microgrids.Specifically, this proposal discusses the zero-level control for grid-following CIDERs, while the zero and primary level controls are analysed in the grid-forming CIDERs. The zero-level control for the grid-following CIDERs aims to deliver the reference power imposed by the secondary and tertiary control, while the microgrid is in grid-connected mode. The zero-level control requires proportional and integral parameterskP1,kI1, as depicted in Figure 1. The respective set of equations for the inner loop is presented in equation (1), while the outer loop is represented by equation set (2).(1)Ud=ud−ωLiq+kP1+kI1sidref−id,Uq=uq+ωLid+kP1+kI1siqref−iq,where Ud and Uq are the dq voltage references for the VSC, which at the same time are the output of the inner loop. Variables ud, uq and id, iq are the dq voltages and currents measured at VSC PCC, which come from the Park transformation of uabc and iabc. ω is the system frequency while θ is the angle reference for the Park transformation. L is the filter inductance. kP1 and kI1 are the proportional and integral gains, respectively, for the PI controller. Finally, idrefidref and iqref are the dq currents used as a reference for the inner loop, which at the same time are the output of the outer loop in(2)idref=Prefud+Qrefuqud2+uq2,iqref=Prefuq−Qrefudud2+uq2,where idrefidref and iqref are the dq references for the inner loop and Pref and Qref are the references of active and reactive power for the outer loop, respectively. ud and uq are measurements as described for equation set (1).Figure 1
Grid-following controller.The grid-forming CIDER regulates frequency and voltage in grid-islanded mode. It requires three pairs of parameters in the zero-level control, namely,kP2,kI2 for the inner loop and kP3,kI3 for the outer loop. Additionally, the primary control requires the parameters related to active and reactive power mp,mq, as depicted in Figure 2. In the case of the grid-forming CIDER, the set of equations for the inner loop is the same as presented in (1), where the PI gains are now kP2 and kI2; the outer loop is represented by equation set (3). Droop equations describe the primary control in (4) and (5).(3)idref=id−ωCuq+kP3+kI3s,udref−ud,iqref=iq+ωCud+kP3+kI3s,uqref−uq,where C is the filter capacitance, kP3 and kI3 are the proportional and integral gains, respectively, for the required PI controller, and udref and uqref are the dq voltage references for the outer loop, so the voltage at the PCC is controlled, andudref comes from the droop control, whereas uqref is null. The remaining variables are already defined in the previous set of equations.(4)udref=uref−mqQ−Qref,(5)ω=ωref−mpP−Pref,where udref is the voltage reference in the direct axis for the outer loop in (3), uref is the voltage reference for the droop control, which is near 1 p.u. mq is the proportional gain for the droop control to regulate voltage; Q and Qref are the measured and reference values for the reactive power, respectively. ω is the controlled frequency from the droop control, which allows obtaining θ for the Park transformation adequate behaviour. ωref is the reference of frequency for the VSC output, which is near 1 p.u. mp is the proportional gain for the droop control to regulate frequency. Finally, P and Pref, are measured and reference values for the active power, respectively.Figure 2
Grid-forming controller.As a result, two parameters have to be tuned for each grid-following CIDER (kP1 and kI1kI1), while six are required for each grid-forming CIDER (kP2, kI2, kP3, kI3, mq, and mp).


## 3. Proposed Iterative and Incremental Approach for CIDER Tuning

This section presents a three-stage approach to adjust the control parameters of several CIDERs within a target microgrid. Each CIDER uses the control scheme in Figures1 or 2 for grid-following and grid-forming operating modes, respectively.The structure of the proposed approach is presented in Figure3. It starts by identifying the target microgrid and defining the basic microgrids as is presented in stage 1. The target microgrid is defined as the complex system of interest to the network analyst, while the basic microgrids are simplifications that consist of a single CIDER connected to a load through a line, as presented in Figure 4. Next, in Stages 2 and 3, the controls of basic microgrids are optimally adjusted; then, these tuned microgrids are used to obtain intermediate microgrids by adding lines, loads, or CIDERs. These intermediate microgrids are iteratively enlarged and tuned, using an optimisation strategy based on the measurements at the CIDER PCC. Finally, the target microgrid is obtained and tuned as a result of this iterative process.Figure 3
Approach for tuning the CIDERs within a complex microgrid.Figure 4
Basic microgrids. (a) Basic grid-connected microgrid. (b) Basic grid-islanded microgrid.
(a)(b)


### 3.1. Stage 1: Identification of the Target and Definition of the Basic Microgrids

This stage is devoted to identifying the target microgrid’s characteristics and defining the two basic microgrids used for the CIDER control adjustment. Thus, instead of initially handling the target microgrid, two basic microgrids presented in Figure4 are defined in this stage.The first basic microgrid presented in Figure4(a) operates in grid-connected mode and includes a single grid-following CIDER. The second operates in grid-islanded mode and considers only one grid-forming CIDER, as depicted in Figure 4(b).The size of the CIDER, line, and load in the basic microgrids is defined considering the target microgrid rated values. These basic microgrids are initially tuned as presented in stage two; next, these are used to define the intermediate microgrids, as presented in stage three.


### 3.2. Stage 2: Optimisation of the CIDER Control Parameters

Stage two focuses on determining the optimal control parameters for the CIDERs within a microgrid. In this stage, three main processes are proposed: (a) the objective functionOF is defined, and an improvement criterion is also established to evaluate the control parameters. (b) A control parameter database is used to improve the odds of reaching a proper solution by the optimisation strategy. (c) The required microgrid control parameters are obtained from the execution of an optimisation process.


#### 3.2.1. Definition of OF

TheOF is defined based on a modified ITAE index to consider evenly time-weighted measurements. The required variables are measured at the CIDER PCC. This index is a robust alternative frequently used for error estimation between two signals, which in this case corresponds to the measured and the reference signals [32, 33].Initially, for a single CIDER and a signal of interestx, the desired time window contains the microgrid response under a single disturbance, for example, short circuit and load change. This window is represented in Figure 5 and has a fixed time length T; an initial time t0, corresponding to the first sample of interest k=1; and a total of K samples, which are defined according to the window length and the sampling time tsmpl.Figure 5
Considered time window for the measurements at the CIDER PCC.The ITAE index for the signals in Figure5 is defined as in equation(6)ITAE=∑k=1KktsmplΔxk,where Δxk=xkreference−xkmeasured.Next, as several disturbancesd are considered, the ITAE in equation (6) becomes(7)ITAE=∑d=1D∑k=1KktsmplΔxk,d,where D is the number of considered disturbances.Additionally, several signalss, such as voltage and current, are considered; then Δx contains a set of signals. Similarly, as the signals of interest differ according to the CIDER operating mode, the average error per signal is preferred. These considerations turn equation (7) into (8), which is obtained for each CIDER c.(8)ITAEc=1S∑s=1S∑d=1D∑k=1KktsmplΔxk,d,s,where S is the number of considered signals at each CIDER c.After that,ITAEc is estimated separately for the grid-forming Cform and grid-following Cfoll CIDERs. The evaluation of (9) is therefore performed.(9)ITAEform=1Cform∑c=1CformITAEc;ITAEfoll=1Cfoll∑c=1CfollITAEc.Finally, theITAEtotal is defined as the OF and presented in (10), which allows comparing CIDERs behaviour.(10)OF=ITAEtotal=αITAEform+1−αITAEfoll.In (10), α is an adjustable weighting factor that gives relevance to either grid-forming or grid-following CIDERs, considering values from 0 to 1. In the grid-islanded microgrid, the weighting factor emphasises the fine parameter selection of the grid-forming CIDERs, while in the grid-connected microgrid, the importance is focused on the grid-following CIDERs.


#### 3.2.2. Definition of the Control Parameter Database

The purpose of the control parameter database is to initialise the parameters for the CIDERs within the microgrid.Initially, this database is empty; then, control parameters at first executions of the optimisation process, which consider the basic microgrids, are obtained from empirical tuning methods or reported control parameters for similar applications, as these presented in [10, 12, 34]. After several iterations, this database also contains parameters obtained from the optimisation process, which is iteratively executed due to several intermediate microgrids being considered. It is necessary to execute the optimisation process multiple times since the CIDERs optimal control parameters are not the same in each microgrid. Then, the number of executions of the optimisation process is given by the criteria at stage 3 as(11)OFnOFbest=ψ⇒Continue to the optimisation process execution,∀ψ≥Y,Enlarge the intermediate microgrid,∀ψ<Y,where Y is a positive integer greater than 1.Finally, the parameters in the database are inputs for the optimisation strategy; then, as the information of previous solutions is available, the optimiser is more likely to find a proper solution in the actual iteration.


#### 3.2.3. Execution of the Optimisation Process

The considered optimisation problem is oriented to minimise the objective functionOF, selecting adequate CIDER control parameters par, as presented in(12)minparαITAEform+1−αITAEfoll,s.t.par∈solutionspace,ξ≥0.Figure6 portrays the process to minimise the OF, as proposed in (10). The initial set of parameters par1 is obtained from the database, as previously described. The OF is estimated using these parameters at the CIDERs control and the measured signals of interest. The OFi estimated in the internal iteration i is compared to the previous OFi−1 to calculate the tolerance. If the tolerance is lower than the desired value ξ, then the best control parameters for the CIDERs control are obtained parbest, which ends the execution of the optimisation process. Otherwise, the optimisation strategy selects a new set of parameters to be evaluated in the CIDER control.Figure 6
General scheme for the optimisation strategy execution.Variablepar is composed of two or six parameters for each grid-following or grid-forming CIDER, respectively. Additionally, since the number of parameters increases with each CIDER in the microgrid, these are grouped, and each group uses the same control parameters. Thus, the parameters sought by the optimisation strategy are given by (13). The CIDERs are grouped considering this distance to the main grid connection node in the grid-connected case or to the grid-forming CIDER in the grid-islanded case.(13)par=2Grfoll+6Grform,where Grfoll and Grform are the number of groups for grid-following and grid-forming CIDERs, respectively.


### 3.3. Stage 3: Enlarging the Basic Microgrids

This stage focuses on increasing the complexity of the defined basic microgrids until they become the target microgrid. Therefore, new microgrids, known as intermediate microgrids, are iteratively generated and used to increase the control parameters database and analyse different microgrid topology or CIDER operating modes. In that way, once stage 2 is completed, a checkpoint verifies whether the two basic microgrids are already tuned, a case in which an intermediate microgrid is generated by addingp−type elements to the actual microgrid. Here, p−type refers to an element as line-type, load-type, or CIDER-type.Once these elements are added, the proposal verifies whether the obtained intermediate microgrid is the same as the target microgrid, the case in which the optimisation process is executed for the last time, and the best control parameters for the target microgrid are obtained. If the intermediate microgrid differs from the target microgrid, itsOF is calculated and compared to a limit value of Y times the best obtained OF, as in (11). When the limit value is surpassed, the optimisation process is once again executed. Otherwise, more elements are added to the actual microgrid, and then another intermediate microgrid is generated. This iterative strategy continues until the target microgrid is adequately controlled.


## 3.1. Stage 1: Identification of the Target and Definition of the Basic Microgrids

This stage is devoted to identifying the target microgrid’s characteristics and defining the two basic microgrids used for the CIDER control adjustment. Thus, instead of initially handling the target microgrid, two basic microgrids presented in Figure4 are defined in this stage.The first basic microgrid presented in Figure4(a) operates in grid-connected mode and includes a single grid-following CIDER. The second operates in grid-islanded mode and considers only one grid-forming CIDER, as depicted in Figure 4(b).The size of the CIDER, line, and load in the basic microgrids is defined considering the target microgrid rated values. These basic microgrids are initially tuned as presented in stage two; next, these are used to define the intermediate microgrids, as presented in stage three.


## 3.2. Stage 2: Optimisation of the CIDER Control Parameters

Stage two focuses on determining the optimal control parameters for the CIDERs within a microgrid. In this stage, three main processes are proposed: (a) the objective functionOF is defined, and an improvement criterion is also established to evaluate the control parameters. (b) A control parameter database is used to improve the odds of reaching a proper solution by the optimisation strategy. (c) The required microgrid control parameters are obtained from the execution of an optimisation process.


### 3.2.1. Definition of OF

TheOF is defined based on a modified ITAE index to consider evenly time-weighted measurements. The required variables are measured at the CIDER PCC. This index is a robust alternative frequently used for error estimation between two signals, which in this case corresponds to the measured and the reference signals [32, 33].Initially, for a single CIDER and a signal of interestx, the desired time window contains the microgrid response under a single disturbance, for example, short circuit and load change. This window is represented in Figure 5 and has a fixed time length T; an initial time t0, corresponding to the first sample of interest k=1; and a total of K samples, which are defined according to the window length and the sampling time tsmpl.Figure 5
Considered time window for the measurements at the CIDER PCC.The ITAE index for the signals in Figure5 is defined as in equation(6)ITAE=∑k=1KktsmplΔxk,where Δxk=xkreference−xkmeasured.Next, as several disturbancesd are considered, the ITAE in equation (6) becomes(7)ITAE=∑d=1D∑k=1KktsmplΔxk,d,where D is the number of considered disturbances.Additionally, several signalss, such as voltage and current, are considered; then Δx contains a set of signals. Similarly, as the signals of interest differ according to the CIDER operating mode, the average error per signal is preferred. These considerations turn equation (7) into (8), which is obtained for each CIDER c.(8)ITAEc=1S∑s=1S∑d=1D∑k=1KktsmplΔxk,d,s,where S is the number of considered signals at each CIDER c.After that,ITAEc is estimated separately for the grid-forming Cform and grid-following Cfoll CIDERs. The evaluation of (9) is therefore performed.(9)ITAEform=1Cform∑c=1CformITAEc;ITAEfoll=1Cfoll∑c=1CfollITAEc.Finally, theITAEtotal is defined as the OF and presented in (10), which allows comparing CIDERs behaviour.(10)OF=ITAEtotal=αITAEform+1−αITAEfoll.In (10), α is an adjustable weighting factor that gives relevance to either grid-forming or grid-following CIDERs, considering values from 0 to 1. In the grid-islanded microgrid, the weighting factor emphasises the fine parameter selection of the grid-forming CIDERs, while in the grid-connected microgrid, the importance is focused on the grid-following CIDERs.


### 3.2.2. Definition of the Control Parameter Database

The purpose of the control parameter database is to initialise the parameters for the CIDERs within the microgrid.Initially, this database is empty; then, control parameters at first executions of the optimisation process, which consider the basic microgrids, are obtained from empirical tuning methods or reported control parameters for similar applications, as these presented in [10, 12, 34]. After several iterations, this database also contains parameters obtained from the optimisation process, which is iteratively executed due to several intermediate microgrids being considered. It is necessary to execute the optimisation process multiple times since the CIDERs optimal control parameters are not the same in each microgrid. Then, the number of executions of the optimisation process is given by the criteria at stage 3 as(11)OFnOFbest=ψ⇒Continue to the optimisation process execution,∀ψ≥Y,Enlarge the intermediate microgrid,∀ψ<Y,where Y is a positive integer greater than 1.Finally, the parameters in the database are inputs for the optimisation strategy; then, as the information of previous solutions is available, the optimiser is more likely to find a proper solution in the actual iteration.


### 3.2.3. Execution of the Optimisation Process

The considered optimisation problem is oriented to minimise the objective functionOF, selecting adequate CIDER control parameters par, as presented in(12)minparαITAEform+1−αITAEfoll,s.t.par∈solutionspace,ξ≥0.Figure6 portrays the process to minimise the OF, as proposed in (10). The initial set of parameters par1 is obtained from the database, as previously described. The OF is estimated using these parameters at the CIDERs control and the measured signals of interest. The OFi estimated in the internal iteration i is compared to the previous OFi−1 to calculate the tolerance. If the tolerance is lower than the desired value ξ, then the best control parameters for the CIDERs control are obtained parbest, which ends the execution of the optimisation process. Otherwise, the optimisation strategy selects a new set of parameters to be evaluated in the CIDER control.Figure 6
General scheme for the optimisation strategy execution.Variablepar is composed of two or six parameters for each grid-following or grid-forming CIDER, respectively. Additionally, since the number of parameters increases with each CIDER in the microgrid, these are grouped, and each group uses the same control parameters. Thus, the parameters sought by the optimisation strategy are given by (13). The CIDERs are grouped considering this distance to the main grid connection node in the grid-connected case or to the grid-forming CIDER in the grid-islanded case.(13)par=2Grfoll+6Grform,where Grfoll and Grform are the number of groups for grid-following and grid-forming CIDERs, respectively.


## 3.2.1. Definition of OF

TheOF is defined based on a modified ITAE index to consider evenly time-weighted measurements. The required variables are measured at the CIDER PCC. This index is a robust alternative frequently used for error estimation between two signals, which in this case corresponds to the measured and the reference signals [32, 33].Initially, for a single CIDER and a signal of interestx, the desired time window contains the microgrid response under a single disturbance, for example, short circuit and load change. This window is represented in Figure 5 and has a fixed time length T; an initial time t0, corresponding to the first sample of interest k=1; and a total of K samples, which are defined according to the window length and the sampling time tsmpl.Figure 5
Considered time window for the measurements at the CIDER PCC.The ITAE index for the signals in Figure5 is defined as in equation(6)ITAE=∑k=1KktsmplΔxk,where Δxk=xkreference−xkmeasured.Next, as several disturbancesd are considered, the ITAE in equation (6) becomes(7)ITAE=∑d=1D∑k=1KktsmplΔxk,d,where D is the number of considered disturbances.Additionally, several signalss, such as voltage and current, are considered; then Δx contains a set of signals. Similarly, as the signals of interest differ according to the CIDER operating mode, the average error per signal is preferred. These considerations turn equation (7) into (8), which is obtained for each CIDER c.(8)ITAEc=1S∑s=1S∑d=1D∑k=1KktsmplΔxk,d,s,where S is the number of considered signals at each CIDER c.After that,ITAEc is estimated separately for the grid-forming Cform and grid-following Cfoll CIDERs. The evaluation of (9) is therefore performed.(9)ITAEform=1Cform∑c=1CformITAEc;ITAEfoll=1Cfoll∑c=1CfollITAEc.Finally, theITAEtotal is defined as the OF and presented in (10), which allows comparing CIDERs behaviour.(10)OF=ITAEtotal=αITAEform+1−αITAEfoll.In (10), α is an adjustable weighting factor that gives relevance to either grid-forming or grid-following CIDERs, considering values from 0 to 1. In the grid-islanded microgrid, the weighting factor emphasises the fine parameter selection of the grid-forming CIDERs, while in the grid-connected microgrid, the importance is focused on the grid-following CIDERs.


## 3.2.2. Definition of the Control Parameter Database

The purpose of the control parameter database is to initialise the parameters for the CIDERs within the microgrid.Initially, this database is empty; then, control parameters at first executions of the optimisation process, which consider the basic microgrids, are obtained from empirical tuning methods or reported control parameters for similar applications, as these presented in [10, 12, 34]. After several iterations, this database also contains parameters obtained from the optimisation process, which is iteratively executed due to several intermediate microgrids being considered. It is necessary to execute the optimisation process multiple times since the CIDERs optimal control parameters are not the same in each microgrid. Then, the number of executions of the optimisation process is given by the criteria at stage 3 as(11)OFnOFbest=ψ⇒Continue to the optimisation process execution,∀ψ≥Y,Enlarge the intermediate microgrid,∀ψ<Y,where Y is a positive integer greater than 1.Finally, the parameters in the database are inputs for the optimisation strategy; then, as the information of previous solutions is available, the optimiser is more likely to find a proper solution in the actual iteration.


## 3.2.3. Execution of the Optimisation Process

The considered optimisation problem is oriented to minimise the objective functionOF, selecting adequate CIDER control parameters par, as presented in(12)minparαITAEform+1−αITAEfoll,s.t.par∈solutionspace,ξ≥0.Figure6 portrays the process to minimise the OF, as proposed in (10). The initial set of parameters par1 is obtained from the database, as previously described. The OF is estimated using these parameters at the CIDERs control and the measured signals of interest. The OFi estimated in the internal iteration i is compared to the previous OFi−1 to calculate the tolerance. If the tolerance is lower than the desired value ξ, then the best control parameters for the CIDERs control are obtained parbest, which ends the execution of the optimisation process. Otherwise, the optimisation strategy selects a new set of parameters to be evaluated in the CIDER control.Figure 6
General scheme for the optimisation strategy execution.Variablepar is composed of two or six parameters for each grid-following or grid-forming CIDER, respectively. Additionally, since the number of parameters increases with each CIDER in the microgrid, these are grouped, and each group uses the same control parameters. Thus, the parameters sought by the optimisation strategy are given by (13). The CIDERs are grouped considering this distance to the main grid connection node in the grid-connected case or to the grid-forming CIDER in the grid-islanded case.(13)par=2Grfoll+6Grform,where Grfoll and Grform are the number of groups for grid-following and grid-forming CIDERs, respectively.


## 3.3. Stage 3: Enlarging the Basic Microgrids

This stage focuses on increasing the complexity of the defined basic microgrids until they become the target microgrid. Therefore, new microgrids, known as intermediate microgrids, are iteratively generated and used to increase the control parameters database and analyse different microgrid topology or CIDER operating modes. In that way, once stage 2 is completed, a checkpoint verifies whether the two basic microgrids are already tuned, a case in which an intermediate microgrid is generated by addingp−type elements to the actual microgrid. Here, p−type refers to an element as line-type, load-type, or CIDER-type.Once these elements are added, the proposal verifies whether the obtained intermediate microgrid is the same as the target microgrid, the case in which the optimisation process is executed for the last time, and the best control parameters for the target microgrid are obtained. If the intermediate microgrid differs from the target microgrid, itsOF is calculated and compared to a limit value of Y times the best obtained OF, as in (11). When the limit value is surpassed, the optimisation process is once again executed. Otherwise, more elements are added to the actual microgrid, and then another intermediate microgrid is generated. This iterative strategy continues until the target microgrid is adequately controlled.


## 4. Tests and Discussion

This section presents the test results that validate the proposed approach, aiming to adjust the CIDER control parameters within a complex microgrid. Measurements at the CIDERs PCC and PSO are used in this paper considering previous satisfactory results [35], although the proposed approach allows other techniques as these presented in [25].Initially, the target and the basic microgrids are presented; next, the results for the basic microgrid considering two testing scenarios. After, the analysis of one of the intermediate microgrids is presented, and finally, the last part presents the result analysis of the target microgrid tuned using the proposed approach.


### 4.1. Test System

The target microgrid selected for tests is based on the CIGRE LV benchmark [36] and has 170 kVA maximum load, operating in islanded or connected modes as presented in Figure 7. The basic microgrids have a single 100 kW CIDER (as CIDER 5), 2/0 AWG conductor, 100 m line, and 80 kVA load.Figure 7
Target microgrid based on a CIGRE benchmark.


### 4.2. Analysis of the Basic Microgrids

#### 4.2.1. Testing Operating Conditions for the Basic Microgrids

The adequate signals used in evaluating theOF defined in (10) consider two testing scenarios in the case of basic microgrids. The first testing scenario is oriented to evaluate the dq currents or voltages, considering the CIDER control based on the dq frame. On the other hand, as the measurements are in the abc frame, the second scenario considers the active and reactive power signals and the RMS voltage to evaluate the OF. Frequency is considered in both scenarios.Finally, the testing operating condition for basic microgrids considers disturbances, including a three-phase fault Rf=1.0Ω at 0.20s, and load changes of 15% and 50% of the CIDER rated value at 0.56s for grid-islanded and grid-connected cases, respectively.


#### 4.2.2. Results for Grid-Following CIDER in the Basic Grid-Connected Microgrid

In this case, both scenarios behave alike in the measured signals (id,iq,P, and Q), which have a stable and flawless response after the load change and the fault clearance; then, no advantage of the dq frame scenario over the abc frame scenario is noticed. For comparison purposes, in the dq frame scenario, the OF best value is 5.13 when estimated using id and iqiq, whereas it is 208.4 when P and Q are used. In the abc frame scenario, the OF is 5.91 when using id and iqiq, whereas it is 208.1 with P and Q. Then, the dq frame scenario is, on average, slightly better.Despite both scenarios being similar and valid to obtain control parameters, thedq frame scenario is selected. Still, the best parameters obtained in both scenarios are used as nourishment for the control parameter database. The best control parameters for the CIDER in the basic grid-connected microgrid are kP1,kI1=10.352421.962.


#### 4.2.3. Results for Grid-Forming CIDER in the Basic Grid-Islanded Microgrid

The differences between scenarios in the grid-forming CIDER are bigger than in the grid-following case. Therefore, in thedq frame scenario, the OF is 17.65 with ud,uq, and f, whereas it is 28.34 when urms and f are used; on the other hand, the abc frame scenario has an OF of 40.13 with ud,uq, and f, whereas it is 11.90 with urms and f. As a consequence, the dq frame scenario has slightly better performance, as is presented in Figure 8. Also, it is shown that the smaller difference is obtained for the id signal, which under fault has a slightly higher overshoot in the dq frame scenario; however, it also recovers faster than the abc frame scenario. Still, results from both scenarios enrich the control parameter database. Finally, the best control parameters for the CIDER in the basic grid-islanded microgrid are kP2,kI2=0.082,0, kP3,kI3=8.657,6361.07, and mp,mq=4.291×10−4,3.173×10−5.Figure 8
Comparison of the optimisation scenarios for the basic grid-islanded microgrid. (a) Basic microgrid frequency. (b) RMS voltage in the PCC. (c) Voltage in direct and quadrature axis at the PCC.
(a)(b)(c)


### 4.3. Analysis of the Intermediate Microgrids

The evolution of the two basic microgrids towards the target microgrid is achieved at stage three of the proposed methodology. This stage is the most complex since it handles the microgrid enlarging by adding a line, load, and CIDER-type elements.Adding elements raises the microgrid’s complexity, whose behaviour is mainly jeopardised by the CIDER-type elements due to their nonlinear behaviour. As these elements cause significant increments in theOF, then one of the intermediate microgrids obtained by adding line and load-type elements and only the CIDER 5 to the basic grid-connected, resulting in the same topology presented in Figure 7, is here analysed as an example of the tuning process. In this case and using the same control parameters as in the basic microgrid, the obtained OF value is 6.37. The OF is severely varied when changing the location, rated power, and the number of CIDER-type elements; for example, changing the CIDER location from N6 to N5 causes an OF value of 9.06, while it rises to 94.85 or 268.11 when the CIDER rated power is reduced to 50 kW or 20 kW, respectively. Similar results are obtained from the intermediate microgrids based on the grid-islanded basic microgrid. A high OF is related to strong and fast signal oscillations in both grid-islanded and grid-connected cases.The aspects mentioned above allow determiningY value. This is greater than 1, but not too small, never to stop the iteration process, and not too big that an intermediate microgrid with lousy behaviour (high oscillations or low-quality voltage or frequency signals) misses the optimisation process. A value of Y=5 is considered.Finally, the addition of CIDER-type elements causes drastic changes inOF that usually activate the optimisation process execution; that is, the associated OF is higher than 5 times OFbest. For instance, in the intermediate microgrid, a second CIDER at N8 produces OF=138.43, which is around 27 times larger than the OFbest until the present iteration (OFbest until now results from the grid-connected basic microgrid and is 5.13), activating the optimisation process. The sequence mentioned above for intermediate microgrid definition and performance evaluation is executed until the target microgrid is obtained.


### 4.4. Analysis of Target Microgrid

This section summarises the optimisation process results for the CIDER control parameters and the target microgrid overall behaviour.


#### 4.4.1. Control Parameters Obtained by the Optimisation Process

The target microgrid in Figure7 operates in grid-connected or grid-islanded modes. During grid-connected, all CIDERs are grid-followers, while in grid-islanded, it has a single grid-forming at node N6.The best CIDER parameters for both microgrid operating modes are different, as presented in Tables2 and 3. Additionally, Grfoll=2 and Grform=1, and the criteria for assigning a CIDER to a certain group are related to the distance from the slack node (N1 in grid-connected mode or N6 in grid-islanded mode).Table 2
Best control parameters in the grid-islanded microgrid.
Grid-islanded microgridGroupCIDERParametersOF15mp=3.35×10−523.795mq=2.167×10−6kP3,kI3 = 10.896, 0kP2,kI2 = 2.012, 021kP1,kI1 = 1.055, 10531.6632, 3, and 4kP1,kI1 = 0.241, 1742.6Table 3
Best control parameters in the grid-connected microgrid.
Grid-connected microgridGroupCIDERParametersOF11, 3, and 5kp1,ki1 = 1.223, 3683.81.6622 and 4kp1,ki1  = 1.145, 3467


#### 4.4.2. Testing Operating Conditions for Target Microgrid

Target microgrid contains intentional grid transition; then, CIDER 5 is selected to operate in grid-forming and grid-following modes according to thetsw state, while the remaining CIDERs only operate in grid-following mode. The best control parameters for grid-islanded and grid-connected modes are used while considering grid transition.Figures9(a)–9(c) present the active power P, voltage u, and frequency f for each CIDER. The considered operating conditions for tests include (a) operation starts in grid-islanded mode, and grid-following CIDERs are compelled to deliver constant power; (b) two load increments of 15kVA in node N8 at 1.2s and 10kVA in node N6 at 1.4s; (c) three-phase fault at node N4 with Rf=1.01Ω and duration of 0.3s at 1.8s and 3.1s3.1s; then disturbances are included within the two microgrid operating modes; and (d) intentional grid transition at 2.6s.Figure 9
CIDERs operation within the target microgrid. (a) Active power in CIDERs 1 to 5. (b) Voltage in CIDERs 1 to 5. (c) Frequency in CIDERs 1 to 5.
(a)(b)(c)As presented in Figure9, the initial time instant of interest is 1s. This is because at any time earlier, the considered CIDERs are in a start-up state, where grid-forming CIDER starts first, and grid-following CIDERs start sequentially to reduce stability issues. The aforementioned start-up sequence is similar to a plug and plays capability in the grid-following CIDERs.The main observations from the obtained results are as follows: (a) CIDER 5 maintains frequency and voltage during grid-islanded mode; (b) load changes during grid-islanded mode are adequately compensated by the grid-forming CIDER; (c) all CIDERs recover flawlessly after the three-phase fault, including voltage sags and frequency variations regardless of the microgrid operative mode; however, disturbances are severer in the grid-islanded mode; (d) the grid transition is supported by the microgrid, which forces CIDER 5 to follow power reference (Figure9(a)) and voltage levels in all CIDERs are increased to slightly better values (Figure 9(b)). Additionally, the highest frequency disturbance is caused by the three-phase fault in the grid-islanded mode, followed by the grid transition as presented in Figure 9(c); however, all CIDERs measurements are consistent and stable under the analysed time window.As presented, the proposed approach is successfully applied and validated to adjust the control parameters of several CIDERs within a complex microgrid and tested under several disturbances, including intentional grid transition.


## 4.1. Test System

The target microgrid selected for tests is based on the CIGRE LV benchmark [36] and has 170 kVA maximum load, operating in islanded or connected modes as presented in Figure 7. The basic microgrids have a single 100 kW CIDER (as CIDER 5), 2/0 AWG conductor, 100 m line, and 80 kVA load.Figure 7
Target microgrid based on a CIGRE benchmark.


## 4.2. Analysis of the Basic Microgrids

### 4.2.1. Testing Operating Conditions for the Basic Microgrids

The adequate signals used in evaluating theOF defined in (10) consider two testing scenarios in the case of basic microgrids. The first testing scenario is oriented to evaluate the dq currents or voltages, considering the CIDER control based on the dq frame. On the other hand, as the measurements are in the abc frame, the second scenario considers the active and reactive power signals and the RMS voltage to evaluate the OF. Frequency is considered in both scenarios.Finally, the testing operating condition for basic microgrids considers disturbances, including a three-phase fault Rf=1.0Ω at 0.20s, and load changes of 15% and 50% of the CIDER rated value at 0.56s for grid-islanded and grid-connected cases, respectively.


### 4.2.2. Results for Grid-Following CIDER in the Basic Grid-Connected Microgrid

In this case, both scenarios behave alike in the measured signals (id,iq,P, and Q), which have a stable and flawless response after the load change and the fault clearance; then, no advantage of the dq frame scenario over the abc frame scenario is noticed. For comparison purposes, in the dq frame scenario, the OF best value is 5.13 when estimated using id and iqiq, whereas it is 208.4 when P and Q are used. In the abc frame scenario, the OF is 5.91 when using id and iqiq, whereas it is 208.1 with P and Q. Then, the dq frame scenario is, on average, slightly better.Despite both scenarios being similar and valid to obtain control parameters, thedq frame scenario is selected. Still, the best parameters obtained in both scenarios are used as nourishment for the control parameter database. The best control parameters for the CIDER in the basic grid-connected microgrid are kP1,kI1=10.352421.962.


### 4.2.3. Results for Grid-Forming CIDER in the Basic Grid-Islanded Microgrid

The differences between scenarios in the grid-forming CIDER are bigger than in the grid-following case. Therefore, in thedq frame scenario, the OF is 17.65 with ud,uq, and f, whereas it is 28.34 when urms and f are used; on the other hand, the abc frame scenario has an OF of 40.13 with ud,uq, and f, whereas it is 11.90 with urms and f. As a consequence, the dq frame scenario has slightly better performance, as is presented in Figure 8. Also, it is shown that the smaller difference is obtained for the id signal, which under fault has a slightly higher overshoot in the dq frame scenario; however, it also recovers faster than the abc frame scenario. Still, results from both scenarios enrich the control parameter database. Finally, the best control parameters for the CIDER in the basic grid-islanded microgrid are kP2,kI2=0.082,0, kP3,kI3=8.657,6361.07, and mp,mq=4.291×10−4,3.173×10−5.Figure 8
Comparison of the optimisation scenarios for the basic grid-islanded microgrid. (a) Basic microgrid frequency. (b) RMS voltage in the PCC. (c) Voltage in direct and quadrature axis at the PCC.
(a)(b)(c)


## 4.2.1. Testing Operating Conditions for the Basic Microgrids

The adequate signals used in evaluating theOF defined in (10) consider two testing scenarios in the case of basic microgrids. The first testing scenario is oriented to evaluate the dq currents or voltages, considering the CIDER control based on the dq frame. On the other hand, as the measurements are in the abc frame, the second scenario considers the active and reactive power signals and the RMS voltage to evaluate the OF. Frequency is considered in both scenarios.Finally, the testing operating condition for basic microgrids considers disturbances, including a three-phase fault Rf=1.0Ω at 0.20s, and load changes of 15% and 50% of the CIDER rated value at 0.56s for grid-islanded and grid-connected cases, respectively.


## 4.2.2. Results for Grid-Following CIDER in the Basic Grid-Connected Microgrid

In this case, both scenarios behave alike in the measured signals (id,iq,P, and Q), which have a stable and flawless response after the load change and the fault clearance; then, no advantage of the dq frame scenario over the abc frame scenario is noticed. For comparison purposes, in the dq frame scenario, the OF best value is 5.13 when estimated using id and iqiq, whereas it is 208.4 when P and Q are used. In the abc frame scenario, the OF is 5.91 when using id and iqiq, whereas it is 208.1 with P and Q. Then, the dq frame scenario is, on average, slightly better.Despite both scenarios being similar and valid to obtain control parameters, thedq frame scenario is selected. Still, the best parameters obtained in both scenarios are used as nourishment for the control parameter database. The best control parameters for the CIDER in the basic grid-connected microgrid are kP1,kI1=10.352421.962.


## 4.2.3. Results for Grid-Forming CIDER in the Basic Grid-Islanded Microgrid

The differences between scenarios in the grid-forming CIDER are bigger than in the grid-following case. Therefore, in thedq frame scenario, the OF is 17.65 with ud,uq, and f, whereas it is 28.34 when urms and f are used; on the other hand, the abc frame scenario has an OF of 40.13 with ud,uq, and f, whereas it is 11.90 with urms and f. As a consequence, the dq frame scenario has slightly better performance, as is presented in Figure 8. Also, it is shown that the smaller difference is obtained for the id signal, which under fault has a slightly higher overshoot in the dq frame scenario; however, it also recovers faster than the abc frame scenario. Still, results from both scenarios enrich the control parameter database. Finally, the best control parameters for the CIDER in the basic grid-islanded microgrid are kP2,kI2=0.082,0, kP3,kI3=8.657,6361.07, and mp,mq=4.291×10−4,3.173×10−5.Figure 8
Comparison of the optimisation scenarios for the basic grid-islanded microgrid. (a) Basic microgrid frequency. (b) RMS voltage in the PCC. (c) Voltage in direct and quadrature axis at the PCC.
(a)(b)(c)


## 4.3. Analysis of the Intermediate Microgrids

The evolution of the two basic microgrids towards the target microgrid is achieved at stage three of the proposed methodology. This stage is the most complex since it handles the microgrid enlarging by adding a line, load, and CIDER-type elements.Adding elements raises the microgrid’s complexity, whose behaviour is mainly jeopardised by the CIDER-type elements due to their nonlinear behaviour. As these elements cause significant increments in theOF, then one of the intermediate microgrids obtained by adding line and load-type elements and only the CIDER 5 to the basic grid-connected, resulting in the same topology presented in Figure 7, is here analysed as an example of the tuning process. In this case and using the same control parameters as in the basic microgrid, the obtained OF value is 6.37. The OF is severely varied when changing the location, rated power, and the number of CIDER-type elements; for example, changing the CIDER location from N6 to N5 causes an OF value of 9.06, while it rises to 94.85 or 268.11 when the CIDER rated power is reduced to 50 kW or 20 kW, respectively. Similar results are obtained from the intermediate microgrids based on the grid-islanded basic microgrid. A high OF is related to strong and fast signal oscillations in both grid-islanded and grid-connected cases.The aspects mentioned above allow determiningY value. This is greater than 1, but not too small, never to stop the iteration process, and not too big that an intermediate microgrid with lousy behaviour (high oscillations or low-quality voltage or frequency signals) misses the optimisation process. A value of Y=5 is considered.Finally, the addition of CIDER-type elements causes drastic changes inOF that usually activate the optimisation process execution; that is, the associated OF is higher than 5 times OFbest. For instance, in the intermediate microgrid, a second CIDER at N8 produces OF=138.43, which is around 27 times larger than the OFbest until the present iteration (OFbest until now results from the grid-connected basic microgrid and is 5.13), activating the optimisation process. The sequence mentioned above for intermediate microgrid definition and performance evaluation is executed until the target microgrid is obtained.


## 4.4. Analysis of Target Microgrid

This section summarises the optimisation process results for the CIDER control parameters and the target microgrid overall behaviour.


### 4.4.1. Control Parameters Obtained by the Optimisation Process

The target microgrid in Figure7 operates in grid-connected or grid-islanded modes. During grid-connected, all CIDERs are grid-followers, while in grid-islanded, it has a single grid-forming at node N6.The best CIDER parameters for both microgrid operating modes are different, as presented in Tables2 and 3. Additionally, Grfoll=2 and Grform=1, and the criteria for assigning a CIDER to a certain group are related to the distance from the slack node (N1 in grid-connected mode or N6 in grid-islanded mode).Table 2
Best control parameters in the grid-islanded microgrid.
Grid-islanded microgridGroupCIDERParametersOF15mp=3.35×10−523.795mq=2.167×10−6kP3,kI3 = 10.896, 0kP2,kI2 = 2.012, 021kP1,kI1 = 1.055, 10531.6632, 3, and 4kP1,kI1 = 0.241, 1742.6Table 3
Best control parameters in the grid-connected microgrid.
Grid-connected microgridGroupCIDERParametersOF11, 3, and 5kp1,ki1 = 1.223, 3683.81.6622 and 4kp1,ki1  = 1.145, 3467


### 4.4.2. Testing Operating Conditions for Target Microgrid

Target microgrid contains intentional grid transition; then, CIDER 5 is selected to operate in grid-forming and grid-following modes according to thetsw state, while the remaining CIDERs only operate in grid-following mode. The best control parameters for grid-islanded and grid-connected modes are used while considering grid transition.Figures9(a)–9(c) present the active power P, voltage u, and frequency f for each CIDER. The considered operating conditions for tests include (a) operation starts in grid-islanded mode, and grid-following CIDERs are compelled to deliver constant power; (b) two load increments of 15kVA in node N8 at 1.2s and 10kVA in node N6 at 1.4s; (c) three-phase fault at node N4 with Rf=1.01Ω and duration of 0.3s at 1.8s and 3.1s3.1s; then disturbances are included within the two microgrid operating modes; and (d) intentional grid transition at 2.6s.Figure 9
CIDERs operation within the target microgrid. (a) Active power in CIDERs 1 to 5. (b) Voltage in CIDERs 1 to 5. (c) Frequency in CIDERs 1 to 5.
(a)(b)(c)As presented in Figure9, the initial time instant of interest is 1s. This is because at any time earlier, the considered CIDERs are in a start-up state, where grid-forming CIDER starts first, and grid-following CIDERs start sequentially to reduce stability issues. The aforementioned start-up sequence is similar to a plug and plays capability in the grid-following CIDERs.The main observations from the obtained results are as follows: (a) CIDER 5 maintains frequency and voltage during grid-islanded mode; (b) load changes during grid-islanded mode are adequately compensated by the grid-forming CIDER; (c) all CIDERs recover flawlessly after the three-phase fault, including voltage sags and frequency variations regardless of the microgrid operative mode; however, disturbances are severer in the grid-islanded mode; (d) the grid transition is supported by the microgrid, which forces CIDER 5 to follow power reference (Figure9(a)) and voltage levels in all CIDERs are increased to slightly better values (Figure 9(b)). Additionally, the highest frequency disturbance is caused by the three-phase fault in the grid-islanded mode, followed by the grid transition as presented in Figure 9(c); however, all CIDERs measurements are consistent and stable under the analysed time window.As presented, the proposed approach is successfully applied and validated to adjust the control parameters of several CIDERs within a complex microgrid and tested under several disturbances, including intentional grid transition.


## 4.4.1. Control Parameters Obtained by the Optimisation Process

The target microgrid in Figure7 operates in grid-connected or grid-islanded modes. During grid-connected, all CIDERs are grid-followers, while in grid-islanded, it has a single grid-forming at node N6.The best CIDER parameters for both microgrid operating modes are different, as presented in Tables2 and 3. Additionally, Grfoll=2 and Grform=1, and the criteria for assigning a CIDER to a certain group are related to the distance from the slack node (N1 in grid-connected mode or N6 in grid-islanded mode).Table 2
Best control parameters in the grid-islanded microgrid.
Grid-islanded microgridGroupCIDERParametersOF15mp=3.35×10−523.795mq=2.167×10−6kP3,kI3 = 10.896, 0kP2,kI2 = 2.012, 021kP1,kI1 = 1.055, 10531.6632, 3, and 4kP1,kI1 = 0.241, 1742.6Table 3
Best control parameters in the grid-connected microgrid.
Grid-connected microgridGroupCIDERParametersOF11, 3, and 5kp1,ki1 = 1.223, 3683.81.6622 and 4kp1,ki1  = 1.145, 3467


## 4.4.2. Testing Operating Conditions for Target Microgrid

Target microgrid contains intentional grid transition; then, CIDER 5 is selected to operate in grid-forming and grid-following modes according to thetsw state, while the remaining CIDERs only operate in grid-following mode. The best control parameters for grid-islanded and grid-connected modes are used while considering grid transition.Figures9(a)–9(c) present the active power P, voltage u, and frequency f for each CIDER. The considered operating conditions for tests include (a) operation starts in grid-islanded mode, and grid-following CIDERs are compelled to deliver constant power; (b) two load increments of 15kVA in node N8 at 1.2s and 10kVA in node N6 at 1.4s; (c) three-phase fault at node N4 with Rf=1.01Ω and duration of 0.3s at 1.8s and 3.1s3.1s; then disturbances are included within the two microgrid operating modes; and (d) intentional grid transition at 2.6s.Figure 9
CIDERs operation within the target microgrid. (a) Active power in CIDERs 1 to 5. (b) Voltage in CIDERs 1 to 5. (c) Frequency in CIDERs 1 to 5.
(a)(b)(c)As presented in Figure9, the initial time instant of interest is 1s. This is because at any time earlier, the considered CIDERs are in a start-up state, where grid-forming CIDER starts first, and grid-following CIDERs start sequentially to reduce stability issues. The aforementioned start-up sequence is similar to a plug and plays capability in the grid-following CIDERs.The main observations from the obtained results are as follows: (a) CIDER 5 maintains frequency and voltage during grid-islanded mode; (b) load changes during grid-islanded mode are adequately compensated by the grid-forming CIDER; (c) all CIDERs recover flawlessly after the three-phase fault, including voltage sags and frequency variations regardless of the microgrid operative mode; however, disturbances are severer in the grid-islanded mode; (d) the grid transition is supported by the microgrid, which forces CIDER 5 to follow power reference (Figure9(a)) and voltage levels in all CIDERs are increased to slightly better values (Figure 9(b)). Additionally, the highest frequency disturbance is caused by the three-phase fault in the grid-islanded mode, followed by the grid transition as presented in Figure 9(c); however, all CIDERs measurements are consistent and stable under the analysed time window.As presented, the proposed approach is successfully applied and validated to adjust the control parameters of several CIDERs within a complex microgrid and tested under several disturbances, including intentional grid transition.


## 5. Conclusions

Nowadays, the modelling of realistic size microgrids requires several studies. Nevertheless, the study of DER integration is an issue considering the compromise between the model detail and the system size; frequently, the microgrid size is reduced when detailed representations are considered.The proposed approach considers two basic microgrids used to iteratively enlarge the system towards the desired target microgrid. The approach helps to obtain an adequate microgrid behaviour because lines, loads, and CIDERs are sequentially added; then, the control parameters are updated considering the settings in the previous iterations and a parameter database.The application of the proposed approach is straightforward, as it avoids detailed modelling of the microgrid and the CIDER. As a consequence of simplifying the modelling efforts and reducing the computational burden, suitable solutions for larger systems, including several CIDERs, are obtained, which constitute relevant advantages of the proposal over those approaches usually addressed by the cited references. Moreover, the proposed objective function considers measurements under different system states; transient and small-signal stability is also addressed.As demonstrated in the testing section, the proposal is validated and successfully applied to adjust the control parameters of several CIDERs in a complex microgrid, whose behaviour is analysed under small and strong disturbances, including load changes, faults, and intentional grid transition. Moreover, the proposed approach optimally adjusts CIDERs for operating under grid-connected or grid-islanded microgrid modes; consequently, considering the observed results, the obtained microgrid and CIDER parameters configuration adequately supports grid transition. This corroborates the suitability of the proposed iterative and optimisation-driven approach.This proposal is also an integrated approach since it iteratively considers several systems prior to the target microgrid study. Also, the proposal considers parameter results from other works or systems, which enables the proposal to embrace many other proposals as an initial point database.Additionally, the fine selection of the CIDER control parameters in a target microgrid influences the system stability since, in the case of a deficient adjustment process, high oscillations and time responses may lead to issues. In the performed tests, disturbances affecting small-signal and transient stability are indirectly considered by including the measured signals at the optimisation process. These stability studies are challenging to consider in other approaches due to the complexity of the system modelling; then, this fact validates an additional demonstrated proposal advantage.Finally, the main contribution is to propose and validate an off-line approach to optimally adjust the control parameters of a multiple CIDER microgrid, considering only local measurements at the objective function. This function is evaluated considering several microgrid operating conditions such as grid transition, power system faults, and load changes. The proposed approach accelerates microgrid studies since fine control adjustment is mandatory to obtain adequate test systems for studying further operation or protection issues.



---

*Source: 1394096-2022-04-11.xml*