Photovoltaic power generation offers the benefits of clean, non-polluting power generation, production of power close to the consumer with very little maintenance requirement, and of having a especially extensive life period [1]. Recently, the photovoltaic power generation is one of the best growing fields for the engineers. There are number of ways for maximizing the power output of a PV grid array. MPPT control method of PV system was proposed and estimated the process for every two perturb processes in search for the maximum power output of PV grid array. The estimate-perturb-perturb (EPP) method significantly improves the tracking accuracy and speed of the MPPT control [2]. Introduce the exercise of BFO and ABFO techniques to develop a well-organized forecasting model for prediction of various ranges of input parameters for getting maximum power output [3]. A Particle Swarm Optimization (PSO) method of MPPT for PV system was proposed and discussed the effect of various irradiation conditions with partial shading. They found that PV system output power was increased with PSO method [4]. Artificial neural network (ANN) method was proposed for a PV system to get maximum power point tracking (MPPT) and observed that new MPPT algorithm can search the MPP fast and exactly based on the feedback voltage and current with different solar irradiance and temperature of environment [5]. FLC and MPPT were based on a voltage control approach of the power converter with a discrete PI controller and eliminate fluctuation in output power of PV system for getting MPPT [6]. A new heuristic population-based search algorithm was proposed and compared SOA with recently reported optimization algorithms like bacteria foraging optimization (BFO) and genetic algorithm (GA). They found that SOA is more effective than either BFO or GA in finding the optimal transient performance [7]. Swarm intelligence with PO algorithm was proposed and analyized oscillations in the output power, voltage and current of the PV system [8]. Perturbation and observation (P&O) method was proposed to track the MPPT of PV system for getting maximum system efficiency and obtained maximum power of PV system when compare with traditional P & O [9]. A fuzzy logic method for the MPPT of a photovoltaic system under variable temperature and insolation conditions was proposed and obtained that the effiecieny of the PV system increases [10]. Compares 62 different techniques of MPPT and gave information of choosing right algorithm for desired output [11]. MATLAB based PV array model was developed and studied the effect of varying temperature and insolation conditions on the performance of the PV array [12]. A new MPPT algorithm using neuro fuzzy system was presented to get the maximum power across the inverter terminals [13]. MATLAB/Simulink based MPPT methods were discussed in terms of the dynamic response of the PV system to variations in temperature and irradiance, attainable efficiency, and implementation considerations [14]. FLC technique gives better and more reliable control for PV grid system with varying weather conditions [15]. Efficiency of MPPT system of the PV system was increased by 2% by using P&O method [16]. To get MPPT under different operating conditions only when all nonlinearities in the characteristic I-V curves were omitted [17]. A new BAT algorithm for MPPT control design was suggested to PV system based on Switched Reluctance Motor (SRM) PI controller and developed PI controller was used to reach MPPT by monitoring the voltage and current of the PV array. The performance of the developed BAT algorithm was compared with Particle Swarm Optimization (PSO) for different disturbances to confirm its robustness [18]. Nevertheless, PV system power is still considered to be more expensive. The cost reduction and MPPT of PV system is subject to extensive research. The objective of this paper is to compare the BFO-PSO model with P & O model and PSO model by using various membership functions of fuzzy logic for PV grid array to get maximum power output.

Methods of MPPT

All MPPT controller work towards to set an optimal duty cycle of boost converter so that voltage generated by PV array can be boosted to desire. The following methods are used for getting MPPT of PV array.

Particle swarm optimization method

Particle swarm optimization (PSO) method is a population based stochastic optimization technique. The system is initialized with a population of random solutions and searches for optimum power generations. PSO has been successfully applied in many areas: function optimization, artificial neural network training, fuzzy system control, and other areas where GA can be applied [14].

Perturbation & observation method

The mainly used method for MPPT is P&O. P&O method algorithm exercises simple feedback arrangement and tiny measured parameters. In this method, the module voltage is periodically given a perturbation and power output is compared with that at the previous perturbing cycle. This perturbation causes the power output of the solar module varies. If the power increases due to the perturbation then the perturbation is continued in the same direction [17]. After getting the maximum power, MPP is zero and in next instant decreases and hence after that the perturbation reverses as. When the steady state is arrived the algorithm oscillates around the MPP [14, 16].

