Photovoltaic grid-connected system PID parameter optimization method based on chaos sparrow search algorithm

By using the Chaos Sparrow Search Algorithm in the photovoltaic grid-connected system to optimize the PID controller parameters, the limitations of traditional control methods under complex power grid conditions are solved, efficient and accurate inverter control is achieved, and the stability and performance of the system are improved.

CN119944811APending Publication Date: 2025-05-06STATE GRID HENAN ELECTRIC POWER COMPANY ANYANG POWER SUPPLY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202510215116.5
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-02-26
Publication Date
2025-05-06

AI Technical Summary

Technical Problem

The traditional grid-connected inverter control method has limitations when facing complex and variable power grid conditions, making it difficult to achieve accurate separation of active and reactive power, has limited response speed, and requires a complex parameter setting process.

Method used

The PID parameter optimization method of photovoltaic grid-connected system based on the Chaos Sparrow Search algorithm is adopted. By establishing the voltage equation under the ABC three-phase coordinate system and converting it to the αβ stationary coordinate system and the DQ synchronous rotation coordinate system, the system decoupling is achieved, and the chaotic sparrow search algorithm is used to optimize the PID controller parameters.

Benefits of technology

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.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN119944811A_ABST
    Figure CN119944811A_ABST
Patent Text Reader

Abstract

The invention relates to a photovoltaic grid-connected system PID parameter optimization method based on a chaos sparrow search algorithm, and the method comprises the following steps: building a voltage equation under an abc three-phase coordinate system, and sequentially converting the voltage equation into an alpha-beta static coordinate system and a dq synchronous rotating coordinate system to obtain a mathematical model of a photovoltaic grid-connected control system under the dq coordinate system; a feed-forward voltage compensation method is adopted, decoupling of a photovoltaic grid-connected control system between a d axis and a q axis is achieved, a double-closed-loop control structure with outer-loop voltage and inner-loop current is adopted, and PID controllers are adopted for the inner-loop current and the outer-loop voltage; and searching a globally optimal PID controller parameter combination by adopting a chaos sparrow search algorithm and aiming at minimizing an objective function of multiple random step response instructions. Compared with the prior art, the chaotic mapping is introduced to increase the randomness of the search process, the search space can be better explored, and the control performance is further improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the technical field of power electronics, and in particular to a method for optimizing PID parameters of a photovoltaic grid-connected system based on a chaotic sparrow search algorithm. 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 moving towards a higher level of renewable energy integration 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. However, current control technologies still cannot meet the adaptability and diversity requirements in complex application scenarios. Summary of the invention

[0004] The purpose of the present invention is to provide a PID parameter optimization method for a photovoltaic grid-connected system based on a chaotic sparrow search algorithm, which is used to achieve precise control of a grid-connected inverter, especially in the application of a photovoltaic power generation system.

[0005] The purpose of the present invention can be achieved by the following technical solutions:

[0006] A method for optimizing PID parameters of a photovoltaic grid-connected system based on a chaotic sparrow search algorithm comprises 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 in turn, and obtain the mathematical model of the photovoltaic grid-connected control system in the dq coordinate system;

[0008] S2, system decoupling: adopt the method of feedforward voltage compensation to realize the decoupling between the d-axis and the q-axis of the photovoltaic grid-connected control system, and adopt a double closed-loop control structure of outer loop voltage and inner loop current, in which both the inner loop current and the outer loop voltage adopt 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] The step S1 comprises the following steps:

[0011] S11, in the abc three-phase stationary coordinate system, the voltage equation of the grid-connected inverter is expressed as:

[0012]

[0013] Where U abc is the inverter output voltage vector in the three-phase stationary coordinate system, E abc is the grid voltage vector in the three-phase stationary coordinate system, I abc is the inverter output current vector in the three-phase stationary coordinate system, R is the inverter output filter resistance, and L is the inverter output filter inductance;

[0014] S12, convert the mathematical model in the three-phase static abc coordinate system into a model in the two-phase vertical static αβ coordinate system:

