Photovoltaic array maximum power point tracking method and device, medium and equipment

By using an inverse cosine function as the dynamic learning factor and an iteration termination condition to optimize the particle swarm optimization algorithm in photovoltaic array maximum power point tracking, the problems of low optimization efficiency and inaccurate iteration are solved, and faster and more accurate photovoltaic array maximum power point tracking is achieved.

CN121478073APending Publication Date: 2026-02-06YUNNAN POWER GRID CO LTD ELECTRIC POWER RES INST
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202311496259.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2023-11-10
Publication Date
2026-02-06

AI Technical Summary

Technical Problem

Existing particle swarm optimization algorithms have low optimization efficiency in photovoltaic power generation, are prone to getting trapped in local extrema during the iteration process, and the iteration conditions are not flexible and accurate enough, resulting in oscillation and loss of photovoltaic output power.

Method used

By employing a dynamic learning factor and iteration termination condition based on the inverse cosine function, and by setting inertia weights, learning factors, and initial values, combined with the output voltage increment of the photovoltaic array, the particle swarm optimization algorithm is optimized to improve the optimization speed and accuracy.

Benefits of technology

It accelerates the search for the maximum power point of the photovoltaic array, reduces the number of iterations, improves the adaptability and accuracy of the iteration, and reduces the oscillation and loss of photovoltaic output power.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121478073A_ABST
    Figure CN121478073A_ABST
Patent Text Reader

Abstract

The invention discloses a photovoltaic array maximum power point tracking method and device, a storage medium and computer equipment. The method comprises the following steps: firstly, setting an initial value of a particle swarm algorithm, and setting a first learning factor and a second learning factor for an inertia weight based on an anti-cosine function; then iteration is started, after k times of iteration, the voltage corresponding to each particle is obtained, and a voltage mean value is calculated based on the voltage; calculating the deviation degree between the voltage and the voltage mean value; when the deviation degree is smaller than a preset value, it is determined that iteration is ended, and the local optimal power and the global maximum power of the photovoltaic array are output. According to the method, two dynamic learning factors are set based on the arc cosine function, so that the speed and accuracy of finding the maximum power point of the photovoltaic array are improved, and meanwhile, the iteration fitness is better and more flexible; furthermore, the iteration termination condition depends on the deviation degree of the individual value relative to the total average value, the number of iterations is reduced, and the iteration speed is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of photovoltaic power generation technology, and in particular to a method, apparatus, medium and equipment for maximum power point tracking of a photovoltaic array. Background Technology

[0002] Photovoltaic power generation plays a crucial role in renewable energy generation. Improving photovoltaic power generation efficiency has long been a key objective, and maximum power point tracking (MPPT) technology can effectively enhance this efficiency. Among existing MPPT technologies, relatively mature methods include constant voltage control, incremental conductance method, perturbation and observation method, and particle swarm optimization (PSO). PSO stands out among these methods due to its superior optimization performance and resistance to getting trapped in local optima.

[0003] However, conventional particle swarm optimization algorithms sometimes cannot adapt to the changing trends of extreme values ​​during iteration, and their conditions for ending the iteration are not flexible or accurate enough, resulting in excessively long optimization time, reduced efficiency, and decreased accuracy. Summary of the Invention

[0004] Based on this, and to address the aforementioned problems, this application provides a method, apparatus, medium, and device for maximum power point tracking of a photovoltaic array, in order to improve the accuracy of the MPPT algorithm optimization, reduce unnecessary algorithm iteration time, and enable the photovoltaic array to quickly reach the maximum power output point, thereby reducing the oscillation and loss of photovoltaic output power during the iterative optimization process.

[0005] In a first aspect, this application provides a method for maximum power point tracking of a photovoltaic array, the method comprising:

[0006] Obtain the output voltage of the photovoltaic array and the increment of the output voltage of the photovoltaic array;

[0007] Based on the particle swarm optimization algorithm, the output voltage, and the increment of the output voltage, a first expression is established; the first expression includes the initial value of each particle, a first learning factor, a second learning factor, and the inertia weight of the particle;

[0008] Set the inertia weight; set the first learning factor and the second learning factor based on the inverse cosine function; set the initial value; substitute the set initial value, inertia weight, first learning factor, and second learning factor into the first expression, and start the iteration;

[0009] After k iterations, the voltage corresponding to each particle is obtained, and the average voltage is calculated based on the voltage. The deviation between the voltage and the average voltage is calculated. When the deviation is less than a preset value, the iteration is terminated, and the local optimal power and global maximum power of the photovoltaic array are output.

[0010] Optionally, the first expression specifically includes:

[0011]

[0012] in,

[0013] in, This represents the voltage increment of the i-th particle during the k-th iteration. is the voltage increment of the i-th particle in the (k+1)-th iteration; w is the particle's inertia weight; c1 is the first learning factor; c2 is the second learning factor; r1 is the first random number between [0,1] in the matrix; r2 is the second random number between [0,1] in the matrix; The voltage of the i-th particle during the k-th iteration; p is the voltage of the i-th particle at the (k+1)-th iteration; i p represents the local optimal power of the photovoltaic array. g This represents the global maximum power.

