# Salp Swarm Optimization Algorithm-Based Controller for Dynamic Response and Power Quality Enhancement of an Islanded Microgrid

^{1}

^{2}

^{3}

^{4}

^{*}

## Abstract

**:**

_{p}and k

_{i}) and dc side capacitance (C), which in turn ensures optimal transient response during the distributed generator (DG) insertion and load change conditions. Finally, to evaluate the effectiveness of the proposed control approach, its outcomes are compared with that of the previous approaches used in recent literature on basis of transient response measures, quality of solution and power quality. The results prove the superiority of the proposed control scheme over that of the particle swarm optimization (PSO) and grasshopper optimization algorithm (GOA) based MG controllers for the same operating conditions and system configuration.

## 1. Introduction

## 2. Modern Microgrid Control Architectures

_{p}and k

_{i}). Hence, selection of these gains decides the overall performance of the controller and consequently, the studied system. Over the last years, these gains were selected by using the “trial and error” or Ziegler-Nicolas (Z-N) method. These conventional methods of PI tuning suffer from many disadvantages, such as excessive time consumption, uncertainty in gain selection and complex calculations which restricted PI controller application in the latest MG control architectures up to a large extent. Most recently, with the development in the area of artificial intelligence (AI) and its applications in optimization field, several AI methods such as fuzzy logic (FL), genetic algorithm (GA) and particle swarm optimization (PSO) were explored to optimize PI controller parameters for dynamic response enhancement of islanded ac MGs. The results presented in the mentioned research papers clearly show the importance of the AI techniques in obtaining optimal PI parameters, which led to the enhanced transient response of the studied MG systems.

## 3. Proposed Islanded MG Architecture

_{v}and e

_{f}) are fed to two PI controllers whose gains are optimized by SSA optimizer. The sole aim of optimizing PI gains is to achieve an optimal dynamic response of the studied MG system with minimum overshoot and settling time in voltage and frequency curves. In order to precisely track the current reference signals (${i}_{d}^{*}$ and ${i}_{q}^{*}$), two more PI controllers are used in the current controller block of the proposed controller. Since the gains for the PI controller used in voltage controller block were optimized using SSA, optimizing gains for PI regulators in the current controller block will increase the complexity and duration of the overall optimization process and may result in un-optimal results at the end due to the excessive number of optimization variables. The transfer function equations for the current controller as derived from Figure 4 are as in Equations (9) and (10):

## 4. Proposed Methodology

#### 4.1. Salp Swarm Algorithm and Its Implementation

_{1}, c

_{2}and c

_{3}denote the random numbers. It is significant to note that, unlike conventional optimization methods such as GA and PSO, the SSA effectively manages to avoid trapping into local minimum due to its adaptive optimization mechanism. SSA updates the position of follower salps with respect to each other and allows them to move gradually towards the leading salp, which prevents the algorithm from stagnating into the local optima. Thus, the algorithm produces an optimal or near-optimal solution precisely during an optimization process [3]. Furthermore, SSA has better exploration versus exploitation balancing capability, which is the fundamental requirement for reaching the best available solution for an optimization problem. As can be seen from Equation (12), the leader salp upgrades its location with reference to the food source only. The coefficient c

_{1}in Equation (12) is one of the very important parameters in SSA since it helps in balancing the exploitation and exploration characteristics of SSA and is defined in Equation (13):

_{2}and c

_{3}used in Equation (12) represents the random numbers between 0 and 1. In order to upgrade the location of the follower salps, a similar equation to that of Newton’s law of motion is used:

_{0}is the symbol used for the velocity at the start of the optimization process, which is generally taken as 0. As the time in the optimization procedure can be replaced by the iterations and the variance between two successive iterations cannot be in a fractional number, hence by assuming v

_{0}= 0, the Equation (14) can be re-written as given underneath:

- The algorithm keeps the best-obtained solution after each iteration and assigns it to the global optimum (food source) variable. Hence, it can never be wiped out even if the whole population deteriorates.
- SSA updates the position of the leading salp with respect to the food source only, which is the best solution obtained thus far; therefore, the leader salp always explores and exploits the space around it for a better solution.
- SSA updates the position of follower salps with respect to each other in order to let them move towards the leading salp gradually.
- Gradual movements of follower salps prevent the SSA from being easily stagnating into local optima.
- Parameter c
_{1}is decreased adaptively over the course of iterations, which helps the algorithm to explore the search space at starting and exploits it at the ending phase. - SSA has only one main controlling parameter (c
_{1}), which reduces the complexity and makes it easy to implement.

