Maximum power point tracking of a partially shaded solar photovoltaic system using a modified firefly algorithm-based controller

Solar photovoltaic (PV) system is one of the most promising power systems based on renewable energy sources, with several advantages compared to others. However, solar PV systems have a challenge of low conversion efficiency because most of the irradiances of the sun, which are channelled to the PV panels, are not fully utilized for power consumption. A more challenging situation of the system occurs when some of its panels are obstructed from full reception of the solar irradiance, a case referred to as partial shading conditions (PSC) in solar PV systems. This leads to the generation of multiple, unequal power peaks in the system, from which the one with the highest power must be tracked for optimum utilization of the system. To this regard, this work presents a modified firefly algorithm-based controller, tied operationally with a DC–DC boost converter. A model was developed and simulated on MATLAB, for tracking the maximum power point of the system, both at constant solar irradiance and at PSC.


Introduction
Over the years, the solar system has become great area of concern in power generation.The system converts direct light energy from the sun to electrical power through photovoltaic (PV) cells [1].It consists of main parts such as PV module, charge controller, battery, inverter and load.However, the basic device of the solar PV system is the PV cell [2].Due to environmental issues and questions associated with other sources, solar energy is becoming the main source of electric power [3].Solar power system is neat, readily abundant, environmentally friendly and has low maintenance cost [4].However, PV systems have high manufacturing and installation cost and low conversion efficiency [5].Furthermore, the system exhibits nonlinear power-voltage characteristics (P-V curve) due to the effect of solar irradiance and ambient temperature [6].Consequently, the operation of a PV system is such that maximum power is extracted from the source due to its low conversion rate and instalment cost [7].
As reported by Hemalatha et al. [2], impediments like dusts, cloudy atmosphere, trees and highly erected structures cause marginal shading of the PV modules, and consequent varying irradiance.This is referred to as the Partial Shading Condition (PSC) in solar PV systems.There is a huge reduction in the power output of PV arrays when partially shaded.This is highly dependent on the configuration of the system and the bypass diode used in the module build ups [8].In addition, shadows can also cause a diminishing effect on the output current of solar modules due to some inherent features in the modules.Also, the PV characteristic curve becomes quite complex with multiple peaks, depending on the level of irradiance received by individual solar panel or module under PSC.But, on the nonlinear curve, power is maximum only at a lone point.
The maximum power point (MMP) is the single in-service point of the PV array from which the load draws maximum power.The locus of this point has a nonlinear distinction with solar irradiance and the cell temperature.Therefore, it is essential to track the point on the curve with maximum power.The process of doing this is referred to as maximum power point tracking (MPPT) in solar PV system [9].MPPT is one of the technical means through which energy generation is optimized in PV systems and there are lots of techniques captured in literatures, which have been proposed and adopted for this purpose [10].These techniques are classified into conventional and soft computing methods for MPPT applications [11,12].The FA is one of the soft computational techniques which have been previously adopted for solar PV MPPT, both in its original form [7] and combined form [12].The parameters of the algorithm can be tuned and implemented for many optimizations problems, especially highly challenging ones.This research work developed a modified FA for solar PV MPPT under PSC [6].

Mathematical model of the PV array
The solar cell, otherwise known as the PV cell is a single unit of the solar panel, made of silicon semiconductors that absorb sunlight in form of irradiance, as a source of energy to generate direct current electricity through a process called the photovoltaic effect.It is a forward-biased p-n junction semiconductor device.The model of solar PV cell is represented in Eqs. ( 1) and (2) using various circuital laws.
Where I PV is the photovoltaic current in Ampere (A), I d is the diode current in Ampere (A), I p is the shunt current through R p in Ampere (A), From Eq. ( 1), the relationship between the output voltage V and current I of the solar cell can be expressed as; where I is the diode reverse saturation current in Ampere (A), q = 1.6 * 10 c is the electron charge, K = 1.3805*10 jk −1 is Boltzmann constant, T is the temperature of the p-n junction, in Kelvin; n is the diode ideality constant, R s is the Ohmic series resistance, R p is Ohmic shunt resistance. (1)

DC-DC boost converter
The DC-DC boost converter will be adopted for this work due to its high voltage boost efficiency and comparatively low complexity.This is because, the load voltage, for most PV applications, is of higher magnitude than the output voltage of the PV network [13].
The basic role of the boost converter in MPPT application is to enhance the PV source voltage in order to extract maximum power from the PV array via its duty cycle [14][15][16].Equation (3) shows the ratio of the output voltage V o to input voltage V mp with respect to ON and OFF periods, at steady state, while Eq. ( 4) gives the relationship between the output voltage and the duty cycle D.Here the voltage across the inductor is zero.
where t on is the period for which switch is ON and t off is the OFF time of the switch.
It can be further established from Eq. (3) that; Hence, it can be seen from Eq. ( 4) that the boost converter's output voltage can be affected by adjusting the duty cycle.For a given input voltage, a higher value of the duty cycle yields a higher output voltage of the converter.