[0014] The first expression further includes a first function, which is:

[0015]

[0016] Where, p i p represents the local optimal power of the photovoltaic array. g This represents the global maximum power. The voltage of the i-th particle during the M-th iteration. The corresponding preset fitness function value, i.e., the output voltage of the photovoltaic array, is The output power of the photovoltaic array at that time; M is the maximum number of iterations; N is the total number of particles.

[0017] Optionally, setting the inertia weight includes setting the inertia weight based on a first formula, wherein the first formula is:

[0018]

[0019] Where w is the inertial weight; w max The maximum inertia weight; w min is the minimum inertia weight; k is the current iteration number; M is the maximum iteration number.

[0020] Optionally, setting the first learning factor and the second learning factor based on the inverse cosine function includes:

[0021] The second and third formulas are established based on the inverse cosine function, and the first and second learning factors are set.

[0022] The second formula is:

[0023]

[0024] Where c1 is the first learning factor; Let c1 be the initial value of the first learning factor. Let c1 be the final value of the first learning factor; k is the current iteration number; M is the maximum iteration number.

[0025] The third formula is:

[0026]

[0027] Where c2 is the second learning factor; This is the initial value for the second learning factor c2; is the final value of the second learning factor c2; k is the current iteration number; M is the maximum iteration number.

[0028] Optionally, setting the initial value includes:

[0029] Obtain the local peak value of the output power of the photovoltaic array, determine the output voltage corresponding to the local peak value, and set the output voltage as the initial value;

[0030] The expression for the initial value is the fourth formula, which is:

[0031]

[0032] in, U is the initial value corresponding to the i-th particle, that is, the initial value of the output voltage corresponding to the i-th particle. oc N is the open-circuit voltage of the photovoltaic array. pv The number of photovoltaic modules connected in series in the photovoltaic array is denoted as n; n is an empirical value.

[0033] Optionally, the step of obtaining the voltage corresponding to each particle after k iterations and calculating the average voltage based on the voltage includes:

[0034] After k iterations, the voltage corresponding to each particle is obtained, and the average voltage is calculated based on the fifth formula and the voltage.

[0035] The fifth formula is:

[0036]

[0037] in, This represents the average voltage of the Nth particle after the kth iteration. is the voltage corresponding to the Nth particle after the kth iteration; N is the total number of particles.

[0038] Optionally, the calculation of the deviation between the voltage and the average voltage includes:

[0039] The degree of deviation is calculated based on the voltage, the average voltage, and the sixth formula.

[0040] The sixth formula is:

[0041]

[0042] Among them, DIFF k This represents the deviation degree corresponding to the Nth particle after the kth iteration; This represents the average voltage of the Nth particle after the kth iteration. is the voltage corresponding to the Nth particle after the kth iteration; N is the total number of particles.

[0043] In a second aspect, the present invention provides a maximum power point tracking device for a photovoltaic array, the device being used in photovoltaic power generation, the device comprising:

[0044] The acquisition module is used to acquire the output voltage of the photovoltaic array and the increment of the output voltage of the photovoltaic array.

[0045] A function module is established to establish a first expression based on the particle swarm optimization algorithm, the output voltage, and the increment of the output voltage; the first expression includes the initial value of each particle, a first learning factor, a second learning factor, and the inertia weight of the particle;

[0046] The parameter setting module is used to set the inertia weight; set the first learning factor and the second learning factor based on the inverse cosine function; set the initial value; and substitute the set initial value, inertia weight, first learning factor, and second learning factor into the first expression to start iteration.

[0047] The optimal solution output module is used to obtain the voltage corresponding to each particle after k iterations, calculate the average voltage based on the voltage, calculate the deviation between the voltage and the average voltage, and determine the end of the iteration when the deviation is less than a preset value, and output the local optimal power and global maximum power of the photovoltaic array.

[0048] In a third aspect, the present invention provides a computer-readable storage medium storing a computer program that, when executed by a processor, causes the processor to perform the steps of the method as described in any of the preceding claims.

[0049] In a fourth aspect, the present invention provides a computer device including a memory and a processor, the memory storing a computer program that, when executed by the processor, causes the processor to perform the steps of the method as described in any of the preceding claims.

[0050] The embodiments of this application have the following advantages or beneficial effects:

[0051] This invention provides a method, apparatus, storage medium, and computer device for maximum power point tracking (MPPT) of a photovoltaic (PV) array. The method is applied to PV power generation and includes: acquiring the output voltage of the PV array and its increment; establishing a first expression based on a particle swarm optimization (PSO) algorithm, the output voltage, and its increment; the first expression including initial values ​​for each particle, a first learning factor, a second learning factor, and particle inertia weights; setting the inertia weights; setting the first and second learning factors based on an inverse cosine function; setting initial values; substituting the set initial values, inertia weights, first and second learning factors into the first expression and starting iteration; after k iterations, obtaining the voltage corresponding to each particle and calculating the average voltage; calculating the deviation between the voltage and the average voltage; and when the deviation is less than a preset value, determining the end of the iteration and outputting the local optimal power and global maximum power of the PV array. This invention improves the speed and accuracy of finding the maximum power point of a photovoltaic array by setting two dynamic learning factors based on the inverse cosine function, while making the iteration more adaptable and flexible. Furthermore, the iteration termination condition of this invention depends on the degree of deviation of the individual value from the overall average value, which reduces the number of iterations and thus improves the iteration speed. Attached Figure Description