[0015]

[0016]

[0017]

[0018] Where U βα =(u β ,u α ) T , represents the inverter output voltage vector in the two-phase stationary αβ coordinate system, I βα =(i β ,i α ) T , represents the inverter output current vector in the two-phase stationary αβ coordinate system, E βα =(e β ,e α ) T , represents the grid voltage vector in the two-phase stationary αβ coordinate system;

[0019] Substitute the above conversion formula into the voltage equation of the grid-connected inverter and simplify it to obtain the voltage equation in the two-phase stationary αβ coordinate system:

[0020]

[0021] S13, transform the mathematical model in the two-phase stationary αβ coordinate system into the mathematical model in the synchronous rotating dq coordinate system:

[0022]

[0023] In addition, when taking the derivative of the current vector, the influence of the rotating coordinate system is considered:

[0024]

[0025] Substituting the above formula into the voltage equation in the αβ coordinate system, we can obtain the voltage equation of the grid-connected inverter in the dq coordinate system:

[0026]

[0027] Expanding the above equation, we get the time domain equation in the dq coordinate system:

[0028]

[0029] Where θ is the dq axis angle of the synchronous rotating coordinate system, ω 0 is the synchronous rotation angular frequency, and ω 0 =dθ / dt,U qd is the inverter output voltage vector under the dq axis of the synchronous rotating coordinate system, E qd is the grid voltage vector in the synchronously rotating dq coordinate system, I qd is the inverter output current vector under the dq axis of the synchronous rotating coordinate system;

[0030] S14, assuming that the initial condition is zero, perform Laplace transform on the time domain equation in the dq coordinate system to obtain the mathematical model of the frequency domain of the grid-connected inverter in the synchronous rotating dq coordinate system:

[0031]

[0032] Where s is the Laplace transform operator, s = jw, E q 、E d is the grid voltage component in the synchronously rotating dq coordinate system, U q , U d is the inverter output voltage component in the synchronously rotating dq coordinate system, I q ,I d is the inverter output current component in the synchronously rotating dq coordinate system.

[0033] The system decoupling is specifically as follows: adopting a feedforward decoupling strategy, introducing a feedforward amount +Lω into the AC voltage output by the grid-connected inverter 0 I d (s) and -Lω 0 I d (s), realizing the decoupling of the system between the d-axis and the q-axis, thereby achieving independent control of active and reactive power.

[0034] In the synchronous rotating coordinate system oriented by the grid voltage, we have e d =E;

[0035] Then the instantaneous active power p and reactive power q of the system are calculated by the following formulas:

[0036]

[0037] In the formula, e d is the d-axis voltage component of the power grid in the synchronously rotating dq coordinate system, e q is the q-axis voltage component of the power grid in the synchronously rotating dq coordinate system, i d is the inverter d-axis output current component in the synchronously rotating dq coordinate system, i q is the inverter q-axis output current component in the synchronously rotating dq coordinate system, and E is the grid voltage amplitude;

[0038] Based on the grid voltage orientation q =0, then the instantaneous active power p and reactive power q of the system are:

[0039]

[0040] Then, the instantaneous active power p and reactive power q of the grid-connected inverter are related to the d-axis and q-axis components i of the output current of the grid-connected inverter. d 、i q The optimization target of the PID controller is set according to the proportional relationship, and i is adjusted respectively. d and i q Realize inverter power control.

[0041] The photovoltaic grid-connected 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 adjust the DC voltage, introduce DC voltage feedback, and achieve zero-static-error control of the DC voltage through a PID controller.

[0042] The current inner loop and voltage outer loop both use classic PID controllers, and their output expressions are:

[0043]

[0044] 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; K i is the integral time constant, which is used to control the response speed of the integral term; K d is the differential time constant, which is used to control the response speed of the differential term; e(t) represents the error signal.

[0045] The steps of the chaotic sparrow search algorithm are as follows:

[0046] S31, Initialization: Randomly initialize the position of each sparrow in the population and speed Among them, i represents the i-th sparrow;

