1 Introduction

1.1 Motivation and aims

Nowadays, the implementation of sustainable economic development strategies is essential owing to the reduction of fossil-fuel-based resources and environmental problems [1, 2]. Among all types of renewable energy sources (RESs), photovoltaic (PV) power plants have many advantages such as high safety, simple installation, low maintenance cost and environmentally friendly. Therefore, the development of solar power plants is faster than other renewable power plants around the world [3]. Nevertheless, due to the dependence of the output power of solar power plants on solar radiation, their stochastic behavior should be considered [4, 5].

Owing to the stochastic nature of PV systems and also the impossibility of generating electricity during the night, solar power plants must generate power in the distribution networks along with other sources such as storage devices. In other words, due to the impossibility of continuous power generation by PV systems, it is needed for solar systems to operate in combination with battery energy storage (BES) systems [6]. The use of hybrid systems, including solar power plants and BESs, not only solves the problem of the stochastic output of PVs but also it is more cost-effective economically. Nevertheless, it is needed to reduce investment costs to reduce the payback period of hybrid PV-BESs [7]. The use of such a hybrid system provides the capability of storing excess power of PV systems in off-peak periods with low cost to use it in peak times.

1.2 Literature review

For solar power plants, producing the maximum probable power rapidly and reliably in different environmental conditions is significant, which is called MPPT. Accordingly, equipping such renewable resources with a proper MPPT control method is required. In a situation where all the modules of the solar system are illuminated, the power–voltage curve has one single maximum power point (MPP). MPPT controller can greatly increase the efficiency of solar power plants by tracking the peak power point [8]. The first MPPT for PV systems is proposed in 1968 for space applications [9]. Then, various researchers around the world evaluate MPPT controllers based on different indexes such as dynamic behavior, reliable operation, tracking performance, equipment efficiency and simple structure [10]. High speed, low fluctuations at the peak power point and the ability to quickly track output power changes are the main benefits of the proposed optimal MPPT algorithm in the literature. MPPT controllers may be classified on the basis of performance into conventional approaches and advanced (soft computing) techniques [11]. Among various traditional methods, P&O [12], INC, constant voltage and current [13] are common because of simplicity. However, such conventional techniques have the ability to trace the single maximum power point on uniform irradiance [14]. Consequently, traditional MPPT approaches have fluctuations near the global MPP; subsequently voltage perturbations benefit it to properly trace the global MPP [15]. Although traditional MPPT approaches have less complexity than new methods, the use of them in high power applications due to high perturbation rates is not desirable. In other words, the high perturbation rate around the global peak and power oscillations are the main drawbacks of the traditional MPPT control approaches.

On the other hand, tracking performance in new MPPT techniques which are called soft computing, bio-inspired (BI) or artificial intelligence methods (AI) has improved considerably compared to conventional methods [15]. Artificial neural network (ANN) [15], the FLC and heuristic methods are the most popular among different types of improved MPPT techniques. Soft computing-based MPPT plays an important role in finding out the best suitable technique for solving nonlinear problems in the literature due to high-speed convergence and high reliability [16]. Several papers have been published on FLC-based MPPT approaches. These controllers are capable of operating with imprecise inputs; therefore, they do not require precise mathematical modeling and can properly cope with nonlinearity [17]. Nevertheless, the choice of the size of the rule base, the shape and parameters of the membership functions as well as the rule inference mechanism can affect the design of the FLC. In [18], improved MPPT control method based on fuzzy set theory is recommended to enhance the efficiency in a PV system. A fuzzy-based MPPT controller using a small number of rules for a PV system to extract maximum power is suggested in [19]. The proposed method can be easily used for real systems. Another advantage of the fuzzy system is the small memory requirement. However, self-tuning capability is the main disadvantage of the fuzzy-based MPPT controller. To overcome the problem of self-tuning ability, an adaptive FLC for a PV system is recommended in [20]. The proposed method has the ability to change the control parameters under different conditions.