Bacterial foraging optimization method

Bacteria Foraging Optimization Algorithm (BFOA) is a novice to the family of nature-inspired optimization algorithms. A bacterium moves by taking small steps while searching for nutrients, is called chemotaxis and key idea of BFOA is mimicking chemotactic movement of virtual bacteria in the observation area. During foraging of the real bacteria, locomotion is achieved by a set of tensile flagella. Flagella help an E.coli bacterium to tumble or swim, which are two basic operations performed by a bacterium at the time of foraging. When they rotate the flagella in the clockwise direction, each flagellum pulls on the cell. That results in the moving of flagella independently and finally the bacterium tumbles with lesser number of tumbling whereas in a harmful place it tumbles frequently to find a nutrient gradient [7, 14, 19].

Moving the flagella in the counter-clockwise (Swim) direction aids the bacterium to swim at a very rapid rate. Usually, the bacteria move for a longer distance in a friendly situation. Figure 1 represents clockwise (Tumble) and counter clockwise movement of a bacterium in a nutrient solution. When they get food in sufficient, they are increased in length and in presence of suitable temperature they break in the middle to from an exact replica of itself. This experience motivated to introduce an event of reproduction in BFOA [3].

Fig. 1
figure 1

Swim and tumble of a bacterium

Fuzzy logic control for MPPT

MPPT is divided into two steps, first will lift the response of MPP and other will lift the stability after MPP. The fuzzy controller consists of three sub-blocks which are fuzzification in which actual situation variable is converted to fuzzy variable, inference model which inherits the rule set or decision variables and defuzzification which reverse the fuzzy variables to situation variables. Figure 2 shows the basic structure of fuzzy logic controller [6, 20].

Fig. 2
figure 2

Basic structure of fuzzy logic controller

The fuzzy logic controller for the MPPT has two real time inputs measured at every sampling time, named ‘E’ and ‘CE’ and one output named ‘Duty cycle (DC)’ for each of the phases [21, 22]. The error at sample time k is calculated by [20, 23, 24].

$$ E(k)=\frac{\partial P}{\partial V}=\left[\frac{P(k) - P\left( k-1\right)}{V(k)- V\left( k-1\right)}\right] $$
$$ C E= E(k)- E\left( k-1\right) $$

The input signals are fuzzified and represented in fuzzy set notations by membership functions. Fuzzy logic control engages three steps: fuzzification, interference and defuzzification. Fuzzification transforms the non-fuzzy input variable measurements into the fuzzy set (linguistic) variable that is a clearly defined boundary. In the proposed controller, the ‘E’ and ‘CE’ are defined by linguistic variables such as NB, NS, ZE, PS, PB characterized by memberships. The memberships are curves that define how each point in the input space is mapped to a membership value between −0.032 to 0.032 and −100 to 100 for ‘E’ and ‘CE’ respectively. The membership functions belonging to the other phases are identical. The membership functions for the inputs are shown in Fig. 3 (a) & (b) and for output variable is shown in Fig. 3(c).

Fig. 3
figure 3

Membership function of a input E, b input CE c output DC

Z axis represents the output modulation technique. Define only membership function does not complete fuzzy logic designing. Rule sets for taking decision have to be designed also and a set of 25 rules in our case is designed in Table 1. The Rule Viewer displays a roadmap of the whole fuzzy inference process. It is based on the fuzzy inference diagram. The three column plots represent rules of E, CE and output. Each rule is a row of plots, and each column is a variable. The rule numbers are displayed on the left of each row. You can click on a rule number to view the rule in the status line. The defuzzified output is displayed as a bold vertical line on this plot. The Rule Viewer allows you to interpret the entire fuzzy inference process at once. The Rule Viewer also shows how the shape of certain membership functions influences the overall result. Based on these rules output duty cycle range is decided.

Table 1 Fuzzy logic rules sets

Methodology adopted

