Modeling and Simulation of an Intelligent Photovoltaic Controller Based on Variable Step Algorithm of Versoria

As a green and renewable energy source, photovoltaic power is of great signiﬁcance for the sustainable development of energy and has been increasingly exploited. The photovoltaic controller is the key component of a photovoltaic power generation system, and its central technology is the maximum power point tracking technology. In this paper, a mathematical model of photovoltaic cells is ﬁrstly established, the output characteristics of photovoltaic cells are analyzed, the main factors that aﬀect the output eﬃciency of photovoltaic cells are obtained, and it is proved that the most important factor that aﬀects the output power is the light intensity. Therefore, in the design, the maximum power point of the photovoltaic cell is tracked by the control algorithm and can maximize the use of photovoltaic output power fast charging. The key to the design of a photovoltaic controller is the design of control algorithm. So, an improved fuzzy control algorithm is proposed to overcome the shortcomings of the traditional maximum power point tracking (MPPT) algorithm. The algorithm can consider tracking both speed and convergence, but the algorithm requires high input and output fuzzy domain parameters, and although the tracking speed is fast, the stability of convergence is poor. For the limitation of fuzzy control algorithm, considering the property of the Versoria function, an MPPT design method for an intelligent controller based on the Versoria variable step algorithm is further proposed. According to the output characteristics of photovoltaic cells, three parameters, α , β , and c , are set to solve the tracking speed and tracking stability. In order to reduce the static error, a genetic factor is proposed to sum up the historical error to eﬀectively improve the tracking stability. The simulation results show that the algorithm can track the maximum power point quickly and has good tracking speed and stability. This algorithm can be used in engineering practice eﬀectively.


Introduction
With the advent of the steam engine in the 18th century, mankind entered the era of industrialization. At the same time, along with mechanized production, fossil fuels are widely used in all aspects of people's productive lives. However, fossil fuels are a nonrenewable resource, and as people exploit them on a large scale, the stock of fossil fuels is getting smaller and smaller; the burning of fossil fuels also brings problems such as global warming and environmental pollution [1,2]. e research and application of new energy sources have become a key issue that cannot be delayed. Solar energy, as a clean and nonpolluting renewable energy source, can replace fossil fuels in some areas [3]. In a solar power generation system, the PV controller is a key component that transfers the current generated by the solar cell to the battery via DC/DC conversion. e PV power generation system is a complex system, and in the recent years, it has become an important research field. A simulation model of photovoltaic cells is presented by using the forward characteristics of the diode, the characteristics of the PN junction, and the output characteristics of the photovoltaic cells in [4]. But, PV cells have different series resistances, so their simulation model output characteristics are also different. A method for establishing intrinsic and extrinsic model parameters of photovoltaic cells by extracting parasitic series resistors and parallel conductance was given in [5]. is method uses the I pv -U pv curve to extract an explicit parsing solution and calculates the capacity function CC based on the parsing solution. e expression of CC is an algebraic function expression of the voltage-current, and the coefficient of the expression is the result of a two-dimensional fit of the intrinsic or extrinsic parameters of the PV model. e method is more complicated to calculate and not easy to understand. An engineering-friendly mathematical model can be found in [6]. e model has no specific physical significance and is simple to solve. Only the four parameters, I sc (short-circuit current), U oc (open-circuit voltage), U mpp (best operating voltage under standard test conditions), and I mpp (best operating current under standard test conditions), given by PV cell manufacturers can be solved. Due to the simplicity of the mathematical model of photovoltaic cells in the literature [6], this paper builds the mathematical model of photovoltaic cells based on the reference of that literature, combined with actual parameters, and analyzes the characteristics of the output characteristic curve of photovoltaic cells.
Since light intensity and temperature change from time to time, so does the maximum power output point. In order to keep the maximum power output of photovoltaic cells, the PV controller is required to track the maximum power point in real-time to output the maximum power [7]. is photovoltaic control technology is called Maximum Power Point Tracking (MPPT) technology, and MPPT technology requires an algorithm to implement it. e photovoltaic controller with advanced algorithm can not only improve the tracking speed of the maximum power point of photovoltaic cells but also reduce the fluctuation of the output power of photovoltaic cells. Compared with the photovoltaic controller without an MPPT function, the photovoltaic controller with an MPPT function can increase the power of the photovoltaic system by more than 30%.
at is why advanced algorithms are very important for PV power generation systems. e commonly used MPPT algorithms include constant voltage (CVT), perturbation observation (P&O), conductivity incrementation (INC), particle swarm optimization (PSO), and fuzzy control algorithm. MPPT algorithm of sliding mode control based on current sampling and sliding mode control algorithm of unknown system dynamics can be found in [8,9]. Most MPPT algorithms are implemented based on voltage sampling, and an algorithm which combines current sampling with a dual control loop for sliding mode control was obtained in [8].
is method ensures the rapid tracking of irradiation changes. e validity of the algorithm was verified through theoretical analysis and modeling simulations. But, the method is not accurate enough, and the tracking stability is insufficient. An improved equivalent impedance matching MPPT algorithm is proposed in [10], which is based on the principle of adaptively matching PV output characteristics with system impedance by changing system parameters. is method is slow to track and requires reasonable parameter setting; otherwise, it will affect the tracking performance and even cause tracking failure. A global distributed particle swarm optimization (PSO) algorithm for photovoltaic array under a local shadow condition was proposed in [11], which combines the overall distribution with a particle population optimization algorithm for solar PV systems with multiple local maximum power points under partial shading conditions to quickly search for global maximum power points. But, the algorithm is computationally complex and complex to implement. In this paper, an improved fuzzy control algorithm is designed and simulated to address the problems of slow tracking speed, poor stability, and computational complexity of these algorithms, which can track MPP relatively fast, but not convergence enough. In order to further reduce the fluctuation range and improve the tracking speed, stability, and convergence speed, the variable step MPPT algorithm of Versoria is proposed, and the correctness and superiority of the new algorithm are verified by comparing the output results of the fuzzy control algorithm simulation model.

