# Research on Control Parameters for Voltage Source Inverter Output Controllers of Micro-Grids Based on the Fruit Fly Optimization Algorithm

^{*}

## Abstract

**:**

## 1. Introduction

## 2. Preliminary Knowledge: The Inverter Model and Voltage Source Inverter (VSI) Controller

#### 2.1. The Inverter Model

_{pv}is the output voltage of the inverter; I

_{PV}is the input current at the DC side of the inverter; u

_{dc}is the voltage between two ends of the capacitor C

_{2}; S

_{k}represents the duty cycle of the thyristor at the DC side of the main conversion circuit; S

_{a}, S

_{b}, and S

_{c}represents the duty cycle of the thyristor at the AC side of the main conversion circuit; and the parameter i

_{ES}can be expressed as the following:

#### 2.2. VSI Controller

_{abc}and output current i

_{abc}, collected from the grid connection point, can be expressed as follows after abc/dq0 conversion:

#### 2.3. Necessity of VSI Controller Parameter Tuning

## 3. The Fruit Fly Optimization (FOA)-Based Parameter Tuning Method of VSI Output Control

#### 3.1. The FOA-Based Offline Parameter Optimization Tuning Method

#### 3.2. The FOA-Based Online Parameter Optimization Tuning Method

- In the rising stage of the system (the set value of the curve ranging from 0 to 0.9), the variation slope of the real-time sampling point should be the maximum error change ratio (IE) value identified during the optimizing process, in order to shorten the rising response time of the system.
- In the oscillation and adjustment stages of the system, the slope of the real-time sampling point should be the minimum IE value (as the following Equation (34) expresses) in order to reduce the oscillation and overshot of the system, and gradually smooth the system curve.$$IE=\frac{d(error(t))}{dt}.$$

**Step 3*:**Update the controller parameter and operate for one step, then compute the IE index:

## 4. Simulation and Results Analysis

^{−6}s; the analog output power of the active power was 8 kW and the reactive power was 3 kVar; the output voltage was 220 V; and the frequency was 50 Hz. Offline optimization and online self-tuning optimization were performed for the inverter control parameters through analog simulation. Finally, the IAEs of the two optimizations in the step–response process were compared to verify the optimization effects.

#### 4.1. Simulation of the Optimization Process

^{−6}s, and the average deviation rate of steady-state error was 0.298%, while the initial controller was 2.56119 × 10

^{−5}s and 5.542%, respectively. Correspondingly, the unit step–response rising time and the average deviation rate of the steady-state error of the q-axis component was 8.21158 × 10

^{−7}s and 0.271%, respectively, while the initial controller increased to 2.77256 × 10

^{−5}s and 6.727%, respectively. It was noted that the responses of the optimized controllers became faster with a smaller steady-state error, and the control performance of these controllers was improved.

^{−5}s, and the control time of the controller was 2 × 10

^{−4}s in the simulation process. In Figure 12a, the results showed that the overshoot reduced from 32.3% to 9.1%, and the settling time shortened from 1.151 s to 0.38 s. These dynamic characteristic indicators in Figure 12b also reduced from 12.73% to 4.46% and shortened from 0.4 s to 0.375 s. With the improvement of the control performance of the d-axis and q-axis, the peak amplitude of current output exceeding the set value reduced from 28.79% to 7.58%, and the settling time shortened from 0.805 s to 0.3 s (as Figure 12c shows).

#### 4.2. Comparison of Online Optimization

## 5. Conclusions

## Author Contributions

## Funding

## Acknowledgments

## Conflicts of Interest

## Appendix A

Load active power (kW) | 12 |

Load reactive power (kVar) | 3 |

L of the filter (H) | 0.028 |

C of the filter (F) | 0.000362 |

R of the filter (Ω) | 25 |

DC Voltage (V) | 750 |

carrier frequency of PWM generator (Hz) | 4000 |

Sample period (s) | 5 × 10^{−5} |

