In rural areas which are located far from the electrical grid, renewable energ y systems such as photovoltaic (PV) energy are investigated. The most popular PV application is solar water pumping for irrigation. DC-DC converter and maximum power point tracking are used because the PV modules output var ies widely due to varying weather conditions. The water pump is driven by a three phase induction motor through a voltag e source inverter (VSI). However, the control of induction motor is known to be difficult because it's highly non -linear and time variant. One method to mitigate this is by using vector control techniques to control the VSI as they offer a n umber of benefits including speed control and regulation over a wide range and fast dynamic response. The proportional - integral (PI) controller is most commonly used in the speed control loop of vector control. This paper deals with the design of the speed PI controller parameters (gains) using particle swarm optimization (PSO) technique and compares it with the conventional Ziegler-Nichols (ZN) method. Different objective functions have been proposed which are used to evalu ate the optimization algorithm. The optimum solution mainly converges to a minimum error which affects the control parameters such as the maximum overshoot, rise time and settling time of the system. Simulation results are obtained using Matlab/Simulink program for photovoltaic pump application during load variation (pump head and flow rate variation). The resu lts show the advantage of the PSO-based optimization approach. Keywords: indirect field oriented control, objective function, particle swarm optimizati on, photovoltaic pump, PI controller. 1. INTRODUCTION Solar power generation is continuously increasing in many power systems around the world in an effort to increase renewable energy penetration as it offers an excellent solution for providing sustainable and clean energy. The most common PV application is solar water pumping (Chandel et al., 2015; Moubarak et al., 2017). The dc output voltage of PV arrays is connected to a dc/dc converter using a maximum power point tracking (MPPT ) controller to maximize their produced energy (De Brito et al., 2013; Forouzesh et al., 2017). Then, that converter is linked to a dc/ac voltage source inverter (VSI) to let the PV system push electric power to the ac utility or to feed ac loads (Wu, 2006). Indirect field oriented control (IFOC) technique is used to control the VSI fed three phase induction motor drive system as it provides an excellent performance in terms of static and dynamic speed regulation and rapid response to transients (Wu, 2006; Moubarak et al., 2018). The Proportional – Integral (PI) controller in the IFOC speed control loop is used to calculate the torque reference by comparing the speed reference with the measured rotor speed. Tuning of the PI controller gains is very important because they have great effect on the control system performance and stability. Over the years, several PI tuning methods have been proposed. Conventional methods include Ziegler-Nichols, Cohen-Coon, Astrom & Hagglund and many others (Pedret et al., 2002). However, these conventional techniques don't provide good tuning and often result in a high overshoot, long settling time and slow transient response. To overcome these drawbacks, several artificial intelligence and random search techniques such as neura l networks, fuzzy systems, genetic algorithm, simulated annealing, particle swarm optimization, etc., have been employed (Gaing, 2004). In this paper, the particle swarm optimization technique (PSO) is used due to its simplicity and ease of implementation, and it can generate a high quality solution within shorter calculation time and stable convergence characteristics than the others (Liang et al., 2006). Particle swarm optimization technique is a modern algorithm that has been developed from the behavior of organisms such as fish schooling and bird flocking. The technique conducts search using a population of particles. Every particle updates its velocity and position in accordance to its own experience and other particles ’ experiences. Each particle's position represents a candidate solution to the problem thus has more efficiency for finding the optimal solution (Kennedy and Eberhart, 1995; Shi and Eberhart, 1998). The convergence of the PSO algorithm toward the global optimal solution is guided by the objective function. The most commonly used functions are the time domain integral error performance criteria (Chin et al., 2004), but these criteria have their own advantages and disadvantages. These drawbacks were overcome with a performance criterion in which the unit step time parameters are used with a single weighting factor (Gaing, 2004). This paper is organized into sections as follows: Section 2 gives an overview of the proposed system. Section 3 presents the indirect field oriented control of an induction motor. The conventional Ziegler-Nichols (ZN) method is described in section 4. Section 5 presents the particle swarm optimization (PSO) method. Multiple performance assessment criteria are presented in section 6. Section 7 shows the simulation results and compares the speed response due to tuning using ZN and PSO with various assessment criteria. Furthermore, the PV pump performance is observed over VOL. 13, NO. 24, DE CEMBER 2018 ISSN 1819-6608 ARPN Journal of Engineering and Applied Sciences ©2006- 2018 Asian Research Publishing Network (ARPN). All rights reserv ed. www.arpnjournals.com 9319 various weather and loading conditions. Section 8 concludes the paper with merits of the proposed syste m. 2. OVERVIEW OF THE PROPOSED SYSTEM The proposed photovoltaic water pumping system is shown in Figure-1, and it has the following elements: Figure- 1. Proposed PSO optimized photovoltaic water pumping system.  PV Array that converts the solar irradiation into DC power. The PV array used consists of 5 Series- connected modules per string and 5 Parallel strings in order to meet the load needs. AXN-P6T170 PV module manufactured by Auxin solar (Auxin Solar INC) is taken as the reference module for simulation and it has the following electrical specifications as shown in Table- 1. Table- 1. Electrical characteristics data of PV module taken from the datasheet. Parameter Value Maximum Power 169.932 W Open Circuit Voltage (Voc) 28.8 V Voltage at Maximum Power Point (Vmpp) 23.8 V Temperature Coefficient of Voc ( 𝛽) - 0.37 (% / ºC) Cells / Module 48 Short Circuit Current (Isc) 7.72 A Current at Maximum Power Point (Impp) 7.14 A Temperature Coefficient of Isc ( 𝛼) 0.111 (% / ºC)  Boost DC-DC Converter which boosts up the PV voltage to the predetermined levels. The boost converter parameters shown in Table-2 were calculated using the equations given in (Mohan et al., 2003). Table- 2. Boost converter and input filter parameters. Parameter Value Inductor (L) 4.73 e−3 H Capacitor (C) 2.26 e−4 F Input Filter Capacitor (Cin) 1.9 e−3 F  Maximum Power Pont Tracking (MPPT) that tracks the PV optimized operation point for power extraction by controlling the boost converter duty cycle. The MPPT technique used in this paper is the perturb and observe (P&O) method (De Brito et al., 2013).  VSI that converts the DC power to AC power.  Motor Control Unit that controls the speed and torque of the induction motor using indirect field oriented control which in turn controls the pump performance. Also, the particle swarm optimization algorithm is employed.  Motor-Pump set which is a three phase induction motor driving a centrifugal pump of type (LKH- / LKHP-/ LKHI-60, 50 Hz) manufactured by Alfa Laval (Alfa Laval Corporate AB). The motor parameters (Moubarak et al., 2017) are given in Table- 3. Table- 3. Three phase induction motor parameters. Parameter Value Rated Power 4 Kw Rated Line to Line Voltage 400 V Rated Frequency 50 Hz Number of Poles 4 Stator Resistance 1.47 Ω Stator Leakage Reactance 1.834 Ω Rotor Resistance 1.393 Ω Rotor Leakage Reactance 1.834 Ω Magnetizing Reactance 54.1 Ω Moment of Inertia 0.012 Kg.m² Rated Speed 1425 RPM Rated Torque 26.8 N.m Efficiency 86.6% 3. INDIRECT FIELD ORIENTED CONTROL Field oriented control principles applied to an induction motor are based on the decoupling between the current components used for generating magnetizing flux VOL. 13, NO. 24, DE CEMBER 2018 ISSN 1819-6608 ARPN Journal of Engineering and Applied Sciences ©2006- 2018 Asian Research Publishing Network (ARPN). All rights reserv ed. www.arpnjournals.com 9320 and torque (Wu, 2006). This is done by performing the transformation from three phase (abc) to d-q rotating reference frame using Clarke and Park transformations. This allows the induction motor to be controlled as a simple DC motor. The field oriented control utilizes the stator current components as control variables. The d- component of the stator current acts on the rotor flux, whereas the q-component is proportional to the motor torque as the control of the motor flux is obtained indirectly by controlling the motor currents. Considering the d-q model of the induction machine in the reference frame rotating at synchronous speed ωe. The ids component of the stator current would be aligned with the rotor field, and the iqscomponent would be perpendicular toids. In indirect field oriented control (IFOC), the rotor flux angle θf is obtained from detected rotor position angle θr and calculated slip angle θsl. A typical block diagram of the IFOC with current controlled VSI is shown in Figure- 2. Figure- 2. IFOC with a current regulated VSI. Since the rotor speed ωris directly measured, the rotor flux angle θfcan be found from: θf= ∫(ωr+ ω sl) dt (1) The angular slip speed (ω sl= ω e− ω r) can be derived from the motor synchronous reference frame model. d dtλr= −R rir− jω slλr (2) Where is&ir are the stator and rotor currents, respectively; Rr is the rotor winding resistance; λr is the rotor flux; Lr&Llr are the rotor self and leakage inductances, respectively; Lm is the magnetizing inductance; and P is the number of poles. From the rotor current: ir= 1 Lr(λr− L mis) (3) Lr= L lr+ L m (4) ؞d dtλr= −Rr Lr(λr− L mis)− jω slλr (5) λr+ τ r(d dtλr+ jω slλr) = L mis (6) Where τr is the rotor time constant, and equals: τr= Lr Rr (7) Dividing Equation (6) into the d-q axis components and taking into account the rotor flux orientation (j λqr= 0 &λ dr= λ r): λr+ τ r(d dtλr) = L mids (8) ωslλrτr= L miqs (9) So ωsl= Lmiqs λr τr (10) From Equation (8) and since the rotor reference flux λr∗is normally kept constant during operation (d dtλr∗= 0) : VOL. 13, NO. 24, DE CEMBER 2018 ISSN 1819-6608 ARPN Journal of Engineering and Applied Sciences ©2006- 2018 Asian Research Publishing Network (ARPN). All rights reserv ed. www.arpnjournals.com 9321 ids∗ =λr∗ Lm (11) The q-axis current reference iqs ∗ can be obtained from the electromagnetic torque equation: Te=3 2P 2Lm Lr(iqs λdr− i ds λqr) (12) Taking into account the rotor flux orientation: iqs ∗=Te∗ KTλr∗ (13) Where KT=3 2P 2Lm Lr (14) Let C = K Tλr∗ ,so i qs ∗=Te∗ C (15) Where Te∗ is the reference electromagnetic torque. Speed controller The speed PI block is an ordinary PI regulator with the speed error signal calculated from the comparison of the speed reference value ( ω𝑟∗) and the actual speed (ω𝑟) as its input. The torque reference value is its output which is then provided to the IFOC block as input. And the mechanical system equation: Te= T L+ 𝐽𝑑ω 𝑟 𝑑𝑡+ 𝑓ω 𝑟 (16) The block diagram of speed control loop can be seen in Figure- 3. Figure-3. Block diagram of speed control loop. If TL=0, the closed loop transfer function is as follows: ω𝑟 ω𝑟∗= (KP s+K Ι) C 𝐽s2+(KP C+𝑓 ) s+K Ι C (17) where 𝐽 is the moment of inertia and 𝑓 is the friction coefficient. 4. TUNING OF PI USING ZIEGLER-NICHOLS METHOD The Ziegler-Nichols (ZN) tuning used here is based on the open-loop step response of the system as shown in Figure-4. This type of response is typical of a first order system with transportation delay. The response is characterized by two parameters, L the delay time and T the time constant. These are found by drawing a tangent to the step response at its point of inflection and noting its intersections with the time axis and the steady state value. These parameters are used to determine the controller ’s gains (Hang et al., 1991) as shown in Table-4. Figure-4. Response curve for Ziegler-Nichols method. Table-4. Ziegler-Nichols open-loop tuning parameters. Controller Kp Ti=K p/Ki Td=K d/Kp PI 0.9 (T/L) L/0.3 0 Where Ti is the reset time , and Td is the derivative time. 5. TUNING OF PI USING PARTICLE SWARM OPTIMIZATION The particle swarm optimization (PSO) can be defined as an optimization technique based on evolutionary computation. It was developed through the simulation of simplified social systems, and has been found to be robust in solving continuous nonlinear optimization problems. PSO is a population based stochastic optimization technique where individuals, referred to as particles, are grouped into a swarm. Every particle in the swarm represents a candidate solution to the optimization problem. Each particle is flown through a multidimensional search space, adjusting its position in search space according to its own experience and that of neighbouring particles. Therefore, a particle makes use of best position encountered by itself and that of its neighbours to position itself towards an optimal solution. The effect is that particles fly toward a minimum, while still searching a wide area around the best solution. The performance of each particle is measured using a predefined objective (fitness) function, which encapsulate the characteristics of the optimization problem (Kennedy and Eberhart, 1995; Shi and Eberhart, 1998). Each particle is treated as a point in a j- dimensional space. The ith particle is represented as XI = (xi1,xi2,…,xij). The best previous position (giving the minimum fitness value) of any particle is recorded and represented as PI = (pi1,pi2,…,pij), this is called pbest. The index of the best particle among all particles in the population is represented by the symbol g, called as gbest. The velocity for the particle i is represented as VI = VOL. 13, NO. 24, DE CEMBER 2018 ISSN 1819-6608 ARPN Journal of Engineering and Applied Sciences ©2006- 2018 Asian Research Publishing Network (ARPN). All rights reserv ed. www.arpnjournals.com 9322 (vi1,vi2,…,vij). The particles are updated according to the following equations: Vijn+1= w ∗ Vijn + r 1c1(Pijn− Xijn) + r 2c2 (Pgjn− Xijn) (18) Xijn+1= Xijn+ Vijn+1 (19) where w is the inertia weight, c1 and c2 are acceleration coefficients, r1 and r2 are random numbers uniformly distributed between 0 and 1, and n represents the iteration number. Equation (18) is used to calculate particle ’s new velocity according to its previous velocity and the distances of its current position from its own best experience (position) and the group ’s best experience. Then the particle flies toward a new position according to Equation (19). The performance of each particle is measured according to a pre-defined objective function (performance index), which is related to the problem to be solved. c1andc2 represent the weighting of the stochastic acceleration terms that pull each particle toward pbest and gbest positions. Low values, allow particles to roam far from the target regions before being tugged back. On the other hand, high values result in abrupt movement toward, or past, target regions. Hence, the acceleration constants c1 and c2 were set to be 2.0 according to past experiences. Suitable selection of inertia weight w provides a balance between global and local explorations, thus requiring less iteration on average to find a sufficiently optimal solution. As originally developed, w often decreases linearly from about wmax = 0.9 to wmin = 0.4 during a run. In general, the inertia weight w is set according to the following equation: w = w max − wmax −w min iter max X iter (20) Where iter max is the maximum number of iterations (generations), and iter is the current number of iterations. The computational flowchart for the proposed PSO is shown in Figure-5. Figure-5. Flowchart of particle swarm optimization. The termination criterion used here is when the maximum number of iterations is reached which is 100 iteration. Considering that there are 50 individuals (particles) in the population. Since there are two parameters (K p& K i) to control, position and velocity are represented by matrices with the dimension of 2x50 by using Equations (18) and (19). The values of (K p& K i) are assumed to be from 0 to 50. The position represents the PI controller gains (K p& K i). 6. EVALUATION OF THE OBJECTIVE FUNCTION The performance of the control system is usually evaluated based on its transient response behavior. To design an efficient controller, the objective is to improve the system response by minimizing the error between the input signal u(t) and the output y(t). In general, the error signal is expressed as: e(t) = u(t) – y(t) (21) The error signal defined by Equation (21) is widely used in the integral performance criteria in the frequency domain (Chin et al., 2004) such as the integral square error (ISE), integral absolute error (IAE), integral time square error (ITSE), and the integral time absolute error (ITAE). The ISE and IAE weigh all errors equally and independent of time. Consequently, optimizing the control system response can result in a response with relatively small overshoot but long settling time or vice versa. To overcome this problem the ITSE and ITAE criteria weigh the error such that late error values are considerably taken into account. The ITSE and ITAE performance criteria formulas are as follows: ITSE = ∫t e2(t) dt∞ 0 (22) VOL. 13, NO. 24, DE CEMBER 2018 ISSN 1819-6608 ARPN Journal of Engineering and Applied Sciences ©2006- 2018 Asian Research Publishing Network (ARPN). All rights reserv ed. www.arpnjournals.com 9323 ITAE = ∫t |e(t)| dt∞ 0 (23) However, ITSE and ITAE can result in a multiple minimum optimization problem. In addition, all the integral performance criteria attempt to minimize only the error which does not necessarily mean minimizing all the basic evaluation parameters such as the maximum overshoot ( Mp), rise time ( tr), settling time ( ts), and the steady-state error ( Ess). A performance criterion in the time domain where the aforementioned parameters are evaluated and minimized was proposed (Gaing, 2004) as shown in Equation (24). Fun = (1 − e−β) . (M p+ E ss) + e−β.(ts− t r) (24) Where β is the weighting factor. β can be set greater than 0.7 to reduce the overshoot and steady-state error or less than 0.7 to reduce the rise time and settling time. For this system, it has been found that setting β to 1.5 yields the best result. Therefore, for tuning a PI controller based on the PSO technique, the performance evaluation indices ITSE, ITAE, and Fun will be used as the objective function and their responses will be compared with each other in order to find the optimal set of the PI controller gains. The structure of the PSO tuned IFOC speed PI controller with its performance evaluated using the objective function is shown in Figure- 6. Figure-6. Implementation of PSO algorithm for tuning the PI controller. 7. RESULTS AND SIMULATION This section shows the simulation results using Matlab/Simulink software for the system with the PI controller tuned using Ziegler-Nichols and PSO methods. Furthermore, the results obtained using different performance evaluation indices for the PSO tuned PI controller are shown and compared. Finally, the system is observed for a variable speed PV water pump over a variety of weather and loading conditions. Figure-7 shows the Matlab/Simulink implementation of the proposed variable speed PV pump. Figure-7. Matlab/Simulink model for the proposed system. Figure-8 shows the motor speed response at its rated speed of 1425 rpm for the PI controller gains (K p & Ki) obtained using Ziegler-Nichols (ZN) method and the gains obtained using PSO with ITSE, ITAE and Fun performance assessment indices as indicated in Table- 5. VOL. 13, NO. 24, DE CEMBER 2018 ISSN 1819-6608 ARPN Journal of Engineering and Applied Sciences ©2006- 2018 Asian Research Publishing Network (ARPN). All rights reserv ed. www.arpnjournals.com 9324 Figure-8. Motor speed curves for different PI controller gains . Table-5. The optimized parameters of PI controller. Tuning Method Kp Ki ZN 0.31 30 PSO - ITSE 0.65 6.97 PSO - ITAE 0.9 7.88 PSO - Fun 5.1 8.03 Comparative results for the speed response performance in the time domain shown in Figure-8 are evaluated based on the rise time (t r), the settling time (t s), the maximum overshoot (M p), and the peak time (t p) as presented in Table- 6. Table-6. Comparison of time domain specifications. Tuning Method tr (s) ts (s) Mp (%) tp (s) ZN 0.026 0.31 44.77 0.078 PSO - ITSE 0.045 0.2117 6.1 0.107 PSO - ITAE 0.036 0.178 4.47 0.09 PSO - Fun 0.017 0.029 0.0038 0.04 It is clear from the responses that the PSO based controller has greatly reduced the overshoot and the settling time compared to the Ziegler-Nichols tuned controller. Furthermore, the PI controller tuned using the PSO evaluated using with the Fun assessment criterion (PSO - Fun) gives the best response as it reduces the overshoot to almost zero and has the fastest rise, settling and peak times. The PSO global best (Best Cost) solution is selected for the particle which has the smallest value based on the Fun performance assessment criterion for the 100 iterations as shown in Figure- 9. VOL. 13, NO. 24, DE CEMBER 2018 ISSN 1819-6608 ARPN Journal of Engineering and Applied Sciences ©2006- 2018 Asian Research Publishing Network (ARPN). All rights reserv ed. www.arpnjournals.com 9325 Figure-9. PSO-Fun global best value throughout the 100 iterati ons. It can be seen that global best value is minimized throughout the iterations, and thus, the solution is optimized. The PI controller gains obtained using PSO with its objective function evaluated using the Fun equation (PSO - Fun) is used to simulate the variable speed PV pump model. (K p = 5.1 & K i=8.03). 7.1 Variable speed PV pump The PV module output changes with the variation of the weather conditions (solar irradiation and temperature). Furthermore, the PV pump proposed varies its speed to accommodate for the variation of the hydraulic requirements (flow rate and pumping head). This is done by employing the pump Affinity laws (Igor et al., 2008). Table-7 shows the required pump motor speed due to the variation of the weather conditions (solar irradiation (G) and temperature (T)) and the variation of hydraulic requirements of the pump (flow rate (Q) and pumping head (H)) along the simulation time. Table- 7. Pump motor speed due to the variation of solar irradiation (G), temperatur e (T), pump flow rate (Q) and head (H). Time G (w/m² ) T (ºC) Q (m³/h) H (m) Motor speed ( RPM ) 0-0.3 1000 25 67 12.47 1425 0.3-0.4 900 25 67 11.17 1363 0.4-0.5 900 35 106 5.097 1274 0.5-0.6 1000 35 106 6.203 1326 0.6-0.7 1000 25 67 12.47 1425 Figure-10 shows the variation of the solar irradiation and temperature and the pump flow rate and head along the simulation time as in Table- 7. Figure-11 shows the pump reference (required) motor speed due to the variation of the weather and loading conditions as illustrated in Table-7 versus the actual (measured) motor speed. As can be seen, the motor follows its required reference speed with an accurate and fast response which shows the merits of the proposed technique. VOL. 13, NO. 24, DE CEMBER 2018 ISSN 1819-6608 ARPN Journal of Engineering and Applied Sciences ©2006- 2018 Asian Research Publishing Network (ARPN). All rights reserv ed. www.arpnjournals.com 9326 Figure-10. Solar irradiation, temperature, pump flow rate, and head variation. Figure-11. Motor reference speed vs. motor actual speed. 8. CONCLUSIONS The IFOC speed control loop PI controller has been tuned using the particle swarm optimization (PSO) and the conventional Ziegler-Nichols (ZN) methods. The various results presented show that the proposed PSO method with different performance assessment indices has more robust stability and efficiency, and can solve the searching and tuning problems of PI controller gains more easily and quickly than the conventional ZN method.