Power Generation Principle and Output
Characteristics of Photovoltaic Cells

Mathematical Modeling and Simulation of Photovoltaic
Cells. Because the single diode model proposed in paper [6] is simple in structure and convenient in calculation, this paper analyzes the output characteristics of photovoltaic cells according to the single diode mathematical model proposed in the reference, considering that the model in the literature is easy to calculate, but the accuracy needs to be improved. On this basis, considering the accuracy of the calculation results, the short-circuit current change temperature coefficient and the open-circuit voltage change temperature coefficient are modified, the actual products are selected, the parameters are substituted into the solution, and the experimental results and simulation are mutually verified. By substituting the actual parameters of photovoltaic cells into the solution and combining the theory with practice, the correctness of the single diode model of photovoltaic cells is verified. In order to accurately characterize the electrical properties of PV modules, the model usually takes into account the resistive properties of the material, as well as the losses, which can be expressed as a series resistance R s and parallel resistance R sh , which is also known as the single diode model [12]. PV module manufacturers often use this model to give technical characteristics of the modules. e circuit model of a photovoltaic cell containing the loss is shown in Figure 1.
According to this model, it is known that there is an influence of R s and R sh in PN junction solar cells. R s is the total series resistance formed by the resistance of the material body, the thin layer resistance, the contact resistance of the electrode, and the resistance of the conductive current of the electrode itself, and the resistance value is usually less than 1 Ω. R sh is the leakage current caused by the incomplete part of the PN junction formation, called parallel resistance, and the resistance value is usually several thousand ohms. e photovoltaic effect current I ph increases with increasing 2 Complexity solar radiation intensity; the reverse saturation current I d increases with increasing temperature. e photovoltaic cell series resistance Rs and parallel resistance R sh also undergo small changes due to changes in light and temperature [13]. According to Kirchhoff Circuit Laws (KCL), the expression for I pv is (1) Bringing the I d value into equation (1) yields (2) In formula (2), I ph is the photogenic current, whose value is equal to the short-circuit current I sc ; I 0 is the reverse saturation current of the diode; q is the electronic charge, q � 1.6029 × 10 −19 C; k is the Boltzmann coefficient, k � 1.3819 × 10 −23 J/K; A is the ideal factor of the diode; T j is the junction temperature of the PV module; I d is the current flowing through the internal diode; and V pv is the voltage of the PV cell unit. Assuming the infinity of the parallel resistance R sh , regardless of its effect, the following formula can be obtained: Next, we solve for equation (3). Equation (3) is transformed into an equivalent form as follows: Type (4) is very close to the curve of the PV cell at the short-circuit current point, so that the approximation of type (5) and (6) can be obtained in the open-circuit voltage region and at the MPPT.
By substituting equation (4) into the following equation, the output power of photovoltaic cells can be expressed as follows: In the actual operation of photovoltaic cells, the external environment is constantly changing. e two factors that have the greatest impact on PV cell output characteristics are light intensity and ambient temperature. erefore, two disturbance factors, illumination intensity and ambient temperature, are considered, and the following formula can be obtained: e output characteristics of photovoltaic panels are influenced by a variety of factors, and the light intensity and temperature that have the greatest impact on the panels are selected for analysis. According to the single diode model of photovoltaic cells to establish the simulation model of photovoltaic cells, the photovoltaic cell system has three inputs and one output, T is the ambient temperature, S is the light intensity, the slope function as input voltage U, and I is the output current of the photovoltaic panel.