AC Voltage of urban grid (V) | 220 |

Voltage Frequency (Hz) | 50 |

## References

- Wang, C.; Yang, X.; Wu, Z.; Che, Y.; Guo, L.; Zhang, S.; Liu, Y. A Highly Integrated and Reconfigurable Microgrid Testbed with Hybrid Distributed Energy Sources. IEEE Trans. Smart Grid
**2016**, 7, 451–459. [Google Scholar] [CrossRef] - Akram, U.; Khalid, M.; Shafiq, S. Optimal sizing of a wind/solar/battery hybrid grid-connected microgrid system. IET Renew. Power Gener.
**2018**, 12, 72–80. [Google Scholar] [CrossRef] - Martirano, L.; Habib, E.; Parise, G.; Greco, G.; Manganelli, M.; Massarella, F.; Parise, L. Demand side Management in Microgrids for Load Control in Nearly Zero Energy Buildings. IEEE Trans. Ind. Appl.
**2017**, 53, 1769–1779. [Google Scholar] [CrossRef] - Aghajani, G.R. Demand side management in a smart microgrid in the presence of renewable generation and demand response. Energy
**2017**, 126, 622–623. [Google Scholar] [CrossRef] - Lu, X.; Guerrero, J.M.; Sun, K.; Vasquez, J.C.; Teodorescu, R.; Huang, L. Hierarchical control of parallel AC-DC Converter Interfaces for Hybrid Microgrids. IEEE Trans. Smart Grid
**2014**, 5, 683–692. [Google Scholar] [CrossRef] - Feng, X.; Shekhar, A.; Yang, F.; Hebner, R.E.; Bauer, P. Comparison of Hierarchical Control and Distributed control for microgrid. Electr. Power Compon. Syst.
**2017**, 45, 1043–1056. [Google Scholar] [CrossRef] - Bullich-Massagué, E.; Díaz-González, F.; Aragüés-Peñalba, M.; Girbau-Llistuella, F.; Olivella-Rosell, P.; Sumper, A. Microgrid clustering architectures. Appl. Energy
**2018**, 212, 340–361. [Google Scholar] [CrossRef] - Parhizi, S.; Lotfi, H.; Khodaei, A.; Bahramirad, S. State of the Art in Research on Microgrids: A Review. IEEE Access
**2015**, 3, 890–925. [Google Scholar] [CrossRef] - Olivares, D.E.; Mehrizi-Sani, A.; Etemadi, A.H.; Canizares, C.A.; Iravani, R.; Kazerani, M.; Hajimiragha, A.H.; Bellmunt, O.G.; Saeedifard, M.; Palma-Behnke, R.; et al. Trends in microgrid control. IEEE Trans. Smart Grid
**2014**, 5, 1905–1919. [Google Scholar] [CrossRef] - Meng, L.; Shafiee, Q.; Trecate, G.F.; Karimi, H.; Fulwani, D.; Lu, X.; Guerrero, J.M. Review on Control of DC Microgrids and Multiple Microgrid Cluesters. IEEE J. Emerg. Sel. Top. Power Electron.
**2017**, 5, 928–948. [Google Scholar] - Schiffer, J.; Hans, C.A.; Kral, T.; Ortega, R.; Raisch, J. Modeling, Analysis, and Experimental Validation of Clock Drift Effects in Low-Inertia Power Systems. IEEE Trans. Ind. Electron.
**2017**, 64, 5942–5951. [Google Scholar] [CrossRef] - Chethan, R.D.; Gaonkar, D.N. Multiple Inverters Operated in Parallel for Proportional Load Sharing in Microgrid. Int. J. Power Electron. Drive Syst.
**2017**, 8, 654–666. [Google Scholar] - Zhuoli, Z.; Ping, Y.; Josep, M.G.; Xu, Z.; Green, T.C. Multiple-Time-Scales Hierarchical Frequency Stability Control Strategy of Medium-Voltage Isolated Microgrid. IEEE Trans. Power Electron.
**2016**, 31, 5974–5991. [Google Scholar] - Liang, G.; Li, W. Some Thoughts and Practice on Performance Improvement in Distributed Control System Based on Fieldbus and Ethernet. Meas. Control
**2016**, 49, 109–118. [Google Scholar] [CrossRef] - Chen, X.; Wang, Y.H.; Wang, Y.C. A novel seamless transferring control method for microgrid based on master-slave configuration. In Proceedings of the ECCE Asia Downunder (ECCE Asia), Melbourne, VIC, Australia, 3–6 June 2013; pp. 351–357. [Google Scholar]
- Franklin, G.F.; Powell, J.D.; Emami-Naeini, A.; Powell, J.D. Feedback Control of Dynamic Systems Sixth Edition; Publishing House of Electronics Industry: Beijing, China, 2014; pp. 83–143. [Google Scholar]
- Waghmare, L.M.; Malwatkar, G.M. Design of PID controllers for improved performance of higher order systems. In Proceedings of the UKACC International Conference on Control 2010, Coventry, UK, 7–10 September 2010; pp. 1–6. [Google Scholar]
- Banerjee, T.; Choudhuri, S.; Bera, J.; Maity, A. Off-line optimization of PI and PID controller for a vector controlled induction motor drive using PSO. In Proceedings of the 2010 International Conference on Electrical and Computer Engineering (ICECE), Dhaka, Bangladesh, 18–20 December 2010; pp. 74–77. [Google Scholar]
- Singh, S.; Mitra, R. Comparative analysis of robustness of optimally offline tuned PID controller and Fuzzy supervised PID controller. In Proceedings of the Engineering and Computational Sciences (2014 RAECS), Chandigarh, India, 6–8 March 2014; pp. 1–6. [Google Scholar]
- Hong, Y.; Luo, W. Realization of simultaneous perturbation stochastic approximation using FPGA for on-line PID parameter tuning. In Proceedings of the Automatic Control and Artificial Intelligence (ACAI 2012), Xiamen, China, 3–5 March 2012; pp. 1632–1637. [Google Scholar]
- Singh, M.; Patel, R.N.; Jhapte, R. Performance comparison of optimized controller tuning techniques for voltage stability. In Proceedings of the 2016 IEEE First International Conference on Control, Measurement and Instrumentation (CMI), Kolkata, India, 8–10 January 2016; pp. 11–15. [Google Scholar]
- Al-Saedi, W.; Lachowicz, S.W.; Habibi, D.; Bass, O. Power flow control in grid-connected microgrid operation using Particle Swarm Optimization under variable load conditions. Int. J. Electr. Power Energy Syst.
**2013**, 49, 76–85. [Google Scholar] [CrossRef] - Fan, J.; Hu, M.; Chu, X.; Yang, D. A comparison analysis of swarm intelligence algorithms for robot swarm learning. In Proceedings of the 2017 Winter Simulation Conference (WSC), Las Vegas, NV, USA, 3–6 December 2017; pp. 1–6. [Google Scholar]
- Juneja, M.; Nagar, S.K. Particle swarm optimization algorithm and its parameters: A review. In Proceedings of the 2016 International Conference on Control, Computing, Communication and Materials (ICCCCM), Allahbad, India, 21–22 October 2016; pp. 1–5. [Google Scholar]
- Pan, W.T. A new fruit fly optimization algorithm: Taking the financial distress model as an example. Knowl.-Based Syst.
**2012**, 26, 69–74. [Google Scholar] [CrossRef] - Dey, A.; Sarkar, T.; Ali, S. Fruit Fly algorithm based clustering protocol in wireless sensor networks. In Proceedings of the 2016 9th International Conference on Electrical and Computer Engineering (ICECE), Dhaka, Bangladesh, 20–22 December 2016; pp. 295–298. [Google Scholar]
- Liu, Y.; Wang, X.; Li, Y. A modified fruit-fly optimization algorithm aided PID controller designing. In Proceedings of the 2012 10th World Congress on Intelligent Control and Automation (WCICA), Beijing, China, 6–8 July 2012; pp. 233–238. [Google Scholar]
- Song, J.; Pan, H. PID control parameters optimize based on an immune fruit fly optimization algorithm. In Proceedings of the 2016 Chinese Control and Decision Conference (CCDC), Yinchuan, China, 28–30 May 2016; pp. 6383–6388. [Google Scholar]
- Jana, J.; Saha, H.; Bhattacharya, K. A review of inverter topologies for single-phase grid-connected photovoltaic systems. Renew. Sustain. Energy Rev.
**2017**, 72, 1256–1270. [Google Scholar] [CrossRef] - Ebrahim, R.; Miadreza, S.; João, P.S.C. Review of primary voltage and frequency control methods for inverter-based islanded microgrids with distributed generation. Renew. Sustain. Energy Rev.
**2018**, 82, 3225–3235. [Google Scholar] - Hu, J.; Duan, J.; Ma, H.; Chow, M.Y. Distributed Adaptive Droop Control for Optimal Power Dispatch in DC-Microgrid. IEEE Trans. Ind. Electron.
**2018**, 65, 778–789. [Google Scholar] [CrossRef] - de Souza, W.F.; Severo-Mendes, M.A.; Lopes, L.A.C. Power sharing control strategies for a three-phase microgrid in different operating condition with droop control and damping factor investigation. IET Renew. Power Gener.
**2015**, 9, 831–839. [Google Scholar] - Tayab, U.B.; Roslan, M.A.B.; Hwai, L.J.; Kashif, M. A review of droop control techniques for microgrid. Renew. Sustain. Energy Rev.
**2017**, 76, 717–727. [Google Scholar] [CrossRef] - Radwan, A.; Mohamed, Y. Modeling, Analysis, and Stabilization of Converter-Fed AC Microgrids with High Penetration of Converter-Interfaced Loads. IEEE Trans. Smart Grid
**2012**, 3, 1213–1225. [Google Scholar] [CrossRef]