[0047] S32, update speed: For each sparrow i, update speed:

[0048]

[0049] 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, R 1 and R 2 is a random number in the range [0, 1];

[0050] S33, introduce chaos mapping to increase the randomness of speed update, and obtain the speed update value after introducing chaos mapping

[0051] S34, update the sparrow position according to the speed update value after introducing the chaotic map:

[0052]

[0053] in, is the position of the i-th sparrow in the t+1 generation;

[0054] S35, fitness evaluation: calculate the fitness value of each sparrow, that is, the objective function f(X i ) value;

[0055] S36, select the best sparrow: select the sparrow with the highest fitness from the population, that is, the sparrow with the smallest objective function value, and update the global best position:

[0056]

[0057] S37, determine the termination condition: when the number of algorithm iterations reaches the maximum value, end the iteration and output the globally optimal PID controller parameter combination; otherwise, return to step S32 for the next iteration.

[0058] In step S3, the position x of each sparrow i Represents a set of PID controller parameter combinations:

[0059] X i =[K ip_i ,Kii_i ,K id_i ,K up_i ,K ui_i ,K ud_i ]

[0060] In the formula, 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 differential time constant of the voltage loop, and the subscript i represents the i-th sparrow.

[0061] The method of introducing chaotic mapping to increase the randomness of speed update is:

[0062]

[0063] Where χ is the control parameter of the chaotic mapping, Indicates the absolute value of speed.

[0064] In step S35, multiple step instructions with amplitudes between 0 and 1 are randomly generated, and the integral of the error between the response of the measurement system and the reference value and time is used as the objective function:

[0065]

[0066] Among them, u * (t) is the reference signal, active power command or reactive power command is taken, and u(t) is the actual response of the control system.

[0067] Compared with the prior art, the present invention has the following beneficial effects:

[0068] 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, the 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 the energy conversion efficiency, reducing the system response time, and having strong robustness under different working conditions. This innovative technology is expected to promote the widespread application of photovoltaic power generation systems in the field of renewable energy. BRIEF DESCRIPTION OF THE DRAWINGS

[0069] Figure 1 is a flow chart of the method of the present invention;

[0070] Figure 2The flowchart of the chaotic sparrow search algorithm of the present invention;

[0071] Figure 3 This is a schematic diagram of the structure of the photovoltaic grid-connected control system of the present invention;

[0072] Figure 4 It is a mathematical model of the photovoltaic grid-connected control system after decoupling of the present invention;

[0073] 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;

[0074] 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;

[0075] 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;

[0076] 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

[0077] The present invention is described in detail below in conjunction with the accompanying drawings and specific embodiments. This embodiment is implemented based on the technical solution of the present invention, and provides a detailed implementation method and specific operation process, but the protection scope of the present invention is not limited to the following embodiments.

[0078] The present invention provides a vector control strategy based on current closed loop, aiming to overcome the limitations of traditional control methods. The strategy uses a synchronous rotating coordinate system to describe the mathematical model of the inverter, realizing the decoupling characteristics of active component and reactive component control. Different from 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 makes the present invention 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.

[0079] Specifically, Figure 1 As shown, the present embodiment provides a method for optimizing PID parameters of a photovoltaic grid-connected system based on a chaotic sparrow search algorithm, comprising the following steps:

[0080] S1, the mathematical model of the photovoltaic grid-connected control system is established: the voltage equation in the abc three-phase coordinate system is established, and it is converted to the αβ stationary coordinate system and the dq synchronous rotating coordinate system in turn to obtain the mathematical model of the photovoltaic grid-connected control system in the dq coordinate system.

[0081] The mathematical model of the photovoltaic grid-connected control system in this embodiment specifically refers to a vector control strategy based on a current closed loop, and a control structure of a grid-connected inverter based on grid voltage orientation, such as Figure 3 As shown, the following is the specific process of building the mathematical model:

[0082] S11, in the abc three-phase stationary coordinate system, the voltage equation of the grid-connected inverter is expressed as:

[0083]