In [21], to overcome the rapid changes of the irradiances in the FLC-based MPPT controller, a particle swarm optimization (PSO) is used for regulating the duty cycle of the DC-DC converter. An improved P&O method is utilized for fine-tuning membership functions (MFs) of the FLC for a grid-tied solar power plant [22]. Even though this scheme provides a high-speed tracking performance, it suffers from oscillations around maximum peak power. In [23], the grey wolf optimizer and random forest algorithms are used at the same time as a novel hybrid MPPT technique. Nonetheless, the major limitation of this scheme is the slow convergence speed. In addition, for rapid variations in irradiances, the initial oscillations at the MPP are very high.

Overcoming the uncertainties in the output power of RESs is another major challenge in the use of hybrid generating technologies. Hybrid PV-BES systems can enhance the reliability and stability of a network supplying with stochastic renewable energy generation [17,18,19,20,21]. In fact, the use of BESs in combination with a solar system can effectively address the problem of the intermittent and stochastic behavior of PV systems. So far, numerous studies have attempted to design proper control methods for the hybrid system [24,25,26].

2 Contribution

In this present paper, an enhanced control system is utilized in the case of a hybrid PV-BES that is coupled to the power system and the MPPT performance is considered for obtaining MPP at changeable temperature and utilizing an intelligent approach. The suggested MPPT scheme is implemented based on the MBA and FLC regulators. The MBA algorithm is responsible for adjusting the MF scaling factors of the FLC and automatically tunes the MFs of output and inputs. An improved PQ control scheme is also suggested for grid-connected mode.

The remainder of this study is structured as: The PV modeling is presented in Sect. 2. BES modeling is given in Sect. 3. The power flow management scheme is designed in Sect. 4. The FLC and MBA are discussed in Sects. 5 and 6, respectively. Section 7 is represented simulation results. Conclusions are given in Sect. 8.

3 PV model

The main components of PV systems are solar cells with p–n junction. They produce photocurrents when exposed to sunlight and act like diodes in the absence of light radiation. Figure 1 shows the solar cell modeling. Since a single solar cell cannot generate high voltages alone, it is needed to join numerous solar cells in parallel and series to procedure PV modules according to Fig. 2. The amount of output power in PV systems is significantly relevant to the level of irradiation and environment temperature. This type of modeling provides a proper tradeoff between simplicity and precision [24].

$$I = I_{photo} - I_{sat} *\left[ {\exp \left( {\frac{{q\left( {V + I*R_{S} } \right)}}{{N_{S} *V_{T} }} - 1} \right)} \right] - \frac{{V + R_{S} *I}}{{R_{P} }}$$
(1)
$$I_{photo} = \left[ {I_{ref} + K_{i} *\Delta T} \right]*\frac{G}{{G_{0} }}$$
(2)
Fig. 1
figure 1

The solar cell modeling

Fig. 2
figure 2

The model of PV cell, (b) A PV model

Further details on the modeling of solar systems are given in ref [25,26,27]. In order to perform the necessary simulations, Red sun 90 W PV module is utilized. PV parameters are represented in Table 1.

Table 1 Red sun

Where IMP, VMP and PMax are the current, voltage and power at the maximum power point, correspondingly. NP stands for parallel cells and NS indicates the series cells.

4 Battery model

BESs have a significant impact on the economic and sustainable operation of distribution networks, including renewable energy resources [1, 25]. In this article, a lead-acid (LA) battery is used to perform simulations. The use of this type of battery in electrical networks is very common. The BES is joined to the DC bus using a bi-directional DC/DC power converter. In this paper, the power system is used as the backup source to respond to the required demand in conditions of irradiance change or transient periods. In other words, BES can only support the electric network in short-duration times. The major duty of the BES systems is to keep the DC-link voltage at a constant value. Keeping the DC-link voltage constant can provide a stable voltage without any fluctuations, without considering that the battery is charged or not. The following equation represents the charge/discharge voltage of the battery [17,18,19,20,21,22,23,24]:

$$V_{batt} = E_{batt} - R.I_{batt}$$
(3)

