Photovoltaic maximum power point tracking (MPPT) based on improved moth fire suppression algorithm
By improving the moth-to-a-flame algorithm and combining adaptive interpolation prediction and the Levy flight strategy, the iteration process of the photovoltaic array was optimized, solving the problem of multiple peak values in the photovoltaic array under uneven illumination. This enabled fast and accurate maximum power point tracking, thereby improving the energy conversion efficiency of the photovoltaic system.
Patent Information
- Application Number
- CN202410524579.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-29
- Publication Date
- 2025-10-31
AI Technical Summary
Traditional MPPT algorithms exhibit multiple peaks in their output curves when photovoltaic arrays are subjected to uneven illumination, causing the photovoltaic system to fall into local extrema, making optimization difficult and resulting in low energy conversion efficiency.
An improved moth-to-a-flame algorithm is adopted, which combines adaptive interpolation prediction, adaptive weighting factor and Levy flight strategy to optimize the iteration process of the moth-to-a-flame algorithm, improve global and local search capabilities, and quickly and accurately find the maximum power point of photovoltaic array.
Under conditions of uniform illumination and partial shading of the photovoltaic array, the optimization speed and accuracy are significantly improved, power oscillation is reduced, and the energy conversion efficiency of the photovoltaic system is enhanced.
Smart Images