[0084] Where U abc is the inverter output voltage vector in the three-phase stationary coordinate system, E abc is the grid voltage vector in the three-phase stationary coordinate system, I abc is the inverter output current vector in the three-phase stationary coordinate system, R is the inverter output filter resistance (Ω), and L is the inverter output filter inductance (H).

[0085] S12, convert the mathematical model in the three-phase static abc coordinate system into a model in the two-phase vertical static αβ coordinate system:

[0086]

[0087]

[0088]

[0089] Where U βα =(u β ,u α ) T , represents the inverter output voltage vector in the two-phase stationary αβ coordinate system, I βα =(i β ,i α ) T , represents the inverter output current vector in the two-phase stationary αβ coordinate system, E βα =(e β ,e α ) T , represents the grid voltage vector in the two-phase stationary αβ coordinate system.

[0090] Substitute the above conversion formula into the voltage equation of the grid-connected inverter and simplify it to obtain the voltage equation in the two-phase stationary αβ coordinate system:

[0091]

[0092] S13, transform the mathematical model in the two-phase stationary αβ coordinate system into the mathematical model in the synchronous rotating dq coordinate system:

[0093]

[0094] In addition, when taking the derivative of the current vector, the influence of the rotating coordinate system needs to be considered:

[0095]

[0096] Substituting the above formula into the voltage equation in the αβ coordinate system, we can obtain the voltage equation of the grid-connected inverter in the dq coordinate system:

[0097]

[0098] Expanding the above equation, we get the time domain equation in the dq coordinate system:

[0099]

[0100] Where θ is the dq axis angle of the synchronous rotating coordinate system (rad), ω 0 is the synchronous rotation angular frequency, and ω 0 =dθ / dt,U qd is the inverter output voltage vector under the dq axis of the synchronous rotating coordinate system, E qd is the grid voltage vector in the synchronously rotating dq coordinate system, I qd It is the inverter output current vector under the dq axis of the synchronous rotating coordinate system.

[0101] S14, assuming that the initial condition is zero (i.e., zero initial state), the time domain equation in the dq coordinate system is Laplace transformed, and the transformation rule is as follows:

[0102]

[0103] After applying the Laplace transform, the time domain equation becomes:

[0104]

[0105] Finally, the mathematical model of the grid-connected inverter in the frequency domain in the synchronous rotating dq coordinate system is obtained:

[0106]

[0107] Where s is the Laplace transform operator, s = jw, E q 、E d is the grid voltage component in the synchronously rotating dq coordinate system, U q , U dis the inverter output voltage component in the synchronously rotating dq coordinate system, I q ,I d is the inverter output current component in the synchronously rotating dq coordinate system.

[0108] S2, system decoupling: The feedforward voltage compensation method is used to achieve decoupling between the d-axis and the q-axis of the photovoltaic grid-connected control system, and a double closed-loop control structure of outer loop voltage and inner loop current is adopted, in which both the inner loop current and the outer loop voltage use PID controllers.

[0109] Since the mathematical model of the grid-connected inverter is coupled between the d and q axes in the dq coordinate system, this embodiment adopts a feedforward decoupling strategy, and introduces feedforward quantities +Lω into the output AC voltage of the grid-connected inverter. 0 I d (s) and -Lω 0 I d (s), realizing the decoupling of the system between the d-axis and the q-axis, thereby achieving independent control of active and reactive power.

[0110] S2 uses a feedforward voltage compensation method to perform dq axis decoupling, which not only improves the control accuracy, but also provides an independent control basis for PID parameter optimization in S3, enabling the entire photovoltaic grid-connected system to operate efficiently.

[0111] In the synchronous rotating coordinate system oriented by the grid voltage, we have e d =E;

[0112] Then the instantaneous active power p and reactive power q of the system are calculated by the following formulas:

[0113]

