Performance analysis of real-time PSO tuned PI controller for regulating voltage and frequency in an AC microgrid

Umbrin Sultana, Sajid Hussain Qazi, Nadia Rasheed, M. W. Mustafa Department of Electrical Engineering, NED University of Engineering and Technology, Karachi, Pakistan Departement of Electrical Engineering, Mehran University of Engineering and Technology Shaheed Zulfiqar Ali Bhutto Campus Khairpur Mir’s, Sindh, Pakistan Department of Computer Systems Engineering, University College of Engineering and Technology (UCE&T), Islamia University of Bahawalpur, Bahawalpur, Pakistan


INTRODUCTION
There is increasing importance of interconnecting renewable energy sources (RES) based distributed generators (DGs) with the conventional grid owing to increased power demand, technology advancement, and environmental issues. Above all, DG has attained momentum thus RES for example photovoltaic, wind, fuel cells, etc., are likely to play an important role to meet ascending power demands [1][2][3]. The cluster of DGs forms a microgrid (MG) that is interfaced with conventional power grid through a power electronics based voltage source inverter (VSI). Grid connected or islanding operation mode are the two modes of operation of MG [4]. However, these MGs generally utilize pulse-width-modulation (PWM) based VSI systems for interconnection with a grid which result in nonlinear V-I characteristics with high switching frequency [5]. As such, continuous improvement in the field of power electronics and digital control equipment is providing more options and better flexibility in integrating the RES based DGs to the conventional power grid.

1069
A basic illustration of a microgrid is shown in Figure 1 [6]. It is essentially required that such system has a robust controller to attain uplifted performance and to satisfy requirements of power quality while coupling micro sources with power grid. Currently, a closed loop current type nonlinear controller and an open loop voltage type linear controller are two main kinds of the current controllers usually utilized to control PWM-VSI based system. Such a system has become an essential part of modern power electronics converters. Both types of these controllers use the inner current feedback loop to have precise output performance [7,8]. The usual nonlinear controller used to interface VSI with 3-phase grid is hysteresis current controller (HCC). The HCC generates PWM signals by compensating current error with an adequate dynamic response. In this case, zero voltage vector cannot be generated because the control delay is independently controlling the current, causing a large ripple in current with increased total harmonic distortion (THD) [9]. A linear controller, space vector PWM (SVPWM) is a suitable controller which compensate an error in current through PI regulator or via an algorithm based on predictive control and separately generates PWM signals. SVPWM produces an excellent response of steady-state with low current ripples and a perfect sinusoidal output waveform. Moreover, because of some constructive features like constant switching, the pattern of switching and exemplary utilization of DC-link voltage, this arrangement can enhance the controller performance [10].
Additionally, the inner current control is generally interfaced with an outer power control loop in order to generate the reference value of voltage for PWM module. This power control strategy is essential to fulfill requirements of power quality. In grid-connected mode, DG generally use control strategy to regulate active and reactive power, while during islanding mode voltage-frequency (Vf) regulation control scheme is considered [11]. The focus of this study pertains to the fact that the DG unit needs to maintain the stability of the system voltage and frequency [12,13].
In recent times, researchers have investigated inner current control loop of power controllers for improved configuration of the microgrid. In [14,15], researcher has designed a controller which retain dynamic system stability and provide requisite design and analysis. A microgrid power control strategy is  [16,17] which comprise of the system analysis and comparison of the two different strategies for controlling power. The load sharing and system dynamics are reflected and the detailed description of controller is given, however, such system lacks in tuning the control parameters automatically to optimize the operation during sudden problems [8,18,19]. The five consecutive portions of the paper are divided as; mathematical foundation of grid connected VSI is presented in Section 2. The power quality requirements for an MG are discussed in Section 3. The detailed explanation of the control system is presented in Section 4. In Section 5, the outcome from simulation results are checked and compared to validate the objectives of study. Lastly, in Section 6 conclusions drawn from this study are summarized. Figure 2 illustrates the VSI based three phase grid model along with an LC filter considered in this study. It may be noted that corresponding resistance, inductance, and capacitance of filter are shown by Rs, Ls and C, while the grid is sensed by inverter itself. Where Vs is the grid voltage. The system equivalent state-space equation in the three-phase abc frame are given by [20] are as under:

RESEARCH METHODOLOGY 2.1. Mathematical modelling of grid connected VSI
utilizing Park's transformation, (1) can be stated in dq reference frame as: where ω is angular frequency, further Park's transformation is defined as: where, where, ∅ = (ωst+∅0) which is synchronously rotating angle and θ0 is the initial value of angle.

Requirements of power quality in microgrid
It is essentially required that in order to maintain seamless shift of operation modes of MG its consistent performance during islanding in terms of frequency and voltage and with respect to demand of the load is maintained. For this reason, DG unit must adopt Vf control mode, so as to maintain voltage and frequency within the threshold limits by following load demand and satisfy above-mentioned requirement of operating in two different modes [17]. The anticipated controller in block diagram illustration is shown in Figure 3. It is pertinent to mention that value of reference voltage and frequency can be defined locally or by the microgrid control centre (MGCC) [6] and that phase-locked-loop (PLL) can be used to measure frequency of system, and the V_rms is given by [14]:

Suggested control strategy
The suggested strategy for a VSI based grid connected system is shown in Figure 4. It is evident that the scheme for controller consists mainly three blocks which are: power controller, the current controller and PSO set of rules for automatic tuning of power controller parameters. The detailed description of each block is discussed in subsequent sub-sections.