The optimization of duty cycle is most important output of any PV grid array. Which is predicted by fuzzy logic tune with BFO based algorithm. Here, BFO and PSO combined algorithm is developed and represented with the help of flow diagram in Fig. 4. With the combination of BFO & P&O methods a new set of output is obtained which is better than BFO & P&O used separately. BFO & P&O based combine algorithm gives more tuned direction of bacteria rather than random direction of bacteria in conventional BFO. In BFO, bacteria move in random direction in search of their food takes lot of time into convergence. The random direction of bacteria in BFO is organized by PSO. The initial position of bacteria is based on the position of particles in PSO and updated velocity of bacteria constitutes the direction of bacteria in BFO which is accurately tuned rather than random. The ranges of membership function of two inputs and one output are defined. These ranges are fixed once and are not changes during the simulation. The membership function range based on the input conditions is tuned and a hybrid bio- inspired algorithm is proposed. The different steps used to apply proposed algorithm is to initialize the random positions and directions of bacteria. Now consider the searching space dimension for 12 membership function values to be tuned. Initialize the chemotactic, swarming, reproduction and dispersion steps and the initial step size of bacteria is taken as 0.005. Initialize the weighting parameters of PSO as 1.2 and 0.5. In each chemotactic step, for every bacteria fitness function is evaluated and position of bacteria is updated by using position updation formula given in Eq. 3.

Fig. 4
figure 4

Flow diagram of algorithm

