A novel MPPT design based on the seagull optimization algοrithm for phοtovοltaic systems operating under partial shading

The use of a maximum power point (MPP) tracking (MPPT) controller is required for photovoltaic (PV) systems to extract maximum power from PV panels. However, under partial shading conditions, the PV cells/panels do not receive uniform insolation due to several power maxima appear on the PV array's P–V characteristic, a global MPP (GMPP) and two or more local MPPs (LMPPs). In this scenerio, conventional MPPT methods, including pertub and observe (P&O) and incremental conductance (INC), fail to differentiate between a GMPP and a LMPP, as they converge on the MPP that makes contact first, which in most cases is one of the LMPPs. This results in considerable energy loss. To address this issue, this paper introduces a new MPPT method based on the Seagull Optimization Algorithm (SOA) to operate PV systems at GMPP with high efficiency. The SOA is a new member of the bio-inspired algorithms. When compared to other evolutionary techniques, it uses fewer operators and modification parameters, which is advantageous when considering the rapid design process. In this paper, the SOA-based MPPT scheme is first proposed and then implemented for an 80 W PV system using the MATLAB/SIMULINK environment. The effectiveness of the SOA based MPPT method is verified by comparing its performance with P& O and PSO (particle swarm optimization) based MPPT methods under different shading scenarios. The results demonstrated that the SOA based MPPT method performs better in terms of tracking accuracy and efficiency.