**Figure 3.**The step–response curves of a single PI controller with different proportional coefficients.

**Figure 4.**The step–response curves of cascade PI controllers when one proportional coefficient is changed.

**Figure 8.**The online optimization process flowchart of the FOA step, then computation of the IE index.

**Figure 9.**The bestSmellbestIndex values of the offline FOA optimization simulation (the population is 100 and the iteration generation is 100). (

**a**) The bestSmellbestIndex1 optimal values curves. (

**b**) The bestSmellbestIndex2 optimal values curves. (

**c**) The bestSmellbestIndex3 optimal values curves. (

**d**) The bestSmellbestIndex4 optimal values curves.

**Figure 10.**Step–response results in the optimal and initial values conditions. (

**a**) Step–response of the d-axis. (

**b**) Step–response of the q-axis.

**Figure 11.**Poles and zeros comparison results. (

**a**) The poles and zeros of the initial control parameters. (

**b**) The poles and zeros after control parameter optimization.

**Figure 12.**The current output curves. (

**a**) The d-axis current comparison curves. (

**b**) The q-axis current comparison curves. (

**c**) The AC current output comparison curves of Phase A.

**Figure 13.**The active and reactive power output. (

**a**) The active power output comparison curves. (

**b**) The reactive power output comparison curves.

**Figure 14.**The bestSmellbestIndex values of the online FOA optimization simulation (the population is 100 and the iteration generation is 100). (

**a**) The bestSmellbestIndex1 optimal values curves. (

**b**) The bestSmellbestIndex2 optimal values curves. (

**c**) The bestSmellbestIndex3 optimal values curves. (

**d**) The bestSmellbestIndex4 optimal values curves.