[0052] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.

[0053] in:

[0054] Figure 1 A flowchart illustrating a particle swarm optimization algorithm provided in an embodiment of this application;

[0055] Figure 2 This is a flowchart illustrating a photovoltaic array maximum power point tracking method proposed in an embodiment of this application;

[0056] Figure 3 A curve showing the change of the values ​​of the first and second learning factors based on the inverse cosine function with the number of iterations, provided for an embodiment of this application;

[0057] Figure 4 This is a schematic diagram of initial particle value setting provided in an embodiment of this application;

[0058] Figure 5A comparison chart of optimization results provided in an embodiment of this application;

[0059] Figure 6 This is a schematic diagram of the structure of a photovoltaic array maximum power point tracking device according to an embodiment of this application;

[0060] Figure 7 An internal structural diagram of the device in one embodiment is shown. Detailed Implementation

[0061] The technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, and not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those of ordinary skill in the art without creative effort are within the scope of protection of this application.

[0062] Maximum Power Point Tracking (MPPT) is a technology used to optimize the performance of photovoltaic (PV) systems. By tracking the maximum power point of the PV cells, it ensures that the system always operates in optimal condition, thereby maximizing energy conversion efficiency and system output power. Its basic principle is to measure the output voltage and current of the PV array in real time, and use the MPPT algorithm to determine whether the current operating point is the maximum power point, i.e., whether the current output voltage is optimal. If the current operating point is not the maximum power point, the algorithm calculates the optimal output voltage corresponding to the next maximum power point of the PV array based on the measured voltage and current values, and then adjusts the operating voltage of the PV cells to approach this calculated optimal voltage value. This process continues, allowing the PV array to operate as close to its maximum power point as possible under different environmental conditions, such as changes in light intensity and temperature. In this way, the PV array can generate maximum power under any given conditions. As mentioned above, existing technologies often use the Particle Swarm Optimization (PSO) algorithm to implement MPPT technology.

[0063] Particle Swarm Optimization (PSO) is a simplified model based on the foraging behavior of birds. It assumes that when a bird hunts, it shares information with other birds in the swarm and adjusts its speed (both magnitude and direction) based on its own optimal position and the optimal position given by the swarm, thus gradually transitioning from disordered searching to ordered flight. The principle is to initialize a swarm of random particles (random solutions) and iteratively find the optimal solution. In each iteration, the particles update themselves by tracking two "extremes." The first is the optimal solution found by the particle itself, called the individual extreme value (pBest); the other extreme value is the optimal solution found by the entire swarm, called the global extreme value (gBest).

[0064] A typical particle swarm optimization algorithm typically includes the following parameters: population size, number of iterations, inertia weight, and learning factor. Please refer to [link / reference]. Figure 1 This is a flowchart of a particle swarm optimization algorithm provided in this application embodiment. Based on this flowchart, the steps of the particle swarm optimization algorithm can be summarized as follows: 1. After starting, initialize the particle swarm parameters. The initialized parameters include the population size, number of iterations, inertia weight, learning factor, position and velocity of each particle (i.e., steps (1) and (2) in the flowchart); 2. Randomly initialize the position and velocity of each particle, i.e., calculate the fitness value of each particle according to the fitness function, save the optimal position of each particle, and similarly calculate and save the best fitness value and the best position of the population of all particles (i.e., step (3) in the flowchart); 3. When the optimal fitness value calculated above does not meet the termination condition, the particle swarm optimization algorithm is terminated according to the velocity. 5. Calculate the fitness value of each particle after the update, compare the best fitness value of each particle with the fitness value of its historical best position, and if it is better, take its current position as the best position of the particle; for each particle, compare the fitness value corresponding to its best position with the best fitness value of the population, and if it is better, update the best position and best fitness value of the population (i.e., steps (6), (7), (8) in the diagram); (6). Determine whether the termination condition (maximum number of iterations or accuracy requirement) is met. If the condition is met, stop the iteration and output the best value (i.e., steps (4), (9), (10) in the diagram).

[0065] Here, a particle refers to a candidate solution to the optimization problem; position refers to the location of the candidate solution; velocity refers to the speed at which the candidate solution moves; fitness value refers to the value used to evaluate the quality of a particle; individual optimal position refers to the best position found by a single particle so far; and swarm optimal position refers to the best position found by all particles so far.