$$ new\ p o s= old\ p o s+ step\ s ize\times \frac{direction}{\sqrt{direction* directio{n}^{\hbox{'}}}} $$

In swarming step the previous fitness function output is compared with the next position output of same bacteria. If found less then position of bacetria is updated again by position updation formula. The present position of bacteria is termed as current position of particle for PSO and output of fitness function is Jlocal for the PSO. In PSO minimum value index from the Jlocal and corresponding bacteria’s position is termed as the local best position of particle for each bacteria. The velocity of each particle is further updated from random initial velocity to a PSO tuned velocity by using the formula given in Eq. 4.

$$ new\ velocity=0.9 \times old\ velocity + {c}_1\times {R}_1\left( local\ best\ position- current\ position\right) + {c}_2 \times {R}_2\left( global\ best\ position- current\ position\right) $$

where, c 1 c 2 and R 1, R 2 are initialized initially.

This new velocity is the direction of bacteria in BFO as given in Eq. 5.

$$ direction= velocity $$

The chemotactic and swarming loop continues till all initialized steps are completed. In each loop PSO updates the direction of bacteria and move the bacteria into the direction of fast convergence. Reproduction steps take place for bacteria with high fitness function values. To disperse or kill the weak bacteria, a probability of 0.25 is defined as the deciding probability. If random probability is higher than it, bacteria are dispersed or vice versa. Result will be positions of bacteria with minimum fitness function output. These positions are membership function’s tuned variables for fuzzy logic controller.

The objective function of algorithm is ‘error’ which is calculated by Eq. 1. To tune the range values of membership functions of fuzzy logic. The initial and final range of trapezoidal function is fixed from – infinity to + infinity. Moreover, two points of each membership function are common to others. It can be clearly shown in Table 2. Trapezoidal and triangular functions are used in above algorithm so a total of 51 values should be tuned but in actual these are just 12 values which requires tuning as per change in initial conditions.

Table 2 Range values for input ‘E’ to fuzzy controller

Matlab model of PV grid

The proposed model of the system is shown in Fig. 5. It is divided into three sub models each for P&O MPPT control, Fuzzy P&O algorithm control and BFO tuned fuzzy P&O MPPT control. The grid designing is relatively easy as compared to PV array as it doesn’t require any precise parameters. The MATLAB based model of utility grid consists of a total 19 km feeder with a 2 MW load at the 14 km distance and 30 MW load at the generating point.

Fig. 5
figure 5

Schematic diagram of P & O, Fuzzy P & O and BFO Fuzzy P & O model

Results and Discussion

The simulation results shows BFO tuned fuzzy P&O MPPT control PV system and compare this system with P & O and PSO PV system for getting MPPT with the help of software MATLAB version 0.13. A sample time of 10−4 s is considered for model simulation. It is divided into three sub models each for P&O MPPT control, Fuzzy P&O algorithm control and BFO tuned fuzzy P&O MPPT control. For easy user access a block for fuzzy controller tuning is provided separately so that clear comparison between algorithms can be visualised. Modelling of all three sub blocks provided is same except MPPT control part. To check the results, initially the V-I curve and P-V curve of PV array is plotted for different radiation intensity. Figure 6 shows the curve for that and nonlinear characteristics of PV array are depicted from these. Every curve has a unique maximum point which is called maximum power point. We worked towards raising the value of this point. Note that with decrease in radiation intensity MPP point also reduces.

Fig. 6
figure 6

I-V characteristics curve of PV array with 66 parallel strings and 5 strings in series

Varying intensity radiations are used as the input in the model and the stability of model is analysed by the constant DC voltage. The model is executed for a given input parameter and comparative curve between P&O, fuzzy P&O and BFO-PSO is obtained. Fuzzy controller’s parameters are tuned with BFO and PSO and after tuning the values are changed from the original once and shape too. Figures 7, 8 and 9 shows the new fuzzy logic membership functions with new range for which our optimisation algorithm finds the minimum error.

Fig. 7
figure 7

Optimisation of membership function for input E

Fig. 8
figure 8

Optimisation of membership function for CE

Fig. 9
figure 9

Optimisation of membership function for output DC

A range comparison is presented in Table 3. If new values are carefully analysed then we will find that these are satisfying all constraints of the PV system models.

Table 3 Values of old and new range of membership functions

For testing purpose we have applied input radiations of intensity 1000 W/m 2 for 4 s and 800 W/m 2 for next 1 s. Since DC voltage is the evaluation parameter for the stability of the PV grid model. The PV array output power by three methods is plotted in Figs. 10 and 11. The generated power is highest by our proposed method amongst all three with a sharp dip at 4 s time as irradiation is decreased from 1000 W/m 2 to 800 W/m 2.

Fig. 10
figure 10

Comparison of DC voltage output of boost converter by three methods

Fig. 11
figure 11

Comparison of PV array output power for all three methods

The change in power and voltage is based on change in duty cycle of boost converter. A comparative duty cycle variation of all three methods is shown in Fig. 12. This difference in duty cycle causes variation in output power of PV array.

Fig. 12
figure 12

Comparison of duty cycle change with P&O, fuzzy P&O and BPSO fuzzy P&O controller

Figure 13 shows that the P component form three phase gird power after a graph is plotted to represent the grid power in all three methods. The BPSO tuned fuzzy logic controller graph is more stable and have highest magnitude than rest.

Fig. 13
figure 13

Comparison of output power of grid with P&O, fuzzy P&O and BPSO fuzzy P&O controller

In Fig. 14 output power of PV array is given and clearly analysed that proposed method gives the maximum power. The BPSO Fuzzy P&O method generated 43.4820 MW more than P&O method and 150 KW more than fuzzy P&O method.

Fig. 14
figure 14

Output power of PV array grid


We analyzed the simulation of three methods of control: P&O and fuzzy P&O controllers and BPSO tuned fuzzy P&O controller and compared the obtained simulation results, by subjecting the controlled system to the same environmental conditions. Results revealed that the generation of 99.71 MW of power from 66 parallel connected and 5 series connected PV cells with BPSO fuzzy P&O controller whereas fuzzy P&O controller and P&O controller has generated just 99.56 MW and 56.228 MW of power, respectively. This also shows that the time response of the photovoltaic system reduces to perturbations and insures the continuity of the operation at the time in response to the continued maximum power point. It also eliminates the fluctuations around MPPT. Simulation results also proposed BPSO fuzzy P&O controller is more effective as compare with P& O and fuzzy P&O system.


CE change in error

DC duty cycle

E error

k time

P(k) Output power of PV panel

P(k-1) Output power of PV panel

V(k) Voltage of PV panel

V(k-1) Voltage of PV panel

Future scope

The controller’s results can be compared to other methods of control such as the use of neural networks controllers to optimize the PV boost converter.