PV system under partial shading condition
The solar irradiance received by PV modules in an array can become non-uniform [8] due to the effects of tall buildings, towers and their shadows, moving clouds, trees and other neighbouring objects.In such a state, rather than having constant irradiance, the PV system experiences different irradiance levels and is said to be under PSC.At such conditions, the PV curve exhibits different power points with a single global maximum power point (GMPP) [12].The developed complete system model, with the DC-DC converter and MPPT controller is shown in Fig. 1a.Also, the parameters of the panels and the boost converter are presented in Tables 1 and 2 respectively.Thus, the system operated at constant irradiance of 1000 W/m 2 each on all four modules, at 25 °C, then a partial shading occurred when the irradiances of modules 2, 3 and 4 were reduced from 1000 to 800 W/m 2 , 600 W/m 2 and 400 W/m 2 respectively, resulting to a 30 % level of shading.Furthermore, Fig. 1b shows the schematic diagram of the developed PV system with a DC-DC boost converter and an MPPT controller.Furthermore, Figs. 2 and 3 respectively show the P-V and I-V characteristics obtained from the simulation of the system at constant irradiance and when partially shaded, with respect to the values of the PV modules given in Fig. 4. (3) (5) where D = t on t on + t off , is the duty cycle.
As shown above, the system exhibits smooth paths for both I-V and P-V curves under constant solar irradiance.The maximum power at constant irradiance was 431.93 W.However, due to the effect of partial shading, the power was reduced drastically to  195.48W.PSC potentially relegates the performance of the photovoltaic system [4].Therefore, the single point ought to be tracked to maximize the efficiency of the system.Considering the power input of the solar cell P in and its resultant maximum output power P pv , the efficiency of the solar η solar is stated in Eq. ( 6) as the ratio of P pv to P in [17].
where V oc is the maximum open circuit cell voltage, occurring when cell current I = 0, and I sc is the maximum short circuit cell current at output voltage V = 0. (6)

Firefly algorithm
FA was introduced by Yang in 2008 based on the swarm behaviour of fireflies, and its flow chart is shown in Fig. 4. The algorithm is governed by three main assumptions these include all fireflies are unisex, the value of the objective function determines the brightness of a firefly, and attractiveness is proportional to their brightness and decreases as the distance among [18].Basically, there are three important factors associated with FA; attractiveness, intensity and randomization parameters.The brightness or intensity function I and attractiveness function β can be defined, in terms of d, the distance between two fireflies, and γ, the absorption factor, as shown in Eqs. ( 7) and ( 8) respectively.While Eq. ( 9) gives the distance d between two fireflies i and j, located at coordinates x i and x j respectively.
where I o is the initial intensity at d = 0.
here, β o is the attractiveness at d = 0.
where x i,k is the kth component of x i related to firefly i. x j,k is the kth component of x j related to firefly j. n represents the dimensionality of the problem.Equation (10) gives the movement of firefly 'i' towards a brighter or more attractive firefly 'j' .
where αε is the randomizer parameter, where α is the coefficient and ε i is a random vector consisting of numbers gotten from a Gaussian or uniform distribution.

The modified firefly algorithm (MFA)
When employed for solar MPPT, the randomization parameter α of the FA exhibits some effects on the tracking process, depending on its value or size.For large amount of α, the search space of each firefly is increased and the convergence speed is reduced.While, for small value of α, there is high probability of trapping in the local optimums, thereby reducing the tracking accuracy and efficiency of the algorithm.Therefore, the conventional FA was modified, such that α is updated and reduced after each iteration.This was done using Eq.(11).Similarly, large amount of β o tends to decrease the convergence speed of the conventional FA.Therefore, β o was be modified using Eq. ( 12), by decreasing its value after each iteration, in order to increase the convergence speed of the algorithm.
where α m = minimum value of randomizer parameter, α M = maximum value of randomizer parameter, β om = minimum value of attractiveness, β oM = maximum value of attractiveness, Itn = iteration number, Itn M = maximum number of iterations (7)

Development of the PV system's MFA-based tracker
The following steps were followed to develop the MFA-based MPPT adopted for the system model, utilizing some already established parameters.In order to achieved this, for initialization of the scheme α = 0.98, β = 1, γ = 1, Number of fireflies = 4 and Itn M = 5, also, d m and d M , to 0.1 and 0.9 respectively.Furthermore, thus all fireflies are randomly positioned between d m and d M , Initial firefly positions were manually chosen as 0.25, 0.4, 0.55 and 0.7.Evaluation and update the intensity of each firefly using Eq.(7).While update effectiveness is achieved using Eq. ( 8) update firefly positions and random randomization factors were determined using Eqs.( 10) and ( 11) respectively.Finally, update attractiveness is determined using (12).Eventually, the flow chart in Fig. 5 shows the processes of the modified firefly algorithm which was employed in the MPPT of the PV system under study.