#### 4.2. Fitness Function Formulation

_{pv}, K

_{iv}, K

_{pf}, K

_{if}) placed in the first control loop of the studied MG controller along with the dc link capacitance (C) are optimized by SSA. In fact, for all metaheuristic and evolutionary optimization methods, the presence of the FF is a compulsory requirement that evaluates the fitness of each and every search agent and selects the best one for further comparison during the next iteration. In the context of the current study, where the optimal tuning of PI controller is required, four FF criterions that are generally considered in the literature are Integral Square Error (ISE), Integral Absolute Error (IAE), Integral Time Square Error (ITSE) and Integral Time Absolute Error (ITAE). However, ITAE is the most widely used FF criterion than its compilators due to the easy implementation, realistic error indexing and better outcomes [15,16]. The ITSE and ISE used to square the error which produces large perturbation in results even for a very small change in error signal, and hence generates impractical results. In addition, due to the continuous-time multiplication with the absolute value of error, the ITAE produces more realistic error indexing as compared to IAE. Hence looking at the prominent features of the ITAE criterion, it is adopted as the FF to be minimized in this study. Mathematically, the ITAE is expressed as provided in Equations (16) and (17):

## 5. Results and Discussion

#### 5.1. Voltage and Frequency Regulation during DG Insertion and Load Change

#### 5.2. Performance Evaluation of Studied Optimization Algorithms

#### 5.3. Power Quality Analysis

## 6. Conclusions

## Author Contributions

## Funding

## Conflicts of Interest

## List of Symbols

Symbol | Name |

${C}_{f}$ | Low pass filter capacitance |

${K}_{1}^{1:n}$ | initial positions of the salps |

${K}_{j}^{1}$ | Position of leader salp |

${L}_{f}$ | Low pass filter inductance |

${M}_{i}$ | Location of the food source in the jth dimension |

${R}_{f}$ | Low pass filter resistance |

${V}_{g}$ | Grid voltage |

${e}_{f}$ | Frequency error |

${e}_{v}$ | Voltage error |

${f}^{*}$ | Reactive frequency |

${f}_{n}$ | Nominal frequency |

${i}_{abc}$ | Three-phase current |

${i}_{d}^{*}$ | Direct reference current |

${i}_{q}^{*}$ | Quadrature reference current |

${k}_{v}$ | Droop constant for voltage |

${k}_{w}$ | Droop constant for frequency |

$l{b}_{j}$ | Lower bound of search boundary |

$u{b}_{j}$ | Upper bound of search boundary |

${v}^{*}$ | Reference voltage |

${v}_{abc}$ | Three-phase voltage |

${v}_{d}^{*}$ | Direct reference voltage |

${v}_{n}$ | Nominal or rated voltage |

${v}_{q}^{*}$ | Quadrature reference voltage |

${v}_{\alpha}$, ${v}_{\beta}$ | Reference voltage in αβ frame |

a | Acceleration of the leading salp |

i | Salp number |

C | dc-link capacitance |

c_{1}, c_{2}, c_{3} | Random numbers |

K_{pf}, K_{if} | Gains for the lower arm PI controller |

K_{pv}, K_{iv} | Gains for the upper arm PI controller |

l | Number of iterations |

L | Number of maximum iterations |

M | Food source position |

Ɵ | Reference angel |

p | Active power |

q | Reactive power |

rand | Random number |

t | Total simulation time |

$\omega $ | Angular frequency |

${\omega}_{c}$ | Filter cut-off frequency |

${v}_{0}$ | Initial velocity of leading salp |

## References