variable step to determine the ideal duty cycle value, resulting in a quicker time response and greater stability under varied operating circumstances.
However, PV arrays are frequently subjected to partial shading conditions (PSCs), which are the root cause of the majority of output power decrease and mismatch 13 . When the PV array is operating under these conditions, the P-V curves are characterized by the appearance of many local peaks, which are caused by the activation of bypass diodes, which protect shaded cells 14 . In such partial shading conditions, standard MPPT algorithms may miss the target by converging to a local maximum rather than the global maximum, resulting in a large loss in output power and, as a result, a poor overall system yield. A variety of enhancements to traditional MPPT algorithms have been developed to deal with the impact of shading on the P-V curves. Some are topology-based and require extra power circuits to accomplish global MPPT (GMPPT) 15 . As a result, overall efficiency is lowered. Others are algorithm-based strategies such as fuzzy logic with polar controller and sequential extremum searching control 16 . The effectiveness of soft computing methods in handling nonlinear problems, such that encountered in PV array behaviour, and their implementation simplicity make them very attractive to solve the MPPT problem of PV systems, especially in the case of partial shading and module mismatches 17 . Artificial Neural Networks, are one of soft computing methods that was used in MPPT techniques. Typically, they were used to estimate the MPP with respect to the randomly changing weather conditions 18 , and to improve the P&O and IC algorithms 19 . These approaches are expensive, time-consuming operations that necessitate the use of complicated technology. However, this solution can increase the cost of the PV system due to the high number of used sensors. Evolutionary computation techniques, such as Differential Evolution (DE) 20 , has been also proposed to deal with the MPPT problem. However, EC techniques might present a poor convergence rate and slow convergence time 21,22 . The metaheuristics techniques have a good convergence rate and fast convergence compared to EC techniques. In addition, the application of the metaheuristic algorithm for MPPT has attracted the interest of many researchers due to its ability to handle nonlinear functions without requiring derivative information. Since metaheuristic MPPT approaches are an efficient search and optimization method for real-valued multi-modal objective functions, it is envisaged to be very effective to deal with MPPT problems. Various metaheuristic approaches are found in the literature but the more popular ones are particle swarm optimization (PSO), grey wolf optimization (GWO), ant colony (ACO), Artificial Bee Colony (ABC), Whales Optimization Algorithm (WOA) [23][24][25][26][27][28] . Sarvi et al. in 29 proposed the PSO-based MPPT for PV systems under PSC to find the GMPP. Nevertheless, this solution presented oscillations around the steady-state. Hence, some researchers have attempted to improve the PSO to reduce oscillations 30,31 . However, their improved method cannot follow the dynamic GMPP under various shading patterns. Furthermore, Jang et al. in 32 proposed an ACO algorithm and showed that this method has a faster convergence speed compared to the Basic PSO. ACO and PSO methods present a major disadvantage in terms of convergence linked to the initial placement of the agents into the research space. In addition, both PSO and ACO need the determination of many parameters, making them rigid and complicated.
To overcome these complexities found in the PSO and ACO methods, the authors of 33 established a comprehensive bio-inspired approach for addressing computationally costly issues called the seagull optimization algorithm (SOA), which mimics the search and attack behaviors of seagulls in nature. This algorithm is one of the latest effective optimization methods, which is gradient-free and applicable to optimize all engineering problems occurring in real life. Additionally, compared to other evolutionary algorithms, SOA requires fewer variables for adjustment and fewer operators, which is advantageous when considering a speedy design process 33 . This algorithm is divided into two phases: the exploration and exploitation phases. During the exploration phases, the search agent makes larger update steps to the candidate solutions. On the other hand, the search agents seek to make use of the search process's history and experience during exploitation. In 34 , the authors present a Modified Seagull Optimization Algorithm (MSOA) based MPPT approach by incorporating Levy Flight Mechanism (LFM) and the formula for heat exchange in Thermal Exchange Optimization (TEO) into the original Seagull Optimization Algorithm (SOA). Thus, in this article, their results from the simulation of the exploration phase is not clear. In which it is calculating the fitness values of each search. Yet, to the best of the authors' knowledge, no research has been done on MPPT based on SOA so far, which motivates us to study this method and to enrich the scientific references with the developed version of the original SOA for MPPT controllers. To this end, this work proposes an SOA-based metaheuristic MPPT method for tracking the GMPP to maximize the PV power output in PV systems operating under both uniform and partial shading conditions. This method is considered best suited for real engineering problems compared to another metaheuristic algorithm. The MPPT's speed and efficiency will be considerably improved.
After the introduction, in "The effect of shading on PV array" section briefly presents the effect of partial shading on the PV array characteristics. ïn Section ″Selection the parameters of Boost converter″ introduces the SOA's fundamentals and mathematical model. in Section ″Seagull optimization algorithm (SOA)″ presents the proposed MPPT controller and how it developed based on SOA. in Section ″Results and discussion″ gives and discusses the simulations results of the proposed SOA-based MPPT method, along with a comparison of its performance with PSO and P&O based MPPT methods. Finally, "Processor In the Loop (PIL) testing" section summarizes the results and suggests some recommendations for further research.
The effect of shading on PV array PV cell and module modeling. The electrical model of the PV cell, as illustrated in Fig. 1, consists of a current source, a diode, and a resistor Rsh linked in parallel, as well as a series resistor Rs.
Where the current source is proportional to sun irradiation. The Rs is primarily determined by the metal base's contact resistance with the p semiconductor layer, the p and n bodies' resistances, the n layer's contact resistance with the top metal grid, and the grid's resistance. The Rsh resistance is mostly influenced by the leakage current of the p-n junction and is affected by the PV cell production procedure 35 Fig. 1, the following equation 35 gives the output current: where I ph , I, and I 0 are denoted the phοtocurrent, the οutput cell current, and the reverse saturatiοn current respectively. V represents the οutput cell vοltage. R s and R sh present a series resistance and parallel resistance respectively.A is the diοde ideality factor. The value of the termal voltage is given by (2).
where K, q, and T are denoted the Bοltzmann cοnstant (1.38 × 10 −23 (J/K)), the charge of electrοn (1.6 × 10 −19 (C)), and the sοlar cell temperature (K) respectively. The photocurrent I ph,c of a solar cell depends on many material characteristics. However, it can be approximated as linear-dependent on irradiance and temperature with sufficient accuracy as follow 36 : where I sc,ref is solar cell short-circuit current at standard test conditions (STC): µ sc is the solar cell short-circuit temperature coefficient, normally provided by the manufacturer (A/K). G is the actual irradiance intensity (W/m 2 ); The well-known diode saturation current estimation equation is given by 36 : where, the nominal saturation current I 0,ref at STC is given by: To achieve the desired voltage and current levels, Ns cells are connected in series and NP cells are connected in parallel respectively, thus forming a PV module. There for the PV module parameters are scaled according to NS and NP as given bellow 37 : The characteristics of the PV panel used in this work are shown in Table 1.
Effect of partial shading on PV array. When PV cells (or modules) are partially shaded, they function as a load on other cells/modules and become reverse biased. As a result, instead of generating energy, they will dissipate it, resulting in a rise in cell temperature. The cell/module can be damaged and influence the entire PV module/array if the temperature becomes too high, which is called the hot spot issue. One of the most prevalent methods to avoid the hot spot problem is to connect a bypass diode to a set of cells connected in series 38,39 , as illustrated in Fig. 3.
To apprehend the current flow direction of the PV array under PSC, consider the PV array in Fig. 3. The PV array consists of four PV modules where two PV panels are unshaded and the other are shaded, as illustrated in Fig. 3b. The P-V curve of the PV array under PSC can be divided into two phases. During uniform solar irradiance, the bypass diodes are reverse biased and therefore have no effect (Fig. 3a). In the other phase (Under PSCs), when the load current is higher than the shaded PV module, the bypass diode active. But, when the load current is lower than the shaded PV module, the bypass diode stays inactive as can be seen in Fig. 3b.

