Photovoltaic System Control Method and Device, Electronic Device, Readable Storage Medium
By dynamically adjusting the control parameters of the PID algorithm and virtual synchronizer based on the grid voltage and frequency characteristics, the problem that traditional control algorithms are difficult to accurately control the output voltage and frequency of the photovoltaic system inverter is solved, and higher grid connection performance and stability are achieved.
Patent Information
- Application Number
- CN202510222642.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-02-27
- Publication Date
- 2025-06-13
- Estimated Expiration
- 2045-02-27
AI Technical Summary
Traditional PID control algorithms are difficult to achieve precise control of the output voltage and frequency of the photovoltaic system inverter, especially when the power grid voltage and frequency change rapidly.
By determining the control parameters of the PID algorithm based on the grid voltage characteristics and determining the control parameters of the virtual synchronizer based on the grid frequency characteristics, the output voltage and frequency of the inverter in the photovoltaic system are dynamically adjusted.
The stability and accuracy of the grid connection voltage and frequency of the photovoltaic system are achieved, reducing the impact of grid fluctuations on the photovoltaic system, and improving the overall grid connection performance.
Smart Images

Figure CN119726925B_ABST
Abstract
Description
Technical Field
[0001] The present disclosure belongs to the technical field of photovoltaic system control, and more specifically, relates to a photovoltaic system control method, device, electronic device, and readable storage medium. Background Art
[0002] With the continuous growth of the global demand for clean energy, solar energy, as a sustainable clean energy, has become increasingly important in the energy field. As the main way of solar energy utilization, the scale and application scope of photovoltaic systems have rapidly expanded, and a large number of photovoltaic power stations and distributed photovoltaic devices are connected to the power grid. However, the grid connection of photovoltaic systems also brings many challenges to grid operation, among which the grid-connected voltage and grid-connected frequency are important parameters during the grid connection process.
[0003] In terms of voltage control, the output voltage of a photovoltaic system is affected by various factors such as light intensity and temperature. The rapid change of light intensity will cause a large fluctuation in the output voltage of photovoltaic cells. When dealing with such complex and variable voltage conditions, the traditional PID control algorithm faces many difficulties. The conventional fixed-parameter PID control cannot automatically adjust parameters according to the real-time voltage characteristics of the power grid, and it is difficult to achieve precise control of the output voltage of the inverter in the photovoltaic system.
[0004] Therefore, there is an urgent need for an accurate and reliable photovoltaic system control method. Summary of the Invention
[0005] The purpose of the present disclosure is to provide a photovoltaic system control method, device, electronic device, and readable storage medium to improve the accuracy and reliability of photovoltaic system control.
[0006] In the first aspect of the embodiments of the present disclosure, a photovoltaic system control method is provided, including:
[0007] Determining the control parameters of the PID algorithm based on the voltage characteristics of the power grid;
[0008] Determining the control parameters of the virtual synchronous machine based on the frequency characteristics of the power grid;
[0009] Controlling the output voltage of the inverter in the photovoltaic system based on the control parameters of the PID algorithm, and controlling the output frequency of the inverter in the photovoltaic system based on the control parameters of the virtual synchronous machine; wherein, the output voltage of the inverter is the grid-connected voltage of the photovoltaic system, and the output frequency of the inverter is the grid-connected frequency of the photovoltaic system.
[0010] In the second aspect of the embodiments of the present disclosure, a photovoltaic system control device is provided, including:
[0011] A voltage parameter module for determining the control parameters of the PID algorithm based on the voltage characteristics of the power grid;
[0012] A frequency parameter module for determining control parameters of a virtual synchronous machine based on the frequency characteristics of the power grid;
[0013] A grid connection control module for controlling the output voltage of an inverter in a photovoltaic system based on the control parameters of a PID algorithm and controlling the output frequency of the inverter in the photovoltaic system based on the control parameters of the virtual synchronous machine; wherein, the output voltage of the inverter is the grid connection voltage of the photovoltaic system, and the output frequency of the inverter is the grid connection frequency of the photovoltaic system.
[0014] In a third aspect of the embodiments of the present disclosure, an electronic device is provided, including a memory, a processor, and a computer program stored in the memory and running on the processor. When the processor executes the computer program, the steps of the above-mentioned photovoltaic system control method are implemented.
[0015] In a fourth aspect of the embodiments of the present disclosure, a computer-readable storage medium is provided. The computer-readable storage medium stores a computer program, and when the computer program is executed by a processor, the steps of the above-mentioned photovoltaic system control method are implemented.
[0016] The beneficial effects of the photovoltaic system control method, device, electronic device, and readable storage medium provided by the embodiments of the present disclosure are as follows:
[0017] In the present disclosure, by determining the control parameters of the PID algorithm based on the voltage characteristics of the power grid, the parameters of the PID algorithm can be adjusted in real time according to the power grid voltage, and thus the output voltage of the inverter in the photovoltaic system can be controlled more precisely, ensuring the stability and accuracy of the grid connection voltage of the photovoltaic system, helping to reduce the impact of power grid fluctuations on the photovoltaic system, and improving the overall grid connection performance of the present disclosure. The present disclosure uses the frequency characteristics of the power grid to determine the control parameters of the virtual synchronous machine, enabling the photovoltaic system to simulate the behavior of a traditional synchronous generator and providing dynamic support for the power grid frequency. When the power grid frequency fluctuates, the virtual synchronous machine can respond quickly and adjust the output frequency of the inverter, thereby helping to maintain the stability of the power grid frequency and enhancing the accuracy and reliability of the photovoltaic system control. Description of the Drawings
[0018] In order to more clearly illustrate the technical solutions in the embodiments of the present disclosure, the following will briefly introduce the drawings required for use in the embodiments or the description of the prior art. Obviously, the following drawings are only some embodiments of the present disclosure. For those of ordinary skill in the art, without creative efforts, other drawings can be obtained based on these drawings.
[0019] Figure 1 It is a schematic flowchart of a photovoltaic system control method provided by an embodiment of the present disclosure;
[0020] Figure 2Structural block diagram of a photovoltaic system control device provided by an embodiment of the present disclosure;
[0021] Figure 3 Schematic block diagram of an electronic device provided by an embodiment of the present disclosure. Detailed implementation manners
[0022] In the following description, specific details such as specific system structures and technologies are presented for the purpose of illustration rather than limitation, so as to thoroughly understand the embodiments of the present disclosure. However, those skilled in the art should clearly understand that the present disclosure can also be implemented in other embodiments without these specific details. In other cases, detailed descriptions of well-known systems, devices, circuits, and methods are omitted to avoid unnecessary details from interfering with the description of the present disclosure.
[0023] To make the objectives, technical solutions, and advantages of the present disclosure clearer, the following will be described through specific embodiments with reference to the accompanying drawings.
[0024] Please refer to Figure 1 , Figure 1 Schematic flow chart of a photovoltaic system control method provided by an embodiment of the present disclosure. The method includes:
[0025] S101: Determine the control parameters of the PID algorithm based on the voltage characteristics of the power grid.
[0026] In an embodiment of the present disclosure, determining the control parameters of the PID algorithm based on the voltage characteristics of the power grid includes:
[0027] In response to the voltage characteristics of the power grid satisfying the first voltage stability condition, determine the control parameters of the PID algorithm based on the first control strategy;
[0028] In response to the voltage characteristics of the power grid not satisfying the first voltage stability condition, determine the control parameters of the PID algorithm based on the second control strategy;
[0029] The control accuracy of the first control strategy is less than that of the second control strategy.
[0030] In this embodiment, the voltage characteristics of the power grid refer to various characteristic indicators reflecting the voltage state of the power grid, which can be voltage amplitude, voltage fluctuation range, voltage change rate, voltage stability, etc., and are used to describe the actual situation and change law of the power grid voltage.
[0031] The Proportional Integral Derivative (PID) algorithm can achieve control according to the deviation value by adjusting the proportional coefficient, integral coefficient, and differential coefficient. The control parameters of the PID algorithm are the proportional coefficient, integral coefficient, and differential coefficient.
[0032] The first voltage stability condition can be that the degree of voltage fluctuation is less than the first fluctuation threshold. The degree of voltage fluctuation can be calculated by the first formula, and the first formula can be: , where represents the degree of voltage fluctuation within time , represents the root mean square value of voltage (effective voltage) at time , represents the root mean square value of voltage at time . The root mean square value of voltage can be obtained by a voltmeter. The first fluctuation threshold can be set according to experience.
[0033] The first control strategy refers to the control strategy adopted when the first voltage stability condition is met. Since the degree of voltage fluctuation is less than the first fluctuation threshold at this time, it means that the voltage of the power grid is relatively stable at this time. The parameters in the PID algorithm can be controlled by a relatively simple control strategy, so as to meet the grid-connected voltage condition.
[0034] The second control strategy refers to the control strategy adopted when the first voltage stability condition is not met. Since the voltage of the power grid fluctuates greatly at this time, that is, the stability is poor, the parameters in the PID algorithm can be controlled in a more accurate way at this time, so as to meet the grid-connected voltage condition.
[0035] Therefore, the control accuracy of the first control strategy is less than that of the second control strategy.
[0036] S102: Determine the control parameters of the virtual synchronous machine based on the frequency characteristics of the power grid.
[0037] In this embodiment, the frequency characteristics of the power grid refer to various attributes and change situations of the alternating current frequency in the power grid, which can include the degree of frequency fluctuation, the actual operating frequency, the fluctuation range of frequency, the frequency change rate, etc.
[0038] The virtual synchronous machine is a technology that simulates the operating characteristics of a traditional synchronous generator through a control algorithm, enabling distributed power sources such as photovoltaic to participate in the operation and control of the power system like a synchronous generator, with certain inertia and damping characteristics, enhancing the stability of the power system.
[0039] The virtual synchronous machine has multiple control parameters, such as the virtual inertia time constant, the virtual damping coefficient, the active power - frequency droop coefficient, the reactive power - voltage droop coefficient, etc. These parameters determine the dynamic and static characteristics of the virtual synchronous machine and affect its response mode and regulation ability to the frequency change of the power grid.
[0040] The rotor motion equation of the virtual synchronous machine is: , where is the virtual moment of inertia, which is used to simulate the inertial characteristics of a synchronous generator and reflects the ability of the photovoltaic system to resist frequency changes. The larger it is, the better the frequency stability. is the rate of change of the virtual angular velocity. is the virtual mechanical torque, which represents the torque corresponding to the equivalent mechanical power input by the photovoltaic system. is the virtual electromagnetic torque, which is related to the electromagnetic power output by the photovoltaic system. is the damping coefficient, which is used to suppress the oscillation of the virtual synchronous machine and enhance the stability of the system. is the virtual angular velocity. is the rated virtual angular velocity, corresponding to the rated frequency of the power grid.
[0041] Virtual inertia time constant , where is the rated apparent power of the virtual synchronous machine. This formula shows that the virtual inertia time constant is proportional to the virtual moment of inertia and inversely proportional to the rated apparent power . By adjusting the virtual moment of inertia and the rated apparent power .
[0042] The parameters of the virtual synchronous machine can be determined according to the rate of change of the power grid frequency, and the rate of change of the power grid frequency can be .
[0043] For example, in response to the rate of change of the power grid frequency being greater than the first frequency change rate, increase the reference value of the virtual inertia time constant according to the first virtual inertia step size, and increase the reference value of the virtual damping coefficient according to the first damping step size.
[0044] A larger virtual inertia time constant makes the virtual synchronous machine have greater inertia, which can slow down the rate of frequency change. A larger virtual damping coefficient can increase the damping of the system, suppress the oscillation of the frequency, and make the frequency stabilize faster.
[0045] The power-frequency droop characteristic equation is , where is the active power output by the photovoltaic system, is the initial active power output, is the frequency droop coefficient, which reflects the regulation ability of the active power to the frequency change. The larger it is, the greater the adjustment range of the active power when the frequency changes. is the rated frequency, is the actual grid-connected frequency.
[0046] The reference values of the parameters in the virtual synchronous machine can be obtained according to the Kalman filtering algorithm. By establishing the state space model of the virtual synchronous machine and using the Kalman filtering algorithm to estimate and update the state variables of the system (such as parameters like virtual inertia and damping coefficient), they can also be determined through experiments. For example, during the actual grid connection operation of the virtual synchronous machine, the parameters are adjusted according to the real-time operating state of the grid and the operation feedback of the virtual synchronous machine. The real-time monitoring data, such as grid frequency fluctuations and power changes, are used to adjust the parameters to adapt to grid changes and maintain stable operation.
[0047] This equation reflects the droop characteristic between the active power of the photovoltaic system and the grid connection frequency. When the grid frequency deviates from the rated frequency, the virtual synchronous machine adjusts the active power output by the photovoltaic system according to this characteristic, thereby achieving the control of the grid connection frequency.
[0048] S103: Control the output voltage of the inverter in the photovoltaic system based on the control parameters of the PID algorithm, and control the output frequency of the inverter in the photovoltaic system based on the control parameters of the virtual synchronous machine; where the output voltage of the inverter is the grid connection voltage of the photovoltaic system, and the output frequency of the inverter is the grid connection frequency of the photovoltaic system.
[0049] In this embodiment, it is a key device in the photovoltaic system. The inverter can convert the direct current generated by the photovoltaic panel into alternating current for grid connection or for use by the load. Its output voltage and frequency directly affect the grid connection performance and power quality of the photovoltaic system.
[0050] The grid connection voltage refers to the output voltage when the inverter connects the alternating current generated by the photovoltaic system to the grid. The grid connection frequency is the frequency when the alternating current output by the inverter is connected to the grid.
[0051] The grid connection voltage should be synchronized with the real-time voltage of the grid, and the grid connection frequency should be synchronized with the real-time frequency of the grid. In this embodiment, the output voltage of the inverter can be controlled by the PID algorithm with the already determined control parameters, and the output frequency of the inverter can be controlled by the virtual synchronous machine with the already determined control parameters.
[0052] It can be concluded from the above that by determining the control parameters of the PID algorithm based on the voltage characteristics of the grid, the present disclosure can more precisely control the output voltage of the inverter in the photovoltaic system, ensuring the stability and accuracy of the grid connection voltage of the photovoltaic system, helping to reduce the impact of grid fluctuations on the photovoltaic system, and improving the overall grid connection performance of the system. The present disclosure uses the frequency characteristics of the grid to determine the control parameters of the virtual synchronous machine, enabling the photovoltaic system to simulate the behavior of a traditional synchronous generator and providing dynamic support for the grid frequency. When the grid frequency fluctuates, the virtual synchronous machine can respond quickly and adjust the output frequency of the inverter, thereby helping to maintain the stability of the grid frequency and enhancing the accuracy and reliability of the control of the photovoltaic system.
[0053] In one embodiment of the present disclosure, determining the control parameters of the PID algorithm based on the first control strategy includes:
[0054] In response to the difference between the grid-connected voltage and the reference voltage being greater than the first voltage threshold, increasing the reference value of the proportional coefficient based on the first proportional step;
[0055] In response to the difference between the grid-connected voltage and the reference voltage being greater than the first error threshold and the duration exceeding the first error duration, increasing the reference value of the integral coefficient based on the first integral step;
[0056] In response to the grid-connected voltage stabilization duration being greater than the first stabilization duration, increasing the reference value of the differential coefficient based on the first differential step;
[0057] The proportional coefficient, the integral coefficient, and the differential coefficient are all control parameters of the PID algorithm.
[0058] In this embodiment, the reference voltage is the real-time voltage of the power grid, and the real-time voltage of the power grid is constantly changing. For the photovoltaic system to smoothly integrate electric energy into the power grid, the grid-connected voltage output by the inverter needs to match the real-time voltage of the power grid. If the reference voltage differs greatly from the real-time voltage of the power grid, a large voltage difference will be generated during grid connection, resulting in an impact current, which may damage the photovoltaic system equipment and power grid equipment, and even trigger the action of the protection device, causing grid connection failure.
[0059] The first voltage threshold is a set voltage difference limit. When the difference between the grid-connected voltage and the reference voltage exceeds this threshold, it indicates that the deviation between the grid-connected voltage and the reference voltage is large, and measures need to be taken to adjust the proportional coefficient to accelerate the response speed to the deviation.
[0060] The first proportional step is the increment used to adjust the reference value of the proportional coefficient. When the difference between the grid-connected voltage and the reference voltage is greater than the first voltage threshold, the reference value of the proportional coefficient is increased according to this step, so that the proportional control effect is enhanced, thereby more quickly reducing the voltage deviation.
[0061] The first error threshold is another set voltage difference limit, which is used to determine whether the deviation between the grid-connected voltage and the reference voltage reaches the level that requires adjusting the integral coefficient. When the deviation exceeds this threshold, it means that there is a large steady-state error in the system, and the integral coefficient needs to be adjusted to eliminate it.
[0062] The first error duration refers to the duration during which the difference between the grid-connected voltage and the reference voltage is greater than the first error threshold. Only when this large deviation lasts for more than the first error duration will the integral coefficient be adjusted to avoid unnecessary adjustment of the integral coefficient due to short-term voltage fluctuations.
[0063] The first integration step size is the increment used to adjust the reference value of the integration coefficient. When the condition that the difference between the grid-connected voltage and the reference voltage is greater than the first error threshold and the duration exceeds the first error duration is met, the reference value of the integration coefficient is increased according to this step size to enhance the integration control effect and eliminate the steady-state error of the system.
[0064] The grid-connected voltage stability duration refers to the time required for the voltage of the photovoltaic system to be stably output. The longer the time, the slower the response of the PID algorithm. When it exceeds the first stability duration, the differential coefficient can be increased according to the first differential step size, so that adjustments can be made in advance according to the rate of change of the voltage deviation.
[0065] Considering that when the difference between the grid-connected voltage and the reference voltage is relatively large, it indicates that the current grid-connected voltage deviates greatly from the reference voltage, and it is necessary to enhance the role of proportional control to enable the inverter to quickly adjust the output voltage to reduce the voltage deviation as soon as possible.
[0066] When the difference between the grid-connected voltage and the reference voltage is greater than the first error threshold and the duration exceeds the first error duration, it indicates that there is a large steady-state error in the system, and it is difficult to eliminate it only by proportional control, so it is necessary to enhance the integration control effect.
[0067] When the time required for the grid-connected voltage to stabilize exceeds the first stability duration, it means that the system cannot respond to the voltage change in time. The differential coefficient can be appropriately increased so that adjustments can be made in advance according to the rate of change of the voltage deviation, accelerating the response speed of the system and enabling the grid-connected voltage to stabilize more quickly when the next voltage fluctuation occurs.
[0068] The first proportional step size can be determined according to the difference between the grid-connected voltage and the reference voltage and the rate of change of the grid voltage. For example, it can be calculated by the second formula, and the second formula can be:
[0069] , where represents the first proportional step size, is the adjustment coefficient, which can be determined through experiments, represents the grid-connected voltage, represents the reference voltage (i.e., the grid voltage), represents the rate of change of the grid voltage, is a constant term to ensure a certain basic adjustment amount.
[0070] Not only considers the grid-connected voltage and the reference voltage difference, but also incorporates the rate of change of the grid voltage . The numerator part reflects the basic influence of the voltage difference on the step size, and the in the denominator is used to adjust the step size.
[0071] When the grid voltage change rate is large, the denominator approaches 1, and the step size is mainly determined by the voltage difference, which is conducive to quickly responding to voltage mutations; when the voltage change rate is small, the denominator is greater than 1, and the step size will be correspondingly reduced to avoid over-adjustment.
[0072] It can be concluded from the above that the present disclosure can more precisely control the grid-connected voltage output by the inverter by dynamically adjusting the control parameters of the PID algorithm, making it match the real-time voltage of the grid, reducing the voltage deviation during grid connection, and also reducing the impact current generated thereby, thus protecting the safety of the photovoltaic system equipment and grid equipment. In this embodiment, the first proportional step size is determined according to the difference between the grid-connected voltage and the reference voltage and the change rate of the grid voltage, thereby adjusting the increment of the reference value of the proportional coefficient, improving the applicability of the present disclosure, being more in line with actual applications, and improving the accuracy and reliability of the photovoltaic system control.
[0073] In an embodiment of the present disclosure, determining the control parameters of the PID algorithm based on the second control strategy includes:
[0074] Determining the number of particles of the particle swarm algorithm based on the grid connection accuracy requirement;
[0075] Determining the initialization range of the particle swarm algorithm based on the control parameters of the historical PID algorithm;
[0076] In response to the iteration number being less than or equal to the first number, increasing the reference value of the inertia weight of the particle swarm algorithm according to the first inertia step size;
[0077] In response to the iteration number being greater than the first number, decreasing the reference value of the inertia weight of the particle swarm algorithm according to the second inertia step size;
[0078] Determining the individual learning factor and the group learning factor of the particle swarm algorithm based on the voltage characteristics of the grid;
[0079] Performing iterative calculations based on the number of particles, inertia weight, individual learning factor, and group learning factor until the preset iteration number and / or the difference between multiple consecutive fitness values are less than the first fitness threshold;
[0080] Taking the particle position corresponding to the global optimal position as the control parameter of the PID algorithm.
[0081] In this embodiment, the second control strategy refers to the particle swarm algorithm. The grid connection accuracy refers to the accuracy standard that needs to be achieved in terms of voltage, frequency, phase, etc. when the photovoltaic system is connected to the grid, and it is the basis for determining the number of particles in the particle swarm algorithm. The higher the grid connection accuracy requirement, the more particles are needed to more precisely search for the optimal solution. The grid connection accuracy can be set in advance according to the application site of the photovoltaic system and the grid connection requirements, or determined by judging the voltage fluctuation degree of the grid. The calculation of the voltage fluctuation degree can refer to the first formula.
[0082] For example, in response to the voltage fluctuation degree being greater than or equal to the second fluctuation threshold, the reference value of the grid connection accuracy is increased according to the first accuracy step size.
[0083] The second fluctuation threshold is greater than the first fluctuation threshold. When the voltage fluctuation degree of the power grid is greater than or equal to the second fluctuation threshold, it indicates that the power grid voltage is prone to fluctuations. In order to ensure that the power grid voltage quality is not further deteriorated after grid connection and stable grid connection can be achieved, the photovoltaic system requires a higher grid connection voltage accuracy, and the voltage deviation is required to be controlled within a smaller range. The reference value of the grid connection accuracy can be determined according to the actual situation.
[0084] In this embodiment, the number of particles in the particle swarm can be obtained through a simple mapping table, as shown in Table 1:
[0085] Table 1 Mapping Table of Grid Connection Accuracy and Number of Particles
[0086]
[0087] The control parameters of the historical PID algorithm refer to the control parameters used by the PID algorithm during the previous operation process, which can reflect the past control situation and performance of the system, and are used to determine the initialization range of the particles in the particle swarm algorithm, so that the particles start searching within a reasonable range, improving the algorithm efficiency. It restricts the initial search space of the particles, avoids the particles searching in an overly large or unreasonable space, and helps the algorithm converge to the optimal solution faster.
[0088] In the particle swarm algorithm, the number of times the particles update and optimize their positions according to certain rules. Each time of iteration, the particles adjust their positions according to their own and the group's information, gradually approaching the optimal solution.
[0089] In the initial stage of iteration, a larger inertia weight can enable the particles to have a greater probability of performing global search in the solution space, allowing the particles to explore different regions more widely, avoiding premature convergence to local optimal solutions, and helping to find a better global optimal solution. As the number of iterations increases, gradually increasing the inertia weight can enable the particles to maintain a strong global search ability in the early stage. When the number of iterations exceeds a certain value, the algorithm gradually approaches the optimal solution. At this time, it is necessary to reduce the inertia weight, so that the particles pay more attention to local search, search more precisely near the current optimal solution, in order to improve the search accuracy, find a more accurate optimal solution, and prevent the particles from missing the local optimal solution due to excessive inertia.
[0090] Therefore, when the number of iterations is less than or equal to the first number, the reference value of the inertia weight can be increased according to the first inertia step size. As the number of iterations increases, the reference value of the inertia weight can be appropriately reduced. The reference value of the inertia weight can be determined according to experiments.
[0091] Considering that when the number of particles is large, the particle swarm optimization algorithm can search in a wider solution space, but the computational complexity will increase significantly. At this time, if the inertia step size is set too large, the particles will jump quickly in the solution space. Although it can speed up the global search speed, it will cause some local optimal solutions to be missed. Moreover, due to the increase in computational complexity, this rapid jump will make the convergence of the algorithm unstable.
[0092] Therefore, the first inertia step size should also be adjusted according to the number of particles. For example, in response to the number of particles being greater than or equal to the first particle number, the first inertia step size is reduced based on the first inertia adjustment step size, and the second inertia adjustment step size is reduced based on the second inertia adjustment step size.
[0093] It should be noted that both the first inertia step size and the second inertia step size are step sizes with strong applicability and can be determined through experiments. The first inertia adjustment step size and the second inertia adjustment step size can be preset values, and the first particle number can be determined based on the data when the particle swarm optimization algorithm was used historically.
[0094] In this embodiment, determining the individual learning factor and the population learning factor of the particle swarm optimization algorithm based on the voltage characteristics of the power grid includes:
[0095] Determining a reference voltage based on the voltage characteristics of the power grid;
[0096] In response to the absolute value of the difference between the grid-connected voltage and the reference voltage being greater than the second voltage threshold and less than or equal to the third voltage threshold, the reference value of the individual learning factor is increased based on the first individual step size, and the reference value of the population learning factor is reduced based on the first population step size;
[0097] In response to the absolute value of the difference between the grid-connected voltage and the reference voltage being greater than the third voltage threshold, the reference value of the individual learning factor is reduced based on the second individual step size, and the reference value of the population learning factor is increased based on the second population step size.
[0098] In this embodiment, the voltage characteristics of the power grid can be the real-time effective voltage value of the power grid. The reference voltage is the real-time effective voltage value of the power grid and should be adjusted in real time according to the effective voltage of the power grid. Considering that when the absolute value of the difference between the grid-connected voltage and the reference voltage is greater than the second voltage threshold and less than or equal to the third voltage threshold, it indicates that the grid-connected voltage is on the high side but not severely high. At this time, the reference value of the individual learning factor is increased based on the first individual step size. The purpose is to make the particles pay more attention to their own experience, deeply explore the information accumulated by the individual during the search process, and try to find the control parameters that can reduce the grid-connected voltage. At the same time, the reference value of the population learning factor is reduced based on the first population step size to appropriately reduce the dependence of the particles on the population optimal experience and avoid the interference of the population experience, so that the particles can explore the solutions suitable for the current voltage situation more independently.
[0099] When the absolute value of the difference between the grid-connected voltage and the reference voltage is greater than the third voltage threshold, it means that the grid-connected voltage is relatively low and the deviation is large. At this time, the reference value of the individual learning factor is decreased based on the second individual step size, because the previous experience of the individual is not applicable in the current situation of large voltage deviation, and the influence of the individual experience needs to be weakened to prevent the particles from being misled. And the reference value of the swarm learning factor is increased based on the second swarm step size, in order to enable the particles to make more full use of the optimal experience of the swarm, because there may be effective methods to solve the problem of relatively low voltage and large deviation in the swarm. By strengthening the learning of the optimal experience of the swarm, the particles can be guided to find the control parameters that can increase the grid-connected voltage more quickly.
[0100] The reference value of the individual learning factor and the reference value of the swarm learning factor can be the initial values of the particle swarm algorithm, or can be determined according to experience.
[0101] At the same time, considering that in the grid voltage control scenario of the present disclosure, the number of particles participating in the optimization is large, indicating that the requirements for control accuracy and stability are high. Smaller swarm step size and individual step size can make the algorithm more refined when adjusting the individual learning factor and the swarm learning factor, avoiding drastic changes in control parameters caused by too large adjustment amplitude, so as to achieve more stable and accurate grid voltage control.
[0102] When the number of particles is small, in order to quickly find appropriate control parameters with limited particle resources to cope with the changes in grid voltage, relatively large swarm step size and individual step size are required. This can enable the particles to adjust the search direction and speed more quickly, adapt to the fluctuations of the grid voltage more rapidly, and improve the real-time performance and effectiveness of voltage control.
[0103] For example, in response to the number of particles being greater than or equal to the second particle number, the first individual step size is decreased based on the first individual adjustment step size, and the second swarm step size is decreased based on the first swarm adjustment step size;
[0104] In response to the number of particles being less than the third particle number, the second individual step size is increased based on the second individual adjustment step size, and the second swarm step size is increased based on the second swarm adjustment step size.
[0105] In this embodiment, the second particle number and the third particle number can be determined according to the data in the historical debugging process, and the first individual adjustment step size, the first swarm adjustment step size, the second individual adjustment step size, and the second swarm adjustment step size can be determined according to the actual situation.
[0106] After determining the above-mentioned particle number, inertia weight, individual learning factor, and swarm learning factor, iterative calculations can be performed. It is sufficient when the preset number of iterations is reached or the difference between multiple connected fitness functions is less than the first fitness threshold. The preset number of iterations can be determined based on the number of particles in the particle swarm or preset according to the actual situation. The multiple can be the first convergence number, which can be determined based on experience. The first fitness threshold can be determined based on the data during the experiment.
[0107] The dimension of each particle can be 3, that is, the position of each particle in the particle swarm space is [proportionality coefficient, integral coefficient, differential coefficient]. The control parameters of the PID algorithm can be determined by continuously searching for the optimal position.
[0108] The fitness function can be , where represents the target voltage at the th sampling moment, represents the actual output voltage, represents the number of sampling points.
[0109] Substitute the PID parameters represented by the position of each particle into the PID algorithm for voltage control simulation to obtain the actual output voltage, and then calculate the fitness value of each particle according to the fitness function. The smaller the fitness value, the better the performance of the PID parameter combination represented by the particle in voltage control. During the iterative process of the particle swarm algorithm, the global optimal position represents the optimal solution found in the entire search process. Taking the corresponding particle position as the control parameter of the PID algorithm is because this parameter can, under the current problem scenario, according to the given conditions and constraints, make the PID algorithm achieve the best control effect, better adapt to the operating state of the power grid, and realize the stable control of the power grid.
[0110] It can be concluded from the above that the present disclosure optimizes the control parameters of the PID algorithm through the particle swarm algorithm, can more precisely meet the voltage requirements during the grid connection of the photovoltaic system, helps to find the optimal or near-optimal PID parameter combination, thereby significantly improving the stability of the grid-connected voltage, reducing voltage fluctuations, and enhancing the compatibility and reliability of the photovoltaic system and the power grid. In this embodiment, the individual learning factor and swarm learning factor of the particle swarm algorithm are dynamically adjusted according to the voltage characteristics of the power grid. When the difference between the grid-connected voltage and the reference voltage is in different ranges, by adjusting the learning factor, the dependence of the particles on individual experience and swarm experience can be balanced, enabling the particles to more efficiently explore the solution space, quickly adapt to the changes in the grid voltage, improve the real-time performance and flexibility of voltage control, and enhance the accuracy and reliability of the photovoltaic system control.
[0111] In one embodiment of the present disclosure, the output voltage of the inverter in the photovoltaic system is controlled based on the PID algorithm, and the output frequency of the inverter in the photovoltaic system is controlled based on the virtual synchronous machine, including:
[0112] Determine the first voltage control quantity based on the PID algorithm;
[0113] Convert the first voltage control quantity into the first duty ratio through the first mapping function;
[0114] Determine the first frequency control quantity based on the virtual synchronous machine;
[0115] Convert the first frequency control quantity into the second duty ratio;
[0116] Perform weighted calculation on the first duty ratio and the second duty ratio to obtain the target duty ratio;
[0117] Control the working state of the switching tube in the inverter based on the target duty ratio;
[0118] Control the output voltage and output frequency of the inverter based on the working state of the switching tube in the inverter.
[0119] In this embodiment, the voltage control quantity output by the PID algorithm is the first voltage control quantity, and the frequency control quantity determined by the virtual synchronous machine is the first frequency control quantity, which can be converted into the duty ratio through the mapping function to control the working of the switching tube of the inverter, thereby controlling the voltage and frequency output by the inverter. The voltage output by the inverter is the grid-connected voltage, and the initial frequency of the inverter is the grid-connected frequency.
[0120] The first mapping function can be , where represents the first duty ratio, the value range of the first voltage control quantity is , and the value range of the duty ratio is , represents the first voltage control quantity.
[0121] The second mapping function can be , where represents the second duty ratio, the range of the first frequency control quantity is , and the value range of the duty ratio is also , represents the first frequency control quantity.
[0122] In this embodiment, considering the importance and interrelationship of voltage and frequency control in a photovoltaic system, weighted calculations are performed on the first duty cycle and the second duty cycle. According to specific system requirements and actual situations, different weights are assigned to the two duty cycles, and they are combined to obtain a target duty cycle that comprehensively considers voltage and frequency control. The switching tubes in the inverter operate according to the target duty cycle, and the target duty cycle determines the time ratio of conduction and turn-off of the switching tubes within a cycle. By controlling the conduction and turn-off time of the switching tubes, the control of the output voltage and frequency of the inverter is achieved.
[0123] It can be concluded from the above that this embodiment combines two control strategies, namely the PID algorithm and the virtual synchronous machine, which are respectively used for voltage and frequency control. By converting the outputs of these two control strategies into duty cycles and performing weighted calculations on them, a comprehensive target duty cycle is obtained, realizing the coordinated control of the output voltage and frequency of the inverter, and improving the overall performance of the photovoltaic system. This embodiment uses a mapping function to convert the control quantity into a duty cycle, which can accurately control the working state of the inverter switching tubes, thereby achieving accurate control of the output voltage and frequency, and improving the accuracy and reliability of the photovoltaic system control.
[0124] In an embodiment of the present disclosure, the photovoltaic system control method further includes:
[0125] Determining the weight corresponding to the first duty cycle based on the voltage characteristics and frequency characteristics, and determining the weight corresponding to the second duty cycle based on the voltage characteristics and frequency characteristics;
[0126] In response to the power output of the photovoltaic system satisfying the first output condition, increasing the weight corresponding to the second duty cycle based on the first frequency step, and decreasing the weight corresponding to the first duty cycle based on the first frequency step.
[0127] In this embodiment, the voltage characteristic may be the degree of voltage fluctuation, the frequency characteristic may be the degree of frequency fluctuation, the calculation of the voltage fluctuation characteristic may refer to the first formula, and the calculation of the degree of frequency fluctuation may be calculated in the same way, that is , where represents the degree of frequency fluctuation within time , represents the grid frequency at time , represents the grid frequency at time .
[0128] The corresponding weights can be determined by the ratio of the degree of voltage fluctuation and the degree of frequency fluctuation. For example, the weight corresponding to the first duty cycle is , and the weight corresponding to the second duty cycle is .
[0129] Considering that when the photovoltaic system is operating at low power output, the impact of the grid-connected voltage on the grid voltage is relatively small compared to the frequency. Therefore, when the photovoltaic system is operating at low power output, the weight corresponding to the second duty ratio can be appropriately increased, and the weight corresponding to the first duty ratio can be decreased.
[0130] That is, the first output condition can be that the photovoltaic system is operating at low power output. It can be determined by comparing the output power of the photovoltaic system with a preset first power. If the output power of the photovoltaic system is less than the first power, it can be determined that the photovoltaic system is operating at low power output. At this time, the weight corresponding to the second duty ratio can be increased based on the first frequency step, and the step corresponding to the first duty ratio can be decreased by the same step.
[0131] From the above, it can be concluded that in this embodiment, by introducing the weights corresponding to the first duty ratio and the second duty ratio determined based on the voltage characteristics and frequency characteristics, the dynamic adjustment of the control strategy is realized. The degree of voltage fluctuation and the degree of frequency fluctuation, as important indicators of the system state, can reflect the interaction between the photovoltaic system and the grid in real time, enabling the present disclosure to more flexibly respond to different operating scenarios and improving the responsiveness and stability of the present disclosure. In this embodiment, by setting dynamic weights, the photovoltaic system is more reasonable when operating at low power output, realizing the precise control of the output voltage and frequency of the inverter, and improving the accuracy and reliability of the control of the photovoltaic system.
[0132] Corresponding to the photovoltaic system control method in the above embodiment, Figure 2 is a structural block diagram of a photovoltaic system control device provided by an embodiment of the present disclosure. For the sake of convenience of description, only the parts related to the embodiments of the present disclosure are shown. Refer to Figure 2 , the photovoltaic system control device 20 includes: a voltage parameter module 21, a frequency parameter module 22, and a grid connection control module 23.
[0133] Among them, the voltage parameter module 21 is used to determine the control parameters of the PID algorithm based on the voltage characteristics of the grid;
[0134] The frequency parameter module 22 is used to determine the control parameters of the virtual synchronous machine based on the frequency characteristics of the grid;
[0135] The grid connection control module 23 is used to control the output voltage of the inverter in the photovoltaic system based on the control parameters of the PID algorithm, and control the output frequency of the inverter in the photovoltaic system based on the control parameters of the virtual synchronous machine; wherein, the output voltage of the inverter is the grid-connected voltage of the photovoltaic system, and the output frequency of the inverter is the grid-connected frequency of the photovoltaic system.
[0136] In one embodiment of the present disclosure, the voltage parameter module 21 is specifically configured to, in response to the voltage characteristics of the power grid satisfying the first voltage stability condition, determine the control parameters of the PID algorithm based on the first control strategy;
[0137] In response to the voltage characteristics of the power grid not satisfying the first voltage stability condition, determine the control parameters of the PID algorithm based on the second control strategy;
[0138] The control accuracy of the first control strategy is less than that of the second control strategy.
[0139] In one embodiment of the present disclosure, the voltage parameter module 21 is further specifically configured to, in response to the difference between the grid-connected voltage and the reference voltage being greater than the first voltage threshold, increase the reference value of the proportional coefficient based on the first proportional step;
[0140] In response to the difference between the grid-connected voltage and the reference voltage being greater than the first error threshold and the duration exceeding the first error duration, increase the reference value of the integral coefficient based on the first integral step;
[0141] In response to the grid-connected voltage stability duration being greater than the first stability duration, increase the reference value of the differential coefficient based on the first differential step;
[0142] The proportional coefficient, integral coefficient, and differential coefficient are all control parameters of the PID algorithm.
[0143] In one embodiment of the present disclosure, the voltage parameter module 21 is further specifically configured to determine the number of particles of the particle swarm algorithm based on the grid connection accuracy requirement;
[0144] Determine the initialization range of the particle swarm algorithm based on the control parameters of the historical PID algorithm;
[0145] In response to the number of iterations being less than or equal to the first number, increase the reference value of the inertia weight of the particle swarm algorithm according to the first inertia step;
[0146] In response to the number of iterations being greater than the first number, decrease the reference value of the inertia weight of the particle swarm algorithm according to the second inertia step;
[0147] Determine the individual learning factor and the population learning factor of the particle swarm algorithm based on the voltage characteristics of the power grid;
[0148] Perform iterative calculations based on the number of particles, inertia weight, individual learning factor, and population learning factor until the preset number of iterations and / or the difference between multiple consecutive fitness values is less than the first fitness threshold;
[0149] Take the particle position corresponding to the global optimal position as the control parameter of the PID algorithm.
[0150] In an embodiment of the present disclosure, the voltage parameter module 21 is further specifically configured to determine a reference voltage based on the voltage characteristics of the power grid;
[0151] In response to the absolute value of the difference between the grid-connected voltage and the reference voltage being greater than a second voltage threshold and less than or equal to a third voltage threshold, increase the reference value of the individual learning factor based on a first individual step size, and decrease the reference value of the population learning factor based on a first population step size;
[0152] In response to the absolute value of the difference between the grid-connected voltage and the reference voltage being greater than the third voltage threshold, decrease the reference value of the individual learning factor based on a second individual step size, and increase the reference value of the population learning factor based on a second population step size.
[0153] In an embodiment of the present disclosure, the grid connection control module 23 is specifically configured to determine a first voltage control amount based on the PID algorithm;
[0154] Convert the first voltage control amount into a first duty cycle through a first mapping function;
[0155] Determine a first frequency control amount based on the virtual synchronous machine;
[0156] Convert the first frequency control amount into a second duty cycle through a second mapping function;
[0157] Perform weighted calculation on the first duty cycle and the second duty cycle to obtain a target duty cycle;
[0158] Control the working state of the switching tube in the inverter based on the target duty cycle;
[0159] Control the output voltage and output frequency of the inverter based on the working state of the switching tube in the inverter.
[0160] In an embodiment of the present disclosure, the photovoltaic system control device 20 further includes: a weight adjustment module;
[0161] The weight adjustment module is configured to determine the weight corresponding to the first duty cycle based on the voltage characteristics and frequency characteristics, and determine the weight corresponding to the second duty cycle based on the voltage characteristics and frequency characteristics;
[0162] In response to the power output of the photovoltaic system satisfying a first output condition, increase the weight corresponding to the second duty cycle based on a first frequency step size, and decrease the weight corresponding to the first duty cycle based on the first frequency step size.
[0163] See Figure 3 , Figure 3 is a schematic block diagram of an electronic device provided in an embodiment of the present disclosure. As Figure 3The electronic device 300 in the present embodiment shown may include: one or more processors 301, one or more input devices 302, one or more output devices 303, and one or more memories 304. The above-mentioned processors 301, input devices 302, output devices 303, and memories 304 communicate with each other through a communication bus 305. The memory 304 is used to store computer programs, and the computer programs include program instructions. The processor 301 is used to execute the program instructions stored in the memory 304. Among them, the processor 301 is configured to call the program instructions to execute the functions of each module / unit in the above-mentioned device embodiments, for example Figure 2 the functions of the modules 21 to 23 shown.
[0164] It should be understood that in the embodiments of the present disclosure, the so-called processor 301 may be a central processing unit (CPU), and this processor may also be other general-purpose processors, digital signal processors (DSPs), application specific integrated circuits (ASICs), field-programmable gate arrays (FPGAs), or other programmable logic devices, discrete gate or transistor logic devices, discrete hardware components, etc. The general-purpose processor may be a microprocessor or this processor may also be any conventional processor, etc.
[0165] The input device 302 may include a touchpad, a fingerprint acquisition sensor (for acquiring the fingerprint information and the direction information of the fingerprint of the user), a microphone, etc., and the output device 303 may include a display (such as an LCD), a speaker, etc.
[0166] The memory 304 may include a read-only memory and a random access memory, and provide instructions and data to the processor 301. A part of the memory 304 may also include a non-volatile random access memory. For example, the memory 304 may also store information about the device type.
[0167] In specific implementation, the processors 301, input devices 302, and output devices 303 described in the embodiments of the present disclosure may implement the implementation manners described in the first and second embodiments of the photovoltaic system control method provided by the embodiments of the present disclosure, and may also implement the implementation manner of the electronic device described in the embodiments of the present disclosure, which will not be elaborated here.
[0168] In another embodiment of the present disclosure, a computer-readable storage medium is provided. The computer-readable storage medium stores a computer program, and the computer program includes program instructions. When the program instructions are executed by a processor, all or part of the processes in the method of the above embodiment are implemented. It can also be completed by instructing relevant hardware through the computer program. The computer program can be stored in a computer-readable storage medium. When the computer program is executed by the processor, the steps of the above method embodiments can be implemented. Among them, the computer program includes computer program code, and the computer program code can be in the form of source code, object code, executable file or some intermediate form, etc. The computer-readable medium can include: any entity or device capable of carrying the computer program code, recording medium, USB flash drive, mobile hard disk, magnetic disk, optical disc, computer memory, read-only memory (ROM, Read-Only Memory), random access memory (RAM, Random Access Memory), electrical carrier signal, telecommunication signal, and software distribution medium, etc.
[0169] The computer-readable storage medium can be the internal storage unit of the electronic device in any of the foregoing embodiments, such as the hard disk or memory of the electronic device. The computer-readable storage medium can also be an external storage device of the electronic device, such as a plug-in hard disk, a smart media card (SMC), a secure digital (SD) card, a flash card, etc. equipped on the electronic device. Further, the computer-readable storage medium can also include both the internal storage unit and the external storage device of the electronic device. The computer-readable storage medium is used to store the computer program and other programs and data required by the electronic device. The computer-readable storage medium can also be used to temporarily store the data that has been output or will be output.
[0170] Those of ordinary skill in the art can realize that the units and algorithm steps of each example described in combination with the embodiments disclosed herein can be implemented by electronic hardware, computer software, or a combination of both. To clearly illustrate the interchangeability of hardware and software, the components and steps of each example have been generally described according to their functions in the above description. Whether these functions are executed in a hardware or software manner depends on the specific application and design constraints of the technical solution. Professional technicians can use different methods to implement the described functions for each specific application, but such implementation should not be considered to exceed the scope of the present disclosure.
[0171] Those skilled in the art can clearly understand that for the convenience and brevity of description, the specific working processes of the above-described electronic devices and units can refer to the corresponding processes in the foregoing method embodiments and will not be elaborated herein.
[0172] In several embodiments provided in the present application, it should be understood that the disclosed electronic devices and methods can be implemented in other ways. For example, the device embodiments described above are merely illustrative. For example, the division of units is only a logical function division. In actual implementation, there may be other division methods. For example, multiple units or components can be combined or integrated into another system, or some features can be ignored or not executed. In addition, the displayed or discussed couplings or direct couplings or communication connections to each other can be indirect couplings or communication connections through some interfaces or units, or can also be electrical, mechanical or other forms of connection.
[0173] The units described as separate components may or may not be physically separated. The components displayed as units may or may not be physical units, that is, they may be located in one place, or may be distributed to multiple network units. Some or all of the units can be selected according to actual needs to achieve the purpose of the solution of the embodiments of the present disclosure.
[0174] In addition, in each embodiment of the present disclosure, the functional units can be integrated in a processing unit, or each unit can exist physically alone, or two or more units can be integrated in one unit. The above integrated units can be implemented in the form of hardware or in the form of software functional units.
[0175] The above is only the specific implementation manner of the present disclosure, but the protection scope of the present disclosure is not limited thereto. Any person skilled in the art within the technical scope disclosed by the present disclosure can easily think of various equivalent modifications or substitutions, and these modifications or substitutions should be covered within the protection scope of the present disclosure. Therefore, the protection scope of the present disclosure should be subject to the protection scope of the claims.
Claims
1. A photovoltaic system control method, characterized in that: include: In response to a voltage characteristic of the power grid satisfying a first voltage stability condition, determining a control parameter of a PID algorithm based on a first control strategy; In response to the voltage characteristic of the power grid not satisfying the first voltage stability condition, determining a control parameter of the PID algorithm based on a second control strategy; The control accuracy of the first control strategy is less than the control accuracy of the second control strategy; The determining the control parameters of the PID algorithm based on the first control strategy includes: In response to a difference between the grid-connected voltage and the reference voltage being greater than a first voltage threshold, increasing a reference value of the proportional coefficient based on a first proportional step size; In response to the difference between the grid-connected voltage and the reference voltage being greater than a first error threshold and lasting longer than a first error duration, increasing a reference value of the integral coefficient based on a first integral step; In response to the grid-connected voltage stable time being longer than the first stable time, increasing the reference value of the differential coefficient based on the first differential step; The proportional coefficient, the integral coefficient and the differential coefficient are all control parameters of the PID algorithm; The determining the control parameters of the PID algorithm based on the second control strategy includes: Determine the number of particles in the particle swarm algorithm based on the grid connection accuracy requirements; Determining the initialization range of the particle swarm algorithm based on the control parameters of the historical PID algorithm; In response to the number of iterations being less than or equal to the first number, increasing a reference value of an inertia weight of the particle swarm algorithm according to a first inertia step; In response to the number of iterations being greater than the first number, reducing a reference value of the inertia weight of the particle swarm algorithm according to a second inertia step; Determining an individual learning factor and a group learning factor of a particle swarm algorithm based on voltage characteristics of the power grid; Iterative calculation is performed based on the number of particles, the inertia weight, the individual learning factor, and the group learning factor until a preset number of iterations is reached and / or the difference between multiple consecutive fitness values is less than a first fitness threshold; The particle position corresponding to the global optimal position is used as the control parameter of the PID algorithm; Determine the control parameters of the virtual synchronous machine based on the frequency characteristics of the power grid; Determine a first voltage control amount based on the PID algorithm; Converting the first voltage control amount into a first duty cycle through a first mapping function; determining a first frequency control amount based on the virtual synchronous machine; Converting the first frequency control amount into a second duty cycle through a second mapping function; Performing weighted calculation on the first duty cycle and the second duty cycle to obtain a target duty cycle; Controlling the working state of the switch tube in the inverter based on the target duty cycle; The output voltage and output frequency of the inverter are controlled based on the working state of the switch tube in the inverter; wherein the output voltage of the inverter is the grid-connected voltage of the photovoltaic system, and the output frequency of the inverter is the grid-connected frequency of the photovoltaic system.
2. The photovoltaic system control method according to claim 1, characterized in that: The determining of the individual learning factor and the group learning factor of the particle swarm algorithm based on the voltage characteristics of the power grid includes: determining a reference voltage based on a voltage characteristic of the power grid; In response to an absolute value of a difference between the grid-connected voltage and the reference voltage being greater than a second voltage threshold and an absolute value of a difference between the grid-connected voltage and the reference voltage being less than or equal to a third voltage threshold, increasing a reference value of the individual learning factor based on a first individual step size, and decreasing a reference value of the group learning factor based on a first group step size; In response to an absolute value of a difference between the grid-connected voltage and the reference voltage being greater than the third voltage threshold, the reference value of the individual learning factor is reduced based on a second individual step size, and the reference value of the group learning factor is increased based on a second group step size.
3. The photovoltaic system control method according to claim 1, characterized in that: Also includes: Determining a weight corresponding to the first duty cycle based on a voltage characteristic and a frequency characteristic, and determining a weight corresponding to the second duty cycle based on the voltage characteristic and the frequency characteristic; In response to the power output of the photovoltaic system satisfying a first output condition, the weight corresponding to the second duty cycle is increased based on a first frequency step, and the weight corresponding to the first duty cycle is decreased based on the first frequency step.
4. A photovoltaic system control device, characterized in that: include: A voltage parameter module, configured to determine a control parameter of a PID algorithm based on a first control strategy in response to a voltage characteristic of the power grid satisfying a first voltage stability condition; In response to the voltage characteristic of the power grid not satisfying the first voltage stability condition, determining a control parameter of the PID algorithm based on a second control strategy; The control accuracy of the first control strategy is less than the control accuracy of the second control strategy; The voltage parameter module is specifically configured to increase the reference value of the proportionality coefficient based on a first proportional step in response to a difference between the grid-connected voltage and the reference voltage being greater than a first voltage threshold; In response to the difference between the grid-connected voltage and the reference voltage being greater than a first error threshold and lasting longer than a first error duration, increasing a reference value of the integral coefficient based on a first integral step; In response to the grid-connected voltage stable time being longer than the first stable time, increasing the reference value of the differential coefficient based on the first differential step; The proportional coefficient, the integral coefficient and the differential coefficient are all control parameters of the PID algorithm; The voltage parameter module is further used to determine the number of particles of the particle swarm algorithm based on the grid connection accuracy requirement; Determining the initialization range of the particle swarm algorithm based on the control parameters of the historical PID algorithm; In response to the number of iterations being less than or equal to the first number, increasing a reference value of an inertia weight of the particle swarm algorithm according to a first inertia step; In response to the number of iterations being greater than the first number, reducing a reference value of the inertia weight of the particle swarm algorithm according to a second inertia step; Determining an individual learning factor and a group learning factor of a particle swarm algorithm based on voltage characteristics of the power grid; Iterative calculation is performed based on the number of particles, the inertia weight, the individual learning factor, and the group learning factor until a preset number of iterations is reached and / or the difference between multiple consecutive fitness values is less than a first fitness threshold; The particle position corresponding to the global optimal position is used as the control parameter of the PID algorithm; A frequency parameter module, used to determine the control parameters of the virtual synchronous machine based on the frequency characteristics of the power grid; A grid-connected control module, configured to determine a first voltage control variable based on the PID algorithm; Converting the first voltage control amount into a first duty cycle through a first mapping function; determining a first frequency control amount based on the virtual synchronous machine; Converting the first frequency control amount into a second duty cycle through a second mapping function; Performing weighted calculation on the first duty cycle and the second duty cycle to obtain a target duty cycle; Controlling the working state of the switch tube in the inverter based on the target duty cycle; The output voltage and output frequency of the inverter are controlled based on the working state of the switch tube in the inverter; wherein the output voltage of the inverter is the grid-connected voltage of the photovoltaic system, and the output frequency of the inverter is the grid-connected frequency of the photovoltaic system.
5. An electronic device comprising a memory, a processor, and a computer program stored in the memory and running on the processor, characterized in that: When the processor executes the computer program, the steps of the method according to any one of claims 1 to 3 are implemented.
6. A computer-readable storage medium storing a computer program, characterized in that: When the computer program is executed by a processor, the steps of the method according to any one of claims 1 to 3 are implemented.
Citation Information
Patent Citations
Self-adaptive control method and device for virtual synchronous machine
CN118611142A