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 (PV 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 pn junction semiconductor device. The model of solar PV cell is represented in Eqs. (1) and (2) using various circuital laws.

$$ I = I_{{{\text{PV}}}} - I_{{\text{d}}} - I_{p} $$
(1)

Where IPV is the photovoltaic current in Ampere (A), Id is the diode current in Ampere (A), Ip is the shunt current through Rp in Ampere (A), From Eq. (1), the relationship between the output voltage V and current I of the solar cell can be expressed as;

$$ I = I_{{{\text{PV}}}} - I_{o} \left\{ {\exp \left[ {\frac{{q(V + IR_{s} }}{nKT}} \right] - 1} \right\} - \frac{{V + IR_{s} }}{{R_{p} }} $$
(2)

where I is the diode reverse saturation current in Ampere (A), q = 1.6 * 10 c is the electron charge, K = 1.3805*10 jk1 is Boltzmann constant, T is the temperature of the pn junction, in Kelvin; n is the diode ideality constant, Rs is the Ohmic series resistance, Rp 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 Vo to input voltage Vmp 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.

$$ \frac{{V_{o} }}{{V_{mp} }} = \frac{{t_{{{\text{on}}}} + t_{{{\text{off}}}} }}{{t_{{{\text{off}}}} }} $$
(3)

where ton is the period for which switch is ON and toff is the OFF time of the switch.

It can be further established from Eq. (3) that;

$$ V_{o} = V_{mp} \left( {\frac{1}{1 - D}} \right) \;\;{\text{for}}\;\;0\; \le \le \;{1}00\% $$
(4)

$$ {\text{where}}\;D\; = \;\frac{{t_{{{\text{on}}}} }}{{t_{{{\text{on}}}} { } + { }t_{{{\text{off}}}} }}, \;{\text{is}}\;{\text{the}}\;{\text{duty}}\;{\text{cycle}}. $$
(5)

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/m2 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/m2, 600 W/m2 and 400 W/m2 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.

Fig. 1
figure 1

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

Table 1 PV modules parameters [4]
Table 2 DC–DC boost converter parameters [7]

Furthermore, Figs. 2 and 3 respectively show the PV and IV 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.

Fig. 2
figure 2

System’s PV curve at constant irradiance and under PSC

Fig. 3
figure 3

System’s IV curve at constant irradiance and under PSC

Fig. 4
figure 4

Flow chart of FA [18]

As shown above, the system exhibits smooth paths for both IV and PV 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 Pin and its resultant maximum output power Ppv, the efficiency of the solar ηsolar is stated in Eq. (6) as the ratio of Ppv to Pin [17].

$$ \eta_{{{\text{solar}}}} = \frac{{P_{pv} }}{{P_{{{\text{in}}}} }} = \frac{{V_{{{\text{oc}}}} *I_{{{\text{sh}}}} }}{{P_{{{\text{in}}}} }} $$
(6)

where Voc is the maximum open circuit cell voltage, occurring when cell current I = 0, and Isc 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 xi and xj respectively.

$$ I = I_{0 } e^{{ - \gamma d^{2} }} $$
(7)

where Io is the initial intensity at d = 0.

$$ \beta = \beta_{o} e^{{ - \gamma d^{2} }} $$
(8)

here, βo is the attractiveness at d = 0.

$$ d_{ij} = \, \left| {\left| {x_{i} {-} \, x_{j} } \right|} \right| \, = \sqrt {\mathop \sum \limits_{k = 1}^{n} \left( {x_{i,k } - x_{j,k} } \right)^{2} } $$
(9)

where xi,k is the kth component of xi related to firefly i. xj,k is the kth component of xj 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’.

$$ x_{i}^{t + 1} = x_{i}^{t} + \beta_{0 } e^{{ - \gamma d^{2} }} \left( {x_{j} - x_{i} } \right) + \alpha \varepsilon_{i} $$
(10)

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.

$$ \alpha = \alpha_{{\text{M}}} + \frac{{\left[ {{\text{Itn}} \times \alpha_{{\text{m}}} } \right] - \left[ {{\text{Itn}} \times \alpha_{{\text{M}}} } \right]}}{{{\text{Itn}}_{{\text{M}}} }} $$
(11)
$$ \beta_{o} = \beta_{{o{\text{M}}}} + \frac{{\left[ {\beta_{{o{\text{m}}}} \times 1/2^{{{\text{Itn}}}} } \right] - \left[ { \beta_{{o{\text{M}}}} \times 1/2^{{{\text{Itn}}}} } \right]}}{{{\text{Itn}}_{{\text{M}}} }} $$
(12)

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, ItnM = 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 ItnM = 5, also, dm and dM, to 0.1 and 0.9 respectively. Furthermore, thus all fireflies are randomly positioned between dm and dM, 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.

Fig. 5
figure 5

Flow chart of the modified firefly algorithm

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

Fig. 6
figure 6

Foraging behaviour of flying squirrels [4]

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 (SK) and its least value (SL), which is determined by Eqs. (13) and (14) respectively. Thus, positions are updated using SMC if SK < SL, otherwise a routine update (RU) is implemented. As a measure of validation, the model of [4] for MPPT was reproduced and compared with MFA.

$${S}_{K}=|{d}_{at}-{d}_{ht}|$$
(13)
$${S}_{L}=\frac{10*{e}^{-6}}{{\left(365\right)}^{\frac{2.5*Itn}{It{n}_{M}}}}$$
(14)

where dat represents positions of squirrels at acorn tree, dht represents positions of those at hickory tree, Itn is the current iteration number, and ItnM is the maximum iteration number.

For normal tree-positioned squirrels, using Eq. (15), the duty ratio dnt can be obtained, considering a step length l, determined using Levy distribution.

$$ d_{{{\text{nt}}}}^{{{\text{Itn}} + 1}} = d_{{{\text{nt}}}}^{{{\text{Itn}}}} + l $$
(15)
$$ {\text{for}}\;\;l = k\left( {d_{{{\text{ht}}}} - d_{{{\text{nt}}}} } \right)\left( {\frac{a}{{\left| b \right|^{{\frac{1}{\emptyset }}} }}} \right) $$
(16)

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

$$ a = N\left( {0,\partial_{a}^{2} } \right) ; b = N\left( {0,\partial_{b}^{2} } \right) $$
(17)
$$ where\, \partial_{a}^{2} = \left( {\frac{{\left( {\emptyset !} \right)\sin \left( {\frac{\pi \emptyset }{2}} \right)}}{{\left( {\frac{\emptyset - 1}{2}} \right)! \times 2\emptyset^{{\left( {\frac{\emptyset - 1}{2}} \right)}} }}} \right)\;;{\text{ and}}\;\partial_{b}^{2} = 1 $$
(18)

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

$$ d_{{{\text{at}}}}^{{{\text{Itn}} + 1}} = d_{{{\text{at}}}}^{{{\text{Itn}}}} + (G_{c} \times g_{d} )\left( {d_{{{\text{ht}}}}^{{{\text{Itn}}}} - d_{{{\text{at}}}}^{{{\text{Itn}}}} } \right) $$
(19)
$$ d_{{{\text{nt}}}}^{{{\text{Itn}} + 1}} = d_{{{\text{nt}}}}^{{{\text{Itn}}}} + (G_{c} \times g_{d} )\left( {d_{{{\text{ht}}}}^{{{\text{Itn}}}} - d_{{{\text{nt}}}}^{{{\text{Itn}}}} } \right) $$
(20)
$$ d_{{{\text{ht}}}}^{{{\text{Itn}} + 1}} = d_{{{\text{ht}}}}^{{{\text{Itn}}}} + (G_{c} \times g_{d} )\left( {d_{{{\text{at}}}}^{{{\text{Itn}}}} - d_{{{\text{nt}}}}^{{{\text{Itn}}}} } \right) $$
(21)

where gd and Gc are the gliding distance and gliding constant respectively. While, Gc is usually taken as a constant, gd, as given in Eq. (24), requires the angle θ, between the drag and lift forces Fd and Fl, utilized by the squirrels for gliding and locomotion, to be determined. Equations (22) and (23), as contained in [4], respectively define the aforementioned forces.

$$ F_{d} = \frac{1}{2}\rho AC_{d} V^{2} $$
(22)
$$ F_{l} = \frac{1}{2}\rho AC_{l} V^{2} $$
(23)
$$ g_{d} = \frac{{h_{l} }}{{s_{c} \tan \theta }} $$
(24)

$$ {\text{where}}\;\;{\text{tan}}\theta = \frac{{F_{d} }}{{F_{l} }} $$
(25)

Here hl is the height loss after gliding, sc is the scaling factor, ρ is the air density, A is surface area, Cd is the drag coefficient, Cl 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].

$$ {\text{error}}\left( \% \right) = \frac{1}{n}\mathop \sum \limits_{i = 1}^{n} \frac{{{\upeta }_{{{\text{proposed}}}} - {\upeta }_{{{\text{FSSO}}}} }}{{{\upeta }_{{{\text{proposed}}}} }} \times 100\% $$
(26)

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, Gc = 1.90, sc = 18 to maintain gd between 0.5 \(<{g}_{d}<\) 1.11, hl = 8 m, ρ = 1.204 kg/m3, A = 154 cm2, Cd = 0.6, Cl 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, dm and dM, as 0.1 and 0.9 respectively. Compare Eqs. (13) and (14), hence update squirrels’ positions using SMC equation and/or RU equations. Evaluate Fd and Fl using Eqs. (22) and (23) respectively, and determine gd 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/m2, the PV current hugely reduced to about 3.2 A due to the drop irradiance down to 400 W/m2, 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.

Fig. 7
figure 7

I–V and P–V curves at different solar irradiance

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.

Fig. 8
figure 8

I–V and P–V curves at varying temperatures

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.

Fig. 9
figure 9

Power–Time plot of MFA compared with FSSO

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.

Fig. 10
figure 10

Voltage–Time plot of MFA compared with FSSO

Fig. 11
figure 11

Current–Time plot of MFA compared with FSSO

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.

Table 3 comparison of the proposed technique and FSSO at constant solar 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.

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

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.