Proportional-Integral Controllers Performance of a Grid-Connected Solar PV System with Particle Swarm Optimization and Ziegler–Nichols Tuning Method

: This paper deals with photovoltaic (PV) power plant modeling and its integration into the medium-voltage distribution network. Apart from solar cells, a simulation model includes a boost converter, voltage-oriented controller and LCL ﬁlter. The main emphasis is given to the comparison of two optimization methods—particle swarm optimization (PSO) and the Ziegler–Nichols (ZN) tuning method, approaches that are used for the parameters of Proportional-Integral (PI) controllers determination. A PI controller is commonly used because of its performance, but it is limited in its effectiveness if there is a change in the parameters of the system. In our case, the aforementioned change is caused by switching the feeders of the distribution network from an open-loop to a closed-loop arrangement. The simulation results have claimed the superiority of the PSO algorithm, while the classical ZN tuning method is acceptable in a limited area of operation.


Introduction
Due to increasing environmental awareness, legal regulations and international agreements that require an improvement of energy efficiency and a decrease of carbon emissions, there is a need to raise the share of renewable energy sources in the total energy balance of the community. Renewable energy sources (such as biomass, water energy, wind energy, solar energy, etc.) continue to set record levels for investment. These sources are known for being an "endless" source of energy that, with correct exploitation, could be able to meet the world's ever-growing needs. So, an ideal energy source should be renewable and should have a minimal effect on the environment. Among the renewable energy sources, solar energy is considered the most encouraging candidate and is expected to be the base of a sustainable energy economy, as sunlight is the most generous resource [1,2]. Solar energy and its related PV power plants, where the system directly converts solar energy into electricity, have become one of the most important renewable energy sources [3,4]. The generated electrical energy depends mainly on solar radiation reaching the PV modules G, the temperature T, as well as the material and the inverter types [5,6]. PV systems are classified into grid-connected and off-grid application varieties. Off-grid PV systems have a big potential for economic application in the unelectrified areas of developing countries. On the other side, grid-connected PV systems use various electronic power devices, mainly the direct current (DC) boost converters and inverters, to convert electricity from DC to alternating current (AC), and afterward supply the produced electricity to the electrical grid [7].
Of course, from a functional point of view, a PV system may face substantial deviations of its output power under changeable weather conditions. They may be responsible for power fluctuations and voltage rises in the system, thus resulting in problems of grid control [8][9][10][11][12]. Grid-connected PV systems based on voltage-oriented control (VOC), with pulse width modulation (PWM) topology, generate some harmonic distortions which can be rectified using an LCL filter. As a filter may cause some resonance peak, it influences the stability of the system; therefore, a proportional-integral (PI) controller is utilized to improve the system stability [9,12].
Several works have concentrated on the control strategy for grid-connected PV systems [13][14][15][16][17][18][19], considering a voltage regulation in the distribution system [15], a VAr control strategy with PV inverters in distribution networks to provide VAr support [16] or a control strategy to mitigate the voltage fluctuations [18]. Some of the results indicate that the control strategy is able to operate under the various operating modes of PV systems, while, within a limited area, some of the conditions can be improved even without additional regulators. The aforementioned various operating modes are an excess of PV power generation, normal condition, low or no PV power output or passing clouds [15,16]. An improved, automatic, coordinated voltage control strategy performed by the authors in [18] combines the advantages of several controls which demonstrates a better control performance, especially in extreme environments. Furthermore, different strategies for controlling the distributed generators in terms of a current harmonic compensator [20][21][22] or unbalanced three-phase loads have been discussed and analyzed [23]. It is challenging to suppress the harmonic content below a pre-set value or to compensate for unbalanced loads [20]. Similarly, a novel energy-management method for a grid-connected PV inverter is investigated. Results indicate that by using this controlling structure, overall power loss diminishes by about 18% [23].
However, in a grid-connected system, a generated resonance peak is often related to the feeder's arrangement, where the feeders in the open-loop arrangement are shifted to closed-loop to upgrade the reliability of the power supply [24][25][26][27][28][29]. Some earlier works have dealt with upgrading primary feeders from radial and open-loop to a normally closed-loop arrangement, but not in terms of a controlling structure. The contributions were correlated with the voltage profiles, power flows and short-circuit capacities of the feeders under both the tie-breaker normally open or occasionally closed conditions; measurements and the impacts of the upgrading of system type on the distribution system and customers were assessed [24,[26][27][28]. Unlike the aforementioned paper, our research fills some gaps by providing a controlling structure related to both open and closed-loop arrangements of feeders. A proportional gain and integral time constant of the PI controller are set by the ZN tuning method approach and are also used as the design variables of the optimization problem, where their values influence the system feedback. The procedures are performed for both the open-loop as well as closed-loop arrangement of feeders.

