# Hybrid PSO-HHO Optimal Control for Power Quality Improvement in Autonomous Microgrids

<figure><img src="image_1.png" /></figure>

Check for
updates

Karimulla Syed*, Ravi Kumar Chekka

Department of Electrical and Electronics Engineering, Acharya Nagarjuna University, Guntur 522510, India

Corresponding Author Email: syedkarimullaanu@gmail.com

https://doi.org/10.18280/jesa.560320

Received: 12 May 2023

Accepted: 17 June 2023

Keywords:

PSO, HHO, microgrid, optimal, THD

## ABSTRACT

The focus on resilience, energy security, and renewable energy is increased. Hence the necessity of autonomous microgrids has become more prevalent. These autonomous microgrids can operate independently and provide stable energy to the users. The design and performance of an autonomous microgrid depends on the control system which will play a significant role in its ability to provide reliable and resilient energy. Hence to account this a hybrid PSO-HHO based optimal control strategy is proposed for power quality improvement. A test case of 3.5 kW PV based autonomous micro grid system is considered and implemented in MATLAB/Simulink. The proposed hybrid PSO-HHO based optimal control strategy is compared with PSO and HHO based optimal control strategies. The performance parameters such as PV maximum voltage $PV_{vmax}$, PV maximum current $PV_{imax}$, Voltage RMS $V_{RMS}$, Current RMS $I_{RMS}$, PV output power $PV_{op}$, Autonomous grid power $A_{gp}$, THD, Efficiency, Inverter Losses $Inv_{loss}$ are evaluated in all the cases. The proposed hybrid PSO-HHO based optimal control strategy exhibited the mark improved performance.

## 1. INTRODUCTION

An autonomous microgrid is a type of power system that operates independently of the larger electrical grid. These systems usually utilize wind and solar power, as well as storage devices like batteries. They can provide sustainable and reliable power to communities. It utilizes advanced control systems to manage its energy consumption and supply balance. Some of the advantages of an autonomous microgrid include increased energy security, better resilience against power outages, reduced carbon emissions and peak demand charges, and avoidance of costly upgrades to the electrical grid [1, 2].

These types of systems are particularly useful in areas where there is a lack of access to reliable power. They can be utilized to provide local power to military bases, hospitals, and data centres. Despite the advantages of autonomous microgrids, they still face various challenges when it comes to their development and deployment. Some of these include the need for efficient and cost-effective energy systems, the complexity of their operation, and the regulatory obstacles they can face [3-5]. Control of autonomous micro grid is one of the complex system. Hence to reduce the complexity optimal controllers are required.

Autonomous microgrids have numerous applications and case studies as shown below:

* Remote Communities and Islands

* Military Installations and Forward Operating Bases

* Emergency Response and Disaster Management

* Industrial and Commercial Applications

* Rural Electrification and Developing Regions

* Smart Cities and Urban Developments

## 2. LITERATURE REVIEW

The study [6] presented a decentralized secondary controller that can be used in autonomous microgrids to provide accurate power sharing and frequency regulation. It does not require a communication network. Frequency based optimal control strategy is presented in the study [7]. The study [8] proposed a cost-effective hybrid control approach that can achieve both stability and optimal operation in an autonomous microgrid. The influence of the cost-based schemes on the stability of the system is studied using a small-signal model. The study [9] proposed a resilient and robust distributed optimal control scheme for addressing cyber-attacks. The study [10] presented a novel formulation for determining the optimal droop type and characteristic. The study [11] proposed a multi-agent reinforcement learning approach that can learn the optimal policy for a microgrid without the complexity of system modelling. A game based multi agent approach for energy management is presented in the study [12]. The paper [13] presented a decentralized power flow model that takes into account the multiport control strategy of PET for running AC/DC hybrid microgrids. The research [14] presented an optimal control scheme for an isolated DC microgrid with a composite load and multiple sources.

The study [15] presents an extensive analysis of the literature on the subject of droop-controlled microgrids. It includes a critical evaluation of over 150 studies. The study [16] aims to improve the island-level microgrid's frequency resilience by implementing the virtual inertia control method. Related studies are also presented in the study [17-21]. The recent literature lacks in hybrid optimal control strategies for autonomous micro grids. Hence to account this a hybrid PSO-HHO based optimal control strategy is proposed for power
quality improvement. The following are the numerous advantages of PSO-HHO over conventional optimal controllers