Model Simulation Analysis.
According to the improved mathematical model of photovoltaic cell proposed in the previous section, the simulation model of the photovoltaic cell is established. e simulation model is based on a 240W monocrystalline silicon photovoltaic cell produced by a company to set the parameters. According to the technical parameters of the product, the open-circuit voltage of the solar panel U oc is 36 V, the short-circuit current I sc is 8.5 A, the best working voltage U mpp is 30 V, and the best working current I mpp is 8 A under standard test conditions. Set the light intensity S � 1000 W/m 2 as a fixed value in the model, set the ambient temperature to 0°C, 25°C, 50°C, and 75°C, respectively, and then set the basic parameters of the solar panel. When the temperature changes, the PV cell P-U output curve is as shown in Figure 2. As can be seen from Figure 2, with the increase in temperature, the maximum output power of photovoltaic cells slowly decreases, while the maximum output power of photovoltaic cells at the point of voltage also becomes smaller, according to the model simulation, and it can be concluded that the ambient temperature on the maximum output power of photovoltaic cells influences very sensitive.
Similarly, set the ambient temperature T � 25°C as a fixed value in the model, set the light intensity S to 250 W/m 2 , 500 W/m 2 , 750 W/m 2 , and 1000 W/m 2 , respectively, and set the basic parameters of the solar panel. When the light intensity changes, the PV cell P-U output curve is shown in Figure 3. Obviously, the change in light intensity has a big impact on the maximum output power of photovoltaic cells, as shown in Figure 3, and the maximum output power of photovoltaic cells increases significantly with the increase in light intensity. In the simulation model, set the light intensity to S � 1000 W/m 2 , set the ambient temperature to 0°C, 25°C, 50°C, and 75°C, respectively, and then set the basic parameters of the solar panel. When the temperature changes, the I-U output curve of the photovoltaic cell is shown in Figure 4. As can be seen from Figure 4, with the increase in temperature, the open-circuit voltage of the photovoltaic cell gradually decreased, while the short-circuit current of the photovoltaic cell gradually increased.
In the simulation model, the ambient temperature is set to T � 25°C, the light intensity S is set to 250 W/m 2 , 500 W/m 2 , 750 W/m 2 , and 1000 W/m 2 , respectively, and the basic parameters of the solar panel are set. When the light intensity changes, the I-U output curve of the photovoltaic cell is as shown in Figure 5. Distinctly, the change in light intensity has a great influence on the maximum output power of photovoltaic cells, as shown in Figure 5, and the maximum output power of photovoltaic cells increases significantly with the increase in light intensity.
According to the simulation characteristic curve of the abovementioned engineering photovoltaic cell mathematical model, when the light intensity and temperature are determined at a certain time, there must be a corresponding maximum power output point. Also, the maximum power point varies with light intensity and ambient temperature, which verifies the correctness of the model. e photovoltaic controller achieves maximum power point tracking by adjusting the duty cycle, so that the voltage of the DC/DC circuit changes, and the PV panel always maintains maximum power output. Under changing external conditions, it is necessary to constantly change the duty cycle size to track the maximum power output point of the PV cell [14,15], which requires fasttracking capability and good convergence of the MPPT algorithm.