[0066] It's important to note that conventional particle swarm optimization (PSO) algorithms often use fixed learning factors, which cannot adapt to the changing trends of extreme values ​​during the iteration process of maximum power point tracking (MPPT) in photovoltaic (PV) arrays. Furthermore, conventional algorithms typically determine their termination strategy based on the maximum number of iterations or the difference between every two peak particles. For algorithms using the maximum number of iterations as the termination strategy, setting it too low will result in a non-optimal solution, leading to inaccurate maximum power point tracking and energy waste. Conversely, setting it too high will cause output fluctuations or excessively long optimization times, reducing efficiency and resulting in poor MPPT efficiency for PV arrays. Moreover, there is no fixed method for selecting the maximum number of iterations; it is often determined through trial and error, further reducing efficiency. For algorithms using a termination strategy where the difference between every two peak particles is less than a preset value, if there are particles with significant deviations from the majority of particle values ​​or if the preset difference value is too large, the optimal solution cannot be accurately found. Similarly, if the preset difference value is too small, it will also cause output fluctuations or excessively long optimization times, reducing efficiency. The selection of the preset difference value also lacks a fixed method, ultimately leading to insufficient flexibility and poor efficiency in tracking the maximum power point of the PV array.

[0067] To this end, this application embodiment sets a dynamic learning factor based on the inverse cosine function, which can accelerate the search for the maximum power point of the photovoltaic array and the search result is more accurate. Furthermore, this application embodiment proposes a brand-new iteration termination condition, which can achieve more accurate results for tracking the maximum power point of the photovoltaic array and eliminates the need for multiple invalid iterations.

[0068] For details, please refer to Figure 2 This is a flowchart illustrating a photovoltaic array maximum power point tracking (MPPT) method proposed in this application. It should be noted that when applying the particle swarm optimization (PSO) algorithm to photovoltaic MPPT, the particle velocity represents the photovoltaic array output voltage increment ΔV, and the particle position represents the photovoltaic array output voltage V. The output power P of the photovoltaic array satisfies P = f(V) with the fitness function f(·). The photovoltaic array MPPT problem can be reduced to an optimization problem of finding the maximum value of the function P = f(V). Therefore, the specific method for photovoltaic array maximum power point tracking is as follows:

[0069] Step 201: Obtain the output voltage of the photovoltaic array and the increment of the output voltage of the photovoltaic array.

[0070] It is understandable that a photovoltaic array is the largest-scale photovoltaic power generation system, referring to the connection of solar cell modules and photovoltaic modules in a certain arrangement (such as square arrays, circular arrays, etc.) to better collect solar energy for power generation and improve solar energy utilization. In practical applications, multiple photovoltaic arrays can be connected in parallel or series to form various power generation systems. In the embodiments of this application, N is used. pvA photovoltaic module is connected in series to form a photovoltaic string, M pv A series of photovoltaic modules connected in parallel form N pv ×M pv Photovoltaic arrays.

[0071] Furthermore, in step 201, the current output voltage of the photovoltaic array is acquired in real time, and the increment of the output voltage is calculated based on the output voltage acquired twice consecutively.

[0072] Step 202: Based on the particle swarm optimization algorithm, output voltage, and output voltage increment, establish a first expression; the first expression includes the initial value of each particle, the first learning factor, the second learning factor, and the particle inertia weight.

[0073] In one feasible implementation, MPPT technology is implemented based on the particle swarm optimization algorithm. Specifically, the particle velocity represents the photovoltaic array output voltage increment ΔV, and the particle position represents the photovoltaic array output voltage V. The first expression then represents the relationship between the output voltage V and the output voltage increment ΔV, specifically:

[0074]

[0075] in,

[0076] in, This represents the voltage increment of the i-th particle during the k-th iteration. is the voltage increment of the i-th particle in the (k+1)-th iteration; w is the particle's inertia weight; c1 is the first learning factor; c2 is the second learning factor; r1 is the first random number between [0,1] in the matrix; r2 is the second random number between [0,1] in the matrix; The voltage of the i-th particle during the k-th iteration; p is the voltage of the i-th particle at the (k+1)-th iteration; i p represents the local optimal power of the photovoltaic array. g This represents the global maximum power. It can be seen that in equation ①, the first part on the right-hand side represents the particle's ability to maintain its original voltage increment due to inertia, where w represents the inertial weight. The second part represents self-cognition, with c1 as its learning factor. The third part represents social cognition, with c2 as its learning factor.

[0077] It is important to note that the local optimal power p of the photovoltaic array i and global maximum power p g It also needs to satisfy the first function:

[0078]

[0079] Where, p i p represents the local optimal power of the photovoltaic array.g This represents the global maximum power. The output voltage of the i-th particle during the M-th iteration. The corresponding fitness function value, i.e., the output voltage of the photovoltaic array, is The output power of the photovoltaic array at that time; M is the maximum number of iterations; N is the total number of particles.

[0080] It should be noted that the fitness function in this embodiment is an existing fitness function given based on experience, intended to allow obtaining the fitness value of each particle or the fitness value of the population through this fitness function. No specific examples are provided here, but no excessive limitations are imposed.

[0081] Step 203: Set inertia weights; set the first learning factor and the second learning factor based on the inverse cosine function; set initial values; substitute the set initial values, inertia weights, the first learning factor, and the second learning factor into the first expression, and start iterating.

[0082] In one feasible implementation, the inertia weight is set based on the first formula, which is:

[0083]

[0084] Where w is the inertial weight; w max The maximum inertia weight; w min Let k be the minimum inertia weight; k be the current iteration number; and M be the maximum iteration number. From formula ④, it can be seen that as the iteration number k increases, the inertia weight gradually decreases, making the function value more approach the global optimum.

[0085] In this embodiment, a dynamic learning factor based on the inverse cosine function is proposed, as shown in equations ⑤ and ⑥. Iterative calculation of the learning factor using the inverse cosine function has the advantage of reflecting the inverse trend of the two types of learning factors changing over time in actual physical processes, thus accelerating the search for the optimal solution. Secondly, the inverse cosine function curve is generally smooth; when the independent variable changes, the dependent variable does not show a significant turning point, making it less likely to miss function extrema. Furthermore, the larger the number of iterations, the slower the changes in c1 and c2, which reduces the particle velocity, i.e., reduces the voltage increment change, resulting in a more detailed optimization search.

[0086] In summary, based on the inverse cosine function, a second formula is established, thereby setting the first learning factor. The second formula is:

[0087]

[0088] Where c1 is the first learning factor; Let c1 be the initial value of the first learning factor. Let c1 be the final value of the first learning factor; k is the current iteration number; M is the maximum iteration number.

[0089] The third formula is established based on the inverse cosine function, thereby setting the second learning factor. The third formula is:

[0090]

[0091] Where c2 is the second learning factor; This is the initial value for the second learning factor c2; is the final value of the second learning factor c2; k is the current iteration number; M is the maximum iteration number.

[0092] Please see Figure 3 This application provides curves showing the changes in the values ​​of the first and second learning factors based on the inverse cosine function as a function of iteration number. It can be seen that using the inverse cosine function for iterative calculation of the learning factors has the advantage of reflecting the inverse trend of the two types of learning factors changing over time in the actual physical process, thus accelerating the search for the optimal solution. Secondly, the inverse cosine function curve is generally smooth; under the same conditions, when the independent variable changes, the dependent variable does not show a significant turning point, making it less likely to miss function extrema. Furthermore, the larger the iteration number, the slower the changes in c1 and c2, which reduces the particle velocity, i.e., reduces the voltage increment change value, resulting in a more detailed optimization search.

[0093] It is understandable that the embodiments of this application, by setting a dynamic learning factor based on the inverse cosine function, make it better adaptable to photovoltaic MPPT technology. The data in photovoltaic MPPT technology is often large and random, making a flexible optimization method particularly important. Based on the characteristics of the inverse cosine function curve, the dependent variable changes relatively smoothly when the independent variable changes, allowing for a better and more detailed search for the maximum power point of the photovoltaic array. Simultaneously, the characteristic that setting a dynamic learning factor based on the inverse cosine function allows for a slower optimization as the number of iterations increases also makes the search for the maximum power point of the photovoltaic array more accurate.

[0094] In this embodiment, the initial value of the iteration is set near a local peak. Specifically, the local peak value of the photovoltaic array's output power is first obtained, and the output voltage corresponding to this local peak value is determined. This output voltage is then set as the initial value for the iteration in the particle swarm optimization algorithm. In simpler terms, the initial value of the particles is set near the photovoltaic output voltage when the photovoltaic array's output power reaches its extreme value. Specifically: the local peak value of the photovoltaic array's output power is obtained, the output voltage corresponding to this local peak value is determined, and this output voltage is set as the initial value. The expression for this initial value is the fourth formula, where the fourth formula is:

[0095]

[0096] in, U is the initial value corresponding to the i-th particle, that is, the initial value of the output voltage corresponding to the i-th particle. oc N is the open-circuit voltage of the photovoltaic array. pv The number of photovoltaic modules connected in series in the photovoltaic array is denoted by n; n is an empirical value, typically taken as 0.8. It can be understood that this corresponds to the voltage during particle iteration. satisfy

[0097] It should be noted that, as mentioned above, N pv A photovoltaic module is connected in series to form a photovoltaic string, M pv A series of photovoltaic modules connected in parallel form N pv ×M pv If there is a photovoltaic array, then there are at most N such arrays. pv There are several power peak points. i and N pv Generally, the same value is preferred, that is, i = N is generally preferred. pv For example, when the number of photovoltaic modules N in a photovoltaic array pv When there are 100, i is selected as 100.

[0098] It is understood that in this embodiment, the initial value is set near a local peak point. This allows the particle swarm optimization algorithm to iterate continuously based on the output voltage corresponding to this local peak point, updating the output voltage and thus finding the output voltage value corresponding to the maximum output power. This significantly reduces the iteration time and correspondingly improves the speed of photovoltaic maximum power point tracking. It is understood that the local peak is the aforementioned locally optimal power p of the photovoltaic array. i This refers to the largest of the multiple output power values ​​corresponding to the i-th particle after multiple iterations. Please refer to [link / reference]. Figure 4 This is a schematic diagram of initial particle value setting provided in an embodiment of this application. As can be seen, Figure 4 The four peak points are local peak points. Setting the initial voltage value of each particle before iteration to be near the local peak can speed up the algorithm's optimization process, reduce the number of iterations, and improve the optimization efficiency of the particle swarm maximum power tracking algorithm.