* Enhanced Exploration and Exploitation

* Improved Convergence Speed

* Handling Different Types of Optimization Problems

* Improved Solution Quality

* Reduced Risk of Getting Stuck in Local Optima

A test case of 3.5 kW PV based autonomous micro grid system is considered and implemented in MATLAB/Simulink.

The proposed hybrid PSO-HHO based optimal control strategy is compared with PSO and HHO based optimal control strategies. The performance parameters such as PV maximum voltage (PV<sub>vmax</sub>), PV maximum current (PV<sub>imax</sub>), Voltage RMS (V<sub>RMS</sub>), Current RMS (I<sub>RMS</sub>), PV output power (PV<sub>op</sub>), Autonomous grid power (A<sub>gp</sub>), THD, Efficiency, Inverter Losses (Inv<sub>loss</sub>) are evaluated in all the cases. The proposed hybrid PSO-HHO based optimal control strategy exhibited the mark improved performance.

### 3. HYBRID PSO-HHO OPTIMAL CONTROLLER

In this paper hybrid PSO-HHO based optimal control scheme is proposed as shown in Figure 1. In this control scheme the voltage and current controller gain values are tuned by using hybrid PSO-HHO algorithm based on Integral Time Absolute Error (ITAE) as shown in the following:

$$ \text{Integral Time Absolute Error (ITAE)} = \int_{0}^{t} |e(t)| dt $$

<figure><img src="image_2.png" /><figcaption>Figure 1. Proposed hybrid PSO-HHO Optimal Controller</figcaption></figure>

The flow chart of the proposed hybrid PSO-HHO Optimal Controller is presented in Figure 2.

### 4. RESULTS AND DISCUSSIONS

In this paper a hybrid PSO-HHO based optimal control strategy is proposed for power quality improvement. A test case of 3.5 kW PV based autonomous micro grid system is considered and implemented in MATLAB/Simulink under the following cases:

* PSO based Optimal Controller

* HHO based Optimal Controller

* Proposed PSO-HHO Optimal Controller

#### 4.1 PSO based Optimal Controller

In this case the voltage and current controller gain values are tuned using PSO algorithm under Standard Test Condition (Solar Irradiance is 1000 w/m² and Ambient Temperature is 25°C) and Variable Test Condition (At time period 0s, 0.9s Solar Irradiance is 1000 w/m², 800 w/m² and Ambient Temperature is 25°C, 35°C respectively). The PSO parameters are tabulated in Table 1.

<figure><img src="image_3.png" /><figcaption>Figure 2. Flow chart of PSO-HHO Optimal Controller</figcaption></figure>

<table><caption>Table 1. PSO parameters</caption><thead><tr><td>Parameter</td><td>Value</td></tr></thead><tbody><tr><td>Population (swarm) Size</td><td>50</td></tr><tr><td>Iterations</td><td>200</td></tr><tr><td>Constant C<sub>1</sub></td><td>0.5</td></tr><tr><td>Constant C<sub>2</sub></td><td>1.25</td></tr><tr><td>Weight W</td><td>1</td></tr><tr><td>Velocity V</td><td>10</td></tr></tbody></table>

The gain values obtained for Voltage controller are K<sub>pv</sub> is 1.5016, K<sub>iv</sub> is 3.2419, Similarly the gain values obtained for
Current controller are Kpc is 0.6277, Kic is 3.5928. By using these gain values the following are the performance parameters obtained and tabulated in Table 2.

<table><caption>**Table 2. Performance parameters**</caption><thead><tr><th>Performance Parameter</th><th>STC</th><th>VTC</th></tr></thead><tbody><tr><td>PV<sub>vmax</sub></td><td>433.8 V</td><td>401.5 V</td></tr><tr><td>PV<sub>imax</sub></td><td>8.05 A</td><td>6.624 A</td></tr><tr><td>V<sub>RMS</sub></td><td>239 V</td><td>238.9 V</td></tr><tr><td>I<sub>RMS</sub></td><td>14.41 A</td><td>10.27 A</td></tr><tr><td>PV<sub>op</sub></td><td>3492.09 W</td><td>2659.536 W</td></tr><tr><td>A<sub>gp</sub></td><td>3433.99 W</td><td>2453.503 W</td></tr><tr><td>η</td><td>98.62%</td><td>92.25%</td></tr><tr><td>Inv<sub>loss</sub></td><td>1.377399%</td><td>7.746953%</td></tr></tbody></table>