Flying squirrel search optimization
The flying squirrel search optimization (FSSO) is also one of the most recently applied techniques for solar MPPT under partially shaded conditions.It was developed based on the foraging nature and gliding locomotion of southern squirrels [4].This is displayed in Fig. 6, which also reviews that a squirrel can change its location (usually represented by a vector) anytime to any other favourable location.Thus they glide in several dimensional search spaces [19].Three regions of solutions can be represented by each tree and hence, three steps of implementation.Hickory tree ⇾ Optimum solution (OS), Acorn tree ⇾ Near optimum solution (NOS), Normal tree ⇾ Random solution (RS).Therefore, in step 1, NOS moves in the direction determined by the global best solution; in step 2, some of RS moves towards OS; and in step 3, the other parts of RS move towards NOS, hence establishing a cooperation between the three, and by implication, fostering faster convergence of the technique.
For MPPT applications, positions are updated for optimal solutions depending on the seasonal monitoring condition (SMC).The SMC takes into account, two parameters; the seasonal constant (S K ) and its least value (S L ), which is determined by Eqs. ( 13) and ( 14) respectively.Thus, positions are updated using SMC if S K < S L , otherwise a routine update (RU) is implemented.As a measure of validation, the model of [4] for MPPT was reproduced and compared with MFA.
where d at represents positions of squirrels at acorn tree, d ht represents positions of those at hickory tree, Itn is the current iteration number, and Itn M is the maximum iteration number.
For normal tree-positioned squirrels, using Eq. ( 15), the duty ratio d nt can be obtained, considering a step length l, determined using Levy distribution.Usually, a and b are obtained from normal distribution curve as given in Eq. ( 16), While k is the step coefficient and ∅ is the Levy index