Ebatt, which is the internal battery’s voltage, is represented in the following:

Charge: (i* < 0)

$$E_{batt} = E_{0} - k_{B} \frac{C}{{i_{t} + .1C}}.i* - K_{B} \frac{C}{{C - i_{t} }}.i_{t} + \alpha (t)$$
(4)

Discharge: (i* > 0)

$$E_{batt} = E_{0} - k_{B} \frac{C}{{C - i_{t} }}.i* - K_{B} \frac{C}{{C - i_{t} }}.i_{t} + \alpha (t)$$
(5)

The discharge characteristic of the battery at rated discharging current is shown in Fig. 3. The detailed modeling of the BES is discussed in ref [1].

Fig. 3
figure 3

Discharging characteristics of the battery

5 Proposed PQ controller

The most important task of a distributed generation (DG) in grid-tied mode is injecting predetermined power to the network. Injecting the predetermined power of DGs into the distribution networks is done using voltage or current controllers. Here, a current controller is considered for regulating the output power DG units [28, 29]. In the PQ scheme, the output real/reactive powers are used as control parameters and compared with their reference values. The PQ control mode is given in Fig. 4. The output voltage/current (x) can be written as:

$$\left[ \begin{gathered} x_{a} \hfill \\ x_{b} \hfill \\ x_{c} \hfill \\ \end{gathered} \right] = \left[ \begin{gathered} X{}_{m}\cos (wt) \hfill \\ X{}_{m}\cos (wt - \frac{2\pi }{3}) \hfill \\ X{}_{m}\cos (wt + \frac{2\pi }{3}) \hfill \\ \end{gathered} \right]$$
(6)
Fig. 4
figure 4

Conceptual model of the PQ controller

Equation (6) can be represented in the dq frame as:

$$T_{abc \to dq} = \frac{2}{3}\left[ \begin{gathered} \cos (wt)\,\,\,\,\,\,\,\,\,cos(wt - \frac{2\pi }{3})\,\,\,\,\,\,\,\cos (wt + \frac{2\pi }{3}) \hfill \\ \sin (wt)\,\,\,\,\,\,\,\,\,\,\,\sin (wt - \frac{2\pi }{3})\,\,\,\,\,\,\,\sin (wt + \frac{2\pi }{3}) \hfill \\ \frac{1}{2}\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\frac{1}{2}\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\,\frac{1}{2} \hfill \\ \end{gathered} \right]$$
(7)

The real and reactive power in the dq frame can also be described as:

$$P = \frac{3}{2}.(v_{q} i_{q} + v_{d} i_{d} )$$
(8)
$$Q = \frac{3}{2}.(v_{q} i_{d} - v_{d} i_{q} )$$
(9)

6 MPPT methods

There are nonlinear characteristics in the solar system such as current–voltage and active power-voltage. These properties can be changed by varying radiation and temperature. Hence, in solar modules, one can change the MMP by changing the ambient conditions. Hence, for producing the maximum power, solar modules were used by a DC-DC converter. In order to obtain the optimal point of operation, the regulator of MPPT is used in PV systems [7]. In the MPPT controller with proper design, there exist important factors that have to be specified between every perturbation (i.e., the maximum step size along with minimum sampling rate). The input-side MPPT regulator is shown in Fig. 5 [8].

Fig. 5
figure 5

Block diagram of MPPT method

6.1 FLC controller

FLC is based on fuzzy set theory which is to some degree similar sets whose components have degrees of membership. The advantages of this method are its simplicity and robustness and no need the precise mathematical model. Moreover, this method has a remarkable ability to deal with the nonlinear behavior of the system, as well as inaccurate inputs and parameters.

FLC mainly contains the four various parts as [6, 24]:

  • Fuzzification: this stage uses for transforming the crisp values into linguistic values.

  • Fuzzy inference system: this stage has the capability of expressing logical decisions on the basis of fuzzy concepts and convert the fuzzy rules using the fuzzy concept into the fuzzy linguistic output.

  • Rule base: rule base is used to describe the overall control policy of the system.

  • Defuzzification: by fuzzy membership functions the fuzzy output values back to actual system values.