An Improved Fuzzy Control Algorithm.
A fuzzy control algorithm applied to photovoltaic power generation systems was proposed in the paper [16]. e method combines the conductivity incremental method with a fuzzy control    Complexity algorithm at the beginning of tracking and a fuzzy control algorithm at the end of tracking. But, the two algorithms need to be reasonably set to switch values; otherwise, the tracking speed and stability are easily affected. An adaptive fuzzy control algorithm applied to vehicle active suspension systems was given in [17], which is suitable for nonlinear parameter estimation, but specific to different control objects and requires specific analysis; otherwise, the control accuracy of the system cannot be guaranteed. In the literature [18], exponential stability and lu2 gain analysis and observer-based controller design were performed for the widening discrete loop switching system using the loop segmentation linear Lyapunov function method. e method provides a solution to the non-linear control problem. In this paper, a fuzzy control algorithm suitable for photovoltaic systems is proposed based on the output characteristics of photovoltaic cells, combined with the actual working environment of photovoltaic systems. e improved fuzzy control algorithm in this paper is based on the fuzzy control algorithm model proposed in the literature [16]. Because of the slow tracking speed of the fuzzy control model in paper [16], seven fuzzy subsets are set for the fuzzy control domain En and ΔE, respectively, five fuzzy subsets are set for the output fuzzy domain dD, and the parameters of the fuzzy subsets are modified by simulation. e disadvantages of fuzzy control are the large amount of calculation, the long time of calculation, the high performance of the processor, and the low economy of the design. e advantage of fuzzy control is that it does not need to establish the exact function relation of the controlled object, so the fuzzy theory field can be designed according to experience, and the design of control algorithm is more convenient. e fuzzy control algorithm requires high input and output parameters. Although the tracking speed is fast, the convergence stability is poor; when the parameters are small, the tracking speed is slow, but the convergence stability is better. e fuzzy control algorithm is a new control method based on the fuzzy set theory, and its control process can be divided into three steps: fuzzification, fuzzy inference operation, and antifuzzification. e algorithm is highly adaptive in mathematical models unknown and nonlinear complex systems. e output of the panels in the actual photovoltaic system is nonlinear and difficult to match with precise mathematical models, so the fuzzy control method is very appropriate at this point. In fuzzy control, the input and output variables of the fuzzy logic controller must be set first [19]. e main role of the fuzzy controller is to adjust the output control signal to stabilize the PV system at maximum power output, as mentioned above. Figure 6 is the logic block diagram of fuzzy control. After the input signal goes through the fuzzy control process, the signal is transmitted to the actuator, which then acts on the controlled object. e output signal generated after the work of the controlled object is fed back to the input, so that the system can increase or decrease the input amount appropriately. e abovementioned process is the process of fuzzy control principles. Fuzzy controller fuzzification is the process of converting the collected digital input signal into a "fuzzy amount" that can be recognized and used by a logical reasoning operator; fuzzy reasoning is the process of obtaining a "fuzzy amount" and formulating an algorithm rule based on the "knowledge base" to arrive at a fuzzy control output; antifuzzification is the process of restoring the "fuzzy amount" expressed in linguistic variables to an accurate value, that is, the value of the output variable that can be calculated according to the affiliation of the output fuzzy subset [20].
Fuzzy control is the core part of the perturbation observation method, and using the traditional perturbation observation method will cause the system to oscillate near the maximum power point, resulting in unnecessary power loss. e fuzzy control algorithm equations are set up as follows: ec � e k − e k−1 .
In the formula, En and ΔE are the input of the fuzzy controller, and they are expressed by fuzzy control variables e and ec, respectively. e duty cycle D is the output. In equation (12), ΔP represents the difference between the power value of the k-th measurement and the power value of the k−1th measurement. ΔU represents the difference between the voltage value of the k-th measurement and the voltage value of the k−1th measurement. e represents error, and ec represents error rate of change.
According to the fuzzy control theory, the fuzzy domain of input quantities e and ec can be set to [−3, 3] According to the setting method of the abovementioned fuzzy control theory, the triangle membership functions of e, ec, and D shown in Figures 7(a)-7(c) can be obtained.
A fuzzy inference table can be obtained from the triangle fuzzy affiliation function shown in Figure 7, as shown in Table 1.