Position update using RU
In this update method, the squirrel at the best solution, that is, at hickory tree, remains in its position, while others (those at acorn and normal tree) update their positions with respect to the global best position.Equations ( 19), ( 20) and ( 21) display their duty ratio update pattern, thus it is to be noted that not all squirrels eventually find the global solution, as some still return to the nearly optimal position (Singh et al., 2020).
where g d and G c are the gliding distance and gliding constant respectively.While, G c is usually taken as a constant, g d , as given in Eq. ( 24), requires the angle θ, between the drag and lift forces F d and F l , utilized by the squirrels for gliding and locomotion, to be determined.Equations ( 22) and ( 23), as contained in [4], respectively define the aforementioned forces. ( Here h l is the height loss after gliding, s c is the scaling factor, ρ is the air density, A is surface area, C d is the drag coefficient, C l is the lift coefficient and V is squirrel velocity. In this paper, the performance of the model in used in the analysis is assessed by the value of percentage errors as in Eq. ( 26) [20].

Modelling the system's FSSO-based tracker
Having analysed the tracking techniques proposed by the following steps are extracted and utilized, for validation of the proposed MFA-based tracker.Intial parameters used in this paper includes Number of Flying Squirrels = 4, G c = 1.90, s c = 18 to maintain g d between 0.5 < g d < 1.11, h l = 8 m, ρ = 1.204 kg/m 3 , A = 154 cm 2 , C d = 0.6, C l was ran- domly selected from 0.675 ≤ C l ≤ 1.5, and V = 5.25 m/s, fitness evaluation is by using minimum and maximum duty ratios, d m and d M , as 0.1 and 0.9 respectively.Compare Eqs. ( 13) and ( 14), hence update squirrels' positions using SMC equation and/or RU equations.Evaluate F d and F l using Eqs.( 22) and ( 23) respectively, and determine g d using (24) Update. (24) Fig. 7 I-V and P-V curves at different solar irradiance

Results and discussion effect of varying solar irradiance
As depicted in Fig. 7, the I-V and P-V characteristics of the PV system experience obvious changes due to changes in the amount of solar irradiance striking the modules.For a drastic decrease in solar irradiance, there is a corresponding drastic decrease in the photovoltaic current, causing a reduction of the maximum available current, which is the short circuit current (Isc), while the open circuit voltage (Voc) slightly reduces.Therefore, the maximum power is ultimately reduced, and vice versa.This clearly shows, as depicted by the red curves, that from an initial value of 8 A, at an irradiance of 1000 W/ m 2 , the PV current hugely reduced to about 3.2 A due to the drop irradiance down to 400 W/m 2 , while the voltage on slightly reduced.Therefore, the corresponding decrease in PV current is clearly demonstrated by the blue curves.This is because as modelled in the PV cell circuit, PV current directly relates to solar irradiation than PV voltage.

Effect of varying temperature
Unlike the case of varying irradiance, the effect of temperature change of the PV module is more conspicuous on Voc than on Isc.An increase in temperature results in a clear decrease in Voc and a slight increase in Isc, and vice versa, as seen in Fig. 8. Consequently, there will be a decrease in the photovoltaic power.From the Fig. 8, the red curve shows the PV voltage at an initial value of 145 V, which became gradually reduced to 120 V, as shown by the blue curves, due to the corresponding increase in temperature from 25 to 75 °C.This is because increased cell temperature negatively affects the performance of a PV module.There is however only a slight increase in the current due to the temperature change.Another vital effect of the increased cell temperature is the occurrence of hotpots on the PV panels, which can reduce the efficiency of an affected panel and ultimately, its damage.Therefore, operation at normal temperature is greatly recommended.While panels at 25 °C work most effectively according to manufacturers' standards, a range of 15-35 °C is considered generally tolerable.

Comparison of results obtained with the developed technique and FSSO
In order to find the GMPP, the PV system was simulated, engaging the developed technique and FSSO, to track the powers, at constant irradiance and when partial shading occurred.From the result, it was found that the MFA tracked a power of 431.65 W after 15 s as compared to the 431.93 W photovoltaic power of the system at constant irradiance.Thus, the tracking efficiency was found to be 99.93% with a tracking error of 0.07%, while FSSO tracked 430.25 W after 16 s of operating time.
The tracking efficiency was found to be 99.61%, with a tracking error of 0.39%.Furthermore, as seen from Fig. 9, at exactly 150 s, a partial shading occurred, rendering the photovoltaic power down to 195.48 W. It was found that the developed technique ascertained 194.97 W of the available power just 4 s after the drift, with an efficiency and error of 99.74% and 0.26% respectively, while FSSO was able to track 194.41 W, after 6 s, with a tracking efficiency of 99.45% and an error of 0.55% techniques.Similarly, Figs. 10 and 11, show that the open circuit voltages at maximum power, obtained with MFA were 138.03V and 101.85 V, at constant irradiance and at PSC respectively, while short circuit current values were respectively 2.83 A and 1.90 A at constant irradiance and at PSC.Furthermore, with the FSSO-based tracker, the maximum power open circuit voltages at constant irradiance and PSC were 137.57V and 101.51V respectively, while 2.86 A and 1.93 A were the short circuit currents obtained with FSSO at constant irradiance and PSC respectively.
Consequently, it was established that the developed technique outstripped FSSO, having ascertained a tracking efficiency of 99.93% as compared to 99.61% obtained with the latter, when the system operated at constant solar irradiance, thereby adding an improvement of 0.32% on the maximum power.Table 3 summarizes the rest of the improvements gained by the developed technique when matched with FSSO, when the system operated at constant irradiance.
Thus, an improvement of 0.29% was also gained on the maximum power tracked by the developed technique over FSSO, when the system was partially shaded, having obtained a tracking efficiency of 99.74% as compared to 99.45% obtained with [4].Table 4 displays the rest of the improvements added by the developed technique, when the system was partially shaded.

Conclusion
In this research work, a solar PV system has been modelled for its MPPT analysis.
The system was primarily composed of 4-series solar modules, a boost converter and a developed MPPT scheme, an MFA-based tracker, as an intermediary between the PV power source and the converter.The points of maximum powers, when the system was made active, to operate at a case of constant solar irradiance and at PSC, were determined by the developed tracker.The MFA tracker yielded a tracking efficiency of 99.93% at constant irradiance and 99.74% at PSC, and an improvement of 0.33% at constant irradiance and 0.29% at PSC, when compared to FSSO-based technique.Also, in terms of the tracking time, the developed method outclassed the FSSO technique, having yielded 6.25% and 33.33% improvements, during the operation of the system, at constant irradiance and at PSC respectively.

Fig. 1 a
Fig. 1 a Complete system model.b PV MPPT system with a boost converter

Fig. 2 Fig. 3
Fig. 2 System's P-V curve at constant irradiance and under PSC

Fig. 5
Fig. 5 Flow chart of the modified firefly algorithm

Fig. 8 I
Fig. 8 I-V and P-V curves at varying temperatures

Fig. 9
Fig. 9 Power-Time plot of MFA compared with FSSO

Fig. 11
Fig. 11 Current-Time plot of MFA compared with FSSO

Table 3
comparison of the proposed technique and FSSO at constant solar irradiance

Table 4
Comparison of the developed technique and FSSO when the system operated at PSC