The THD using PSO controller is 3.22% as shown in Figure 3.

<figure><img src="image_4.png" /><figcaption>**Figure 3. THD Analysis using PSO controller**</figcaption></figure>

## 4.2 HHO based Optimal Controller

In this case the voltage and current controller gain values are tuned using HHO algorithm under Standard Test Condition (Solar Irradiance is 1000 w/m² and Ambient Temperature is 25°C) and Variable Test Condition (At time period 0s, 0.9s Solar Irradiance is 1000 w/m², 800 w/m² and Ambient Temperature is 25°C, 35°C respectively). The HHO parameters are tabulated in Table 3.

<table><caption>**Table 3. HHO parameters**</caption><thead><tr><th>Parameter</th><th>Value</th></tr></thead><tbody><tr><td>Size of the Hawks</td><td>50</td></tr><tr><td>Iterations</td><td>200</td></tr><tr><td>convergence probability r</td><td>0.5</td></tr><tr><td>r1, r2, r3, r4</td><td>0 - 1</td></tr></tbody></table>

The gain values obtained for Voltage controller are Kpv is 1.5104, Kiv is 3.2812, Similarly the gain values obtained for Current controller are Kpc is 0.5916, Kic is 3.5896. By using these gain values the following are the performance parameters obtained and tabulated in Table 4.

<table><caption>**Table 4. Performance parameters**</caption><thead><tr><th>Performance Parameter</th><th>STC</th><th>VTC</th></tr></thead><tbody><tr><td>PV<sub>vmax</sub></td><td>433.8 V</td><td>401.5 V</td></tr><tr><td>PV<sub>imax</sub></td><td>8.05 A</td><td>6.624 A</td></tr><tr><td>V<sub>RMS</sub></td><td>239 V</td><td>238.9 V</td></tr><tr><td>I<sub>RMS</sub></td><td>14.47 A</td><td>10.31 A</td></tr><tr><td>PV<sub>op</sub></td><td>3492.09 W</td><td>2659.536 W</td></tr><tr><td>A<sub>gp</sub></td><td>3458.33 W</td><td>2463.059 W</td></tr><tr><td>η</td><td>99.03%</td><td>92.61%</td></tr><tr><td>Inv<sub>loss</sub></td><td>0.966756%</td><td>7.387642%</td></tr></tbody></table>

The THD using HHO controller is 2.31% as shown in Figure 4.

<figure><img src="image_5.png" /><figcaption>**Figure 4. THD Analysis using HHO controller**</figcaption></figure>

## 4.3 Proposed PSO-HHO based Optimal Controller

In this case the voltage and current controller gain values are tuned using PSO-HHO algorithm under Standard Test Condition (Solar Irradiance is 1000 w/m² and Ambient Temperature is 25°C) and Variable Test Condition (At time period 0s, 0.9s Solar Irradiance is 1000 w/m², 800 w/m² and Ambient Temperature is 25°C, 35°C respectively). The PSO-HHO parameters are tabulated in Table 5.
<table><caption>**Table 5.** PSO-HHO parameters</caption><thead><tr><td>Parameter</td><td>Value</td></tr></thead><tbody><tr><td>Population (swarm) Size</td><td>50</td></tr><tr><td>Iterations</td><td>200</td></tr><tr><td>Constant C<sub>1</sub></td><td>0.5</td></tr><tr><td>Constant C<sub>2</sub></td><td>1.25</td></tr><tr><td>Weight W</td><td>1</td></tr><tr><td>Velocity V</td><td>10</td></tr><tr><td>Size of the Hawks</td><td>50</td></tr><tr><td>Iterations</td><td>200</td></tr><tr><td>convergence probability r</td><td>0.5</td></tr><tr><td>r1, r2, r3, r4</td><td>0 - 1</td></tr></tbody></table>