The suggested FLC, as presented in Fig. 6, includes two inputs variable and one output variable. Each variable is characterized by seven membership functions as given in ref [6, 24]. E and CE can be calculated as:

$$E(K) = \frac{dP}{{dV}} = \frac{{P_{PV} (K) - P_{PV} (K - 1)}}{{V_{PV} (K) - V_{PV} (K - 1)}}$$
(10)
$$CE(K) = E(K) - E(K - 1)$$
(11)
Fig. 6
figure 6

Block diagram of FLC

E (k) indicates variation in its amount of V-P curve’s slope, and ΔD demonstrates variation of duty cycle.

In addition, the variable in output was

$$\Delta D = D(K) - D(K - 1)$$
(12)

E(k) shows variation for V-P curve’s slope,

FLC Toolbox in MATLAB/Simulink is applied for implementing rule base and membership functions. The rule base is presented in Ref [24]. In this paper, the method proposed by Mamdani is used as a fuzzy inference system in which the center method is taken into account for defuzzification. The MFs’ output and input variable regarding FLC is depicted in Fig. 7.

Fig. 7
figure 7

Membership functions; (a) input; (b) change in input; (c) output

6.2 Suggested adaptive FLC based MPPT

In previous FLC control methods, MFs are typically selected incorrectly. However, many authors have recently developed swarm optimization methods to adjust the scaling factors of inputs and output parameters of MFs. Several schemes have been proposed for fuzzy parameter tuning [30]. Here, the MBA algorithm is employed for tuning scaling factors. More details about the MBA algorithm are given in [31]. Figure 8 shows the suggested controller. To decrease the number of variables in the optimization process, the scaling factors of MFs are tuned in preference to fuzzy set ranges. The use of this method leads to reaching the maximum point of power quickly. The integral time absolute error (ITAE) criteria are utilized for the cost function as:

$$ITAE = \int_{0}^{\infty } {t \times } \left| {e(t)} \right|dt$$
(13)
Fig. 8
figure 8

Proposed Adaptive FLC

6.2.1 MBA

In this part, the MBA algorithm is presented.

6.3 Original BA

The BAT search algorithm operates by imitating the echolocation activities of bats in finding their foods. Yang [31,32,33] proposes this algorithm to cope with different optimization difficulties. Each virtual bat uses a similar method to update its position. Some of the echolocation characteristics of the bats are used for developing rules related to the BAT algorithm.

  1. a.

    Bats use echolocation features to differentiate between prey and barrier.

  2. b.

    Each bat flies accidentally with the velocity at position Xi with a varying frequency frei, changing wavelength and loudness to search for prey.

  3. c.

    Frequency, loudness Ai and pulse released rate of each bat are varied.

  4. d.

    The loudness varies from a very large amount to a minimum constant amount.

The position and velocity Veli of each bat must be introduced and changed. The bat's location is then improved to find the best result [31,32,33].

The location of each bat is formulated as:

$$\begin{gathered} fre_{i} = fre_{i}^{\min } + \beta \left( {fre_{i}^{\max } - fre_{i}^{\min } } \right)\,\,\,\,\,\,\,\,\,;i = 1,...,N_{p} \hfill \\ X_{i}^{new} = X_{i}^{old} + Vel_{i}^{new} \hfill \\ Vel_{{}}^{new} = Vel_{i}^{old} + fre_{i} (X_{best} - X_{i} ) \hfill \\ \end{gathered}$$
(14)

In order to attain better results, a more updating mechanism has been considered. The second move is a local search around each bat in order to determine the best location in the neighborhood space.

$$X_{i}^{new} = X_{i}^{old} + \xi A_{mean}^{old} \,\,\,;\,\,\,\,i = 1,...,N_{p}$$
(15)

\(A_{mean}^{old}\) indicates the column-wise mean value of the bat population. If not, a novel possible position \(X_{i}^{new}\) is generated accidentally, \(\xi\) is a random number in the range of [-1,1].