[0114] In the formula, e d is the grid d-axis voltage component in the synchronously rotating dq coordinate system (V), e q is the grid q-axis voltage component (V) in the synchronously rotating dq coordinate system, i d is the inverter d-axis output current component (A) in the synchronously rotating dq coordinate system, i q is the inverter q-axis output current component (A) in the synchronously rotating dq coordinate system, and E is the grid voltage amplitude (such as 220V, 230V, etc., depending on the grid standard).

[0115] Based on the grid voltage orientation q =0, then the instantaneous active power p and reactive power q of the system are:

[0116]

[0117] Then, the instantaneous active power p and reactive power q of the grid-connected inverter are related to the d-axis and q-axis components i of the output current of the grid-connected inverter. d 、i q This verifies the rationality of S2 decoupling and shows that i can be controlled independently in the dq coordinate system of grid voltage orientation. d and i q To accurately adjust the active and reactive power. It also provides optimization targets for S3 (PID parameter optimization) to ensure that the PID controller can accurately adjust the i d and i q , to achieve inverter power control.

[0118] like Figure 4 As shown in the figure, the photovoltaic grid-connected control system consists of a DC voltage outer loop and active and reactive current inner loops. The function of the DC voltage outer loop is to stabilize or adjust the DC voltage, introduce DC voltage feedback and achieve zero-static-error control of the DC voltage through a PID controller.

[0119] The current inner loop and voltage outer loop both use classic PID controllers, and their output expressions are:

[0120]

[0121] 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; K i is the integral time constant, which is used to control the response speed of the integral term; K d is the differential time constant, which is used to control the response speed of the differential term; e(t) represents the error signal.

[0122] 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.

[0123] like Figure 2 As shown, the steps of the chaotic sparrow search algorithm are as follows:

[0124] S31, Initialization: Randomly initialize the position of each sparrow in the population and speed Among them, i represents the i-th sparrow; the position of each sparrow is X i Represents a combination of PID controller parameters:

[0125] X i =[K ip_i ,K ii_i ,K id_i ,K up_i ,K ui_i ,Kud_Ai ]

[0126] In the formula, 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 differential time constant of the voltage loop, and the subscript i represents the i-th sparrow.

[0127] S32, update speed: For each sparrow i, update speed:

[0128]

[0129] 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, R 1 and R 2 is a random number in the range [0, 1].

[0130] S33, introduce chaos mapping to increase the randomness of speed update, and obtain the speed update value after introducing chaos mapping

[0131]

[0132] Where χ is the control parameter of the chaotic mapping, Indicates the absolute value of speed.

[0133] S34, update the sparrow position according to the speed update value after introducing the chaotic map:

[0134]

[0135] in, is the position of the i-th sparrow in the t+1th generation.

[0136] S35, fitness evaluation: calculate the fitness value of each sparrow, that is, the objective function f(X i ) value. In this embodiment, multiple step instructions with amplitudes between 0 and 1 are randomly generated, and the integral of the error between the response of the measurement system and the reference value and time is used as the objective function:

[0137]

[0138] Among them, u *(t) is the reference signal, active power command or reactive power command is taken, and u(t) is the actual response of the control system.

[0139] S36, select the best sparrow: select the sparrow with the highest fitness from the population, that is, the sparrow with the smallest objective function value, and update the global best position:

[0140]

[0141] S37, determine the termination condition: when the number of algorithm iterations reaches the maximum value, end the iteration and output the globally optimal PID controller parameter combination; otherwise, return to step S32 for the next iteration.

[0142] 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;

[0143] PID controller parameter search range:

[0144] Current loop proportional parameter K ip : [0.01,5];

[0145] Current loop integral parameter K ii : [10,500];

[0146] Current loop differential parameter K id : [0.001,1];

[0147] Voltage loop ratio parameter K up : [0.001,0.02];

[0148] Voltage loop integral parameter K ui : [1,50];

[0149] Voltage loop differential parameter K ud : [0.0001,0.01];

[0150] Simulation conditions: The simulation time for all conditions is 10s.

[0151] (1) Reactive power tracking simulation: Set the reactive power command to a step signal of 50 kVar.

[0152] (2) Active power tracking simulation: Set the active power command to a 60kW step signal.