Selection the parameters of boost converter
A boost converter (step-up converter) is a power converter with an output DC voltage greater than its input DC voltage 41 . It is a class of switching-mode power supply (SMPS). A simple boost converter consists of an inductor L, a controlled switch S and a diode D, filters made of a capacitors are normally added to the output and the input of the converter to reduce voltage ripples (see Fig. 4).  The critical inductance value of the boost converter is given by the Eq. (13): where: • V in is the input voltage; • V out is the desired output voltage; • f sw is the designed switching frequency; • I L is inductor ripple current; Output capacitor selection of boost converter. The current store to the output circuit is discontinuous. Therefore, to limit the output voltage ripple must use a big filter capacitor. When the diode is off, The filter capacitor should supply the output DC to the load. where: • C out_min is the output capacitance(minimum); • V out is the ripple of output voltage; • f sw is switching frequency in kHz; • I out_Max is maximum output current; • D is the duty cycle;  The selection of C min must be higher than the calculated value to make sure that the converter's output voltage ripple remains within the specific range and its equivalent series resistance (ESR) should be low. ESR can be minimized by connecting many capacitors in parallel. Therefore, it can be assumed that the ESR is as in Eq. (15): Intput capacitor selection of boost converter. As stated earlier, the output of the PV voltage has ripples due to the change in temperature and irradiation. Therefore, it is necessary to replace the input capacitor in parallel with the voltage supply to minimize ripples produced by the solar panel. The ripples have an adverse effect on the output as the input voltage is proportional to the output current. Similarly to the output capacitor, ESR on the input capacitor should be considered by selecting a greater capacitor value than the calculated one. Equation (16) computes the value of the input capacitor while considering the ripples limit. where: The electrical parameters of the used boost converter are depicted in Table 2.

