Photovoltaic grid-connected system PID parameter optimization method based on chaos sparrow search algorithm
By introducing the Chaos Sparrow Search Algorithm and PID Controller in the photovoltaic grid-connected system, combined with the synchronous rotation coordinate system, the efficient control of the grid-connected inverter is achieved, solving the limitations of traditional control methods under complex power grid conditions, and significantly improving the stability and performance of the system.
Patent Information
- Application Number
- CN202311447611.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2023-11-02
- Publication Date
- 2025-04-08
- Estimated Expiration
- Not applicable · inactive patent
AI Technical Summary
Traditional grid-connected inverter control methods have limitations when facing complex and variable power grid conditions, making it difficult to achieve accurate separation of active and reactive power, with limited response speed and complex parameter setting process.
The PID parameter optimization method of photovoltaic grid-connected system based on the chaotic sparrow search algorithm is adopted, and the randomness of the search process is increased by introducing chaotic mapping, combined with a synchronous rotation coordinate system and a classic PID controller, the decoupling of active component and reactive component control is achieved.
It significantly improves the stability and performance of the system, achieves faster and more accurate current and voltage regulation, improves energy conversion efficiency, reduces system response time, and has strong robustness under different working conditions.
Smart Images

Figure CN119787467A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of power electronics technology, and in particular to a method for optimizing PID parameters of a photovoltaic grid-connected system based on a chaotic sparrow search algorithm, which is used to achieve precise control of a grid-connected inverter, and is particularly applicable to photovoltaic power generation systems. Background Art
[0002] Traditional grid-connected inverter control methods mainly adopt strategies based on voltage closed loops. Although they can achieve stable operation of the inverter to a certain extent, they have some limitations when facing complex and changeable grid conditions. First, voltage closed-loop control makes it difficult to accurately separate active and reactive power, which limits the grid access capability under different operating modes. Second, the voltage closed-loop control method has limited response speed when dealing with grid faults or disturbances, which may lead to grid instability or inverter loss of control. In addition, traditional control methods often require complex parameter setting processes, rely on experience and experiments, and are not flexible and efficient enough.
[0003] The current power system is developing towards a higher integration of renewable energy and a more intelligent power grid, which requires the inverter control system to have higher accuracy and flexibility. At the same time, the problems faced by the power system, such as voltage fluctuations and frequency deviations, also put forward higher requirements on the control performance of the inverter. Therefore, modern inverter control systems tend to adopt vector control strategies based on current closed loops to achieve more accurate active and reactive power control and improve the robustness and response speed of the system. In addition, the introduction of new intelligent algorithms and chaos optimization techniques to improve the adaptability and diversity of control systems has become a research hotspot in the field of power electronics.
[0004] The present invention provides a PID parameter optimization method for a photovoltaic grid-connected system based on a chaotic sparrow search algorithm, aiming to overcome the limitations of traditional control methods. This strategy uses a synchronous rotating coordinate system to describe the mathematical model of the inverter, and realizes the decoupling characteristics of the active component and reactive component control. Unlike the traditional method, the present invention introduces a chaotic sparrow search algorithm, which increases the randomness of the search process through chaotic mapping, so as to better explore the search space and improve the control performance. In addition, the present invention also uses a classic PID controller for current closed-loop and voltage closed-loop control to ensure the stability and response speed of the system. This comprehensive technical solution enables the present invention to have significant advantages in high-precision control, robustness and adaptability, and is suitable for application scenarios in modern power systems that have high requirements for inverter performance. Summary of the invention
[0005] The present invention provides a PID parameter optimization method for a photovoltaic grid-connected system based on a chaotic sparrow search algorithm, which is suitable for precise control of grid-connected inverters. The strategy adopts a synchronous rotating coordinate system control system and combines the design and setting of a PID controller to achieve the decoupling characteristics of active component and reactive component control. The core innovation of the present invention lies in the use of a chaotic sparrow search algorithm, which introduces chaotic mapping to increase the randomness of the search process, thereby better exploring the search space and further improving the control performance.
[0006] The technical solution adopted by the present invention is: a method for optimizing PID parameters of a photovoltaic grid-connected system based on a chaotic sparrow search algorithm, comprising the following steps:
[0007] S1: Establishment of mathematical model of photovoltaic grid-connected control system. Establish the voltage equation in the abc three-phase coordinate system, and transform it to the αβ stationary coordinate system and the dq synchronous rotating coordinate system to obtain the mathematical model of the system in the dq coordinate system;
[0008] S2: System decoupling. The feedforward voltage compensation method is used to achieve the decoupling of the system between the d-axis and the q-axis. A dual closed-loop control structure of outer loop voltage and inner loop current is adopted. The inner loop current uses a PID controller, and the outer loop voltage uses a PID controller.
[0009] S3: PID parameter tuning. The chaotic sparrow search algorithm is used to search for the global optimal PID controller parameter combination with the goal of minimizing the objective function of multiple random step response instructions;
[0010] Specifically, the photovoltaic grid-connected control system mathematical model described in S1 specifically refers to a vector control strategy based on a current closed loop. The following is a specific mathematical model:
[0011] In the three-phase stationary abc coordinate system, the voltage equation of the grid-connected inverter is:
[0012]
[0013] The mathematical model in the three-phase static abc coordinate system is converted into a model in the two-phase vertical static αβ coordinate system:
[0014]
[0015]
[0016] Where U βα =(u β ,u α ) T , I βα =(i β ,i α ) T
[0017] Substituting it into the formula and simplifying it, we get
[0018]
[0019] Then transform the mathematical model in the two-phase stationary αβ coordinate system into the mathematical model in the synchronous rotating dq coordinate system:
[0020]
[0021]
[0022] The voltage equation of the grid-connected inverter in the dq coordinate system:
[0023]
[0024] Wherein ω0 is the synchronous rotation angular frequency, and ω0=dθ / dt.
[0025] In the zero initial state, Laplace transform is performed to obtain the mathematical model of the grid-connected inverter frequency domain in the synchronous rotating dq coordinate system:
[0026]
[0027] Specifically, the system decoupling described in S2 refers to the use of a feedforward voltage compensation method to achieve the decoupling of the system between the d-axis and the q-axis. Since in the dq coordinate system, the mathematical model of the grid-connected inverter is coupled between the d-axis and the q-axis. The present invention adopts a feedforward decoupling strategy, and introduces feedforward quantities +Lω0 and I into the output AC voltage of the grid-connected inverter. d (s) and -Lω0 I d (s), thus achieving decoupling between the d and q axes.
[0028] In the synchronous rotating coordinate system oriented by the grid voltage, we have e d =E.
[0029] The instantaneous active power p and reactive power q of the system can be calculated by the following formulas:
[0030]
[0031] Since the grid voltage orientation is based on q =0, then the instantaneous active power p and reactive power q of the system are:
[0032]
[0033] The instantaneous active power p and reactive power q of the grid-connected inverter and the d-axis and q-axis components i of the output current of the grid-connected inverter d 、i q Directly proportional.
[0034] The control system consists of a DC voltage outer loop and an active and reactive current inner loop. The function of the DC voltage outer loop is to stabilize or adjust the DC voltage. By introducing DC voltage feedback and using a PID controller (denoted as PID2 in the figure), the DC voltage can be controlled without static error.
[0035] Both the current loop and the voltage loop use the classic PID controller, and its output expression is:
[0036]
[0037] Where u(t) represents the output signal of the PID controller, K p is the proportional gain, which is used to adjust the linear relationship between output and error. i K is the integral time constant, which is used to control the response speed of the integral term. d is the differential time constant, which is used to control the response speed of the differential term. e(t) represents the error signal.
[0038] In the photovoltaic power generation dual-loop grid-connected system, the PID controller parameters of the current loop and the voltage loop are recorded as: K ip is the proportional gain of the current loop. K ii is the integral time constant of the current loop. K id is the current loop differential time constant. K up is the proportional gain of the voltage loop. K ui is the integral time constant of the voltage loop. K ud is the voltage loop differential time constant.
[0039] Specifically, the steps of the chaotic sparrow search algorithm described in S3 are as follows:
[0040] S3.1: Initialization: Initialize the position and speed of each sparrow in the population. Randomly generate the initial position of the sparrow: i represents the i-th sparrow. In this example, each sparrow represents a combination of PID controller parameters:
[0041] X i =[K ip_i , K ii_i , K id_i , K up_i , K ui_i , K ud_i ]
[0042] Randomly generate the initial speed of the sparrow:
[0043] S3.2: Update position and speed: For each sparrow i, update the speed:
[0044]
[0045] in, is the speed of the i-th sparrow in the t+1 generation, is the current best sparrow position, is the position of another randomly selected sparrow, ω is the inertia weight, α and β are acceleration factors, and R1 and R2 are random numbers in the range [0, 1].
[0046] S3.3: Introducing chaotic mapping to increase randomness: By applying chaotic mapping (such as Tent mapping) to update the speed, the randomness of the search process can be increased:
[0047]
[0048] Here, χ is the control parameter of the chaotic map, Indicates the absolute value of speed.
[0049] S3.4: Update location:
[0050]
[0051] in, is the position of the i-th sparrow in the t+1th generation.
[0052] S3.5: Fitness Assessment:
[0053] Calculate the fitness value of each sparrow, which is the value of the objective function. Randomly generate multiple step instructions with amplitudes between 0 and 1, and measure the integral of the error between the system response and the reference value and time as the objective function.
[0054]
[0055] Among them, u * (t) is the reference signal (which can be an active power command or a reactive power command), and u(t) is the actual response of the control system.
[0056] S3.6: Select the best sparrow:
[0057] Select the sparrow with the highest fitness from the population, that is, the sparrow with the smallest objective function value. Update the global best position:
[0058]
[0059] S3.7: Determine the termination condition: The termination condition is that the number of algorithm iterations reaches the maximum value.
[0060] Beneficial effects of the present invention: The present invention adopts a vector control strategy based on a current closed loop and a chaotic sparrow search algorithm to achieve efficient control of the grid-connected inverter in the photovoltaic power generation system, significantly improving the stability and performance of the system. By introducing a synchronous rotating coordinate system, precise design of the PID controller and the randomness of the chaotic mapping, the present invention successfully solves the control problem of the grid-connected inverter, enabling it to achieve faster and more accurate current and voltage regulation, thereby effectively improving energy conversion efficiency, reducing system response time, and having strong robustness under different working conditions. This innovative technology is not only expected to promote the widespread application of photovoltaic power generation systems in the field of renewable energy. BRIEF DESCRIPTION OF THE DRAWINGS
[0061] Figure 1 It is a main step flow chart of the present invention;
[0062] Figure 2 The flowchart of the chaotic sparrow search algorithm of the present invention;
[0063] Figure 3 This is a schematic diagram of the structure of the photovoltaic grid-connected control system of the present invention;
[0064] Figure 4 It is a mathematical model of the photovoltaic grid-connected control system after decoupling of the present invention;
[0065] Figure 5 It is a graph showing the number of optimization iterations of the chaotic sparrow search algorithm versus the objective function in an embodiment of the present invention;
[0066] Figure 6 It is a step response comparison curve diagram (reactive power) of the system before and after the control parameter optimization in the embodiment of the present invention.
[0067] Figure 7 It is a step response comparison curve diagram (active power) of the system before and after the control parameter optimization in the embodiment of the present invention.
[0068] Figure 8 This is a step response comparison curve diagram (voltage) of the system before and after control parameter optimization in an embodiment of the present invention. DETAILED DESCRIPTION
[0069] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention, and are specifically described in combination with the embodiments below.
[0070] like Figure 1 and 2 As shown, the present invention comprises the following steps:
[0071] S1: Establishment of mathematical model of photovoltaic grid-connected control system. Establish the voltage equation in the abc three-phase coordinate system and transform it to the αβ stationary coordinate system and the dq synchronous rotating coordinate system to obtain the mathematical model of the system in the dq coordinate system; the control structure of the grid-connected inverter based on grid voltage orientation is as follows: Figure 3 The control system consists of a DC voltage outer loop and an active and reactive current inner loop.
[0072] In the three-phase stationary abc coordinate system, the voltage equation of the grid-connected inverter is:
[0073]
[0074] The mathematical model in the three-phase static abc coordinate system is converted into a model in the two-phase vertical static αβ coordinate system:
[0075]
[0076]
[0077] Where U βα =(u β ,u α ) T , I βα =(i β ,i α ) T
[0078] Substituting it into the formula and simplifying it, we get
[0079]
[0080] Then transform the mathematical model in the two-phase stationary αβ coordinate system into the mathematical model in the synchronous rotating dq coordinate system:
[0081]
[0082]
[0083] The voltage equation of the grid-connected inverter in the dq coordinate system:
[0084]
[0085] Wherein ω0 is the synchronous rotation angular frequency, and ω0=dθ / dt.
[0086] In the zero initial state, Laplace transform is performed to obtain the mathematical model of the grid-connected inverter frequency domain in the synchronous rotating dq coordinate system:
[0087]
[0088] S2: System decoupling. The feedforward voltage compensation method is used to achieve the decoupling of the system between the d-axis and the q-axis. A dual closed-loop control structure of outer loop voltage and inner loop current is adopted. The inner loop current uses a PID controller, and the outer loop voltage uses a PID controller.
[0089] Specifically, the system decoupling described in S2 refers to the use of a feedforward voltage compensation method to achieve the decoupling of the system between the d-axis and the q-axis. Since in the dq coordinate system, the mathematical model of the grid-connected inverter is coupled between the d-axis and the q-axis. The present invention adopts a feedforward decoupling strategy, and introduces feedforward quantities +Lω0 and I into the output AC voltage of the grid-connected inverter. d (s) and -Lω0 I d (s), thus achieving the decoupling between the dq axes. The decoupled system model is as follows: Figure 4 shown.
[0090] In the synchronous rotating coordinate system oriented by the grid voltage, we have e d =E.
[0091] The instantaneous active power p and reactive power q of the system can be calculated by the following formulas:
[0092]
[0093] Since the grid voltage orientation is based on q =0, then the instantaneous active power p and reactive power q of the system are:
[0094]
[0095] The instantaneous active power p and reactive power q of the grid-connected inverter and the d-axis and q-axis components i of the output current of the grid-connected inverter d 、i q Directly proportional.
[0096] The control system consists of a DC voltage outer loop and an active and reactive current inner loop. The DC voltage outer loop is used to stabilize or regulate the DC voltage. The DC voltage feedback is introduced and a PID controller ( Figure 4 The zero-static-error control of DC voltage can be realized by using PID2.
[0097] Both the current loop and the voltage loop use the classic PID controller, and its output expression is:
[0098]
[0099] Where u(t) represents the output signal of the PID controller, K p is the proportional gain, which is used to adjust the linear relationship between output and error. i K is the integral time constant, which is used to control the response speed of the integral term.d is the differential time constant, which is used to control the response speed of the differential term. e(t) represents the error signal
[0100] In the photovoltaic power generation dual-loop grid-connected system, the PID controller parameters of the current loop and the voltage loop are recorded as: K ip is the proportional gain of the current loop. K ii is the integral time constant of the current loop. K id is the current loop differential time constant. K up is the proportional gain of the voltage loop. K ui is the integral time constant of the voltage loop. K ud is the voltage loop differential time constant.
[0101] S3: PID parameter tuning. The chaotic sparrow search algorithm is used to search for the global optimal PID controller parameter combination with the goal of minimizing the objective function of the random step response instruction;
[0102] S3.1: Initialization: Randomly generate the initial position of the sparrow: i represents the i-th sparrow. In this example, each sparrow represents a combination of PID controller parameters:
[0103] X i =[K ip_i , K ii_i , K id_i , K up_i , K ui_i , K ud_i ]
[0104] Randomly generate the initial speed of the sparrow:
[0105] S3.2: Update position and speed: For each sparrow i, update the speed:
[0106]
[0107] in, is the speed of the i-th sparrow in the t+1 generation, is the current best sparrow position, is the position of another randomly selected sparrow, ω is the inertia weight, α and β are acceleration factors, and R1 and R2 are random numbers in the range [0, 1].
[0108] S3.3: Introducing chaotic mapping to increase randomness: By applying T e nt mapping to update speed and increase the randomness of the search process:
[0109]
[0110] χ is the control parameter of the chaotic map, Indicates the absolute value of speed.
[0111] S3.4: Update location:
[0112]
[0113] in, is the position of the i-th sparrow in the t+1th generation.
[0114] S3.5: Fitness Assessment:
[0115] Calculate the fitness value of each sparrow, which is the value of the objective function. Randomly generate multiple step instructions with amplitudes between 0 and 1, and measure the integral of the error between the system response and the reference value and time as the objective function.
[0116]
[0117] Among them, u * (t) is the reference signal (which can be an active power command or a reactive power command), and u(t) is the actual response of the control system.
[0118] S3.6: Select the best sparrow:
[0119] Select the sparrow with the highest fitness from the population, that is, the sparrow with the smallest objective function value. Update the global best position:
[0120]
[0121] S3.7: Determine termination condition: The termination condition is that the number of algorithm iterations reaches the maximum value.
[0122] The effectiveness of the present invention is verified as follows: a system having two Figure 3 The system simulation model shown in the figure is used to verify the effectiveness of the photovoltaic grid-connected control system. The parameters are set as follows: DC bus voltage E dc =1000V; filter inductor L f =3mH; grid voltage amplitude E = 220V; grid voltage frequency f = 50Hz; resistance R = 0.01Ω; population size 20 sparrows; maximum number of iterations 100 generations; chaos mapping parameter χ = 4; acceleration factor α = 1; acceleration factor β = 1; inertia weight ω = 0.8;
[0123] PID controller parameter search range:
[0124] Current loop proportional parameter K ip : [0.01, 5];
[0125] Current loop integral parameter Kii : [10, 500];
[0126] Current loop differential parameter K id : [0.001, 1];
[0127] Voltage loop ratio parameter K up : [0.001, 0.02];
[0128] Voltage loop integration parameter K ui : [1, 50];
[0129] Voltage loop differential parameter K ud : [0.0001, 0.01];
[0130] Simulation conditions: The simulation time for all conditions is 10s.
[0131] (1) Reactive power tracking simulation: Set the reactive power command to a step signal of 50 kVar.
[0132] (2) Active power tracking simulation: Set the active power command to a 60kW step signal.
[0133] (3) DC bus voltage tracking simulation: Set the DC voltage command to a 1200V step signal.
[0134] Through the simulation of the above three working conditions, the chaotic sparrow search algorithm is used to find the global optimal solution within the search range as the final PID controller parameters. The system control error integral function (objective function) optimized by the chaotic sparrow algorithm continues to decrease with the increase of the number of iterations, and finally converges to a lower level steadily, such as Figure 5 In addition, it can be observed that the response performance of the photovoltaic grid-connected system under reactive power, active power and voltage control instructions is better than that of the random parameters before optimization, as shown in Figure 6 , Figure 7 and Figure 8 shown.
[0135] It will be apparent to those skilled in the art that the invention is not limited to the details of the exemplary embodiments described above and that the invention can be implemented in other specific forms without departing from the spirit or essential features of the invention. Therefore, the embodiments should be considered in all respects as exemplary and non-limiting, and the scope of the invention is defined by the appended claims rather than the foregoing description, and it is intended that all variations within the meaning and scope of the elements of the claims be included in the invention. Any reference numeral in a claim should not be considered as limiting the claim to which it relates.
Claims
1. A PID parameter optimization method for photovoltaic grid-connected system based on chaotic sparrow search algorithm, characterized in that: The following steps are involved: S1: Establish a mathematical model of the photovoltaic grid-connected control system, use the voltage equation in the abc three-phase coordinate system, and transform it to the αβ stationary coordinate system and the dq synchronous rotating coordinate system to obtain the mathematical model of the system in the dq coordinate system; S2: The feed-forward voltage compensation method is used to achieve the decoupling of the system between the d-axis and the q-axis; S3: A dual closed-loop control structure of outer loop voltage and inner loop current is adopted, the inner loop current adopts PID controller, and the outer loop voltage adopts PID controller; S4: The chaotic sparrow search algorithm is used to search for the global optimal PID controller parameter combination, with the minimization of the objective function of multiple random step response instructions as the optimization goal.
2. The photovoltaic grid-connected system PID parameter optimization method based on the chaotic sparrow search algorithm according to claim 1, characterized in that: The mathematical model of the photovoltaic grid-connected control system established in step (1) is specifically: in the abc three-phase stationary coordinate system, the voltage equation of the grid-connected inverter is: Convert it to the αβ stationary coordinate system: And further transformed to the dq synchronous rotating coordinate system: in, is the coordinate transformation matrix from abc to αβ, is the coordinate transformation matrix from αβ to dq; In the dq coordinate system, the voltage equation of the grid-connected inverter is: Where ω0 is the synchronous rotation angular frequency, and ω0 = dθ / dt; The mathematical model of the grid-connected inverter frequency domain in the synchronous rotating dq coordinate system is:
3. The photovoltaic grid-connected system PID parameter optimization method based on the chaotic sparrow search algorithm according to claim 1, characterized in that: The feedforward voltage compensation method used in step (2) is specifically as follows: introducing feedforward amount +Lω0I into the output voltage of the grid-connected inverter d (s) and -Lω0I d (s) to achieve decoupling between the dq axes.
4. The photovoltaic grid-connected system PID parameter optimization method based on the chaotic sparrow search algorithm according to claim 1, characterized in that: The specific steps of the chaotic sparrow search algorithm include: S3.1: Initialize the position of each sparrow in the population and speed S3.2: For each sparrow i, update the speed according to the position S3.3: Speed Perform chaos mapping to increase randomness; S3.4: Update the sparrow position according to the speed S3.5: Calculate the fitness value of each solution; S3.6: Select the solution with the highest fitness as the global optimal solution; S3.7: Determine whether the termination condition is met.
5. The photovoltaic grid-connected system PID parameter optimization method based on the chaotic sparrow search algorithm according to claim 4 is characterized in that: The update equation of the speed Vi(t+1) in step (2) is: Where ω is the inertia weight, α and β are acceleration factors, and R1 and R2 are random numbers in the range [0,1].
6. The photovoltaic grid-connected system PID parameter optimization method based on the chaotic sparrow search algorithm according to claim 4, characterized in that: In the step (3), Tent mapping is used as chaotic mapping.
7. The photovoltaic grid-connected system PID parameter optimization method based on the chaotic sparrow search algorithm according to claim 4, characterized in that: The fitness function in step (5) is selected as the objective function of multiple random step responses: Among them, u * (t) is the reference signal and u(t) is the response signal.
8. A photovoltaic grid-connected system PID parameter optimization device based on a chaotic sparrow search algorithm, using a photovoltaic grid-connected system PID parameter optimization method based on a current closed-loop vector control strategy as claimed in claim 1, characterized in that: include: Modeling module, used to establish the mathematical model of photovoltaic grid-connected control system; A decoupling module, used for realizing the decoupling between the d-axis and the q-axis of the system by adopting a feed-forward voltage compensation method; A control module, used for a double closed-loop control structure using an outer loop voltage and an inner loop current; The optimization module is used to search for the globally optimal PID controller parameters using the chaotic sparrow search algorithm.
9. The photovoltaic grid-connected system PID parameter optimization device based on the chaotic sparrow search algorithm according to claim 8, characterized in that: The modeling module adopts the voltage equation in the abc three-phase coordinate system and converts it to the αβ stationary coordinate system and the dq synchronous rotating coordinate system to obtain the mathematical model of the system in the dq coordinate system.
10. The photovoltaic grid-connected system PID parameter optimization device based on the chaotic sparrow search algorithm according to claim 8, characterized in that: The control module adopts an inner loop current PID controller and an outer loop voltage PID controller. The specific steps of the chaotic sparrow search algorithm of the optimization module are as described in claim 4. The chaotic sparrow search algorithm takes minimization of the objective function of multiple random step response instructions as the optimization goal.