[0153] (3) DC bus voltage tracking simulation: Set the DC voltage command to a 1200V step signal.

[0154] 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.

[0155] The preferred specific embodiments of the present invention are described in detail above. It should be understood that a person skilled in the art can make many modifications and changes based on the concept of the present invention without creative work. Therefore, any technical solution that can be obtained by a person skilled in the art through logical analysis, reasoning, or limited experiments based on the concept of the present invention on the basis of the prior art should be within the scope of protection determined by the claims.

Claims

1. A method for optimizing PID parameters of photovoltaic grid-connected system based on chaotic sparrow search algorithm, characterized in that: The following steps are involved: 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 in turn, and obtain the mathematical model of the photovoltaic grid-connected control system in the dq coordinate system; S2, system decoupling: adopt the method of feedforward voltage compensation to realize the decoupling between the d-axis and the q-axis of the photovoltaic grid-connected control system, and adopt a double closed-loop control structure of outer loop voltage and inner loop current, in which both the inner loop current and the outer loop voltage adopt PID controller; 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.

2. The method for optimizing PID parameters of a photovoltaic grid-connected system based on a chaotic sparrow search algorithm according to claim 1, characterized in that: The step S1 comprises the following steps: S11, in the abc three-phase stationary coordinate system, the voltage equation of the grid-connected inverter is expressed as: Where U abc is the inverter output voltage vector in the three-phase stationary coordinate system, E abc is the grid voltage vector in the three-phase stationary coordinate system, I abc is the inverter output current vector in the three-phase stationary coordinate system, R is the inverter output filter resistance, and L is the inverter output filter inductance; S12, convert the mathematical model in the three-phase static abc coordinate system into a model in the two-phase vertical static αβ coordinate system: Where U βα =(u β ,u α ) T , represents the inverter output voltage vector in the two-phase stationary αβ coordinate system, I βα =(i β ,i α ) T , represents the inverter output current vector in the two-phase stationary αβ coordinate system, E βα =(e β ,e α ) T , represents the grid voltage vector in the two-phase stationary αβ coordinate system; Substitute the above conversion formula into the voltage equation of the grid-connected inverter and simplify it to obtain the voltage equation in the two-phase stationary αβ coordinate system: S13, transform the mathematical model in the two-phase stationary αβ coordinate system into the mathematical model in the synchronous rotating dq coordinate system: In addition, when taking the derivative of the current vector, the influence of the rotating coordinate system is considered: Substituting the above formula into the voltage equation in the αβ coordinate system, we can obtain the voltage equation of the grid-connected inverter in the dq coordinate system: Expanding the above equation, we get the time domain equation in the dq coordinate system: Where θ is the dq axis angle of the synchronous rotating coordinate system, ω0 is the synchronous rotating angular frequency, and ω0 = dθ / dt, U qd is the inverter output voltage vector under the dq axis of the synchronous rotating coordinate system, E qd is the grid voltage vector in the synchronously rotating dq coordinate system, I qd is the inverter output current vector under the dq axis of the synchronous rotating coordinate system; S14, assuming that the initial condition is zero, perform Laplace transform on the time domain equation in the dq coordinate system to obtain the mathematical model of the frequency domain of the grid-connected inverter in the synchronous rotating dq coordinate system: Where s is the Laplace transform operator, s = jw, E q 、E d is the grid voltage component in the synchronously rotating dq coordinate system, U q , U d is the inverter output voltage component in the synchronously rotating dq coordinate system, I q ,I d is the inverter output current component in the synchronously rotating dq coordinate system.

3. The method for optimizing PID parameters of a photovoltaic grid-connected system based on a chaotic sparrow search algorithm according to claim 2 is characterized in that: The system decoupling is specifically as follows: adopting a feedforward decoupling strategy, introducing feedforward quantities +Lω0I into the output AC voltage of the grid-connected inverter d (s) and -Lω0I d (s), realizing the decoupling of the system between the d-axis and the q-axis, thereby achieving independent control of active and reactive power.