Model of PV Power Plant
A grid-connected PV system is shown in Figure 1. It is composed of a PV array (solar cells), a boost converter with a maximum power point tracker (MPPT), an inverter with VOC and a transformer (TR). The AC power is delivered to the grid with the help of the LCL filter. The mathematical model of the solar cell, boost converter with MPPT, VOC and LCL filter are briefly described in Sections 2.1-2.3.

Solar Cell
Equation (1) represents an important part related to the solar cell model. The diode saturation current I sat and the Boltzmann constant k are involved in the model, where q is the electron charge and Q d is the quality factor. The equivalent circuit of a solar cell is shown in Figure 2 [10], where U is the diode voltage, I PH stands for the photocurrent, I D is the diode current, while parallel R P and series resistance R S represent the leakage currents in the diode and the losses related to the connections and the contacts. Symbols G, T and DI stand for the solar radiation level, temperature and diode, respectively, while I C and U C are the current and voltage of the solar cell. Equation (1) is usually modified in terms of several solar cells consideration [10,30].

Boost Converter with MPPT
A boost converter is a DC-DC power converter, where an output voltage U OUT is higher than its input voltage U INP . Important boost converter equations and a schematic presentation are shown by Equations (2)-(4) and Figure 3 [31,32]. When the switch (SW) is switched on, the current flows through the inductor L BO and energy is stored in it, while during switch-off the input voltage and the voltage across the inductor are in series. These voltages charge the output capacitor C BO to a voltage higher than the input voltage. In that sense, the key ratings targeted for the converter design are a rated power between 1.5 kW and 6 kW, an input voltage range between 200 V and 600 V, an output voltage of 600 V and an efficiency approximately equal to 98% [33]. Values of L BO and C BO could be defined after the desired inductor current ripple ∆i L , the desired output voltage ripple ∆u OUT and minimum switching frequency of boost converter f S are chosen. At the same time, the input voltage U INP and desired output voltage U OUT should also be prescribed. The first step is to define the duty cycle D (4) for the minimum input voltage and the maximal output current i OUTmax necessary for the application [32]. After that, the values of both L BO and C BO could be calculated by Equations (2) and (3). The output power of a solar cell is also a function of the voltage and current product. By varying one or both parameters the output power can be maximized. In that sense, the PV system output power can be increased by using a special controller connected to a DC-DC converter for a tracking system. However, the maximum power point (MPP)-at which the complete PV system behaves with maximal efficiency and produces its maximal output power-changes due to the nonlinear characteristic of PV modules, but can be located with MPPT controller [19,34].

