Implementation of PSO algorithm on MPPT PV System using Arduino Uno under PSC

The availability of fossil energy sources decreases as consumers' demand for electrical energy increases rapidly. Currently, the utilization of renewable energy sources is crucial. PV is a renewable energy source that converts photon energy into DC current. Maximum power point tracker (MPPT) control technology for photovoltaics has advanced significantly. PV is unique in that its P-V characteristic curve is non-linear. Conditions of partial shading can cause the P-V curve to have multiple peaks. This research will design MPPT PV using the Particle Swarm Optimization (PSO) algorithm in partially shaded conditions with an Arduino Uno and boost converter. Conventional algorithms, incremental conductance (IC), and Perturb and Observe (P&O) are implemented as a comparison. The purpose of implementing the PSO algorithm is to find the global peak of power to minimize power losses of PV. It leads to optimal power in case of partial shading conditions. Two PV modules are arranged in series for MPPT in a partially shaded environment. The examination was conducted in a darkened room with spotlights. The mean absolute percentage error of the current sensor, INA219, and the voltage sensor, voltage divider, was less than 1% during testing. The MPPT PV system test results indicate that the PSO algorithm can extract approximately 1.64 Watts of average power. In contrast, the IC and P&O algorithms can extract about 1.25 Watts and 1.41 Watts, respectively. When no algorithm exists in the control system, the extracted power is approximately 1.13 watts. Thus, the PSO algorithm tracks global or optimal power under partial shading conditions.


I. INTRODUCTION
Recently, there has been an uptick in the growth of population activity, which is one factor that contributes to the escalation of both global pollution and warming.This is a result of the growing utilization of coal and oil and other non-renewable forms of energy.The availability of coals and petroleum, both of which are becoming increasingly scarce, is not keeping pace with the rising demand [1][2] [3].This phenomenon serves as an incentive for governments and individuals to search for alternative energy sources that make use of renewable resources.Photovoltaic energy is a non-renewable energy source that stands out from other energy sources due to its distinctive properties [4].It can generate clean electricity, which will contribute to a reduction in pollution [5].The utilization in terms of non-conventional sources of power, like solar energy, results in more cost-effective payments for one's electricity [6].In addition, solar energy has many other advantages, such as the fact that it can generate power without releasing any emissions while it is in operation; consequently, these advantages present an intriguing challenge when it comes to addressing the challenges posed by global warming [7].
Photovoltaic materials can be used to directly generate electricity by converting solar energy into electrical energy.This eliminates the need for a mechanical conversion step.In photovoltaic (PV) technology, the semiconducting materials that makeup PV panels are the building blocks.Both the temperature and the amount of solar radiation affect the non-linear characteristics of the photovoltaic panel, which causes the panel's efficiency to fluctuate.Because of this, the generation of photovoltaic energy needs to be managed to achieve the high efficiency of solar energy.It is necessary to run solar photovoltaic modules at their maximum power point (MPP) to obtain the maximum amount of energy they can produce [8].Maximum power point trackers, also known as MPPT, is a technique that can be used to complete the process.These Maximum Power Point Tracking controller devices are utilized to configure the DC-DC Converter so that the solar panel module can harvest the maximum amount of solar energy possible [9].These Maximum Power Point Tracking controller devices are utilized to configure the DC-DC Converter so that the solar panel module can harvest the maximum amount of solar energy possible.
The photovoltaic module generates a unique characteristic curve, consisting of a characteristic curve of current concerning voltage that produces a characteristic curve of power-to-voltage.The P-V characteristics curve has one maximum power peak under ideal conditions.Ideal conditions are difficult to achieve when solar panels are installed directly in the field.Curves will experience rapid irradiation changes and partially shaded modulus surface conditions in actual conditions.This condition will transform the characteristic P-V curve into one with multiple peaks.Experimental analysis of the results of PV characteristic curves under partial shading conditions reveals that the characteristic curve becomes increasingly complex, with multiple local peaks [10].Researchers use mechanical detection of the global maximum power point to locate the global peak of power.
A converter is a power electronics device that can be used to extract energy from solar panels at the moment when the power is at its maximum.One form of DC-DC converter that can raise the voltage is called a boost converter DC-DC.The converter is situated in the path of electrical current that runs from the photovoltaic cell to the load.The microcontroller is connected to the MOSFET, one of the converter's primary components.Within the MOSFET, there is a duty cycle.This quantity will be adjusted to measure the voltage value in such a way that it stays at the place where it produces the most power.Based on the incremental conductance (IC) algorithm, the Arduino uno gadget is utilized to make adjustments to the duty cycle of a boost converter system [11] [12].The findings indicate that the IC algorithm can monitor power levels at optimum operating points regardless of whether the environment is typical or subjected to full sunlight.In the MPPT PV design based on the SEPIC converter topology, other conventional algorithms, such as P&O, are implemented [13].
A partial shading condition (PSC) occurs when clouds, leaves, or dust obscure part of the surface of a photovoltaic cell.These circumstances cause a decline in photovoltaic electricity efficiency and a signal shape of the P-V characteristic curve that is increasingly complex or has multiple peaks.Because the P-V characteristic curve has more than one peak, conventional algorithms such as incremental conductance (IC) and P&O struggle to identify global peaks.Conventional algorithms frequently become trapped at local peaks in partial shading conditions.The impact of partial shade on the power-to-voltage characteristic curve has resulted in a significant change in the shape of the curve, according to experimental results.Researchers used the global maximum power point detection (GMPPD) method mechanically to locate the highest peak point [10].The correct algorithm is required to keep the power operating point at a common peak in the PSC case.Implementing the PSO algorithm in the Arduino Uno-based MPPT design with a boost converter is proposed.The PSO algorithm implementation outcomes will be analyzed and compared to IC and P&O algorithms.The purpose of implementing the PSO algorithm is to find the global peak of power to minimize power losses of PV.

