- Research
- Open access
- Published:

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

*Journal of Electrical Systems and Information Technology*
**volume 10**, Article number: 48 (2023)

## Abstract

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.

### 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.

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.

### 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 *k*th component of *x*_{i} related to firefly *i*. *x*_{j,k} is the *k*th 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

### 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 randomly selected from 0.675 \(\le {C}_{l}\le \) 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.

## 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.03 V 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.57 V and 101.51 V 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.

## Availability of data and materials

In this work all data and materials used have been made available in the manuscript.

## References

Gulzar MM (2023) Maximum power point tracking of a grid connected PV based fuel cell system using optimal control technique. Sustainability 15(5):3980

Hemalatha C, Rajkumar MV, Krishnan GV (2016) Simulation and analysis for MPPT control with modified firefly algorithm for photovoltaic system. Int J Innov Stud Sci Eng Technol 2(11):48–52

Akram N, Khan L, Agha S, Hafeez K (2022) Global maximum power point tracking of partially shaded PV system using advanced optimization techniques. Energies 15(11):4055

Singh N, Gupta KK, Jain SK, Dewangan NK, Bhatnagar P (2020) A flying squirrel search optimization for ABB: MPPT under partial shaded photovoltaic system. IEEE J Emerg Sel Top Power Electron. 9(4):4963

Moreira HS, Silva JLDS, Prym GC, Sakô EY, dos Reis MVG, Villalva MG (2019) Comparison of swarm optimization methods for MPPT in partially shaded photovoltaic Systems. In: 2019 international conference on smart energy systems and technologies (SEST) (pp 1–6). IEEE

Huang YP, Ye CE, Chen X (2018) A modified firefly algorithm with rapid response maximum power point tracking for photovoltaic systems under partial shading conditions. Energies 11(9):2284

Sundareswaran K, Peddapati S, Palani S (2014) MPPT of PV systems under partial shaded conditions through a colony of flashing fireflies. IEEE Trans Energy Conves 29(2):463–472

Dhivya P, Kumar KR (2017). MPPT based control of sepic converter using firefly algorithm for solar PV system under partial shaded conditions. In: 2017 international conference on innovations in green energy and healthcare technologies (IGEHT) (pp 1–8). IEEE

Noman AM, Addoweesh KE, Alolah AI (2017) Simulation and practical implementation of ANFIS-based MPPT method for PV applications using isolated Ćukconverter. Int J Photoenergy. https://doi.org/10.1155/2017/3106734

Omar FA, Pamuk N, Kulaksız AA (2023) A critical evaluation of maximum power pointtracking techniques for PV systems working under partial shading conditions. Turk J Eng 7(1):73–81. https://doi.org/10.31127/tuje.1032674

Atharah N, Wei C (2014) A comprehensive review of maximum power point tracking algorithms for photovoltaic systems. Renew Sustain Energy Rev 37:585598. https://doi.org/10.1016/j.rser.2014.05.045

Huang YP, Huang MY, Ye CE (2020) A fusion firefly algorithm with simplified for photovoltaic MPPT under partial shading conditions. IEEE Trans Sustain Energy 11(4):2641–2652

Gopi RR, Sreejith S (2018) Converter topologies in photovoltaic applications: a review. Renew Sustain Energy Rev 94(May):1–14. https://doi.org/10.1016/j.rser.2018.05.047

Fathy A, Alharbi AG, Alshammari S, Hasanien HM (2021) Archimedes optimization algorithm based maximum power point tracker for wind energy generation system. Ain Shams Eng J. https://doi.org/10.1016/j.asej.2021.06.032

Babes B, Boutaghane A, Hamouda N (2021) A novel nature-inspired maximum power point tracking ( MPPT ) controller based on ACO-ANN algorithm for photovoltaic ( PV ) system fed arc welding machines. Neural Comput Appl. https://doi.org/10.1007/s00521-021-06393-w

Ayop R, Tan CW (2018) Design of boost converter based on maximum power point resistance for photovoltaic applications. Sol Energy 160:322–335. https://doi.org/10.1016/j.solener.2017.12.016

Sani S, Olarinoye GA, Okorie PU (2021) Modelling and analysis of photovoltaic system under partially shaded conditions using improved harmony search algorithm. Niger J Technol Devel. https://doi.org/10.4314/njtd.v17i4.4

Gandomi AH, Yang XS, Talatahari S, Alavi AH (2013) Firefly algorithm with chaos. Commun Nonlinear Sci Numer Simul 18(1):89–98

Ali SMAES (2017) Firefly algorithm based load frequency controller design of a two area system composing of PV grid and thermal generator. Electr Eng. https://doi.org/10.1007/s00202-017-0576-5

Jain M, Singh V, Rani A (2018) A novel nature-inspired algorithm for optimization: squirrel search algorithm. Swarm Evol Comput. https://doi.org/10.1016/j.swevo.2018.02.013

## Acknowledgements

The authors wish to thank and acknowledge the Department of Electrical Engineering, Ahmadu Bello University Zaria.

## Funding

This work has not received any external funding.

## Author information

### Authors and Affiliations

### Contributions

ISJ is an Msc student in the department of Electrical Engineering, AB University Zaria. AA and GAO are his major and minor supervisors respectively.

### Corresponding author

## Ethics declarations

### Competing interests

The authors declared that there no complicating interest whatsoever.

## Additional information

### Publisher's Note

Springer Nature remains neutral with regard to jurisdictional claims in published maps and institutional affiliations.

## Rights and permissions

**Open Access** This article is licensed under a Creative Commons Attribution 4.0 International License, which permits use, sharing, adaptation, distribution and reproduction in any medium or format, as long as you give appropriate credit to the original author(s) and the source, provide a link to the Creative Commons licence, and indicate if changes were made. The images or other third party material in this article are included in the article's Creative Commons licence, unless indicated otherwise in a credit line to the material. If material is not included in the article's Creative Commons licence and your intended use is not permitted by statutory regulation or exceeds the permitted use, you will need to obtain permission directly from the copyright holder. To view a copy of this licence, visit http://creativecommons.org/licenses/by/4.0/.

## About this article

### Cite this article

John, I.S., Abdulkarim, A. & Olarinoye, G.A. Maximum power point tracking of a partially shaded solar photovoltaic system using a modified firefly algorithm-based controller.
*Journal of Electrical Systems and Inf Technol* **10**, 48 (2023). https://doi.org/10.1186/s43067-023-00114-0

Received:

Accepted:

Published:

DOI: https://doi.org/10.1186/s43067-023-00114-0