Seagull optimization algorithm (SOA)
The basics of the SOA. Seagulls are a type of coastal bird that has been around for roughly thirty million years. Their wings are large, and their rear legs have developed to enable them to travel on the water. Seagulls come in a range of sizes and shapes, and they may be found in practically every corner of the world. Seagulls are capable of drinking both fresh and saltwater. Most animals are unable to do this. On the other hand, Seagulls have a unique set of drums covering their eyes that they used to clean the salt out of their system by opening their beaks. Seagulls inhabit in vast groups and use a variety of voices to communicate with one another. With their expertise, they can find and attack the prey. They steal food under the influence of other birds, animals, and even people, which is one of their strangest behaviours. Seagulls eat mostly fish, although they also eat earthworms and insects. To discover and attack prey, seagulls use their intelligence. The most prominent characteristics of seagulls are their migratory and attacking habits. A group of seagulls migrated from one area to another using mathematical models of predator movement and attack. A seagull must satisfy the following requirements: The migration behaviour is described as follows: • They move in groups when migrating. To avoid accidents, their starting locations differ from one another.
• They use their swarm experience to their benefit that is they try to go in the way of the highest survival to acquire the lowest cost value.
Seagulls typically attack migratory birds over the sea. This procedure is influenced by the natural structure of the spiral's activity during the attack. During exploration, the algorithm must satisfy three conditions (avoiding collisions, move in the direction of the best neighbour, and stay close to the best search agent) to replicate how a group of seagulls moves from one place to another. The behaviour of the migration can be modelled by the following equation 33 : www.nature.com/scientificreports/ where the distance between the current search agent and the best-fit search agent is provided by D s , X s (t) denotes the current place of search agent, X bs (t) denotes the place of the best-fit search agent. t denotes the current iteration, A presents a linearly decreases from fc to 0, B is a randomized variable that ensures a correct balance of exploration and exploitation. During exploitation, seagulls seek to make use of the search process's history and experience. In this phase, seagulls use their wings and weight to keep their height. During the iteration process, the search agents might update their locations about the best search agent. As a result, the following equation is used to determine the search agent's updated position 33 : where � X s (t + 1) represents the equation of updating the position of other search agents. X ′ ,Y ′ and Z ′ described the spiral movement that behavior produces in the air, and which are defined as follows 33 : The radius of each spiral turn is r, while k is a random value in [0, 2π]. e is the natural logarithm's base, while u and v are constants that determine the spiral form.
Here is the detailed pseudo-code of the SOA algorithm 33 : where d min and d max represent the limit of the search band mechanism. The distance D s can be calculated using the following equation : The new seagull's solution can then be generated using the following equation: Since the GMPP changes continuously as the weather conditions change, the SOA-MPPT algorithm must be restarted to search for the new GMPP. Therefore, to detect if ever a change in weather conditions takes place to restart the search, the following inequality is adopted in the algorithm: Whenever the inequality indicated above is met, the process of finding a new MPP will be repeated to ensure that the algorithm can always identify the GPPM regardless of the operating condition. Figure 6 depicts the principle working of the SOA based MPPT algorithm.

