A new intelligently optimized model reference adaptive controller using GA and WOA-based MPPT techniques for photovoltaic systems

Recently, the integration of renewable energy sources, specifically photovoltaic (PV) systems, into power networks has grown in significance for sustainable energy generation. Researchers have investigated different control algorithms for maximum power point tracking (MPPT) to enhance the efficiency of PV systems. This article presents an innovative method to address the problem of maximum power point tracking in photovoltaic systems amidst swiftly changing weather conditions. MPPT techniques supply maximum power to the load during irradiance fluctuations and ambient temperatures. A novel optimal model reference adaptive controller is developed and designed based on the MIT rule to seek global maximum power without ripples rapidly. The suggested controller is also optimized through two popular meta-heuristic algorithms: The genetic algorithm (GA) and the whale optimization algorithm (WOA). These meta-heuristic approaches have been exploited to overcome the difficulty of selecting the adaptation gain of the MRAC controller. The reference voltage for MPPT is generated in the study through an adaptive neuro-fuzzy inference system. The suggested controller’s performance is tested via MATLAB/Simulink software under varying temperature and radiation circumstances. Simulation is carried out using a Soltech 1sth-215-p module coupled to a boost converter, which powers a resistive load. Furthermore, to emphasize the recommended algorithm’s performance, a comparative study was done between the optimal MRAC using GA and WOA and the conventional incremental conductance (INC) method.


Single diode model
Several mathematical models illustrating solar panels' operation and performance are documented in the literature.Indeed, real-time simulation requires equivalent circuit modeling of PV cells.The most popular approximate equivalent model researchers use is the single-diode model, as presented in Fig. 2. The used circuit consists of at least four components: a current source I Ph , a diode D, a parallel resistor R p , and a series resistor R s .
According to the single diode equivalent model of the PV cell presented in Fig. 2, the output current I PV can be described as follows 60 .
The reverse saturation current of the cell is referred to as I rs .V denotes the voltage of the cell, whereas N s indicates the number of PV cells linked in series at the same time.N p indicates the number of photovoltaic cells linked in parallel.K represents the Boltzmann constant, q symbolizes an electron's charge, T denotes Kelvin's temperature, and A represents the diode ideality constant.Based on Eq. ( 2), the irradiance of the sun E and the ambient temperature T are two of the main factors determining the I Ph .
K i represents the short-circuit current, T denotes the temperature coefficient of the cell, I sc is the short-circuit current, and E represents the variation in solar radiation.Equation (3) gives the saturation current in cell I rs .A strong correlation exists between temperature and saturation current 61,62 .
I rr : represents the reverse saturation corresponding to T r ; T r : is the cell reference temperature; E G : is the bandgap energy of the semiconductor used in the cell.

Triple diode model
The PV cell scheme based triple diode model is illustrated in Fig. 3.This model taken into consideration two additional diodes as in the single diode model 63,64 .The expression of the output current can be given as following 65 .
(1) I PV = N p I ph − N p I rs .exp q(v + R s I PV ) AkTN s − 1 − N p q (v + R s I PV ) N s R sh , (2)

Dynamics modeling of the DC-DC boost converter
A traditional MPPT algorithm relies on Eq. ( 4) to determine the converter's duty cycle when the system is stable.
On the other hand, the MPPT controller needs to consider the dynamics related to the duty cycle d and the PV voltage V PV to optimize transient responses 66,67 .When the duty cycle is adjusted to reflect varying environmental circumstances, the MPPT controller should remove any transient fluctuations in the PV voltage [68][69][70] .
As suggested in 71 , 72 , a small signal model of the studied system was considered (Fig. 4) in order to make it easier to analyze how the system responds to changes over time.A resistor R with a small signal PV voltage represents the solar array Vpv and current I pv throughout its terminals, while battery storage represents the load R O .By ignoring the battery load, the transfer function between the duty cycle d (s) as an input and the array voltage V pv(s) as an output of the system can be described as following 72 : Where f (D) is the correlation between a boost converter's voltage at the output array V o and the operating duty cycle D.
The first derivation of Eq. ( 6) can be expressed by: By inserting Eq. ( 7) into Eq.( 5), we can obtain: The negative sign in (8) implies that reducing the duty cycle d(s) causes the array voltage to increase.The transfer function depicted previously is derived from a linearized form 73 .Noteworthy is that C 1 and L are identified, while R is unknown.The PV system's operating point (particularly the parameter R) fluctuates as ambient circumstances change quickly 74,75 .The value of R may be estimated by calculating the slope of the line tangent to point A on the I-V curve shown in Fig. 5 and then taking the inverse of that slope. (4)