- Hatziargyriou, N. Microgrids: Architectures and Control; John Wiley & Sons: Chichester, UK, 2014. [Google Scholar]
- Jumani, T.A.; Mustafa, M.W.; Rasid, M.M.; Mirjat, N.H.; Baloch, M.H.; Salisu, S. Optimal Power Flow Controller for Grid-Connected Microgrids using Grasshopper Optimization Algorithm. Electronics
**2019**, 8, 111. [Google Scholar] [CrossRef] - Mirjalili, S.; Gandomi, A.H.; Mirjalili, S.Z.; Saremi, S.; Faris, H.; Mirjalili, S.M. Salp Swarm Algorithm: A bio-inspired optimizer for engineering design problems. Adv. Eng. Softw.
**2017**, 114, 163–191. [Google Scholar] [CrossRef] - Abbassi, R.; Abbassi, A.; Heidari, A.A.; Mirjalili, S. An efficient salp swarm-inspired algorithm for parameters identification of photovoltaic cell models. Energy Convers. Manag.
**2019**, 179, 362–372. [Google Scholar] [CrossRef] - Tolba, M.; Rezk, H.; Diab, A.; Al-Dhaifallah, M. A novel robust methodology based Salp swarm algorithm for allocation and capacity of renewable distributed generators on distribution grids. Energies
**2018**, 11, 2556. [Google Scholar] [CrossRef] - El-Fergany, A.A. Extracting optimal parameters of PEM fuel cells using Salp Swarm Optimizer. Renew. Energy
**2018**, 119, 641–648. [Google Scholar] [CrossRef] - Abusnaina, A.A.; Ahmad, S.; Jarrar, R.; Mafarja, M. Training neural networks using salp swarm algorithm for pattern classification. In Proceedings of the 2nd International Conference on Future Networks and Distributed Systems, Amman, Jordan, 26–27 June 2018; p. 17. [Google Scholar]
- Kumari, S.; Shankar, G. A Novel Application of Salp Swarm Algorithm in Load Frequency Control of Multi-Area Power System. In Proceedings of the 2018 IEEE International Conference on Power Electronics, Drives and Energy Systems (PEDES), Chennai, India, 18–21 December 2018; pp. 1–5. [Google Scholar]
- Al-Saedi, W.; Lachowicz, S.W.; Habibi, D.; Bass, O. Voltage and frequency regulation based DG unit in an autonomous microgrid operation using Particle Swarm Optimization. Int. J. Electr. Power Energy Syst.
**2013**, 53, 742–751. [Google Scholar] [CrossRef] - Vinayagam, A.; Alqumsan, A.A.; Swarna, K.; Khoo, S.Y.; Stojcevski, A. Intelligent control strategy in the islanded network of a solar PV microgrid. Electr. Power Syst. Res.
**2018**, 155, 93–103. [Google Scholar] [CrossRef] - Moarref, A.E.; Sedighizadeh, M.; Esmaili, M. Multi-objective voltage and frequency regulation in autonomous microgrids using Pareto-based Big Bang-Big Crunch algorithm. Control Eng. Pract.
**2016**, 55, 56–68. [Google Scholar] [CrossRef] - Sedighizadeh, M.; Esmaili, M.; Eisapour-Moarref, A. Voltage and frequency regulation in autonomous microgrids using Hybrid Big Bang-Big Crunch algorithm. Appl. Soft Comput.
**2017**, 52, 176–189. [Google Scholar] [CrossRef] - Qazi, S.H.; Mustafa, M.W.; Sultana, U.; Mirjat, N.H.; Soomro, S.A.; Rasheed, N. Regulation of Voltage and Frequency in Solid Oxide Fuel Cell-Based Autonomous Microgrids Using the Whales Optimisation Algorithm. Energies
**2018**, 11, 1318. [Google Scholar] [CrossRef] - Jumani, T.A.; Mustafa, M.W.; Rasid, M.M.; Mirjat, N.H.; Leghari, Z.H.; Saeed, M.S. Optimal Voltage and Frequency Control of an Islanded Microgrid using Grasshopper Optimization Algorithm. Energies
**2018**, 11, 3191. [Google Scholar] [CrossRef] - Killingsworth, N.; Krstic, M. Auto-tuning of PID controllers via extremum seeking. In Proceedings of the American Control Conference, Portland, OR, USA, 8–10 June 2005; pp. 2251–2256. [Google Scholar]
- Seborg, D.E.; Edger, T.F.; Mellichamp, D.A. Process Dynamics and Control, 2nd ed.; John Wiley & Sons: Chichester, UK, 2004. [Google Scholar]
- Association, I.S. IEEE 1547 Standard for Interconnecting Distributed Resources with Electric Power Systems; IEEE Standards Association: Piscataway, NJ, USA, 2003. [Google Scholar]

**Figure 1.**A basic structure of Microgrid [2].