**Figure 16.**The comparison curves of the system startup process. (

**a**) The active power output curves. (

**b**) The reactive power output curves.

**Figure 17.**Comparison startup process integral absolute errors (IAEs) of the original controller, online optimization controller, and offline optimization controller. The IAE1-P represents active power, the IAE2-Q represents reactive power, the IAE3-d axis represents the d-axis component, and the IAE4-q axis represents the q-axis component under the IAE index.

**Figure 18.**The active power output curves and d-axis current output curves. (

**a**) The active power output comparison curves. (

**b**) The d-axis current output comparison curves.

**Figure 19.**Comparison variable load process IAEs of the original controller, online optimization controller, and offline optimization controller. The IAE1-P represents active power, the IAE2-Q represents reactive power, the IAE3-d axis represents the d-axis component, and the IAE4-q axis represents the q-axis component under the IAE index.

**Figure 20.**Load mutation comparison curves. (

**a**) The active and reactive power comparison curves. (

**b**) The output current curves of online optimization. (

**c**) The current comparison curves of Phase A.

**Figure 21.**Comparison load mutation process IAEs of the original controller, online optimization controller, and offline optimization controller. The IAE1-P represents active power, the IAE2-Q represents reactive power, the IAE3-d axis represents the d-axis component, and the IAE4-q axis represents the q-axis component under the IAE index.