Variable
Step MPPT Algorithm of Versoria. Aiming at the problem that the fuzzy control algorithm cannot consider both the tracking speed and the tracking stability, the variable step algorithm of Versoria is proposed. e skip tongue line function is a pair function with the Y-axis as the symmetry axis, and it decreases monotonically in the X Complexity positive axis, increases monotonically in the X negative axis, and y has the maximum value at x � 0. As the absolute value of x increases, the value of y tends to 0 on both sides of the coordinate axis. According to the nature of the Versoria function [21], combined with the actual needs of the photovoltaic MPPT algorithm, a duty cycle change coefficient with the iteration function of Versoria as the index and the slope of the P-U curve as the base is designed. e algorithm has a large change in the duty cycle at the beginning of tracking and a fast-tracking speed; a small change in the duty cycle at the later tracking period improves stability.
From the output characteristic curve of the PV cell and the principle of the conductivity increment method, it can be seen that the value of dP pv /dU pv at the maximum power point is 0, the value of dP pv /dU pv near the maximum power point is smaller, and the value of dP pv /dU pv away from the maximum power point is larger. Also, the value of dP pv /dU pv  Output feedback y (t) r (t) Figure 6: Logic diagram of fuzzy control. 6 Complexity is positive to the left of the maximum power point and negative to the right. Based on this property of dP pv /dU pv , the variable step algorithm of Versoria is shown by equations (14)- (16).
e upper formula D k indicates the k-th adjustment of the duty cycle size; ΔD indicates the duty cycle base change; λ(k) indicates the Versoria iterative function; and δ(k) is the power change iterative function introduced. e genetic factor design in the Versoria variable step algorithm is to reduce the static error. By setting the genetic factor to sum the historical error, it is similar to the integral function of PI regulation, which can greatly improve the tracking stability; φ indicates the current power change weight, and the size of φ is generally 0.9∼1, used to ensure that the current power change dP k has a larger weight; |dP/dU λ(k) | indicates the duty cycle change coefficient. e effect of λ(k) on |dP/dU| is shown in Figure 8. e shape of the Versoria function is determined by the three parameters α, β, and c, where α represents the size of the translation of the Versoria function up and down along the y-axis, and the larger the α, the greater the translation of the function upward; β indicates the width between the highest point of the Versoria function and 0, and the larger the β, the wider the function width; c represents the "fatness" at the peak of the Versoria function, and the larger the c, the steeper the function graph peak and the more "thin" "the function." α determines the tracking speed of the algorithm, and β and c determine the stability at the end of tracking. Figure 9 can intuitively show the influence of the three parameters α, β, and c on the Versoria function.