**Figure 4.**Detailed diagram of the salp swarm optimization algorithm based controller for islanded MG.

**Figure 10.**Three-phase sinusoidal current waveform (

**a**) complete operation (

**b**) zoomed version from 0.1–0.22 s.

**Figure 11.**FFT analysis of studied MG system during (

**a**) DG injection, (

**b**) load injection and (

**c**) load detachment.

Parameter | Symbol | Value |
---|---|---|

Solar PV rating | P_{s} | 150 kW |

Filter capacitance | C_{f} | 2.5 mF |

Filter inductance | L_{f} | 95 mH |

Switching frequency | f_{sw} | 10 kHz |

Sampling frequency | f_{s} | 500 kHz |

Load 1 | P_{l}, Q_{1} | 50 kW, 30 kVAR |

Load 2 | P_{2}, Q_{2} | 40 kW, 20 kVAR |

Load 3 | P_{3}, Q_{3} | 40 kW, 20 kVAR |

Optimization | K_{pv} | K_{iv} | K_{pf} | K_{if} | C (mF) |
---|---|---|---|---|---|

PSO | 0.2571093 | 25.6392019 | 0.9374905 | 9.3847852 | 23.817 |

GOA | 0.9441557 | 12.8365850 | 26.768654 | 1.2474575 | 17.458 |

SSA | 1.5485963 | 0.87302975 | 2.1385992 | 15.583932 | 19.954 |

**Table 3.**Dynamic response evaluation of the proposed controller for voltage and frequency regulation.

Studied Condition | Method | Maximum Overshoot/Undershoot (%) | Peak Time (ms) | Settling Time (ms) | |
---|---|---|---|---|---|

Voltage | MG insertion | PSO | 5.86 | 27.2 | 37.7 |

GOA | 4.68 | 36.3 | 64.5 | ||

SSA | 1.45 | 26.2 | 26.36 | ||

Load injection | PSO | 16.45 | 4.00 | 94.21 | |

GOA | 16.00 | 4.70 | 94.20 | ||

SSA | 15.04 | 3.90 | 94.19 | ||

Load detachment | PSO | 16.41 | 7.70 | 73.50 | |

GOA | 15.59 | 7.50 | 78.50 | ||

SSA | 14.77 | 7.80 | 77.40 | ||

Frequency | MG injection | PSO | 0.44 | 2.05 | - |

GOA | 0.54 | 5.58 | - | ||

SSA | 0.46 | 2.30 | - | ||

Load injection | PSO | 0.66 | 35.2 | - | |

GOA | 0.50 | 34.8 | - | ||

SSA | 0.46 | 35.0 | - | ||

Load detachment | PSO | 0.50 | 36.4 | - | |

GOA | 0.48 | 36.7 | - | ||

SSA | 0.46 | 36.8 | - |

Operating Condition | Percentage Harmonics (%) |
---|---|

MG injection | 0.84 |

Load injection | 0.65 |

Load detachment | 0.13 |

© 2019 by the authors. Licensee MDPI, Basel, Switzerland. This article is an open access article distributed under the terms and conditions of the Creative Commons Attribution (CC BY) license (http://creativecommons.org/licenses/by/4.0/).

## Share and Cite

**MDPI and ACS Style**

Jumani, T.A.; Mustafa, M.W.; Md. Rasid, M.; Anjum, W.; Ayub, S.
Salp Swarm Optimization Algorithm-Based Controller for Dynamic Response and Power Quality Enhancement of an Islanded Microgrid. *Processes* **2019**, *7*, 840.
https://doi.org/10.3390/pr7110840

**AMA Style**

Jumani TA, Mustafa MW, Md. Rasid M, Anjum W, Ayub S.
Salp Swarm Optimization Algorithm-Based Controller for Dynamic Response and Power Quality Enhancement of an Islanded Microgrid. *Processes*. 2019; 7(11):840.
https://doi.org/10.3390/pr7110840

**Chicago/Turabian Style**

Jumani, Touqeer Ahmed, Mohd. Wazir Mustafa, Madihah Md. Rasid, Waqas Anjum, and Sara Ayub.
2019. "Salp Swarm Optimization Algorithm-Based Controller for Dynamic Response and Power Quality Enhancement of an Islanded Microgrid" *Processes* 7, no. 11: 840.
https://doi.org/10.3390/pr7110840