Proposed MPPT
The proposed MPPT technique in this paper can be divided into three main steps, as depicted in Fig. 6.The first objective is maintaining a constant reference voltage (V ref ) from the PV module output using an adaptive neurofuzzy controller under fluctuating environmental circumstances.
The ANFIS controller employs a relationship between VMPP and (irradiance and temperature) to supply reference peak power voltage.This reference value is compared with the value V pv to provide an error value sent to the proposed MPPT's second stage.During the second control stage, the MRAC algorithm generates a control input that adjusts the DC-DC converter's PWM signal.This paper also optimizes this controller using metaheuristic optimization algorithms to ensure the most efficient dynamic performance of the system.

Reference voltage generation via adaptive neuro-fuzzy algorithm (ANFIS)
To guarantee maximum power from the PV panel to the load, the MPPT controller must constantly check the PV array output voltage.Several methods have been used for calculating or learning the PV array reference peak power voltage.For instance, artificial neural networks (ANN) 60 , regression plans 49,76 , Gaussian process regression (GPR) 11 , and adaptive neuro-fuzzy inference systems (ANFIS) 39 .This paper uses the Neuro-Fuzzy algorithm to generate/estimate the voltage reference VMPP for the proposed controller.
The curve of PV characteristic change under varying environmental conditions for every single temperature value (T) and irradiance (G) is presented in Fig. 7.The V MPP data was collected using MATLAB/Simulink by adjusting the temperature from 20 to 70 °C while keeping the irradiance constant at 1000 w/m 2 .Then, we set the temperature to 25°, whereas the irradiance has been varied from 100 to 1000 w/m 2 .Figure 8 presents the result of these data as a 3-D plane.The structure of the ANFIS model in MATLAB/Simulink for VMPP estimation is depicted in Fig. 9.The neuro-fuzzy estimator comprises temperature (T) and irradiance (G) inputs.The fuzzification layer, which includes ten triangular membership functions assigned to every variable, represents each rule in the output layer as a linear equation 77,78 .
The ANFIS algorithm provides the reference voltage to the development controller.Then, the controller forces the output voltage to track the desired voltage to reach the maximum power point.

Model reference adaptive control (MRAC)
An adaptive controller is, intuitively, one that can adapt its actions based on variations in the process dynamics and the nature of the disturbance 79 .Several researchers have attempted to define adaptive control in the literature.As shown in Fig. 9, we will use the pragmatic approach in this research, which involves a controller with adjustable parameters and a mechanism that allows these parameters to be adjusted.MRAC systems are  designed so that the plant model's output constantly tracks the reference model's output 80,81 .The structure of the model consists of a PV system with a boost converter, represented by a second-order transfer function, as shown in Eq. ( 8).The voltage reference V ref produced by the first level (ANFIS estimator) is regarded as an input to the system, represented as u (t).In contrast, y (t) represents the output.The plant model can be rewritten in the following manner: where The reference model that guides how the process output should ideally react to the control signal u(t) is given in Eq. (11).Where y m is the desired output, K m represents a positive gain, and a m and b m must be selected.The reference model thus offers the suggested solution.
The controller architecture depicted in Fig. 10 illustrates the approach we will use to achieve the control objective.The control law is described as follows 58 :    theory.This study has chosen the MIT rule to adjust the controller's parameters as an adaptation mechanism.By using the MIT rule, the loss function is expressed by: where e represents the error obtained by subtracting the plant y output value from the reference model output Y m.
A mathematical equation was developed for updating the parameter θ, based on the assumption that, if the purpose were to minimize the error-related cost, moving towards the negative gradient of J. where J is supposed to change proportionally to θ would be advisable.Therefore, the derivative of θ equals the negative variation in J. Based on the cost function selected above, the following result can be obtained: Γ and ∂e/∂θ are the system's adaptation gain and sensitivity derivative, respectively.The transfer function between the input Y C and the plant's output y is given by: Thus, Eq. ( 14) can be rewritten as follows: According to (15), the sensitivity derivatives ∂e/∂θ 1 and ∂e/∂θ 2 can be described by: In order to ensure a perfect tracking error from this close loop process, we will assume that the time behavior is the same as that of the reference model, as follows: Therefore, based on the MIT rule, the control parameters are updated as follows: The next step will be to tune the adaptation gain of the MRAC controller by employing two optimization techniques.