Results and discussion
To examine the performance of the SOA based MPPT method, the 80 W PV system depicted in Fig. 7 is considered, which is designed under MATLAB/SIMULINK environment. This system comprises a PV array formed by four 20 W PV modules serially connected, a boost DC-DC converter, an MPPT controller and a DC load. The DC-DC converter is controlled, using a PWM generator, by the duty cycle "α" which is generated by the SOA based MPPT controller. Table 3 shows the irradiation values considered in the simulation tests. The P-V characteristic obtained in each test is presented in Fig. 8. As can be seen in this figure, the P-V curve shows multiple peaks under PSCs. Each of these peaks is characterized by its voltage and power. The peaks number is depending on the number of shaded panels. The key parameters of the implemented MPPT methods, namely SOA, PSO and P&O, are seated in Table 4.
To verify the ability of the SOA-based MPPT method to track the GMPP, the PV system was simulated with various PSCs (PSC1, PSC2, and PSC3) in addition to the standart test condition (STC). The system was first started by testing it under STC, and then each PSC was applied every 7.5 s for a period between 0 and 30 s, as depicted in Fig. 12 Table 5. The obtained power in the case of the SOA-based optimization method is significantly more than those of the PSO and P&O algorithms throughout the whole profile. Table 6 presents a comparison of SOA-based MPPT versus different MPPT methods existing in the literature according to these criteria: converter used, sensors used, convergence speed, tracking eficiency, steady-state oscillations level, implementation complexity and GMPP tracking ability.    www.nature.com/scientificreports/ Figure 13 presents the tracking efficiency of PV system output power under various PSC using P&O, PSO and SOA methods. It can be concluted that the proposed SOA-MPPT is guaranted the tracking of GMPP with high efficiency better than P&O and PSO.
Under all simulations tests, it can be observed that the the proposed SOA-MPPT and PSO algorithms successfuly converge to the GMPP corresponding to the different PSCs with a noticeable superiority of the proposed SOA-MPPT in terms tracking speed. Although the tracking speed of the P&O algorithm is higher than that of SOA and PSO. Yet, P&O algorithm is not even able to track the GMPP in the most case of PSC and is traped in the local MPP of the P-V curve (in the case of PSC1 and PSC2).
In addition, we note that the P&O and PSO algorithm are not able to track the true MPP when the PV system operating under weak uniform conditions (see Fig. 14). In otherwise, the proposed SOA-MPPT successfuly converge to the MPP when the PV system operating under weak uniform conditions. Finally, it can be interpreted that the SOA based MPPT converges with a good speed and zeros oscillates around the GP compared to PSO and P&O based MPPT.

Processor In the Loop (PIL) testing
The goal of this part is to put the MPPT controller model onto a real embedded processor and run a closed-loop simulation with the simulated plant model; this is known as the processor-in-the-loop (PIL) test. In this way, the SOA-MPPT controller is replaced by a PIL block that have the controller code running on the hardware. The PIL test will help us identify if the processor is capable of executing the developed MPPT controller to validate the proposed MPPT control strategy on an actual embedded board. Figure 15 shows the embedded board used to perform the PIL experimentation, which is the Arduino MKRZERO board. The microcontroller integrated in this board is the ATMEL SAMD21 from Microchip Technology. This microcontroller contains a 32-bit Arm® Cortex®-M4F processor with Floating Point Unit (FPU) running at up to 120 MHz with 256kB flash memory, 32kB SRAM. As presented in Fig. 15, the PIL block is generated and connected to the plant model so as to acquire the PV output voltage and current, after that the PIL block will identify the required duty cycle by using the proposed algorithm and send it to the plant model. During the PIL process, the generated code is tested in realtime while the plant model runs on a computer which allows to detect and correct possible errors. Figure 16 depicts the result from the PIL test. It can be observed that the results obtained using PIL test are similar to the simulation results obtained in MATLAB/Simulink. Therefore, the MPPT control algorithm proposed in this work is verified on a real microcontroller (or embedded board).

Conclusion
In this research, a new metaheuristic-based MPPT has been proposed. The letter is designed by using seagull optimization algorithm. The performance of this method is simulated and compared with that of PSO and P&O. Consequently, the effectiveness of the suggested SOA-based MPPT method was verified for an 80 W PV system using the MATLAB/SIMULINK environment. It is noted that the average tracking efficiency of the proposed method is higher than 98.32%.The simulation results were performed under various partial shading scenarios and weak uniform conditions. It prouves the superiority of the proposed method in terms of tracking efficiency and fast response time, as compared to other methods (P&O and PSO).
In this work, the design and implementation of a new MPPT method were carried out. Moreover, a Processor in the Loop (PIL) test was performed, using the Arduino MKRZERO embedded board, to confirm the functionality of the proposed SOA-MPPT approach. In this work, a PV array consisting of four modules connected in series is considered to test the proposed MPPT algorithm. However, we also aim to make complex partial shading conditions in our future research to test and confirm the effectiveness of the MPPT approach based on the proposed SOA.

Data availability
Corresponsdence and requests for materials should be addressed to A.C.