Figure CN120872092A_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of photovoltaic maximum power point tracking, and specifically relates to photovoltaic maximum power point tracking based on an improved moth-to-a-flame algorithm. Background Technology
[0002] With global economic growth and continuous social development, the demand for new energy sources is constantly increasing, while fossil fuels, such as oil and coal, are declining. Furthermore, with my country's dual-carbon goals, new energy sources, represented by photovoltaic energy, will inevitably become the main force in achieving carbon neutrality. Therefore, improving the efficiency of photovoltaic power generation has gradually become a necessity of our time. Among these efforts, achieving maximum power point tracking (MPPT) for photovoltaic arrays is of paramount importance in improving photovoltaic power generation efficiency.
[0003] Traditional MPPT algorithms suffer from problems such as fixed step size, low convergence accuracy, and poor optimization speed. Furthermore, when photovoltaic arrays are subjected to uneven illumination, their output curves exhibit multi-peak phenomena, making it impossible to distinguish between local and global optima. This causes the photovoltaic system to fall into local extrema, resulting in low energy conversion efficiency. Therefore, this paper proposes a photovoltaic maximum power MPPT algorithm based on an improved "moth to a flame" algorithm to address these issues. Summary of the Invention
[0004] The technical problem to be solved by this invention is to provide a photovoltaic maximum power MPPT based on an improved moth-to-a-flame algorithm. This method solves the problem that when photovoltaic modules are partially shaded due to uneven illumination, the power output curve exhibits multiple peaks, and when the difference between the peaks is very small, the search for the optimal point is easily hindered, resulting in output power loss. This method has the characteristics of being able to quickly and accurately perform optimization when photovoltaic modules are partially shaded due to uneven illumination.
[0005] To achieve the above-mentioned technical effects, the technical solution adopted by the present invention is as follows:
[0006] The photovoltaic maximum power MPPT based on the improved moth-to-flame algorithm includes the following steps:
[0007] S1, Set algorithm parameters: Parameters include: moth population size N, search space dimension D, maximum number of iterations t max The optimal output value U_best and the duty cycle d;
[0008] S2, Initialize Population: Initialize the location of the moth population; set the fitness function and determine the number of flames;
[0009] S3 updates the location of moth populations using the Levy flight strategy;
[0010] S4, determine if the moth's position is within the upper or lower boundary limits; if not, set the moth's position to the upper or lower boundary limit; if so, calculate the population fitness and update the flame position.
[0011] S5, determine whether the optimal flame meets the interpolation conditions; if not, return to step S3; if it does, perform interpolation prediction on the optimal flame position.
[0012] S6, determine whether the interpolated predicted flame position is better than the current flame position; if not, return to step S3; if so, update the interpolated predicted flame position to the current optimal flame position.
[0013] S7. When all moths have reached their optimal positions, i.e., when the output power of the photovoltaic array is at its maximum, the algorithm stops iterating, or stops iterating when the maximum number of iterations is reached.
[0014] Preferably, the specific method of step S2 is as follows:
[0015] S201, Population initialization is performed. An adaptive weighting factor strategy is introduced to generate a uniformly distributed initial moth population. The moth search and flame position update formula is as follows.
[0016]
[0017]
[0018] In the formula: W0 is the adaptive weighting factor; t and t max These are the current iteration number and the maximum iteration number, respectively; D i Let M be the distance between the q-th flame and the i-th moth; b is a constant; M is the distance between the q-th flame and the i-th moth. i t0 is the latest position of the moth; t0 is a random number between [-1, 1], representing the distance between the moth and the flame; F j This indicates the location of the flame.
[0019] Preferably, the specific method of step S3 is as follows:
[0020] S301, the Levy flight strategy is introduced to update the location of moth populations. The calculation formula is as follows:
[0021]
[0022] In the formula: α is the step size control factor, which takes a value of 1; For dot product; Levy(β) is a random walk with a step size following a Levy distribution;
[0023] Preferably, the specific method of step S4 is as follows:
[0024] S401, determine whether the moth's position is within the upper or lower boundary limit; if not, set the moth's position to the upper or lower boundary limit; if so, calculate the population fitness and update the flame position.
[0025]
[0026] In the formula: Ub and Lb are the upper and lower limits of the optimization problem, respectively;
[0027] Preferably, the specific method of step S5 is as follows:
[0028] S501, determine whether the optimal flame meets the interpolation conditions; if not, return to step S3; if it does, perform interpolation prediction on the optimal flame position.
[0029] Preferably, the specific method of step S6 is as follows:
[0030] S601, This represents the position of the j-th flame in generation t. It stores the positions of flames j in the next three generations. The position of the fourth-generation flame j is predicted by interpolation. Then, the predicted position of the fourth-generation flame j is compared with the position of the flame j obtained by iterative update of the basic moth-to-a-flame algorithm. The better position is taken as the final position of the fourth-generation flame j. Determine if the interpolated flame position is better than the current flame position; if so, update the interpolated flame position to the current optimal flame position; calculate the flame fitness O for both the non-interpolated and interpolated flame positions. F and O′ F Comparison O F and O′ F Size;
[0031]
[0032] In the formula: The final position of the flame;
[0033] Preferably, the specific method of step S7 is as follows:
[0034] S701, when the difference between the optimal and worst positions reaches a threshold, it is considered that the optimal value has been found, and the historical best value, i.e., the maximum output power value of the photovoltaic array, is output. The algorithm stops iterating, or it stops iterating when the maximum number of iterations is reached; the termination formula is as follows:
[0035] |x best -x worst |≤0.05;
[0036] In the formula: x bestThe optimal position; x worst This is the worst possible position;
[0037] The beneficial effects of this invention are as follows:
[0038] This invention addresses the traditional "moth to a flame" algorithm by introducing adaptive interpolation prediction, adaptive weighting factor, and Levy flight strategies to optimize and improve it. This results in better global search capability in the early stages of iteration and better local search capability in the later stages, accelerating the algorithm's solution accuracy and optimization speed. It effectively solves the problem of multi-peak power output curves in photovoltaic modules under partial shading, leading to significant power loss. The algorithm exhibits strong search capability and tracking accuracy under both uniform illumination and partial shading conditions, reducing power oscillations during tracking. Attached Figure Description
[0039] Figure 1 [Flowchart of MFO algorithm]
[0040] Figure 2 For photovoltaic MPPT simulation model;
[0041] Figure 3 The fitness convergence curve of the IMFO algorithm under uniform illumination is shown.
[0042] Figure 4 The fitness convergence curve of the IMFO algorithm under partial shading;
[0043] Figure 5 The graph shows the power tracking curve of the IMFO algorithm under uniform illumination.
[0044] Figure 6 The graph shows the power tracking curve of the IMFO algorithm under partial shading. Detailed Implementation
[0045] Example 1:
[0046] like Figures 1-6 As shown, the photovoltaic maximum power MPPT based on the improved moth-to-a-flame algorithm includes the following steps:
[0047] S1, Set algorithm parameters: Parameters include: moth population size N, search space dimension D, maximum number of iterations t max The optimal output value U_best and the duty cycle d;
[0048] S2, Initialize Population: Initialize the location of the moth population; set the fitness function and determine the number of flames;
[0049] S3 updates the location of moth populations using the Levy flight strategy;
[0050] S4, determine if the moth's position is within the upper or lower boundary limits; if not, set the moth's position to the upper or lower boundary limit; if so, calculate the population fitness and update the flame position.
[0051] S5, determine whether the optimal flame meets the interpolation conditions; if not, return to step S3; if it does, perform interpolation prediction on the optimal flame position.
[0052] S6, determine whether the interpolated predicted flame position is better than the current flame position; if not, return to step S3; if so, update the interpolated predicted flame position to the current optimal flame position.
[0053] S7. When all moths have reached their optimal positions, i.e., when the output power of the photovoltaic array is at its maximum, the algorithm stops iterating, or stops iterating when the maximum number of iterations is reached.
[0054] Preferably, the specific method of step S2 is as follows:
[0055] S201, Population initialization is performed. An adaptive weighting factor strategy is introduced to generate a uniformly distributed initial moth population. The moth search and flame position update formula is as follows.
[0056]
[0057]
[0058] In the formula: W0 is the adaptive weighting factor; t and t max These are the current iteration number and the maximum iteration number, respectively; D i Let M be the distance between the q-th flame and the i-th moth; b is a constant; M is the distance between the q-th flame and the i-th moth. i t0 is the latest position of the moth; t0 is a random number between [-1, 1], representing the distance between the moth and the flame; F j This indicates the location of the flame.
[0059] Preferably, the specific method of step S3 is as follows:
[0060] S301, the Levy flight strategy is introduced to update the location of moth populations. The calculation formula is as follows:
[0061]
[0062] In the formula: α is the step size control factor, which takes a value of 1; For dot product; Levy(β) is a random walk with a step size following a Levy distribution;
[0063] Preferably, the specific method of step S4 is as follows:
[0064] S401, determine whether the moth's position is within the upper or lower boundary limit; if not, set the moth's position to the upper or lower boundary limit; if so, calculate the population fitness and update the flame position.
[0065]
[0066] In the formula: Ub and Lb are the upper and lower limits of the optimization problem, respectively;
[0067] Preferably, the specific method of step S5 is as follows:
[0068] S501, determine whether the optimal flame meets the interpolation conditions; if not, return to step S3; if it does, perform interpolation prediction on the optimal flame position.
[0069] Preferably, the specific method of step S6 is as follows:
[0070] S601, This represents the position of the j-th flame in generation t. It stores the positions of flames j in the next three generations. The position of the fourth-generation flame j is predicted by interpolation. Then, the predicted position of the fourth-generation flame j is compared with the position of the flame j obtained by iterative update of the basic moth-to-a-flame algorithm. The better position is taken as the final position of the fourth-generation flame j. Determine if the interpolated flame position is better than the current flame position; if so, update the interpolated flame position to the current optimal flame position; calculate the flame fitness O for both the non-interpolated and interpolated flame positions. F and O′ F Comparison O F and O′ F Size;
[0071]
[0072] In the formula: The final position of the flame;
[0073] Preferably, the specific method of step S7 is as follows:
[0074] S701, when the difference between the optimal and worst positions reaches a threshold, it is considered that the optimal value has been found, and the historical best value, i.e., the maximum output power value of the photovoltaic array, is output. The algorithm stops iterating, or it stops iterating when the maximum number of iterations is reached; the termination formula is as follows:
[0075] |x best -x worst |≤0.05;
[0076] In the formula: x best The optimal position; x worst This is the worst possible position;
[0077] Example 2:
[0078] like Figure 2 As shown: Simulation tests were conducted using an MPPT simulation model based on the Boost system built in MATLAB / Simulink; Table 1 shows the simulation parameters of the photovoltaic array, and Table 2 shows the optimization algorithm results under uniform illumination and partial shading conditions.
[0079]
[0080] Table 1: Simulation parameters of photovoltaic array;
[0081]
[0082] Table 2: Results of the optimization algorithm under uniform illumination and partial shading conditions;
[0083] The above embodiments are merely preferred technical solutions of this invention and should not be considered as limitations on this invention. The embodiments and features described in this application can be arbitrarily combined without conflict. The scope of protection of this invention should be limited to the technical solutions described in the claims, including equivalent substitutions of the technical features described in the claims. That is, equivalent substitutions and improvements within this scope are also within the scope of protection of this invention.
Claims
1. A photovoltaic maximum power MPPT based on an improved moth-to-a-flame algorithm, characterized in that: Includes the following steps: S1, Set the relevant parameters of the algorithm: The parameters include: moth population size N, search space dimension D, maximum number of iterations T, optimal output value U_best and duty cycle d; S2, Initialize Population: Initialize the location of the moth population; set the fitness function and determine the number of flames; S3 updates the location of moth populations using the Levy flight strategy; S4, determine if the moth's position is within the upper or lower boundary limits; if not, set the moth's position to the upper or lower boundary limit; if so, calculate the population fitness and update the flame position. S5, determine whether the optimal flame meets the interpolation conditions; if not, return to step S3; if it does, perform interpolation prediction on the optimal flame position. S6, determine whether the interpolated predicted flame position is better than the current flame position; if not, return to step S3; if so, update the interpolated predicted flame position to the current optimal flame position. S7. When the difference between the optimal position and the worst position reaches the threshold, it is considered that the optimal value has been found. The historical optimal value, i.e., the output power value of the photovoltaic array is the maximum, is output, and the algorithm stops iterating, or stops iterating when the maximum number of iterations is reached.
2. The photovoltaic maximum power MPPT based on the improved moth-to-a-flame algorithm according to claim 1, characterized in that: The specific method for step S2 is as follows: S201, Population initialization is performed, and an adaptive weighting factor strategy is introduced to generate a uniformly distributed initial moth population. The formula for updating the moths' search for and position relative to the flame is as follows: In the formula: W0 is the adaptive weighting factor; t and t max These are the current iteration number and the maximum iteration number, respectively; D i Let M be the distance between the q-th flame and the i-th moth; b is a constant; M is the distance between the q-th flame and the i-th moth. i t0 is the latest position of the moth; t0 is a random number between [-1, 1], representing the distance between the moth and the flame; F j This indicates the location of the flame.
3. The photovoltaic maximum power MPPT based on the improved moth-to-a-flame algorithm according to claim 1, characterized in that: The specific method in step S3 is as follows: S301, the Levy flight strategy is introduced to update the location of moth populations. The calculation formula is as follows: In the formula: α is the step size control factor, which takes a value of 1; is the dot product; Levy(β) is a random walk with a step size following a Levy distribution.
4. The photovoltaic maximum power MPPT based on the improved moth-to-a-flame algorithm according to claim 1, characterized in that: The specific method in step S4 is as follows: S401, determine whether the moth's position is within the upper or lower boundary limit; if not, set the moth's position to the upper or lower boundary limit; if so, calculate the population fitness and update the flame position. In the formula: Ub and Lb are the upper and lower limits of the optimization problem, respectively.
5. The photovoltaic maximum power MPPT based on the improved moth-to-a-flame algorithm according to claim 1, characterized in that: The specific method in step S5 is as follows: S501, determine whether the optimal flame meets the interpolation conditions; if not, return to step S3; if it does, perform interpolation prediction on the optimal flame position.
6. The photovoltaic maximum power MPPT based on the improved moth-to-a-flame algorithm according to claim 1, characterized in that: The specific method in step S6 is as follows: S601, This represents the position of the j-th flame in generation t. It stores the positions of flames j in the next three generations. The position of the fourth-generation flame j is predicted by interpolation. Then, the predicted position of the fourth-generation flame j is compared with the position of the flame j obtained by iterative update of the basic moth-to-a-flame algorithm. The better position is taken as the final position of the fourth-generation flame j. Determine if the interpolated flame position is better than the current flame position; if so, update the interpolated flame position to the current optimal flame position; calculate the flame fitness O for both the non-interpolated and interpolated flame positions. F and O′ F Comparison O F and O′ F Size; In the formula: This indicates the final location of the flame.
7. The photovoltaic maximum power MPPT based on the improved moth-to-a-flame algorithm according to claim 1, characterized in that: The specific method in step S7 is as follows: S701, when the difference between the optimal and worst positions reaches a threshold, it is considered that the optimal value has been found, and the historical best value, i.e., the maximum output power value of the photovoltaic array, is output. The algorithm stops iterating, or it stops iterating when the maximum number of iterations is reached; the termination formula is as follows: |x best -x worst |≤0.05; In the formula: x best The optimal position; x x worst This is the worst position.