VOC and LCL Filter
This subsection deals with the application of the VOC method to LCL filter-based systems using a set of current measurement blocks. To reduce some higher harmonics close to the switching frequency, occasionally, a high value of input inductance is utilized. However, for implementations over several kilowatts, it becomes too expensive to realize a higher-value filter, while the system's dynamic feedback may become too low. A helpful solution for this problem is to use an LCL filter ( Figure 4), with the inductance at the inverter side (L i ), the filter capacitor (C f ) and at the transformer side (L s ). In this manner, a suitable result could be obtained in the range of powers up to hundreds of kVA, while still applying some relatively small values of inductors and capacitors [9,12,[35][36][37]. Stability is emphasized with respect to some of the dissimilar ratios of control frequency and resonance frequency of the LCL filters. These are crucial parameters from a control point of view as well as system design. It should be noted that the grid-connected inverter tied with the LCL filter [14,38] is often applied with disable to realize the precise control of a system. Normally, the balanced inverter consists of six switches and forms a three-phase system (Figure 4a). In practice, the asynchronous switching condition for the upper and the lower switches occurs if the gate-driving circuits are not parametrically symmetrical [39]; therefore, the results might show in the form of equalizing currents. This is not the case when the star-connected transformer has a neutral point solidly earthed (Figure 4b, [14]). As presented, the low-voltage winding of the transformer (TR) is con-nected in delta (∆), while the high-voltage winding is connected in star (Y) with the neutral point connected directly to the earth.
The basic structure of the VOC strategy is shown in Figure 5. Input variables are the current and voltage measured at the transformer's high-voltage side (I TR , U TR ), while the voltage of the DC link U DC is measured and compared to a reference value (I q,ref and U DC,ref ). The reference of the reactive current component I q,ref is set to 0, thereby seeking a unity power factor. Within transformation, the phase-locked loop (PLL) is used to determine the angle of transformation from three-phase voltages. The grid voltage is transformed in the dq coordinates system, while its output generates commanded voltage source control (VSC) voltages. Such an approach allows the full use of the advantages of PI controllers [19,40]. After backward transformation, the three voltages are delivered to PWM, which generates switching signals for an inverter [40,41]. Procedures for the controller's parameters determinations are based on different methods, such as the Ziegler-Nichols method or even on the optimization algorithms applications [9,13,19,34,[42][43][44]. Both procedures are used in this paper.

Open and Closed-Loop Operation
The analyzed medium-voltage network is presented in Figure 6. It includes a substation with two 110 kV/20 kV transformers TR I and TR II and two feeders (Feeder 1 and 2) supplied by a high-voltage (HV) network. Measurement points are denoted by M, SW is a switch and MVL stands for the medium-voltage line, while Ld and RS stand for the load and a renewable source of energy. The voltages and currents are studied at the low-voltage side of the transformers. The proposed scheme was chosen because a various specter of measurements has been performed with it in the past [19,26,27,29]. The analyzed medium-voltage network works well, even in the case of some experiments on different combinations of loads and renewable sources of energy [19]. In general, a system, apart from electrical sources, involves essential dynamic properties: a capacitance (C) as a property of a device to store electrical charges, an inductance (L) as a property of a current-carrying conductor that generates a magnetic field around the conductor and resistance (R) as a measure of the opposition to the current flow. The current, for a particular set of R, L and C, depends on source frequency and the total resistance of the circuit. The current first increases and reaches the maximum value and then decreases with source frequency. The particular value of frequency f, for which the current I reaches the maximum, is called resonance frequency ( Figure 7); when this occurs, the circuit is termed a resonance circuit. The feeders in the open-loop arrangement are occasionally modified to the closed-loop arrangement to curtail the power losses generated by an electric power transmission, to upgrade voltage profiles in the feeders with the distributed generation or to increase the power quality and reliability of the power supply [24,29]. Since the total system resistance is dependent on the resistance inserted directly into the network, it could be found that when feeders in the open-loop arrangement are modified to the closed-loop arrangement, that the current through the circuit is changed. In a changed arrangement there becomes a new frequency point where the inductive reactance of the inductors becomes equal in value to the capacitive reactance of the capacitors.

Controller Tuning
The PI controller generates an output signal y(t) proportional to both input signal x(t) and integral part (5).
After the reference signal is compared to the actual one, an error signal is contributed to the PI control [33,41]. By choosing an integral (K i ) and proportional gain (K p ), the desired response can be fulfilled. The process of choosing a controller parameter to match some particular performance specification is known as controller tuning. The suitable values of PI controllers were often set by trials-errors-based proceedings, while ZN suggested that guides for tuning PI controllers are found in the experimental step response. This non-systematic and hard action becomes more difficult and time-consuming, particularly in complex applications. So, the formulation of controller tuning as an optimization problem is a promising resolution.
First, for obtaining the closed-loop performance parameters with PI control, the gain parameters are required where the ZN reaction curve method is applied. Likewise, a step response in the expression of an S-shaped curve in Figure 8 is produced for the PV system, where the solar radiation is stepped from 0 to 250 W/m 2 (so-called lower-tuning ZN procedure (A)) and from 0 to 500 W/m 2 (higher-tuning ZN procedure (B)), respectively. Second, both integral and proportional gains of the PI controller are set as the essential variables inside of the optimization process. In this paper, an application of the Particle Swarm Optimization (PSO)-based PI control strategy is suggested to upgrade the dynamic performance of the analyzed PV systems [19,34]. The optimization procedure is performed once at the beginning of the operation. It is initialized with a population of random solution particles that are linked with a velocity v and position s. In this sense, the solution particles fly through the search area with velocities that are dynamically balanced within a process. All of the solution particles have objective values evaluated by the objective function. The solution particle's condition is modified according to the next three principles [34]: (1) to hold its inertia; (2) to adjust the solution particles' position according to its most optimal position; (3) to adjust the solution particles' position according to the swarm's most optimal position. So, the individual particles update their velocity v i,new by the velocity (Equation (6)) where i is the number of particles, v i,old represents the old velocity, while P best,i and G best denote the best solution of particle i and the best solution of all particles at a certain point. Coefficients c 1 , c 2 are the acceleration parameters and R 1 , R 2 are the random numbers distributed between 0 and 1. In our case, the old position of the particles s i,old is adjusted according to an integral and proportional gain of the PI controller as shown in [19].
Afterward, the position of each particle s i,new will be updated according to (7), [13].

Results and Discussion
The procedure described in previous sections was applied on a 100 kW PV power plant, where a 100 kW, 0.24/20 kV output transformer was used [19]. Within the procedure (∆u OUT = 2%, f S = 4000 Hz, ∆i L = 3%, U INP /U OUT = 250 V/500 V), L BO = 3.68 mH, C BO = 589.5 µF and all of the filter parameters L i = 0.1833 mH, L s = 0.0916 mH and C f = 276.3 µF were set, while with the ZN reaction curve method and PSO procedure [19] the parameters of PI controllers were determined. In the case of the ZN reaction curve method, both lower and higher tuning ZN procedures were applied inside of the calculations. For example, results obtained by the lower Ziegler-Nichols procedure were tested with the step responses on two different solar radiation (G = 400 and 800 W/m 2 , Figure 9a) levels, where results are presented in Figure 9b,c (G = 400 W/m 2 (A) and G = 800 W/m 2 (B)). In this manner, MPPT currents i MPPT , and powers P 1 at the measurement point M1 ( Figure 6) are shown. Better results are obtained for the lower value of solar radiation G = 400 W/m 2 since the ZN procedure is set for the lower radiation step (Figure 8). Results obtained by both ZN and PSO methods, within the same computational time, are presented in Figures 10-15. During calculations, the solar radiation G changed on the way presented in Figure 10a, where a positive and negative change of G is triggered in higher and lower specters of solar radiation. Five different powers (P 1 , P 3 , P 31 , P 4 and P 41 ) are observed for five different medium-voltage network points (M1, M3, M31, M4 and M41) ( Figure 6). Results are presented for the medium-voltage feeders in the open-loop arrangement, as well as the changes to the closed-loop arrangement by an appropriate SW position ( Figure 6). Figures 13-15 demonstrate that in the case of the ZN method, both the lower-tuning (LT) and higher-tuning ZN procedures (HT) were compared.      In general, it is obvious that in the case of higher solar radiation the power at points M3 and M4 ( Figure 6) was lower, where part of the energy for the upper feeder (Feeder 1, Figure 6) is delivered from the PV power plant. It is clear that some of the provided results obtained by the ZN method are highly unreliable (low agreement with the ideal valuesar 2 ), especially in the case of solar radiation levels higher than 500 W/m 2 . Otherwise, the results obtained by the PSO gave some highly acceptable results, even with the agreement higher than 99% (Table 1). In Table 1, ZN-LT and ZN-HT stand for the lower-tuning and higher-tuning ZN procedures, respectively. Results of the agreement to the ideal responses are worse for the applied lower-tuning ZN procedure (under 60%), while higher-tuning ZN procedures are mainly acceptable (above 90%), but still lower in comparison to PSO results. At the same time, it is clear that the agreement results for the closed-loop arrangement are lower than for the open-loop arrangement, while not the case for PSO results, so the procedure could be acceptable in general.  Table 1, about agreement values for the partly observed solar radiation levels.
To obtain an answer, the upper and lower specter of solar radiation levels were used (Tables 2 and 3). In this sense, the limit value of solar radiation was set to 500 W/m 2 . The results obtained by ZN-HT and ZN-LT were higher than 90% for the lower specter of solar radiation levels (ar 1 and ar 3 ), while results for the upper specter of solar radiation levels could be highly unacceptable in the case of ZN-LT (41.25 and 38.20%).

Conclusions
In this paper, the specific PV power plant model was included within the mediumvoltage distribution network as a part of the distribution network during radial and closed-loop operations. So, in the case of available solar radiation, part of the energy for the loads was delivered from the PV power plant. The LCL filter represents an important part of the model, with its main drawback of offering resonance peaks at the resonant frequency, which could make the system unstable. At the same time, the PI controller is commonly used to control the converter because of its good performance, but at the same time, it also has the drawback of not effectively controlling if there is a change in the parameters of the system. In our case, the aforementioned change is caused by switching from the open-loop to the closed-loop arrangement. Time responses of a system with different PI controller-tuning methods show that a PSO-based approach has a great effect on system performance. An additional comparison of the classical Ziegler-Nichols methods shows that the results are partly comparable with those obtained by an aforementioned PSO-based tuning approach but with less computational complexity and a remarkable reduction of the design time (shorter calculation and simulation times, less complicated programming, less laborious to implement, etc.) and resources (different licensing programs, development tools, etc.). The simulation results have claimed the superiority of the PSO algorithm to systematically tune the PI controllers, while classical Ziegler-Nichols approaches are acceptable mainly in a limited area. In general, PSO tuning leads to better performance with a reduced amplitude peak of overshoot. It is obvious that for the closed-loop arrangement of feeders, the agreement results of the classical approaches are lower than those of the open-loop arrangement, while also not the case for PSO results, so the procedure could be generally acceptable.

Conflicts of Interest:
The authors declare no conflict of interest. The funders had no role in the design of the study; in the collection, analyses, or interpretation of data; in the writing of the manuscript, or in the decision to publish the results. random numbers (PSO) c 1 , c 2 acceleration parameters (PSO) P best,i best solution of particle i G best best solution of all particles