The gain values obtained for Voltage controller are Kpv is 1.1126, Kiv is 3.9712, Similarly the gain values obtained for Current controller are Kpc is 0.2916, Kic is 4.1782. By using these gain values the following are the performance parameters obtained and tabulated in Table 6.

<table><caption>**Table 6.** Performance Parameters</caption><thead><tr><td>Performance Parameter</td><td>STC</td><td>VTC</td></tr></thead><tbody><tr><td>PV<sub>vmax</sub></td><td>433.8 V</td><td>401.5 V</td></tr><tr><td>PV<sub>imax</sub></td><td>8.05 A</td><td>6.624 A</td></tr><tr><td>V<sub>RMS</sub></td><td>239 V</td><td>238.9 V</td></tr><tr><td>I<sub>RMS</sub></td><td>14.56 A</td><td>10.41 A</td></tr><tr><td>PV<sub>op</sub></td><td>3492.09 W</td><td>2659.536 W</td></tr><tr><td>A<sub>gp</sub></td><td>3479.84 W</td><td>2486.949 W</td></tr><tr><td>η</td><td>99.65%</td><td>92.61%</td></tr><tr><td>Inv<sub>loss</sub></td><td>0.350793%</td><td>6.9397%</td></tr></tbody></table>

The THD using PSO-HHO controller is 1.18 % as shown in Figure 5.

<figure><img src="image_6.png" /><figcaption>**Figure 5.** THD Analysis using PSO-HHO controller</figcaption></figure>

## 5. CONCLUSIONS

In this paper hybrid PSO-HHO based optimal control strategy for power quality improvement is presented. Detailed literature on autonomous microgrids is reviewed. A test case of 3.5 kW PV based autonomous micro grid system is considered and implemented in MATLAB/Simulink. The proposed hybrid PSO-HHO based optimal control strategy is compared with PSO and HHO based optimal control strategies. The performance parameters such as PV maximum voltage (PV<sub>vmax</sub>), PV maximum current (PV<sub>imax</sub>), Voltage RMS (V<sub>RMS</sub>), Current RMS (I<sub>RMS</sub>), PV output power (PV<sub>op</sub>), Autonomous grid power (A<sub>gp</sub>), THD, Efficiency, Inverter Losses (Inv<sub>loss</sub>) are evaluated in all the cases. The proposed hybrid PSO-HHO based optimal control strategy exhibited the mark improved performance.

## REFERENCES

[1] Gupta, A., Suhag, S. (2023). Charging station control strategy considering dynamic behaviour of electric vehicles with variable state of charge regulation for energy management of autonomous micro-grid. Journal of Energy Storage, 59. https://doi.org/10.1016/j.est.2022.106460

[2] Ghennou, S., Nasser, T.M., Benmoussa, D., Chellali, B. (2022). Energy Optimization of a Purely Renewable Autonomous Micro-Grid to Supply a Tourist Region. European Journal of Electrical Engineering, 24(1). https://doi.org/10.18280/ejee.240105

[3] Abdalla, S.A., Abdullah, S.S., Kassem, A.M. (2022). Performance enhancement and power management strategy of an autonomous hybrid fuel cell/wind power system based on adaptive neuro fuzzy inference system. Ain Shams Engineering Journal, 13(4). https://doi.org/10.1016/j.asej.2021.101655

[4] Dong, Y., Shan, X., Yan, Y., Leng, X., Wang, Y. (2022). Architecture, Key Technologies and Applications of Load Dispatching in China Power Grid. Journal of Modern Power Systems and Clean Energy, 10(2). https://doi.org/10.35833/MPCE.2021.000685

[5] Chamarande, T., Mathy, S., Hingray, B. (2022). The least cost design of 100 % solar power microgrids in Africa: Sensitivity to meteorological and economic drivers and possibility for simple pre-sizing rules. Energy for Sustainable Development, 69. https://doi.org/10.1016/j.esd.2022.07.001

[6] Khayat, Y., Naderi, M., Shafiee, Q., Batmani, Y., Fathi, M., Guerrero, J.M., Bevrani, H. (2019). Decentralized optimal frequency control in autonomous microgrids. IEEE Transactions on Power Systems, 34(3). https://doi.org/10.1109/TPWRS.2018.2889671