II. METHOD
The hardware system of photovoltaic consists of Arduino Uno as an MPPT controller, voltage sensor, current sensor, load-using resistor, photovoltaic module, and boost converter set, as shown in Fig. 1 .The voltage sensor uses the technique of a voltage divider connected in both of input and output side.The following step is the design, which includes the application of standard algorithms such as IC and P&O, in addition to the PSO algorithm.The outcomes of putting each of these algorithms into practice will be contrasted with a hypothetical situation involving solar panel modules that are only partially covered.

A. Photovoltaic System
The experiment presented here uses two solar panels with a maximum power output of 10 watts (PV module).Both solar panels are connected in series, and their respective photovoltaic module specifications are in Table I.In order to facilitate the reader's analysis of the characteristic curve, the simplification of the solar panel module model is elucidated using an equivalent circuit.Figure 2 describes the equivalent circuit.Based on the equivalent circuit, the solar panel module is a current source affected by the amount of irradiation received from the light source.Equation (1) describes the current that flows from a solar panel module [14].Where, the  variable is an ideal diode factor of photovoltaic; the  variable is the output voltage of photovoltaic; the   variable is the resistance in parallel; the   variable is the series resistance; the  ,0 variable is the current value obtained from the sun; the   variable is the thermal voltage; the  ℎ variable is the current of the photon; the   variable is the diode current and the   variable is the current in the parallel branch.
A solar panel module is composed of multiple cells connected in series.A module of this type can manage the condition of a partially closed cell surface.Each solar panel module can be equipped with diodes to counteract the effects of partial shading conditions.The condition of partial shading is implemented in this experiment.Two solar panels are arranged in series such that a portion of the solar panel's surface is covered.

B. MPPT
The IC and P&O algorithms are commonly used conventional algorithms under normal conditions.The IC algorithm modifies the duty cycle value based on the state of the sensor's measured quantities, voltage, and electric current.Measurements of current and voltage are used to determine the rated power.The location of the operating point on the P-V characteristic curve will be determined by comparing changes in power and voltage values.In the meantime, the P&O algorithm utilizes power-to-voltage slope data to determine the position of the power operating point, allowing the duty cycle value to be modified to shift the power operating point toward the peak point.
Equations ( 2) and (3) describe the derivative of power concerning voltage change.The voltage and current values of the photovoltaic modules serve as the basis for calculating the instantaneous conductance (  /  ) and incremental conductance (  /  ) values using the results of the voltage and current sensors.When the power operating point is at its maximum, the power change over the voltage is zero, thereby satisfying the condition of Equation ( 4).This condition indicates that the duty cycle value remains unchanged.When the slope in Equation ( 5) is greater than zero or positive, the operating point of the solar panel power is to the left of the peak power point (MPP).Consequently, the duty cycle value is decreased, so the solar cell voltage rises toward the peak power voltage.In contrast, when the conditions in Equation ( 6) are met when the slope condition is negative, or the power operating point is to the right of the peak point, the power operating point is to the left.Thus, the duty cycle value is increased so that the voltage rapidly decreases to the voltage at maximum power.Fig. 3. depicts the operation of the IC algorithm in detail.The Particle Swarm Optimization (PSO) algorithm is an optimization inspired by different species' social and cooperative behavior to satisfy their requirements in the search space.The aim is to determine the subsequent locations of the particles within the search universe.The algorithm takes into account both the individual's past experiences (referred to as   ) and the aggregate history (referred to as   ).In addition, the experiences are sped up by two factors,  1 and  2 , and two Calculated randomly from a range [0, 1].On the other hand, the current movement is multiplied by an inertia factor, w, whose values range between [  ;   ] [15] [16].
As shown in Fig. 4, the PSO algorithm is started by randomly deciding where the first particle will be positioned.After this, the algorithm will look for the best possible value by continuously updating the position of the particles.At the end of each iteration, the position of each particle will be updated based on the best solution for the best local value (P best), Equation ( 9), as well as the best solution based on the global population (G best), Equation (10).After that, Equations ( 7) and ( 8) will be used to make any necessary adjustments to the velocities and positions of the particles.The PSO algorithm is broken down into its parts, outlined in Table II below.In addition, the flowchart for the PSO algorithm is in Figure 4, along with an explanation of how it works.
Where the    variable is defined as the velocity of  ℎ particle and  ℎ iteration; the    variable is represented as the position of  ℎ particle and  ℎ iteration; the  1 and  2 variable are acceleration factors 1 and 2, respectively.The  1 and  2 variable are defined as the random variable respectively; the  variable is symbolized as the weight; the    variable is the sensor measures the voltage  ℎ at time  and    the sensor measures the current  ℎ at time .