4. The method for optimizing PID parameters of a photovoltaic grid-connected system based on a chaotic sparrow search algorithm according to claim 1, characterized in that: In the synchronous rotating coordinate system oriented by the grid voltage, we have e d =E; Then the instantaneous active power p and reactive power q of the system are calculated by the following formulas: In the formula, e d is the d-axis voltage component of the power grid in the synchronously rotating dq coordinate system, e q is the q-axis voltage component of the power grid in the synchronously rotating dq coordinate system, i d is the inverter d-axis output current component in the synchronously rotating dq coordinate system, i q is the inverter q-axis output current component in the synchronously rotating dq coordinate system, and E is the grid voltage amplitude; Based on the grid voltage orientation q =0, then the instantaneous active power p and reactive power q of the system are: Then, the instantaneous active power p and reactive power q of the grid-connected inverter are related to the d-axis and q-axis components i of the output current of the grid-connected inverter. d 、i q The optimization target of the PID controller is set according to the proportional relationship, and i is adjusted respectively. d and i q Realize inverter power control.

5. The method for optimizing PID parameters of a photovoltaic grid-connected system based on a chaotic sparrow search algorithm according to claim 1, characterized in that: The photovoltaic grid-connected 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 adjust the DC voltage, introduce DC voltage feedback, and achieve zero-static-error control of the DC voltage through a PID controller.

6. The method for optimizing PID parameters of a photovoltaic grid-connected system based on a chaotic sparrow search algorithm according to claim 1, characterized in that: The current inner loop and voltage outer loop both use classic PID controllers, and their output expressions are: 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; K i is the integral time constant, which is used to control the response speed of the integral term; K d is the differential time constant, which is used to control the response speed of the differential term; e(t) represents the error signal.

7. The method for optimizing PID parameters of a photovoltaic grid-connected system based on a chaotic sparrow search algorithm according to claim 1, characterized in that: The steps of the chaotic sparrow search algorithm are as follows: S31, Initialization: Randomly initialize the position of each sparrow in the population and speed Among them, i represents the i-th sparrow; S32, update speed: For each sparrow i, update speed: 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, R1 and R2 are random numbers in the range [0, 1]; S33, introduce chaos mapping to increase the randomness of speed update, and obtain the speed update value after introducing chaos mapping S34, update the sparrow position according to the speed update value after introducing the chaotic map: in, is the position of the i-th sparrow in the t+1 generation; S35, fitness evaluation: calculate the fitness value of each sparrow, that is, the objective function f(X i ) value; S36, select the best sparrow: select the sparrow with the highest fitness from the population, that is, the sparrow with the smallest objective function value, and update the global best position: S37, determine the termination condition: when the number of algorithm iterations reaches the maximum value, end the iteration and output the globally optimal PID controller parameter combination; otherwise, return to step S32 for the next iteration.

8. The method for optimizing PID parameters of a photovoltaic grid-connected system based on a chaotic sparrow search algorithm according to claim 7, characterized in that: In step S3, the position x of each sparrow i Represents a set of PID controller parameter combinations: X i =[K ip_i ,K ii_i ,K id_u ,K up_u ,K ui_i ,K ud_i ] In the formula, 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 differential time constant of the voltage loop, and the subscript i represents the i-th sparrow.

9. The method for optimizing PID parameters of a photovoltaic grid-connected system based on a chaotic sparrow search algorithm according to claim 7, characterized in that: The method of introducing chaotic mapping to increase the randomness of speed update is: Where χ is the control parameter of the chaotic mapping, Indicates the absolute value of speed.

10. The method for optimizing PID parameters of a photovoltaic grid-connected system based on a chaotic sparrow search algorithm according to claim 7, characterized in that: In step S35, multiple step instructions with amplitudes between 0 and 1 are randomly generated, and the integral of the error between the response of the measurement system and the reference value and time is used as the objective function: Among them, u * (t) is the reference signal, active power command or reactive power command is taken, and u(t) is the actual response of the control system.