Maximum power point tracking system and method based on improved whale optimization algorithm
Through the improved whale optimization algorithm, the problem of multi-peak value of photovoltaic power generation under non-uniform lighting conditions is solved, the tracking accuracy and speed are improved, the local maximum power point is trapped, and the output efficiency of the photovoltaic system is improved.
Patent Information
- Application Number
- CN202510394284.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-03-31
- Publication Date
- 2025-07-25
AI Technical Summary
The traditional maximum power point tracking method for photovoltaic power generation is difficult to distinguish multiple peaks under non-uniform lighting conditions, and it is easy to misjudgment into the local maximum power point, resulting in low system output power and power loss. The existing whale optimization algorithm has the disadvantages of slow convergence speed and large search oscillation.
The improved whale optimization algorithm is adopted, and the probability factor P is added to the whale algorithm and searches are divided into two stages. Combining the nonlinear change convergence factor and weight factor, Gaussian perturbation is introduced to improve the search speed and accuracy, and avoid falling into the local maximum power point.
It improves photovoltaic output efficiency, enhances tracking accuracy and dynamic stability under non-uniform lighting conditions, reduces power loss, and achieves fast and accurate maximum power point tracking.
Smart Images

Figure CN120371076A_ABST
Abstract
Description
Technical Field
[0001] The present invention belongs to the technical field of maximum power point tracking algorithms in photovoltaic systems, and particularly relates to a maximum power point tracking system and method based on an improved whale optimization algorithm. Background Art
[0002] In today's society, people pay more and more attention to environmental protection and resource conservation. The deteriorating ecological environment and gradually exhausted resources have made people pay more and more attention to renewable resources. Therefore, it is particularly important to vigorously develop renewable resources. Photovoltaic power generation has the characteristics of large reserves, clean and renewable, etc., and has developed rapidly in recent years.
[0003] Photovoltaic power generation involves the problem of maximum power point tracking. Currently, traditional methods include the perturbation observation method and the incremental conductance method, etc. The main advantages of the above methods are simple processes and convenience in implementation in photovoltaic modules. However, they are only applicable under uniform illumination because at this time, the output power curve of the photovoltaic cell is a non-linear curve with a single peak. However, in actual situations, photovoltaic cells are easily affected by the natural environment, such as being blocked by clouds, dust, trees or buildings, resulting in uneven illumination and forming a partial shadow phenomenon (PSC). The power-voltage (P-V) curve is no longer a smooth curve but contains multiple peaks. In this case, traditional MPPT methods cannot distinguish the global maximum power point (GMPP) among multiple peaks and are prone to misjudgment and getting trapped in the local maximum power point (LMPP), resulting in low system output power and increased power loss. To address the multi-peak problem, researchers have proposed applying intelligent algorithms to photovoltaic MPPT, but the whale algorithm (WOA) still has disadvantages such as slow convergence speed, large search oscillation, and getting trapped in LMPP, and needs to be improved. Summary of the Invention
[0004] To solve the influence brought by PSC and improve the photovoltaic output efficiency, the present invention proposes a maximum power point tracking system based on an improved whale optimization algorithm, which has great improvements in three aspects: convergence speed, tracking accuracy, and dynamic stability.
[0005] A maximum power point tracking system based on an improved whale optimization algorithm, comprising: a photovoltaic array, a sampling module, an MPPT calculation module, a PWM driving module, a Boost boost module, and a load. The input end of the sampling module is connected to the output end of the photovoltaic array, the output end of the sampling module is connected to the input end of the MPPT calculation module, the output end of the MPPT calculation module is connected to the input end of the PWM driving module, the output end of the PWM driving module is connected to the input end of the Boost boost module, and the output end of the Boost boost module is connected to the load module. Among them, the sampling module includes a voltage sampling module and a current sampling module. The voltage sampling module and the current sampling module are respectively connected to the output end of the photovoltaic array, and are used to collect the output voltage and output current of the photovoltaic array in real time and send them to the MPPT calculation module.
[0006] The sampling module samples the output voltage and current of the photovoltaic array; inputs the obtained voltage and current into the improved whale optimization algorithm MPPT module, and outputs a control signal to the switching tube of the Boost circuit.
[0007] The MPPT calculation module adopts an improved whale optimization algorithm, adds a probability factor P to the whale algorithm, and is divided into two stages according to the number of iterations. The search mechanism focuses on different aspects in different stages; in addition, a non-linearly varying weight factor and a convergence factor are introduced to improve different position movement mechanisms of the whale algorithm. At the same time, the population after updating the position according to the search mechanism is set as an ordinary population, and Gaussian perturbation is introduced to increase the diversity of the population, improve the search speed and accuracy, avoid falling into the local maximum power point, and reduce the output power loss.
[0008] For the improved whale optimization algorithm, a non-linearly varying convergence factor a and a weight factor ω are introduced, and the expressions are:
[0009]
[0010] Among them, t is the current number of iterations; T max is the maximum number of iterations.
[0011] When the algorithm is searching for the optimal target value, the whale population communicates with each other, swims and changes positions according to the situations explored by each other, and explores towards the optimal point. In this stage, the position of the whale corresponding to the voltage moves according to the surrounding mechanism:
[0012]
[0013] Among them, D1 is the coefficient distance between the current individual and the optimal individual; X(t) is the position of the current individual; represents the position of the best individual in the current whale group. t is the number of iterations. A and C are control coefficients, obtained from the following formula:
[0014]
[0015] Among them, r1 and r2 are random parameters in [0, 1].
[0016] In the stage of updating the position by helix, the positions of the whale population move according to the helix mechanism:
[0017]
[0018] Among them, D2 is the coefficient distance between the current individual and the optimal individual; b is the coefficient constant; l is a random quantity between [-1, 1].
[0019] In the random search stage, the whale positions corresponding to the voltage move globally according to the random search mechanism:
[0020] D3 = |CX rand (t) - X(t)| (8)
[0021] X(t + 1) = X rand (t) - ωAD3 (9)
[0022] Among them, D3 is the coefficient distance between the current individual and the optimal individual; X rand (t) represents the position of the random individual in the current whale population. According to the value of A in formula (5), the way of whale moving positions is divided into two cases. If |A| < 1, the algorithm enters the stage of surrounding and encircling the prey. Then randomly select the position of the whale, and the whale position corresponding to the voltage moves globally, and at the same time set it as the ordinary population and perform Gaussian perturbation. Otherwise, randomly select the position of the whale, and the whale position corresponding to the voltage moves globally, and at the same time set it as the ordinary population and perform Gaussian perturbation. The position update is as follows:
[0023] X′(t) = X(t) + X(t)[2N(0, 1) - 1] (10)
[0024] Among them, N(0, 1) is a random variable that satisfies the standard Gaussian distribution; X′(t) is the whale position after Gaussian perturbation.
[0025] The maximum power tracking method of the improved whale optimization algorithm is as follows:
[0026] Step S1: Initialize the number of whale populations N, random positions, the current iteration number t, the maximum iteration number T max , probability factors P1 and P2.
[0027] Step S2: Detect the output voltage and current of the photovoltaic array, and calculate the corresponding power. Calculate the convergence factor and the weight factor according to formulas (1) and (2). At the same time, generate a random number R between [0, 1].
[0028] Step S3: Compare the current iteration number t with the maximum iteration number T max If t < T max / 2, the algorithm is in the early stage of search. In this stage, the probability factor is small, within the range of (0, 0.5). At this time, the probability that the random number R is greater than the probability factor P1 is more than 50%. The algorithm focuses on the surrounding mechanism and the random search mechanism. At the same time, according to Equation (5), the value of the control parameter A determines the search mechanism of the algorithm, and A is related to the convergence factor a. As the iteration number t increases, the absolute value of the slope of the convergence factor a is small, and a decreases relatively gently. That is, in the early stage of iteration, the value of A is large and remains for a long time. In this way, the algorithm has a large search range and has enough time to change the search step size within a larger range. The algorithm focuses on global search in the early stage. If t ≥ T max / 2, the algorithm is in the late stage of search. In this stage, the probability factor is large, within the range of (0.5, 1). At this time, the probability that the random number R is less than the probability factor P2 is more than 50%. The algorithm focuses on the spiral update mechanism. At the same time, as the iteration number t increases, the absolute value of the slope of the convergence factor a is large, and a decreases relatively rapidly. The value of A is small. In this way, the algorithm has a fast convergence speed, converges to near the global maximum power point, and improves the tracking accuracy. The algorithm focuses on local search in the late stage. Then, the population after updating the position according to the random search mechanism is set as the ordinary population, and Gaussian perturbation is performed according to Equation (10) to improve the population diversity and is beneficial to improving the search accuracy. At the same time, calculate the output power corresponding to each whale position, and take the optimal individual power as the historical global optimal value. If there is an individual optimal value in the current population that is greater than the historical global optimal value, the individual optimal value is regarded as the new optimal power, and the historical global optimal value is updated. Otherwise, retain the historical optimal value, and then continuously update the voltage corresponding to the whale position and increase the current iteration number.
[0029] Step S4: Finally, compare the current iteration number with the maximum iteration number. If t > T max , output the search result; otherwise, return to Step S2 to continue the maximum power point tracking.
[0030] Compared with the prior art, the beneficial effects are as follows:
[0031] 1. The present invention adds a probability factor P to the whale algorithm. According to the iteration number, it is divided into two stages. The search mechanism of the algorithm focuses on different aspects in different stages. The algorithm focuses on global search in the early stage and local search in the late stage, avoiding the algorithm falling into local optimal solutions while improving the tracking accuracy;
[0032] 2. Introduce a non-linearly varying convergence factor and weight factor into the whale algorithm, strengthening the global and local search capabilities of the algorithm while improving the convergence speed of the algorithm and the tracking speed;
[0033] 3. Gaussian perturbations are introduced into the ordinary whale population to increase population diversity and further reduce the probability of converging to LMPP. Compared with the existing methods, the present invention takes into account both the tracking speed and the tracking accuracy. BRIEF DESCRIPTION OF THE DRAWINGS
[0034] Figure 1 is a schematic structural diagram of a maximum power point tracking system based on an improved whale optimization algorithm proposed by the present invention;
[0035] Figure 2 is a flowchart of a maximum power point tracking method based on an improved whale optimization algorithm proposed by the present invention;
[0036] Figure 3 is a P-V and I-V output characteristic curve diagram of a photovoltaic array in different light conditions in an embodiment of the present invention;
[0037] Figure 4 is a comparison diagram of MPPT results of a photovoltaic array using different algorithms under standard conditions in an embodiment of the present invention;
[0038] Figure 5 is a comparison diagram of MPPT results of a photovoltaic array using different algorithms under local shadow condition 1 (PSC1) in an embodiment of the present invention;
[0039] Figure 6 is a comparison diagram of MPPT results of a photovoltaic array using different algorithms under local shadow condition 2 (PSC2) in an embodiment of the present invention. DETAILED DESCRIPTION OF THE INVENTION
[0040] The following will elaborate in detail on the specific implementation manners of a maximum power point tracking system and method based on an improved whale optimization algorithm of the present invention with reference to the accompanying drawings.
[0041] As Figure 1 shown, the maximum power point tracking system based on an improved whale optimization algorithm of the present invention includes: a photovoltaic array, a sampling module, an MPPT calculation module, a PWM driving module, a Boost boost module, and a load. The input end of the sampling module is connected to the output end of the photovoltaic array, the output end of the sampling module is connected to the input end of the MPPT calculation module, the output end of the MPPT calculation module is connected to the input end of the PWM driving module, the output end of the PWM driving module is connected to the input end of the Boost boost module, and the output end of the Boost boost module is connected to the load module. Among them, the sampling module includes a voltage sampling module and a current sampling module, and the voltage sampling module and the current sampling module are respectively connected to the output end of the photovoltaic array, and are used to collect the output voltage and output current of the photovoltaic array in real time and send them to the MPPT calculation module.
[0042] The MPPT calculation module adopts an improved whale optimization algorithm. A probability factor P is added to the whale algorithm, which is divided into two stages according to the number of iterations. The search mechanism focuses on different aspects in different stages. In addition, a non-linearly varying weight factor and convergence factor are introduced to improve different position movement mechanisms of the whale algorithm. At the same time, the population after updating the position according to the search mechanism is set as the ordinary population, and Gaussian perturbation is introduced to increase the diversity of the population, improve the search speed and accuracy, avoid falling into the local maximum power point, and reduce the output power loss.
[0043] For the improved whale optimization algorithm, a non-linearly varying convergence factor a and weight factor ω are introduced, and the expressions are as follows:
[0044]
[0045] where t is the current number of iterations; T max is the maximum number of iterations.
[0046] When the algorithm is searching for the optimal objective value, the whale population communicates with each other, swims and changes positions according to the situations explored by each other, and explores towards the optimal point. In this stage, the position of the whale corresponding to the voltage moves according to the surrounding mechanism:
[0047]
[0048] where D1 is the coefficient distance between the current individual and the optimal individual; X(t) is the position of the current individual; represents the position of the best individual in the current whale group. t is the number of iterations. A and C are control coefficients, which are obtained by the following formula:
[0049]
[0050] where r1 and r2 are random parameters in [0,1].
[0051] In the spiral position update stage, the position of the whale population moves according to the spiral mechanism:
[0052]
[0053] where D2 is the coefficient distance between the current individual and the optimal individual; b is a coefficient constant; l is a random quantity between [-1,1].
[0054] In the random search stage, the position of the whale corresponding to the voltage moves globally according to the random search mechanism:
[0055] D3 = |CX rand (t) - X(t)|(8)
[0056] X(t + 1) = Xrand (t) - ωAD3 (9)
[0057] Where D3 is the coefficient distance between the current individual and the optimal individual; X rand (t) represents the position of the random individual in the current whale population. According to the value of A in Equation (5), the whale movement position method is divided into two cases. If |A| < 1, the algorithm enters the stage of surrounding and encircling the prey. Then randomly select the position of the whale, perform global movement on the position corresponding to the voltage of the whale, and at the same time set it as the ordinary population and perform Gaussian perturbation. Otherwise, randomly select the position of the whale, perform global movement on the position corresponding to the voltage of the whale, and at the same time set it as the ordinary population and perform Gaussian perturbation. The position update is as follows:
[0058] X′(t) = X(t) + X(t)[2N(0, 1) - 1] (10)
[0059] Where N(0, 1) is a random variable that satisfies the standard Gaussian distribution; X′(t) is the position of the whale after Gaussian perturbation.
[0060] As Figure 2 shown, the maximum power point tracking method based on the improved whale optimization algorithm of the present invention includes the following steps:
[0061] Step S1: Initialize the number of whales in the population N, random positions, the current iteration number t, the maximum iteration number T max , probability factors P1 and P2.
[0062] Step S2: Detect the output voltage and current of the photovoltaic array, and calculate the corresponding power. Calculate the convergence factor and weight factor according to Equations (1) and (2). At the same time, generate a random number R between [0, 1].
[0063] Step S3: Compare the current iteration number t with the maximum iteration number T max If t < T max / 2, the algorithm is in the early stage of search. In this stage, the probability factor is small, between (0, 0.5). At this time, the probability that the random number R is greater than the probability factor P1 is more than 50%. The algorithm focuses on the surrounding mechanism and random search mechanism. At the same time, according to Equation (5), the value of the control parameter A determines the search mechanism of the algorithm, and A is related to the convergence factor a. As the iteration number t increases, the absolute value of the slope of the convergence factor a is small, and a decreases relatively gently. That is, in the early stage of iteration, the value of A is large and remains for a long time. In this way, the algorithm has a large search range and has enough time to change the search step size in a larger range. The algorithm focuses on global search in the early stage. If t ≥ T maxIf it is less than 1 / 2, the algorithm is in the late stage of search. In this stage, the probability factor is relatively large, between (0.5, 1). At this time, the probability that the random number R is less than the probability factor P2 is more than 50%. The algorithm focuses on the spiral update mechanism. At the same time, as the iteration number t increases, the absolute value of the slope of the convergence factor a is relatively large, a decreases relatively rapidly, and the value of A is small. In this way, the algorithm has a relatively fast convergence speed, converges near the global maximum power point, improves the tracking accuracy, and the algorithm focuses on local search in the later stage. Then, the population after updating the position according to the random search mechanism is set as the ordinary population, and Gaussian perturbation is performed according to Equation (10) to improve the population diversity and is conducive to improving the search accuracy. At the same time, calculate the output power corresponding to each whale position, and use the optimal individual power as the historical global optimal value. If there is an individual optimal value in the current population that is greater than the historical global optimal value, the individual optimal value is regarded as the new optimal power, and the historical global optimal value is updated. Otherwise, keep the historical optimal value, and then continuously update the voltage corresponding to the whale position and increase the current iteration number.
[0064] Step S4: Finally, compare the current iteration number with the maximum iteration number. If t > T is satisfied max , the search result is output. Otherwise, return to Step S2 to continue the maximum power point tracking.
[0065] Considering that local shading makes the output power of the photovoltaic array prone to falling into the local maximum power point, because the traditional MPPT algorithm is prone to failure when tracking the maximum power point and the tracking efficiency is reduced. To further verify that the output characteristic curve of the photovoltaic array presents a multi-peak phenomenon under different conditions, a simulation model of the photovoltaic array is established, and different illumination conditions are set to prepare for the verification of the MPPT algorithm. S1, S2, and S3 respectively represent the illumination on the photovoltaic cells PV1, PV2, and PV3. Table 1 shows the different environmental parameters set in the embodiments of the present invention, which are divided into the standard condition (STC) and different degrees of local shading.
[0066] Table 1 Irradiance under different illumination conditions
[0067]
[0068] Figure 3P-V and I-V characteristic curves corresponding to different illumination conditions in the embodiments. Under STC, the P-V curve of the photovoltaic array has only one peak, and the peak power is the largest among the three illuminations at this time. The I-V curve is of a single-knee shape. Under the other two illuminations, the irradiance received by the photovoltaic array is uneven. In PSC1, there are two different irradiances, the P-V curve shows a double peak, and the I-V curve is of a double-knee shape. In PSC2, the P-V curve has three peaks, and the I-V curve is of a triple-knee shape. The number of different shadow occlusion levels reflects the complexity of the actual irradiation. The more complex the light intensity, the more complex the output characteristic curve, and the traditional MPPT algorithm is more likely to fall into a local solution.
[0069] Figures 4 - 6 The simulation results of the MPPT output curves of the photovoltaic array using different algorithms under different conditions in the embodiments of standard conditions (STC), partial shadow condition 1 (PSC1), and partial shadow condition 2 (PSC2) are shown. The results show that under standard conditions and partial shadow conditions, compared with other algorithms, the improved whale optimization algorithm (IWOA) has a faster speed of tracking GMPP, a smaller power fluctuation during the oscillation process, avoids falling into the local maximum power point, and effectively improves the photovoltaic power generation efficiency.
[0070] Finally, it should be noted that the technical solutions of the present invention are only illustrated in combination with the above embodiments and are not limited thereto. Those of ordinary skill in the art should understand that those skilled in the art can modify or equivalently replace the specific embodiments of the present invention, but these modifications or changes are within the scope of protection of the claims pending for approval.
Claims
1. A maximum power point tracking system based on an improved whale optimization algorithm, characterized in that Including: A photovoltaic array, a sampling module, an MPPT calculation module, a PWM driving module, a Boost boost module, and a load; the input end of the sampling module is connected to the output end of the photovoltaic array, the output end of the sampling module is connected to the input end of the MPPT calculation module, the output end of the MPPT calculation module is connected to the input end of the PWM driving module, the output end of the PWM driving module is connected to the input end of the Boost boost module, and the output end of the Boost boost module is connected to the load module.
2. The maximum power point tracking system based on the improved whale optimization algorithm according to claim 1, characterized in that, The sampling module includes a voltage sampling module and a current sampling module. The voltage sampling module and the current sampling module are respectively connected to the output end of the photovoltaic array, and are used to collect the output voltage and output current of the photovoltaic array in real time and send them to the MPPT calculation module.
3. The maximum power point tracking system based on the improved whale optimization algorithm according to claim 2, characterized in that The MPPT calculation module adopts an improved whale optimization algorithm, adding a probability factor P to the whale algorithm. According to the number of iterations, it is divided into two stages, and the search mechanism focuses on different aspects in different stages; in addition, a non-linearly varying weight factor and a convergence factor are introduced to improve different position movement mechanisms of the whale algorithm. At the same time, the population after updating the position according to the search mechanism is set as an ordinary population, and Gaussian perturbation is introduced to increase the diversity of the population, improve the search speed and accuracy, avoid falling into the local maximum power point, and reduce the output power loss.
4. A maximum power point tracking system based on an improved whale optimization algorithm according to claim 3, characterized in that For the improved whale optimization algorithm, a non-linearly varying convergence factor a and a weight factor ω are introduced, and the expression is: where t is the current iteration number; T max is the maximum number of iterations.
5. The maximum power point tracking system based on the improved whale optimization algorithm according to claim 4, characterized in that, When the improved whale optimization algorithm is looking for the optimal target value, the whale population communicates with each other, swims and changes positions according to the situations explored by each other, and explores towards the optimal point; at this stage, the position of the whale corresponding to the voltage moves according to the surrounding mechanism: Among them, D1 is the coefficient distance between the current individual and the optimal individual; X(t) is the position of the current individual; represents the position of the best individual in the current whale group; t is the number of iterations, and A and C are control coefficients, which are obtained from the following formula: where r1 and r2 are random parameters in [0, 1]; In the spiral position update stage, the position of the whale population moves according to the spiral mechanism: where D2 is the coefficient distance between the current individual and the optimal individual; b is a coefficient constant; l is a random quantity between [-1, 1]; In the random search stage, the position of the whale corresponding to the voltage moves globally according to the random search mechanism: D3 = |CX rand (t) - X(t)| (8) X(t + 1) = X rand (t) - ωAD3 (9) Among them, D3 is the coefficient distance between the current individual and the optimal individual; X rand (t) represents the position of the random individual in the current whale population; according to the value of A in Equation (5), the whale movement position is divided into two cases: if |A| < 1, the algorithm enters the stage of surrounding and encircling the prey, then randomly select the position of the whale, and perform global movement on the whale position corresponding to the voltage. At the same time, set it as the ordinary population and perform Gaussian perturbation; otherwise, randomly select the position of the whale, perform global movement on the whale position corresponding to the voltage, and at the same time set it as the ordinary population and perform Gaussian perturbation; the position update is as follows: X′(t) = X(t) + X(t)[2N(0, 1) - 1] (10) where N(0, 1) is a random variable satisfying the standard Gaussian distribution; X′(t) is the position of the whale after Gaussian perturbation.
6. The maximum power point tracking method of the maximum power point tracking system based on the improved whale optimization algorithm according to any one of claims 1-5, characterized in that The detection method includes the following steps: Step S1: Initialize the number N of the whale population, the random positions, the current iteration number t, the maximum iteration number T max , the probability factors P1 and P2; Step S2: Detect the output voltage and current of the photovoltaic array and calculate the corresponding power; Calculate the convergence factor and the weight factor according to formulas (1) and (2), and at the same time generate a random number R between [0, 1]; Step S3: Compare the current iteration number t with the maximum iteration number T max If t < T max / 2, the algorithm is in the early stage of search; if t ≥ T max / 2, the algorithm is in the late stage of search; Step S4: Finally, compare the current iteration number with the maximum iteration number. If \(t>T\) is satisfied max , then output the search result; otherwise, return to Step S2 and continue with the maximum power point tracking.
7. The maximum power point tracking method based on the improved whale optimization algorithm according to claim 6, characterized in that, Step S3: Compare the current iteration number t with the maximum iteration number T max as follows: If t < T max / 2, the algorithm is in the early stage of search. In this stage, the probability factor is small, between (0, 0.5). At this time, the probability that the random number R is greater than the probability factor P1 accounts for more than 50%. The algorithm focuses on the surrounding mechanism and the random search mechanism. At the same time, according to Equation (5), the value of the control parameter A determines the search mechanism of the algorithm, and A is related to the convergence factor a. As the number of iterations t increases, the absolute value of the slope of the convergence factor a is small, and a decreases relatively gently. That is, in the early stage of iteration, the value of A is large and remains for a long time. In this way, the algorithm has a large search range and has enough time to change the search step size within a larger range. The algorithm focuses on global search in the early stage; If \(t\geq T\) max / 2, the algorithm is in the late stage of search. In this stage, the probability factor is relatively large, between (0.5, 1). At this time, the probability that the random number \(R\) is less than the probability factor \(P2\) is more than 50%. The algorithm focuses on the spiral update mechanism. At the same time, as the iteration number \(t\) increases, the absolute value of the slope of the convergence factor \(a\) is relatively large, \(a\) decreases relatively rapidly, and the value of \(A\) is small. In this way, the algorithm has a relatively fast convergence speed, converges to the vicinity of the global maximum power point, and improves the tracking accuracy. The algorithm focuses on local search in the late stage. Then, the population after updating the position according to the random search mechanism is set as the ordinary population, and Gaussian perturbation is carried out according to Equation (10) to improve the population diversity, which is beneficial to improving the search accuracy. At the same time, calculate the output power corresponding to each whale position, and take the optimal individual power as the historical global optimal value. If there is an individual optimal value in the current population that is greater than the historical global optimal value, the individual optimal value is regarded as the new optimal power, and the historical global optimal value is updated; otherwise, keep the historical optimal value, and then continuously update the voltage corresponding to the whale position and increase the current iteration number.