Power control technique
This is considered as outer control loop of proposed system which is utilized to generate reference current values * and * . Consequently, the power output of inverter will be of high quality if change in the trajectory of reference current is slow [21]. Owing to limitation of conventional PI controller, the gain values are set at a fixed value (by trial and error method), hence, PI controller will not be capable to regulate control objectives automatically. With this arrangement, a PSO based self-tuning method is applied to achieve better control objectives. In Vf controller, voltage and frequency are two foremost goals which need to be regulated during islanding mode. In this instance, regulation of frequency and voltage depends on their reference values (fref and Vref). Further, both controllers PI and PSO-PI separately generate control objectives, but since the PSO is an intelligent process thus it will provide optimal control parameters to yield best reference current vectors. Subsequently, the current reference values can be expressed as: * = ( − ) ( + ) (7) * = ( − ) ( + )

Current control technique
The right side of Figure 4 illustrates an inner loop of current control, considered in view of SRF. In order to track accurately, the short transients in inverter output current is of the significant importance in this technique. This technique is usually used to minimize error in inductor impulse current when a voltage is applied to inductive R-L circuits. In this case, for detecting the phase angle, PLL is used in order to implement Park's transformation. Furthermore, two PI controllers are used in the system to reduce the current error. The current loop of inverter and feed forward voltage loop of the grid are utilized to enhance dynamic and steady state response. Subsequently, controller output signal is reference voltage in synchronously rotating dq frame. It is then trailed by inverse Park's transformation and Clarke's transformation, all together that controller yields voltage reference signal in αβ axis, producing SVPWM six pulse to trigger IGBT inverter. Besides, SVPWM technique also confirms that the desired value of voltage is given by controller and with less THD.
Moreover, low pass filter is used to obtain the inductor current [7]. In this study, first order transfer function is presented as LPF and is given by:  (12) where f is the value of input filter, fl is the filtered value, and Ti is the time constant.

Algorithm of particle swarm optimization (PSO)
In this paper, the upper and lower band of search scope are considered as, 1 = 2 = 1, = 0.4 and = 0.9. Further, the steps of applying PSO and their parameters are given in Table 1 and Table 2 as under.
1-Initialize random position and velocity of particles, 2-For K iterations, 3-Update weight of inertia by (15), 4-For every i particle of the population, -At iteration K update positions and velocities of all particles by (13) and (14), respectively, -Calculate the fitness value of all particles, -If fitness <local best position, then update and local best position, = ; -Local best position = fitness , -If local best position < global best then update and global best position, = ; -Global best position= local best position, 5-New particle, 6-New iteration, 7-Solution is

SIMULATION RESULTS
The proposed controller with the model of a VSI based three-phase power grid scheme is simulated in MATLAB/Simulink environment shown in Figure 2 of this article. A MATLAB/M-file program is used to implement the algorithm of PSO. The values of model parameter are shown in Table 3 [6,22] which are in per unit (p.u.) system and considered in this study.

Regulation of voltage and frequency
In order to validate the proposed structure of the controller, the model initially set to operate in the grid mode wherein grid is responsible for maintaining MG voltage and frequency profiles. At 0.5 s, the MG shifts to the islanding mode. At this point, MG adopts Vf control mode based on conventional PI with fixed gain values ( = 6.2836, = 7.3694) [21,23] and with PSO-PI controller separately in order to reduce voltage drop and to avoid uncertainty in frequency owing to abrupt transformation in operation mode and load change. As per (7) and (8), Vref and fref of proposed scheme are set to 1p.u and that operational behavior of PI controller and the results gained from PSO algorithm are already discussed in Section 4. As such, the obtained results of voltage and frequency with both PI and PSO-PI techniques are shown in Figure 5.

Dynamic and steady-state response
To confirm the dynamic performance of the proposed control strategy, the output inverter current is braked two periods. Initially, at 0.5 s when the microgrid is shifted to islanding, then when the load is increased at 0.7 s. Figure 6 shows the output line current of inverter with each PI and PSO-PI control strategies both illustrated separately. It is evident that in case of PSO-PI strategy, short transient time can be observed and the steady state situation of current is attained within two cycles as compared to PI regulator alone in which current waveform is having harmonic contents and is not a perfect sinusoidal.
Further, Figure 6 below represents the inverter output current and phase voltage of MG to highlight the steady-state response. In this study, the output filter for the inverter is used to bypass harmonics resulting from switching, and a low pass filter with low cut-off frequency is used to enable acceptable attenuation for the harmonic content in the dq current vectors. As such, it is evident from Figure 5, that outcome waveforms, both of voltage and current, are of high-quality and perfect sinusoidal shape. Correspondingly, Figure 5 shows the THD spectrum of the inverter line current and MG phase voltage. It is significant to mention that THD values of phase voltage and inverter current, which are 1.77% and 1.20% respectively, are well within the limits specified in the relevant standard of IEEE 1547-2003 [24,25].  Figure 6. Transient in inverter output current during islanding mode and load change

CONCLUSION
Microgrids control strategies are attaining highest ever attention. In this context, a smart strategy for control of an inverter based DG unit has been proposed in this study. The objectives of such strategy are to regulate voltage and frequency in an autonomous microgrid system. The proposed scheme has been implemented in a MG system where an internal current control loop and external Vf control loop are present. As such, conventional PI controller and the PSO-PI controller have been associated separately with the Vf control mode to regulate frequency and voltage by exercising a real time self-tuning during the transition of MG to islanding mode or during a varying load.
In addition, the proposed control strategy also examines the dynamic and steady-state response of the system and mitigate the harmonics of inverter output current. The performance of proposed controller with PSO algorithm has an exceptional response as compared to the controller with the conventional PI regulator in regulating the MG voltage and frequency. The PSO-PI strategy also attains satisfactory THD level within short transient time. Therefore, this controller is generally found to be very appropriate and can be used in MGs with more DG units while considering the power sharing issue.