[0099] In this embodiment, setting the initial value close to the local peak value accelerates the optimization process and effectively reduces oscillations caused by a relatively large number of iterations. It also lays the foundation for setting the termination condition in subsequent iterations, enabling better tracking of the maximum power point in photovoltaic MPPT technology when these two factors are combined.

[0100] Step 204: After k iterations, obtain the voltage corresponding to each particle, and calculate the average voltage based on the voltage; calculate the deviation between the voltage and the average voltage; when the deviation is less than the preset value, determine to end the iteration, and output the local optimal power and global maximum power of the photovoltaic array.

[0101] It is understandable that the global maximum power is the same as the maximum power point of the photovoltaic array.

[0102] In one feasible implementation, after k iterations, the voltage corresponding to each particle is obtained, and the average voltage is calculated based on the fifth formula and the voltage itself; the fifth formula is:

[0103]

[0104] in, This represents the average voltage of the Nth particle after the kth iteration. is the voltage corresponding to the Nth particle after the kth iteration; N is the total number of particles.

[0105] In one feasible implementation, the degree of deviation is calculated based on the voltage, the average voltage, and the sixth formula; the sixth formula is:

[0106]

[0107] Among them, DIFF k This represents the deviation degree corresponding to the Nth particle after the kth iteration; This represents the average voltage of the Nth particle after the kth iteration. is the voltage corresponding to the Nth particle after the kth iteration; N is the total number of particles.

[0108] Furthermore, when the deviation is less than a preset value, the iteration ends, and the local optimal power and global maximum power of the photovoltaic array are output. The preset value is typically 2%, meaning that when the deviation is less than a preset value, the iteration ends. k The iteration search ends when the percentage is less than 2%. Here, 2% is an empirical value for optimal performance, not a limiting value.

[0109] Understandably, in traditional particle swarm optimization (PSO) algorithms, if the termination condition is that the difference between the voltages of any two particles in N particles is less than a certain threshold, then N(N-1) / 2 iterations are required. That is, N iterations must be performed after each iteration. 2The difference operations are on the order of magnitude, and the specific value of the threshold is not easy to select. However, for the termination condition in this embodiment, by calculating the deviation of the voltage corresponding to each particle from the average voltage (DIFF value), the difference operations required for each iteration are N, which is less than the number of difference operations in the traditional method. Moreover, as the number of particles N increases, the method proposed in this embodiment has a more obvious advantage in terms of the number of iterations and solution time. Furthermore, the termination condition threshold is the deviation of the individual value from the overall average value, which is a relative error concept. The specific threshold is relatively easy to select according to the error accuracy requirements, and it can usually be selected as an error threshold of 1% to 2%. Combined with the initial value setting method of the aforementioned embodiment of this application, this particle initial value setting method and termination condition setting method avoid the problem that a large difference between the corresponding value of a particle and the average value can easily cause such large-difference particles to "escape," avoiding the discarding of potential optimal solution regions, thereby further improving the accuracy of the algorithm.

[0110] Please see Figure 5 The figures provided in this application provide a comparison of optimization results. The left figure compares the optimization results of this application's embodiment with those of a conventional method, while the right figure compares the number of iterations and optimization deviation between this application's embodiment and the conventional method. It can be seen that when achieving maximum power point tracking, this application's embodiment can find the maximum power output point more accurately and requires fewer iterations.

[0111] It should be noted that in the embodiments of this application, the initial value is set near the local peak, which effectively reduces the oscillation caused by the relatively large number of iterations; a dynamic learning factor based on the inverse cosine function is proposed, which reflects the trend of the two types of learning factors changing in opposite directions with time in the actual physical process, which can accelerate the search for the optimal solution and keep the output of the iteration process relatively stable; the termination condition is set as the degree of deviation of the individual value from the overall average value, avoiding the discarding of potential regions of possible optimal solutions and improving the accuracy of the algorithm.

[0112] Based on the above, this application embodiment sets a dynamic learning factor based on the inverse cosine function. The advantage of using the inverse cosine function for iterative calculation of the learning factor is that it reflects the inverse trend of the two types of learning factors changing over time in the actual physical process, which can accelerate the search for the maximum power output point. Secondly, the inverse cosine function curve is generally smooth; when the independent variable changes, the dependent variable does not show a significant turning point, making it less likely to miss function extrema. Furthermore, the larger the number of iterations, the slower the change in the dynamic learning factor, which can reduce the particle velocity, i.e., reduce the voltage increment change value, resulting in a more detailed optimization search.

[0113] Furthermore, this embodiment sets the initial value near the local peak of the photovoltaic array, meaning that the initial voltage value corresponding to each particle before iteration is near the local peak. This accelerates the algorithm's optimization process, reduces the number of iterations, and improves the optimization efficiency of the particle swarm optimization algorithm. In addition, the proposed initial value setting method avoids the problem of particles with large differences from the mean value easily "escaping," thus avoiding discarding potential optimal solution regions and improving the algorithm's accuracy.