$$\left[ {\lambda < A_{i} } \right]\& \left[ {f(X_{i} ) < f(X_{best} )} \right]$$
(16)

\(\lambda\) is the velocity increment.

Then, the rate and loudness of bats is improved as:

$$\begin{gathered} A_{i}^{Iter + 1} = \alpha A_{i}^{Iter} \hfill \\ r_{i}^{Iter + 1} = r_{i}^{0} \left[ {1 - e^{ - \rho \times Iter} } \right] \hfill \\ \end{gathered}$$
(17)

where a is a constant in the range of [0, 1].

6.4 Modification method

In this section, three novel modifications are suggested for the BA. The Levy flight is also utilized to make a random walk around each bat. It has a great ability in optimization applications [31,32,33] and used to enhance the position of each bat Xi as:

$$L\mathop e\limits^{/} vy\left( \theta \right) \sim \tau = Iter^{ - \theta } ;\,\,\,\,\left( {1 < \theta \le 3} \right)$$
(18)
$$X_{i}^{new} = X_{i}^{old} + \phi_{2} \oplus L\mathop e\limits^{/} vy(\omega )$$
(19)

Novel solutions with better position can be replaced with the old bats. Applying the acceleration formulation for enhancing the diversity of the bats population is the second modification. In this process, worse bats move toward the best bats. The acceleration movement of each location Xi to Xbest is obtained through computing the distance between a bat in the search space and Xbest. Consequently, the distance of Xi from the best bat in the population Xbest in each iteration and for each bat Xi is [31, 32]:

$$D = \left\| {X_{best} - X_{i} } \right\| = \sqrt {\sum\limits_{k = 1}^{d} {\left( {x_{best,k} - x_{i,k} } \right)^{2} } }$$
(20)
$$X_{best} = \left[ {x_{best,1} ,x_{best,2} ,x_{best,3} ,...x_{best,d} } \right]$$
(21)
$$X_{i} = \left[ {x_{i,1} ,x_{i,2} ,...,x_{i,d} } \right]$$
(22)

where D is the distance of two bats. Then, an attractiveness parameter ∅ can be described for Xbest:

$$\phi = \phi_{0} \exp ( - D)$$
(23)

where ∅0 is attractiveness of Xbest with zero distance. Afterward, the position of Xi can be defined as:

$$\begin{gathered} X_{i}^{new} = \phi X_{i}^{old} + \left( {1 - \phi } \right)X_{best} + u_{k} \hfill \\ u_{k} = \pi \left( {rand - \frac{1}{2}} \right) \hfill \\ \end{gathered}$$
(24)

where π is the absorption coefficient using for controlling the reduction rate. The last amendment technique is implemented on the basis of the crossover operator from the genetic algorithm. For each bat Xi, the crossover operator is provided by the best bat Xbest as:

$$x_{i} = \left\{ \begin{gathered} x_{best,k} ;\,\varphi_{3} \le \varphi_{4} \hfill \\ x_{i,k\,\,\,;\,\,Else} \hfill \\ \end{gathered} \right.\,\,\,$$
(25)

7 Simulation results

In this part, simulations are considered to demonstrate the proper performance of the offered MPPT and power flow control methods. The main objective of the suggested controller is to maximize the output power of PV modules. For simulations, MATLAB/Simulink software is used in two separate case studies.

Figure 9 shows the proposed control scheme. The network operates at 220 V and 60 Hz. Table 2 shows the control parameters. The Red sun 90 W has been employed in the present study.

Fig. 9
figure 9

Proposed control system

Table 2 Parameters of the model

The tracking efficiency of the PV system is represented as follows:

$$\eta_{MPPT} = \frac{{\int_{{t_{1} }}^{{t_{2} }} {Pdt} }}{{\int_{{t_{1} }}^{{t_{2} }} {P_{\max } dt} }}$$
(26)

7.1 Effect of irradiance

This paper recommends the FLC and the improvement to optimally adjust the MFs of FLC by the MBA to cope with the uncertainties in irradiances. The suggested scheme is investigated in this part, considering that the system functions in the grid-tied circumstances. The solar irradiance is raised in the intervals [0–2 s, 4–6 s] and decreased in the interval [2–4 s and 8–11 s] as shown in Fig. 10a to evaluate the sensitivity of the suggested controller.

Fig. 10
figure 10

a irradiance variations; b PV power; c BES power

The temperature is constant at 25 °C. The behavior of the solar power plant with a quick deviation in solar irradiance is depicted in Fig. 10b. As seen, the suggested control method, i.e., the MBA-FLC, provides a proper performance along with little deviations near the MPP and improved convergence speed. Under various circumstances, the recommended MBA-FLC confirms an improved performance in comparison with conventional approaches. When a sudden change happens in climate situations, oscillations of the operating point are restricted. Considering the irradiance values less than 1 kW/m2, the output power becomes less than 7.3 kW, and consequently, the utility grid is supplied with active power as shown in Fig. 10c. The achieved values of MPPT related to different values of irradiance are given in Table 3. Moreover, the tracking effectiveness, response time and oscillations around the MPP, considering the variable irradiance are depicted in Fig. 11(a)-(d). Such figures point out that the effectiveness of the proposed scheme is 99%, significantly higher than those attained by other approaches. The suggested MPPT can easily deal with abnormal circumstances.

Table 3 Outputs power of the PV (watt)
Fig. 11
figure 11

Irradiance changes: a the efficiency; b response time; c oscillation around MPPT; d efficiency of MBA-FLC

7.2 Temperature variation

Here, the temperature effect at 1000 W/m2 is evaluated for the solar system. Considering a rapid change as shown in Fig. 12(a), the performance of the solar power plant can be attained. Figure 12(b) demonstrates the output power produced by different control approaches, which confirms the improved performance of the proposed method. As seen, oscillations near the MPP happen by means of other approaches when the temperature rises. Additionally, the temperature is reduced at t = 4 s, resulting in a decline in the current. By decreasing the output of the solar system, the utility grid should be supplied the needed power. Figure 12(c) shows the outcomes achieved using various methods for the power delivered by the utility grid, considering the changes in the temperature. Additionally, the results attained for the MPPT by other approaches are given in Table 4. The results for different control methods are shown in Fig. 13 (a)-(c). Besides, Fig. 13(a) demonstrates the efficiency of the MBA-FLC. The attained outcomes confirm that the efficiency of the suggested control method is 99% as given in Fig. 13 (d), significantly higher than other methods. The efficiencies of other methods are all less than 97%.

Fig. 12
figure 12

(a) Temperature variations; (b) PV power; (c) BES power

Table 4 Outputs power of the PV (watt)
Fig. 13
figure 13

Temperature changes: (a) efficiency; (b) response time; (c) variations around MPPT; (d) efficiency of MBAFLC

7.3 Irradiance evaluation in 24 h

It is depicted in Fig. 14(a). Figure 14(b) compares the MBA-FLC with other methods regarding the active power considering different values of irradiance. Figure 14(b) illustrates the associated power output of the PV system with low-speed variations of the solar irradiance and validates the improved performance of the recommended control method. In this regard, an effective theoretical approach is offered for the MPPT to evaluate its behavior in different circumstances.

Fig. 14
figure 14

(a) Irradiance variations. (b) PV system power

8 Conclusion

For recyclable nature and eco-friendliness, the PV system is one of the most widely used types of RESs all over the world. However, extracting as much as possible power from the PV systems has been commonly a major challenge in such types of RESs. This paper suggests improved control schemes for a hybrid power system comprising a PV system and battery storage in connection with the main grid. A new MPPT control strategy for the PV system is proposed under various weather circumstances using MBA-FLC. Simulations are provided to confirm the accuracy of the suggested MPPT constraint conditions irrespective of the changing irradiance, temperature or load. The proposed MPPT scheme shows better performance in comparison with conventional control techniques.