III. RESULT AND DISCUSSION
Arduino Uno is used as the microcontroller in the design of the MPPT system.Before the experimental design, the current sensor, voltage sensor devices, and the voltage divider are tested to determine the average error.The sensor will be used when the average error value is below the maximum limit.The boost converter is subsequently designed and tested using resistor loads.When the output voltage exceeds the input voltage, we can say that the boost converter is functioning properly.The boost converter test employs a constant duty cycle.The Mean Absolute Percentage Error (MAPE) for the INA219 sensor, the current sensor, is approximately 0.07% based on test results.In the meantime, the MAPE value for the voltage sensor test, the voltage divider, was less than 1%.This demonstrates a satisfactory performance with values below acceptable limits.The final test is a boost converter that can increase the output voltage based on the set point for the duty cycle.
Experiments on the implementation of the algorithm, both the proposed algorithm and the conventional algorithm, IC and P&O, were carried out on the MPPT PV system with a scenario of partial shadow conditions.These experiments compared the performance of both algorithms.As depicted in Fig. 5, the scenario uses an illustration of randomly covering a portion of the surface of the PV module with paper material.All three algorithms and the control group that did not use an algorithm were put through their paces under the same testing conditions.To evaluate how well its performance stacks up against the test results.6 compares the MPPT performance results obtained using the three different algorithms and the results obtained using no algorithm.The performance of conventional algorithms, such as the IC and P&O algorithms, is superior to that of MPPT without the algorithm.When the condition is partially shaded, the IC algorithm decreases the power for the first ten seconds before rapidly increasing it to determine the maximum power operating point.Similarly, the P&O algorithm can track the maximum power for longer than the IC algorithm until 64 and 100 seconds, respectively, when both algorithms experience a power drop.The P-V characteristic curve for two solar panels in series under PSC conditions has two global and one local peak.The global peak is the most powerful power peak.Fig. 6 illustrates that conventional algorithms cannot identify global peaks, as their performance results demonstrate.Each algorithm stalled at the lowest peak.These algorithms both determine the duty cycle based on the slope of the P-V characteristic curve.
Overall, the PSO algorithm can operate at maximum point power.PSO begins by randomly following all operating points.The duty cycle is a randomly generated particle variable that moves to all points by evaluating local solution values (local peak power) until a global solution value (global peak power) is determined.The fluctuating output power value during the initial search shows the search behavior.When there is a change in the power operating point, PSO can maintain the search so that the power remains optimal.PSO can extract an average of 1.64 Watts of power, whereas the IC and P&O algorithms can only extract 1.25 and 1.41 Watts, respectively.The extracted power is approximately 1.13 watts when Pulse Width Modulation or fixed duty cycle is utilized.Thus, PSO is an algorithm that monitors global power or optimal power under partially closed lighting conditions.

IV. CONCLUSION
This article presents the results of an experiment that was carried out to design an MPPT PV system using an Arduino Uno, a current sensor, a voltage sensor, and a DC-DC boost converter.Two photovoltaic modules connected in series, each with a portion of its surface covered, will randomly exhibit partial shading conditions, which can be identified on the P-V characteristic curve as multiple peaks.The current sensor, INA219, and the voltage sensor, voltage divider, perform well in their respective tests, with a mean absolute percentage error of less than 1%.The MPPT PV system test results show that the PSO algorithm can extract an average power of approximately 1.64 Watts, whereas the IC algorithm and the P&O algorithm each only extract 1.25 Watts and 1.41 Watts, respectively, respectively, respectively, as their average power.When there is no algorithm in the control system, the amount of power extracted is approximately 1.13 watts.Therefore, PSO is an algorithm that can track the global peak of power in the condition of partial shading.The PSO algorithm can track the global PowerPoint leading to the highest power output compared to the conventional algorithm.Future research on the effect of external conditions can be extended.The algorithm can be modified by including the conventional algorithm to extract the power of PV under both partial conditions and fast-varying solar irradiation.

Fig. 6
Fig. 6 The Performance Result Of MPPT for PSO Compared With The Conventional Algorithm