[0114] This application embodiment also includes a termination method based on the degree of deviation of individual values ​​from the overall mean, resulting in fewer subtraction calculations compared to traditional methods. As the number of particles increases, the advantages of the proposed method in terms of iteration count and solution time become more pronounced. Furthermore, the termination condition threshold of the algorithm proposed in this application embodiment is the degree of deviation of individual values ​​from the overall mean, which is a relative error concept. The specific threshold is relatively easy to select based on the error accuracy requirements, and is typically set to an error threshold of 1% to 2%.

[0115] Please see Figure 6 This is a schematic diagram of the structure of a photovoltaic array maximum power point tracking device according to an embodiment of this application. The device includes:

[0116] The acquisition module 601 is used to acquire the output voltage of the photovoltaic array and the increment of the output voltage of the photovoltaic array;

[0117] A function module 602 is established to establish a first expression based on the particle swarm optimization algorithm, the output voltage, and the increment of the output voltage; the first expression includes the initial value of each particle, a first learning factor, a second learning factor, and the inertia weight of the particle;

[0118] The parameter setting module 603 is used to set the inertia weight; set the first learning factor and the second learning factor based on the inverse cosine function; set the initial value; and substitute the set initial value, inertia weight, first learning factor, and second learning factor into the first expression to start iteration.

[0119] The optimal solution output module 604 is used to obtain the voltage corresponding to each particle after k iterations, calculate the average voltage based on the voltage, calculate the deviation between the voltage and the average voltage, and determine the end of the iteration when the deviation is less than a preset value, and output the local optimal power and global maximum power of the photovoltaic array.

[0120] In this application embodiment, the relevant content of the above four modules can be found in [reference needed]. Figures 1 to 5 The contents of the illustrated embodiments will not be repeated here.

[0121] In this application embodiment, a computer-readable storage medium is provided, which stores a computer program. When the computer program is executed by a processor, the processor performs any one of the methods described in the above method embodiments.

[0122] In one embodiment, an apparatus is provided, including a memory and a processor, the memory storing a computer program that, when executed by the processor, causes the processor to perform any of the methods described in the above method embodiments.

[0123] Figure 7 An internal structural diagram of a device in one embodiment is shown. This computer device can specifically be a terminal, a server, or a gateway. Figure 7 As shown, the computer device includes a processor, memory, and network interface connected via a system bus. The memory includes a non-volatile storage medium and internal memory. The non-volatile storage medium stores an operating system and may also store a computer program. When executed by the processor, this computer program causes the processor to perform the steps in the above-described method embodiments. The internal memory may also store a computer program, which, when executed by the processor, causes the processor to perform the steps in the above-described method embodiments. Those skilled in the art will understand that... Figure 7 The structure shown is merely a block diagram of a portion of the structure related to the present application and does not constitute a limitation on the computer device to which the present application is applied. Specific computer devices may include more or fewer components than those shown in the figure, or combine certain components, or have different component arrangements.

[0124] Those skilled in the art will understand that all or part of the processes in the above embodiments can be implemented by a computer program instructing related hardware. The program can be stored in a non-volatile computer-readable storage medium, and when executed, it can include the processes of the embodiments described above. Any references to memory, storage, databases, or other media used in the embodiments provided in this application can include non-volatile and / or volatile memory. Non-volatile memory can include read-only memory (ROM), programmable ROM (PROM), electrically programmable ROM (EPROM), electrically erasable programmable ROM (EEPROM), or flash memory. Volatile memory can include random access memory (RAM) or external cache memory. By way of illustration and not limitation, RAM is available in various forms, such as static RAM (SRAM), dynamic RAM (DRAM), synchronous DRAM (SDRAM), dual data rate SDRAM (DDRSDRAM), enhanced SDRAM (ESDRAM), synchronous link DRAM (SLDRAM), RAMbus direct RAM (RDRAM), direct memory bus dynamic RAM (DRDRAM), and RAMbus dynamic RAM (RDRAM), etc.

[0125] The technical features of the above embodiments can be combined in any way. For the sake of brevity, not all possible combinations of the technical features in the above embodiments are described. However, as long as there is no contradiction in the combination of these technical features, they should be considered to be within the scope of this specification.

[0126] The embodiments described above are merely illustrative of several implementation methods of this application, and while the descriptions are specific and detailed, they should not be construed as limiting the scope of this patent application. It should be noted that those skilled in the art can make various modifications and improvements without departing from the concept of this application, and these all fall within the protection scope of this application. Therefore, the protection scope of this patent application should be determined by the appended claims.

Claims

1. A method for maximum power point tracking of a photovoltaic array, characterized in that, The method includes: Obtain the output voltage of the photovoltaic array and the increment of the output voltage of the photovoltaic array; Based on the particle swarm optimization algorithm, the output voltage, and the increment of the output voltage, a first expression is established; the first expression includes the initial value of each particle, a first learning factor, a second learning factor, and the inertia weight of the particle; Set the inertia weight; set the first learning factor and the second learning factor based on the inverse cosine function; set the initial value; substitute the set initial value, inertia weight, first learning factor, and second learning factor into the first expression, and start the iteration; After k iterations, the voltage corresponding to each particle is obtained, and the average voltage is calculated based on the voltage. The deviation between the voltage and the average voltage is calculated. When the deviation is less than a preset value, the iteration is terminated, and the local optimal power and global maximum power of the photovoltaic array are output.