[7] Alshehri, J., Khalid, M. (2020). Discussion on decentralized optimal frequency control in autonomous microgrids. IEEE Transactions on Power Systems, 35(6). https://doi.org/10.1109/TPWRS.2020.3027197

[8] Hamad, B., Al-Durra, A., El-Fouly, T.H.M., Zeineldin, H.H. (2023). Economically optimal and stability preserving hybrid droop control for autonomous microgrids. IEEE Transactions on Power Systems, 38(1). https://doi.org/10.1109/TPWRS.2022.3169801

[9] Liu, Y., Li, Y., Wang, Y., Zhang, X., Gooi, H.B., Xin, H. (2022). Robust and resilient distributed optimal
frequency control for microgrids against cyber attacks.
IEEE Transactions on Industrial Informatics, 18(1).
https://doi.org/10.1109/TII.2021.3071753

[10] Gabl, O.M.A., Shaaban, M.F., Zeineldin, H.H., Ammar, M.E. (2022). A multiobjective secondary control approach for optimal design of DG droop characteristic and control mode for autonomous microgrids. IEEE Systems Journal, 16(4).
https://doi.org/10.1109/JSYST.2021.3114963

[11] Gao, G., Wen, Y., Tao, D. (2022). Distributed Energy Trading and Scheduling Among Microgrids via Multiagent Reinforcement Learning. IEEE Transactions on Neural Networks and Learning Systems.
https://doi.org/10.1109/TNNLS.2022.3170070

[12] Karavas, C.S., Arvanitis, K., Papadakis, G. (2017). A game theory approach to multi-agent decentralized energy management of autonomous polygeneration microgrids. Energies, 10(11).
https://doi.org/10.3390/en10111756

[13] Dong, L., Zhang, T., Pu, T., Chen, N., Sun, Y. (2019). A decentralized optimal operation of ac/dc hybrid microgrids equipped with power electronic transformer. IEEE Access, 7.
https://doi.org/10.1109/ACCESS.2019.2949378

[14] Vijayaragavan, R., Umamaheswari, B. (2021). Decentralized control of autonomous DC microgrids with composite loads: an approach using optimal control. Electrical Engineering, 103(6).
https://doi.org/10.1007/s00202-021-01277-7

[15] Kreishan, M.Z., Zobaa, A.F. (2021). Optimal allocation

and operation of droop-controlled islanded microgrids: A review. Energies, 14(15).
https://doi.org/10.3390/en14154653

[16] Saleh, A., Hasanien, H.M., A. Turky, R., Turdybek, B., Alharbi, M., Jurado, F., Omran, W.A. (2023). Optimal model predictive control for virtual inertia control of autonomous microgrids. Sustainability, 15(6).
https://doi.org/10.3390/su15065009

[17] Hussien, A.M., Turky, R.A., Alkuhayli, A., Hasanien, H. M., Tostado-Véliz, M., Jurado, F., Bansal, R.C. (2022). Coot bird algorithms-based tuning PI controller for optimal microgrid autonomous operation. IEEE Access, 10.
https://doi.org/10.1109/ACCESS.2022.3142742

[18] Wang, H., Li, W., Yue, Y., Zhao, H. (2022). Distributed economic control for AC/DC hybrid microgrid. Electronics, 11(1).
https://doi.org/10.3390/electronics11010013

[19] Akinwale, O.S., Mojisola, D.F., Adediran, P.A. (2021). Mitigation strategies for communication networks induced impairments in autonomous microgrids control: A review. AIMS Electronics and Electrical Engineering, 5(4).
https://doi.org/10.3934/electreng.2021018

[20] Wu, J., Guan, X. (2013). Coordinated multi-microgrids optimal control algorithm for smart distribution management system. IEEE Transactions on Smart Grid, 4(4).
https://doi.org/10.1109/TSG.2013.2269481

[21] Phan-Tan, C.T., Hill, M. (2021). Decentralized optimal control for photovoltaic systems using prediction in the distribution systems. Energies, 14(13).
https://doi.org/10.3390/en14133973