Optimization techniques
This section provides two optimizer algorithms, namely GA and WOA, to adjust the adaptation gains of the proposed MRAC structure.It is worth mentioning that both these methods are widely recognized and have been frequently employed for similar applications.

Genetic algorithm (GA)
GA is an algorithm that is based on the population genetics concept.Each solution represents a chromosome, while each parameter corresponds to a gene 79,82,83 .GA employs an objective (fitness) function to assess the fitness of every single population member.The approach of retaining the most efficient solutions in each generation and utilizing them to generate the following solutions renders this algorithm reliable and proficient in approximating the best possible solution for a given problem 84,85 .In order to update the population, three genetic processes (selection, crossover, and mutation) are applied after each chromosome has been evaluated through a cost function and assigned a fitness value 51 .The genetic algorithm (GA) uses a selection operator (Boltzmann selection, Tournament selection, Rank selection, etc.) 86 to allocate probabilities to individuals based on their fitness values.It allows for the selection of individuals to create the next generation in proportion to their fitness values.Once individuals are chosen via a selection operator, they must be utilized to produce the new generation.The chromosomes from the male and female genes are merged to generate a novel chromosome; this operation in GA is called crossover 87,88 .Mutation operators maintain diversity by adding randomness.By using this operator, the GA algorithm avoids local solutions and prevents solutions from becoming similar 43,79,89 , 90 .
In this study, the cost function chosen to evaluate the result of each individual in the population is Integral Time Absolute Error (ITAE), where the error (e') can be obtained by subtracting the measured power from the maximum power (denoted P ref ), as described in ( 21): Whale optimization algorithm Highly intelligent and emotionally complex, whales have long captivated our imagination and inspired scientific research.Humpback whales are one of the most giant baleen whales.One of the most attractive aspects of humpback whales is their distinct hunting technique 73 .Based on this hunting technique, Mirjalili et al. introduced an innovative swarm intelligence algorithm called the Whale Optimization Algorithm (WOA) 59 .The humpback whale employs a distinctive hunting mechanism named the bubble net feeding method 91 .Noteworthy is that the bubble-net feeding method is a distinctive behavior exclusive to humpback whales.The hunting protocol of the humpback whale can be summarized in three steps: Encircling Prey: Humpback whales can detect the whereabouts of their prey and surround them.In the Whale Optimization Algorithm (WOA), the precise location of the optimal design within the search space has yet to be discovered.Therefore, the algorithm postulates that the current foremost candidate solution is either the target prey or close to the optimal solution.Once the optimal search agent is identified, the remaining search agents adjust their positions toward the optimal search agent.This conduct is mathematically illustrated through the subsequent equations: In the given equation, t denotes the present iteration, C and A serve as coefficient vectors, while X* represents a vector denoting the location of the best solution attained thus far.The process of determining the vectors A and C involves the following computations: The vector a gradually decreases linearly, starting by 2-0 over a series of iterations, whereas ( r) is a haphazard vector within the range [0,1].www.nature.com/scientificreports/Attacking Mechanism Using Bubble-Net: Two methods were developed to construct a mathematical representation for the bubble-net procedure of humpback whales: the Shrinking Encircling Mechanism and the Spiral Updating Position method 92 .
Shrinking encircling mechanism: This conduct can be achieved by decreasing the value of vector a in the Eq.(24).It is essential to highlight that vector a narrows the range of fluctuations in vector A .Accordingly, the value of A inside the range [−a, a].By assigning random values to A within the range of [− 1, 1], the search agent's updated position can be between its original position and the current best agent's position.
Spiral updating position: The method described in this approach involves computing the distance between a whale, which is positioned at coordinates (X, Y), and the location of its prey, which is located at coordinates (X*, Y*).Hence, a spiral equation is formulated to represent the helix-shaped movement of the whales.This spiral equation is expressed as: While D ′ = X * − X represents how the whale is far away from the prey, where the prey is the best result achieved thus far, the constant b defines the logarithmic spiral's form.At the same time, l serves as a stochastic number within the interval of [− 1, 1].
In order to simulate the whales' coordinated movements, it is postulated that there is an even chance of 50% to opt for either the shortening encircling mechanism or the spiral model while the optimization procedure, to alter the whales' positions simultaneously 20,56,93 .The mathematical representation of this model is given by: In the equation given, the variable p represents a random number within the range of [0 1].Exploration Phase: During this phase, it is assumed that humpback whales search for prey randomly based on the positions of other whales.The model of this approach is expressed in this manner: In the given equation, − → X rand represents a whale's haphazardly selected location data from the current iteration.Using the same fitness function mentioned in (21), Fig. 13 illustrates the flowchart of the WOA.( 26)

Simulation results and discussion
To check the effectiveness of the developed ANFIS-OMRAC algorithm-based MPPT, this section was dedicated to simulating and analyzing the entire model system with Simulink, as shown in Fig. 14.The photovoltaic solar panel chosen in this work is the Soltech 1STH-215-P type.PV specifications and the DC-DC boost converter parameters are listed in Table 1.Indeed, GA and WOA are used to tune the MRAC controller design parameters.GA and WOA require fewer input parameters, which is one of the most significant advantages of these algorithms.The specifications for each algorithmic parameter are defined in Table 2.The number of search agents (population size) is relatively small considering the real-time implementation so that the controller may be optimized as quickly as possible.Figure 15 illustrates the objective function performance during computation.The whale optimization algorithm converges faster than the genetic algorithm.The whale optimization algorithm was more effective than the genetic algorithm concerning the convergence rate and accuracy of results.The optimum MRAC adaptation gain appears in Table 3.
After the optimal gain has been determined for OMRAC, the controller is used in online mode.Two different scenarios were used to evaluate the proposed MPPT technique.Firstly, under rapidly changing irradiation with a constant temperature.We will consider a uniform irradiance with a fast-changing temperature in the second test.On the other hand, a comparative study between the proposed GA-MRAC and WOA-MRAC, in addition to a conventional MPPT technique well known as incremental conductance (INC), is done in terms of the different indexes are: settling time (ts), Voltage ripple, Power ripple, the efficiency, integral absolute error (IAE) and integral square error (ISE).The efficiency is given by:

Sudden change in irradiance level with a fixed temperature
In this case, we consider the state of fast-changing irradiation levels, as shown in Fig. 16.We picked an irradiance profile with both step-up and step-down irradiation changes.In contrast, we set the temperature at the steady state, i.e., 25 °C.Figure 17 illustrates the PV power response for each technique used (GA-MRAC, WOA-MRAC, and INC).The MPPT performance depicted in Fig. 17 demonstrates that the settling time (TS) to reach MPP for the INC approach in the first test (Test 1) is 140 ms (ms).The GA-MRAC method takes 3.34 ms, while the WOA-MRAC method only requires 3.25 ms to reach MPP.The proposed optimal model reference adaptive controller (OMRAC) scheme exhibits superior dynamic performance using either GA or WOA.It quickly attains the MPP under irradiance variation and provides lower fluctuations around it throughout all four irradiation tests.
The proposed OMRAC method provides better power quality than the INC method regarding power ripple.The suggested controller managed to decrease the oscillation around the MPP, as shown in Fig. 18, as well as low voltage fluctuation with an average efficiency of 99.92% for GA-MRAC and 99.65% for WOA-MRAC.Table 4 summarizes the dynamic performance results for each irradiation level applied in detail.Figure 19 illustrates the graphical representation of voltage, power ripple, and tracking efficiency.

Under variable temperature and fixed irradiation
To carry out this case, the irradiation intensity was maintained at 1000 w/m 2 , while the temperature was manipulated by the temperature profile depicted in Fig. 20.A sudden shift of 10 °C was introduced to the temperature at each stage.
Figure 21 shows the PV power output during a sudden temperature change using the proposed GA-MRAC and WOA-MRAC compared with the INC MPPT technique.It is worth mentioning that the suggested optimal MRAC exhibited significantly superior performance to INC.The traditional approach required 10.8 ms to monitor the maximum power point, whereas the GA-MRAC reaction time was calculated to be 1.8 ms.The WOA-MRAC MPPT converged in under 1.7 ms.Noteworthy, the OMRAC provides a superior improvement in www.nature.com/scientificreports/convergence time under rapidly changing temperatures over all three temperature tests.The voltage V pv generated by the photovoltaic (PV) array is depicted in Fig. 22; the optimal MRAC offers better V MPP tracking with a small voltage ripple.On the other hand, there is more voltage fluctuation around V MPP for the INC method.
Figure 23 shows the MPPT point tracking by three different algorithms.Accordingly, the suggested algorithm follows the MPP during varying temperature conditions with almost no power ripple.Table 5 shows a comparative analysis of the mentioned techniques under various temperature tests regarding settling time (T s ), Voltage ripple, power ripple, efficiency, IAE, and ISE.Addition to a graphical representation analysis to illustrate and support this comparative study is shown in Fig. 24.Through this table and graphic representation, we notice the superiority of WOA-MRAC, followed by GA-MRAC, and finally, the conventional INC technique.Table 6 thoroughly evaluates the most recent cutting-edge MPPT techniques.

Conclusions and future research directions
In this work, an innovative two-level maximum power point tracking (MPPT) controller designed for photovoltaic devices is developed.The first level of control includes the implementation of an Adaptive Neuro-Fuzzy (ANFIS) estimator to generate the voltage reference.To improve the MPPT algorithm efficiency even more, we introduced a second level of control using a model reference adaptive controller (MRAC).To optimize the MRAC controller performance, we employed two optimization techniques, Genetic Algorithm (GA) and Whale Optimization Algorithm (WOA), to fine-tune the controller's parameters.The proposed approach can cope with the challenges of quickly changing atmospheric conditions.The efficacy of the developed algorithm was verified through MATLAB/Simulink software.The performance of the innovative GA-MRAC and WOA-MRAC was compared with a conventional MPPT algorithm, namely incremental conductance (INC).Summing up the results, the WOA-MRAC controller exhibited the most excellent performance with the fastest convergence time, high tracking efficiency, and no further fluctuations.We conclude that the two-level MPPT control system shows promise for the optimization of PV systems, especially in dynamic environments where real-time tracking of the maximum power point is critical for energy harvesting.
In the future, several research directions could enhance the development of MPPT control systems for PV systems.Consider investigating alternative optimization algorithms other than genetic algorithms (GA) and whale optimization algorithms (WOA) to enhance the fine-tuning of MRAC parameters and maybe achieve superior outcomes.Evaluating the reliability of the two-level MPPT system in real-world scenarios, including partial shade, aging, and fluctuating load conditions, will offer vital insights into its practical use.Furthermore, combining the two-level MPPT system with additional control techniques like energy storage systems or gridconnected inverters could improve the system's efficiency and reliability.Hardware prototypes and field tests are crucial for validating the performance of the two-level MPPT system in real-world situations, offering vital input for PV installations in both residential and commercial environments.Future study should prioritize optimizing and testing the two-level MPPT control system in real-world situations and investigating its integration with other control systems to improve performance.

IFigure 1 .
Figure 1.The proposed MPPT block diagram for the PV system.

Figure 2 .
Figure 2. PV cell circuit using a single diode model.

Figure 3 .
Figure 3. PV cell circuit using triple diode model.

Figure 4 .
Figure 4. PV small signal model coupled to the boost converter.

Figure 5 .
Figure 5. I-V curve of a solar array while changing R.

Figure 6 .
Figure 6.Block diagram of the suggested MPPT technique.

Figure 7 .
Figure 7.The characteristic curve of a photovoltaic module under varying environmental conditions.

Figure 10 .
Figure 10.The architecture of the model references adaptive control.

Figure 11 .
Figure 11.Structure of the controller in the proposed OMRAC.
Figure 11 depicts the procedure for adjusting the parameters of the MRAC controller with GA, which can be outlined using a flowchart, as shown below: D = X * (t).CX(t)

Figure 14 .
Figure 14.Implementation of the proposed model using MATLAB/SIMULINK environment.

Figure 15 .
Figure 15.The performance of the objective function during the computation using GA and WOA.

Figure 21 .
Figure 21.PV power output under variable temperature conditions.

Figure 23 .
Figure 23.PV voltage output under variable temperature conditions.

Table 2 .
GA and WOA parameters.

Table 3 .
The optimum MRAC controller gains.

Table 4 .
Analysis results for variable irradiation test.

Table 5 .
Analysis results for variable temperature test.