2. The method according to claim 1, characterized in that, The first expression specifically includes: ΔV i k+1 =wDV i k +c1r1(p i -V i k )+c2r2(p g -V i k ); Among them, V i k+1 =V i k +ΔV i k+1 ; Where, ΔV i k ΔV represents the voltage increment of the i-th particle during the k-th iteration. i k+1 V is the voltage increment of the i-th particle in the (k+1)-th iteration; w is the particle's inertia weight; c1 is the first learning factor; c2 is the second learning factor; r1 is the first random number between [0, 1]; r2 is the second random number between [0, 1]; V i k V represents the voltage of the i-th particle during the k-th iteration. i k+1 p is the voltage of the i-th particle at the (k+1)-th iteration; i p represents the local optimal power of the photovoltaic array. g This represents the global maximum power. The first expression further includes a first function, which is: Where, p i p represents the local optimal power of the photovoltaic array. g f(V) represents the global maximum power. i M V is the voltage of the i-th particle during the M-th iteration. i M The corresponding preset fitness function value, i.e., the output voltage of the photovoltaic array is V. i M The output power of the photovoltaic array at that time; M is the maximum number of iterations; N is the total number of particles.

3. The method according to claim 1, characterized in that, Setting the inertia weight includes setting the inertia weight based on a first formula, wherein the first formula is: Where w is the inertial weight; w max The maximum inertia weight; w min is the minimum inertia weight; k is the current iteration number; M is the maximum iteration number.

4. The method according to claim 1, characterized in that, The step of setting the first learning factor and the second learning factor based on the inverse cosine function includes: The second and third formulas are established based on the inverse cosine function, and the first and second learning factors are set. The second formula is: Where c1 is the first learning factor; Let c1 be the initial value of the first learning factor. Let c1 be the final value of the first learning factor; k is the current iteration number; M is the maximum iteration number. The third formula is: Where c2 is the second learning factor; This is the initial value for the second learning factor c2; is the final value of the second learning factor c2; k is the current iteration number; M is the maximum iteration number.

5. The method according to claim 1, characterized in that, Setting the initial value includes: Obtain the local peak value of the output power of the photovoltaic array, determine the output voltage corresponding to the local peak value, and set the output voltage as the initial value; The expression for the initial value is the fourth formula, which is: Among them, V i 0 U is the initial value corresponding to the i-th particle, that is, the initial value of the output voltage corresponding to the i-th particle. oc N is the open-circuit voltage of the photovoltaic array. pv The number of photovoltaic modules connected in series in the photovoltaic array is denoted as n; n is an empirical value.

6. The method according to claim 1, characterized in that, After k iterations, the voltage corresponding to each particle is obtained, and the average voltage is calculated based on the voltage, including: After k iterations, the voltage corresponding to each particle is obtained, and the average voltage is calculated based on the fifth formula and the voltage. The fifth formula is: in, This represents the average voltage of the Nth particle after the kth iteration. is the voltage corresponding to the Nth particle after the kth iteration; N is the total number of particles.

7. The method according to claim 6, characterized in that, The calculation of the deviation between the voltage and the average voltage includes: The degree of deviation is calculated based on the voltage, the average voltage, and the sixth formula. The sixth formula is: Wherein, DIFFk is the deviation degree corresponding to the Nth particle after the kth iteration; This represents the average voltage of the Nth particle after the kth iteration. is the voltage corresponding to the Nth particle after the kth iteration; N is the total number of particles.

8. A photovoltaic array maximum power point tracking device, characterized in that, The device is used in photovoltaic power generation, and the device includes: The acquisition module is used to acquire the output voltage of the photovoltaic array and the increment of the output voltage of the photovoltaic array. A function module is established to establish a first expression based on the particle swarm optimization algorithm, the output voltage, and the increment of the output voltage; the first expression includes the initial value of each particle, a first learning factor, a second learning factor, and the inertia weight of the particle; The parameter setting module is used to set the inertia weight; set the first learning factor and the second learning factor based on the inverse cosine function; set the initial value; and substitute the set initial value, inertia weight, first learning factor, and second learning factor into the first expression to start iteration. The optimal solution output module is used to obtain the voltage corresponding to each particle after k iterations, calculate the average voltage based on the voltage, calculate the deviation between the voltage and the average voltage, and determine the end of the iteration when the deviation is less than a preset value, and output the local optimal power and global maximum power of the photovoltaic array.

9. A computer-readable storage medium storing a computer program, characterized in that, When the computer program is executed by a processor, it causes the processor to perform the steps of the method as described in any one of claims 1 to 7.

10. A computer device, comprising a memory and a processor, characterized in that, The memory stores a computer program that, when executed by the processor, causes the processor to perform the steps of the method as described in any one of claims 1 to 7.