Simulation Verification Analysis
e photovoltaic MPPT algorithm relies on the DC/DC circuit to realize. Before establishing the MPPT simulation model, the simulation model of the BOOST circuit is first established. e BOOST circuit simulation model built in this paper is shown in Figure 10. e component parameters of the BOOST circuit simulation model are shown in Table 2.
In the abovementioned simulation model, set the ambient temperature to 25°C and the simulation time to 0.15 s. Use the timer module in Simulink to simulate changes in light intensity. e timer module is used to generate a signal that changes at a specified time. Its simulated light intensity signal page is shown in Figure 11. e blue curve in the figure is the variable step algorithm of Versoria, and the pink curve is the fuzzy control algorithm. At the initial moment, the light intensity changes from 0 W/m 2 to 800 W/m 2 ; at 0.05 s, the light intensity changes from 800 W/m 2 to 500 W/ m 2 ; and at 0.1 s, the light intensity changes from 500 W/m 2 to 1000 W/m 2 . Figure 12(a) shows that the fuzzy control algorithm, and the tongue-and-groove variable-step algorithm simultaneously tracked the maximum power point at 3 ms in the first stage, and the fuzzy fluctuation of the fuzzy control algorithm is between 191.3 and 192.9 W. e variable step algorithm of Versoria has a stable fluctuation range of 192.0∼192.9 W. In the first stage, the variable step algorithm of Versoria has better convergence, and the tracking speed is comparable. Figure 12(b) shows that the fuzzy control algorithm tracks the maximum power point at 70 ms in the second stage, and the variable step algorithm of Versoria tracks the maximum power point at 56 ms. e fuzzy control algorithm fluctuates steadily around 75 W, and the variable step algorithm of Versoria fluctuates steadily around 112 W. In this process, the variable step algorithm of Versoria has a faster tracking speed and better convergence. en, Figure 12(c) shows that the fuzzy control algorithm tracks the maximum power point at 107 ms in the third stage, and the variable step algorithm of Versoria tracks the maximum power point at 104 ms. e stable fluctuation range of the fuzzy control algorithm is between 246∼250.5 W, and the stable fluctuation range of the variable step algorithm of Versoria is between 249.7 and 250.5 W. e result shows that the variable step algorithm of Versoria has a better convergence and faster-tracking speed in the third process.
In summary, the variable step algorithm of Versoria can achieve maximum power point tracking, which has higher tracking speed and better convergence than the fuzzy control algorithm. From the simulation results and compared with the fuzzy control algorithm, it can be seen  clearly that the algorithm of the variable step algorithm of Versoria has a faster tracking speed and a smaller power fluctuation range after tracking. Also, in the second stage, when the fuzzy control algorithm is stable, the power is 35 W less than that of the variable step algorithm of Versoria.

Conclusions
Although there are many maximum power point tracking algorithms for photovoltaic systems, some of which are also basically mature, in different application scenarios, the adaptability of each algorithm is also different. Some algorithms pursue higher system output efficiency, some algorithms seek faster response speed and static stability, some algorithms pay more attention to its simplicity and implementability, and some algorithms emphasize economy. For different application requirements, it is necessary to continue to improve and perfect existing algorithms. e improved fuzzy control algorithm in this paper can reduce unnecessary power loss caused by the system oscillating near the maximum power point, but its convergence speed is slow and the fluctuation range is large, especially the fuzzy control algorithm cannot take into account both tracking speed and tracking stability. As a result, the further proposed variable step algorithm of Versoria has a fast tracking performance, which solves the problem of slow convergence speed, reduces its fluctuation range, and solves the consistency of tracking stability and convergence speed. e algorithm is also instructive for solving practical problems of MPPTrelated projects. In further research, theories such as probability density function control, dynamic adjustment of stochastic nonlinear system based on EKF [22,23], generalized predictive control (GPC) [24], and distributed control [25] can be considered to dynamically set parameters, and the randomness and nonlinearity [26] of the controller can be considered to obtain better output characteristics.

Data Availability
e data used to support the findings of this study are available from the corresponding author upon request.

Conflicts of Interest
e authors declare that they have no conflicts of interest.