Optimum Variable | 100-Population | 200-Population | ||
---|---|---|---|---|

Optimal Value | Iteration Number | Optimal Value | Iteration Number | |

bestSmellbestIndex1 | 0.007284 | 9 | 0.007321 | 16 |

bestSmellbestIndex2 | 0.021197 | 7 | 0.021093 | 5 |

bestSmellbestIndex3 | 0.037699 | 31 | 0.037472 | 16 |

bestSmellbestIndex4 | 0.010301 | 7 | 0.010189 | 5 |

Controller Parameters | Initial Parameters | Optimal Parameters | |
---|---|---|---|

100-Population | 200-Population | ||

Kp1 | 0.5 | 0.5112 | 0.5177 |

Ki1 | 20 | 20.0196 | 20.0368 |

Kp2 | 0.5 | 0.4978 | 0.5296 |

Ki2 | 20 | 20.0212 | 20.0249 |

Kp3 | 0.5 | 0.4894 | 0.4886 |

Ki3 | 20 | 20.0202 | 20.0265 |

Kp4 | 0.5 | 0.5588 | 0.5482 |

Ki4 | 20 | 20.0397 | 20.0291 |

Dynamic Performance Indicators | Initial | Offline |
---|---|---|

Rise time (Id, s) | 0.143 | 0.115 |

Rise time (Iq, s) | 0.145 | 0.125 |

Rise time (P, s) | 0.147 | 0.115 |

Rise time (Q, s) | 0.147 | 0.115 |

Overshoot (Id, %) | 32.3% | 9.1% |

Overshoot (Iq, %) | 12.73% | 4.46% |

Overshoot (P, %) | 31.6% | 8.3% |

Overshoot (Q, %) | 12.3% | 3.3% |

Peak time (Id, s) | 0.302 | 0.2 |

Peak time (Iq, s) | 0.25 | 0.25 |

Peak time (P, s) | 0.306 | 0.205 |

Peak time (Q, s) | 0.25 | 0.24 |

Settling time (Id, s) | 1.151 | 0.38 |

Settling time (Iq, s) | 0.4 | 0.375 |

Settling time (P, s) | 1.146 | 0.353 |

Settling time (Q, s) | 0.405 | 0.346 |

Average steady-state error (Id, %) | 6.3% | 0.37% |

Average steady-state error (Iq, %) | 1.27% | 1.02% |

Average steady-state error (P, %) | 5.83% | 0.96% |

Average steady-state error (Q, %) | 5.87% | 1.1% |

Optimum Value and Controller Parameters | Original Value | Optimal Value |
---|---|---|

bestSmellbestIndex1 | 2.42 × 10^{−5} | 0.00373 |

bestSmellbestIndex2 | 2.2 × 10^{−3} | 0.07049 |

bestSmellbestIndex3 | 4.49 × 10^{−4} | −9.95 × 10^{−5} |

bestSmellbestIndex4 | 2.94 × 10^{−3} | −0.06804 |

kp1 | 0.5 | 0.4264 |

ki1 | 20 | 19.7319 |

kp2 | 0.5 | 1.1136 |

ki2 | 20 | 19.7449 |

kp3 | 0.5 | 0.1799 |

ki3 | 20 | 10.2169 |

kp4 | 0.5 | 0.8494 |

ki4 | 20 | 19.6006 |

**Table 5.**The key parameters comparison table of the active and reactive power initial step–response during the VSI startup process.

Dynamic Performance Indicators | Initial | Offline | Online |
---|---|---|---|

Rise time (P, s) | 0.0200 | 0.0184 | 0.0140 |

Average steady-state error (P, %) | 1.3% | 1.28% | 1.22% |

Overshoot (P, %) | 18.4% | 16.5% | 17.8% |

Rise time (Q, s) | 0.0230 | 0.0220 | 0.0123 |

Average steady-state error (Q, %) | 3.06% | 1.35% | 1.64% |

Overshoot (Q, %) | 18.7% | 13.7% | 18.3% |

Dynamic Performance Indicators | Initial | Offline | Online |
---|---|---|---|

Step value (I_{d}, A) | 10 | 10 | 10 |

Step value (P, kW) | 2 | 2 | 2 |

Rise time (I_{d}, s) | 0.01 | 0.01 | 0.01 |

Rise time (P, s) | 0.032 | 0.022 | 0.023 |

Overshoot (I_{d}, %) | 143% | 105% | 120% |

Overshoot (P, %) | 38.5% | 26% | 28% |

Peak time (I_{d}, s) | 0.04 | 0.03 | 0.031 |

Peak time (P, s) | 0.0085 | 0.042 | 0.047 |

Settling time (I_{d}, s) | 0.146 | 0.078 | 0.082 |

Settling time (P, s) | 0.157 | 0.087 | 0.092 |

Average steady-state error (I_{d}, %) | 19.3% | 10.1% | 9.8% |

Average steady-state error (P, %) | 11.1% | 4.9% | 5.1% |

Dynamic Performance Indicators | Initial | Offline | Online |
---|---|---|---|

Peak1 (P, kW) | 1.09 | 0.38 | 0.51 |

Peak1 (Q, kVar) | 0.53 | 0.54 | 0.53 |

Peak2 (P, kW) | 0.74 | 0.43 | 0.45 |

Peak2 (Q, kVar) | 0.66 | 0.83 | 0.82 |

Settling time1 (P, s) | 0.092 | 0.072 | 0.057 |

Settling time1 (Q, s) | 0.077 | 0.054 | 0.054 |

Settling time2 (P, s) | 0.073 | 0.05 | 0.046 |

Settling time2 (Q, s) | 0.089 | 0.053 | 0.053 |

© 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**

Dong, R.; Liu, S.; Liang, G.
Research on Control Parameters for Voltage Source Inverter Output Controllers of Micro-Grids Based on the Fruit Fly Optimization Algorithm. *Appl. Sci.* **2019**, *9*, 1327.
https://doi.org/10.3390/app9071327

**AMA Style**

Dong R, Liu S, Liang G.
Research on Control Parameters for Voltage Source Inverter Output Controllers of Micro-Grids Based on the Fruit Fly Optimization Algorithm. *Applied Sciences*. 2019; 9(7):1327.
https://doi.org/10.3390/app9071327

**Chicago/Turabian Style**

Dong, Runnan, Shi Liu, and Geng Liang.
2019. "Research on Control Parameters for Voltage Source Inverter Output Controllers of Micro-Grids Based on the Fruit Fly Optimization Algorithm" *Applied Sciences* 9, no. 7: 1327.
https://doi.org/10.3390/app9071327