PI controller parameter optimization method based on multi-agent joint optimization
By adopting the PI controller parameter optimization method with multiple agents combined optimization in the power quality controller, the problem of local optimization or algorithm complexity in the PI controller parameter optimization in the prior art is solved, and dynamic online optimization and effective compensation of the DC bus voltage are realized.
Patent Information
- Application Number
- CN202411674651.9
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-21
- Publication Date
- 2025-03-28
AI Technical Summary
The existing power quality controller based on PI feedback controllers has problems such as local optimization search or algorithms that cannot converge in terms of DC bus voltage regulation and parameter optimization.
The PI controller parameter optimization method based on multi-agent joint optimization is adopted to apply the intelligence of the agent to the group search of particle swarms, and the PI controller parameter objective function is jointly searched through the lattice environment of the multi-agent Agent system to achieve dynamic online optimization.
It improves the dynamic online optimization capability of PI controller parameters, enhances the information diversity and transferability of the particle swarm algorithm, solves the problems of large fluctuations and many disturbances in DC voltage parameters, and ensures effective compensation of voltage energy when the DC bus is connected to the grid and isolate.
Smart Images

Figure CN119726984A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the technical field related to microgrids, and in particular to a PI controller parameter optimization method based on multi-agent joint optimization. Background Art
[0002] As the proportion of microgrids in distribution networks continues to increase, the power generated by microgrids is volatile, which causes fluctuations in grid voltage. A large number of power electronic equipment connected to distribution networks also generates a large number of harmonics. Therefore, the power quality of distribution networks containing microgrids has received increasing attention. As an effective power quality management device, the unified power quality controller UPQC has pointed out the research direction for the comprehensive management of power quality in distribution networks. Since UPQC is a comprehensive power quality control equipment, it uses a series-parallel filter method to achieve comprehensive management of electric energy. The series-parallel filters (SAPF and PAPF) complete the bidirectional conversion of electric energy by sharing the DC bus. However, the energy coupling between the DC bus reduces the stability of the DC bus voltage control, directly affects the energy exchange between the two, and affects the compensation performance of UPQC. Therefore, it is of great significance to achieve a stable control strategy for the DC side voltage.
[0003] In recent years, although many research results have been achieved in the study of UPQC DC side voltage control, the PI feedback control technology is still the main control strategy. However, most of the current methods based on PI feedback controller parameter optimization still have many problems, especially the PI controller parameters in the target optimal function optimization algorithm have local optimization or the algorithm is too complex to converge. Summary of the invention
[0004] The present invention aims to overcome the above-mentioned deficiencies in the prior art and provides a PI controller parameter optimization method based on multi-agent joint optimization, which can enable the controller parameters to be dynamically optimized online.
[0005] In order to achieve the above object, the present invention adopts the following technical solutions:
[0006] A PI controller parameter optimization method based on multi-agent joint optimization specifically includes the following steps:
[0007] (1) In the existing UPQC topology, the DC bus integrated photovoltaic power generation is used to control the DC bus voltage stability, thereby constructing a new UPQC topology. The new UPQC topology adds photovoltaic modules PV1 and PV2. The photovoltaic module PV1 is connected in parallel to the load side of the distribution network to provide power for the AC load. The photovoltaic module PV2 is connected to the DC bus side through a boost module to directly charge the DC bus capacitor and provide the power required for voltage compensation for the SAPF. When the distribution network is powered off, the AC load is powered through the PAPF.
[0008] (2) To achieve DC bus voltage regulation control, the key is to optimize and compensate the PI controller. The basic principle is: the parallel filter PAPF uses the PI controller feedback optimization method to detect the instantaneous voltage drop of the DC bus, and proposes a PI controller parameter optimization method based on multi-agent joint optimization. The intelligence of the agent is applied to the group search of the particle swarm, and the PI controller parameter objective function is jointly optimized to achieve dynamic online optimization of the PI controller parameters.
[0009] In view of the problems existing in the structure of the current power quality controller and the PI feedback optimization problem of DC bus voltage stabilization, the present invention proposes a power quality controller structure for photovoltaic power generation compensating the DC bus to ensure effective compensation of the DC bus voltage energy when the DC bus is grid-connected or islanded; at the same time, in view of the problem that the DC side photovoltaic power generation itself is prone to cause bus voltage instability, a PI controller parameter optimization method based on multi-agent is further proposed, the intelligence of the agent is applied to the group search of the particle swarm, the diversity and transferability of the internal information of the particle swarm algorithm are enhanced, and the PI controller parameter objective function is jointly optimized at the same time, the optimization speed of the particle swarm is improved, so that the controller parameters can be dynamically optimized online, and the defects of large fluctuations and more disturbances in the new topology structure are solved.
[0010] Preferably, the specific framework structure of the photovoltaic module PV2 connected to the DC bus side through the boost module is as follows: photovoltaic module PV2, boost module, voltage and current acquisition module, drive module, DSP processor, battery and DC bus capacitor, the DSP processor is used as the main control system, the drive module adopts an IGBT module, wherein the photovoltaic module PV2, boost module, battery and DC bus capacitor are connected in sequence, the voltage and current acquisition module is connected to the input and output ends of the boost module to collect voltage and current and send them to the DSP processor, the DSP processor controls the drive module according to the collected voltage and current to feedback adjust the boost module.
[0011] As a preferred embodiment, the boost module adopts a Boost circuit, and the Boost circuit input voltage U pv With output voltage U o The relationship is as follows (1):
[0012] U pv ·D·T+(U pv -U 0 )·(1-D·T)=0 (1)
[0013] In the formula, the Boost circuit contains a switch tube, T is the switching period of the switch tube, and D is the duty cycle. The duty cycle is the ratio of the switch tube conduction time to the working period, and the value is between (0, 1). It can be sorted out as follows:
[0014]
[0015] To realize impedance transformation for Boost circuit, we can get the relationship between input and output voltage: U o =U L (1-D), according to the theory that the power before and after the transformation is equal, we have I o =I L / (1-D), where U L is the equivalent voltage, I L is the equivalent current, and the equivalent resistance R is connected in series eq As shown in formula (2):
[0016]
[0017] In the formula, I 0 is the output current, R L is the parallel equivalent resistance;
[0018] From formula (2), we can see that when the duty cycle D is adjusted, the Boost circuit is connected in series with an equivalent resistance R eq The internal resistance R of the photovoltaic panel of the photovoltaic module PV2 pv When the impedances match, the maximum output power of the photovoltaic cell is as shown in formula (3):
[0019]
[0020] Preferably, in step (2), the parallel filter PAPF adopts a PI controller feedback optimization method for detecting the instantaneous voltage drop of the DC bus, specifically, the voltage compensation instruction based on the instantaneous reactive power dq0 method is obtained, and the basic principle is as follows:
[0021] Assume that the three-phase voltage expression in the distribution network system is as shown in formula (4):
[0022]
[0023] In the formula, u a ,u b ,u c is the three-phase voltage of the distribution network, is the three-phase positive sequence component, as shown in formula (5):
[0024]
[0025] is the three-phase negative sequence component, as shown in formula (6):
[0026]
[0027] u 0 is the zero-sequence component, as shown in equation (7):
[0028]
[0029] is the positive sequence component of the nth harmonic, as shown in formula (8):
[0030]
[0031] is the negative sequence component of the nth harmonic, as shown in formula (9):
[0032]
[0033] is the negative sequence component of the nth harmonic, as shown in formula (10):
[0034]
[0035] Among them, formula (4) to formula (10) are all waveform expressions of three-phase voltage, t is time, w is angular frequency, ψ is positive phase, ψ is negative phase, U + is the voltage peak value, U - is the negative peak value of voltage;
[0036] Three-phase voltage u dq0 and u abc The transformation relationship between them is obtained by the following formula (11):
[0037]
[0038] Where: C refers to the three-phase coordinate transformation formula of dq0 to abc, as follows
[0039]
[0040]
[0041] In the formula, The vector representing the positive sequence component Park
[0042] A vector representing the negative sequence component park
[0043] u 00 The vector representing the zero-sequence component
[0044] Filter out the high-order harmonics from equation (11) with a low-pass filter, and get the DC component expression (12):
[0045]
[0046] Performing dq0 inverse transformation on equation (12), we can obtain the fundamental voltage positive sequence component: As shown in formula (13):
[0047]
[0048] Then the instantaneous drop voltage of the DC bus of the parallel filter is as shown in formula (14):
[0049]
[0050] Among them, u ac Refers to the instantaneous drop voltage of phase a, u bc Refers to the instantaneous drop voltage of phase b, u cc Refers to the instantaneous drop voltage of phase c; the mathematical model of the PI controller is (15):
[0051]
[0052] K p is the proportionality coefficient, is the integral time constant. In the actual digital control field, digital PI control is used, and the integral is replaced by the summation form, and the differential is replaced by the increment form. The approximate transformation is as follows:
[0053]
[0054] In the formula, e j is the initial deviation value, j = 0, 1, 2, ... k, L is the maximum sampling sequence; T s is the sampling period, k is the sampling sequence, and the discrete PI control expression similar to e(kT) is simplified as shown in formula (17):
[0055]
[0056] In the above formula, u(k) is the output value at the kth sampling time, e(k) is the deviation value input at the kth sampling time, K I is the integration coefficient, u 0 The original initial value for starting the PI controller;
[0057] From the above analysis, we can see that if the control parameter K of the PI controller p Improper settings will directly affect the voltage drop detection effect of the parallel filter.
[0058] Preferably, in step (2), a PI controller parameter optimization method based on multi-agent joint optimization is used to jointly optimize the PI controller parameter objective function, specifically: assuming that the photovoltaic module PV2 collects the DC voltage from the DC bus and enters the DSP processor through AD conversion; setting the DC reference voltage u dcref , enter the PI control link of the algorithm, and the specific steps for optimizing the PI controller parameters are as follows:
[0059] (21): Construct a multi-agent agent system grid environment: each particle agent has a specified physical address, each agent contains two attributes: speed and position, and each agent is equipped with 8 surrounding neighbor particles, which together form a local environment capable of interactive communication; in this multi-agent environment, perform initialization settings: the number of particle groups and the maximum allowed number of iterations, and initialize the position and speed of the particles in the solution space;
[0060] (22) Calculate the fitness value of each particle: Take the objective function as follows (18):
[0061]
[0062] Where, e(t) is the absolute value of the position coordinate of the t-th particle, u(t) is the velocity of the t-th particle; w 1 、w 2 、w 3 、w 4 are weights, and w 4 >>w 1 , ey(t)=y(t)-y(t-1), y(t) is the output of the controlled object, t u For the rise time, the initial value range of the PI control parameters is set first, and then a set of optimal PI control parameters (K dcP , K dcI ), where K dcP is the proportional constant of the DC bus voltage PI regulator, K dcI The integral constant of the DC bus voltage PI regulator; ensures that the objective function value of the system response is minimized, so that the output response performance is the best;
[0063] (23) Each agent competes and cooperates with its eight neighbors and updates its adaptability values. According to the action strategy formula (19):
[0064] f(α)≤f(β)(19)
[0065] α′ k =β k +rand((-1,1)(β k -α k )k=1,2,…,n(20)
[0066] Where f(α) represents the fitness of α particles, and f(β) represents the fitness of β particles; k represents the position coordinates of the α particle, α' k is the updated coordinate, β k represents the position coordinates of the β particle, n represents the total number of particles; rand(-1, 1) is a random number in the interval (-1, 1); if f(α)≤f(β), it is a high-quality particle, otherwise it is a low-quality particle; if Agentα is a high-quality particle, its position in the solution space remains unchanged, otherwise the position of Agentα in the solution space will be adjusted according to formula (20);
[0067] (24) Update the position and velocity of each agent particle in the solution space. The iterative formula is as follows (21):
[0068] v iD =wv iD +c 1 r 1 (p iD -x iD )+c 2 r 2 (p gD -x iD )
[0069] x iD =x iD +v iD
[0070] Among them, v iD is the particle velocity increment, x iD is the particle velocity, p iD is the horizontal position coordinate, p gD is the longitudinal position coordinate; ω is the inertia weight, c 1 and c 2 is the learning factor, r 1 and r 2 is a random number in the range of (0, 1);
[0071] (25) Calculate the fitness value of each particle, select the 20% particles with the best performance, use the CLS algorithm to search, and update the individual extreme value of each particle and the total extreme value of the group at the same time;
[0072] (26) If the algorithm meets the optimization end condition, the search ends and the optimal solution is output; otherwise, go to step (27);
[0073] (27) The search area is reduced according to the following formula:
[0074]
[0075] In the formula, x mini is the minimum value of the current individual i-dimensional variable, x maxi is the maximum value of the i-dimensional variable of the current individual value; 0 <r<1,x gi is the i-th dimension variable value of the current individual extreme value;
[0076] (28) Randomly generate the remaining 80% of the particles in the population in the shrunk space and go back to step (22);
[0077] According to the above algorithm, the PI controller parameters are optimized online to generate the PI control loop current I dR Signal, the phase information is obtained by the collected load voltage Lae through the phase-locked loop, and then the PI control loop reference current I is obtained ref The signal passes through the current inner loop PI controller, IGBT driver and LC filter module in sequence to realize the power generation control of the photovoltaic module PV2.
[0078] The beneficial effects of the present invention are: ensuring effective compensation of DC bus voltage energy when the DC bus is grid-connected or islanded; applying the intelligence of the intelligent agent to the group search of the particle swarm, enhancing the diversity and transferability of the internal information of the particle swarm algorithm, and simultaneously performing joint optimization on the PI controller parameter objective function to improve the optimization speed of the particle swarm, so that the controller parameters can be dynamically optimized online, solving the defects of large fluctuations and more disturbances in the new topology structure. BRIEF DESCRIPTION OF THE DRAWINGS
[0079] Figure 1 is a topological diagram of the UPQC of the present invention;
[0080] Figure 2 It is the photovoltaic power generation control block diagram of UPQC DC bus voltage;
[0081] Figure 3 This is the schematic diagram of the Boost circuit;
[0082] Figure 4 It is the equivalent diagram of the Boost circuit after impedance transformation;
[0083] Figure 5 This is the basic principle diagram of voltage compensation command acquisition based on instantaneous reactive power dq0 method;
[0084] Figure 6It is a schematic diagram of the grid environment of a multi-agent agent system. DETAILED DESCRIPTION
[0085] The present invention is further described below in conjunction with the accompanying drawings and specific embodiments.
[0086] A PI controller parameter optimization method based on multi-agent joint optimization specifically includes the following steps:
[0087] (1) In the existing UPQC topology, the DC bus integrated photovoltaic power generation is used to control the DC bus voltage stability, thereby constructing a new UPQC topology to realize the multiple functions of UPQC to provide DC side and important AC load power, such as Figure 1 As shown in the figure, the new UPQC topology structure adds photovoltaic modules PV1 and PV2. The photovoltaic module PV1 is connected in parallel to the load side of the distribution network to provide power for the AC load; the photovoltaic module PV2 is connected to the DC bus side through the boost module to directly charge the DC bus capacitor and provide the power required for voltage compensation for the SAPF. When the distribution network is powered off, the AC load can be powered through the PAPF. Therefore, this topology structure improves the versatility of UPQC. The entire topology Figure 1 In fact, it is an AC-DC conversion and inversion process. In the two conversion processes, a series filter SAPF and a parallel filter PAPF are added respectively, and a photovoltaic module PV2 is added to the DC bus and a Boost boost module is added to adjust the DC bus. In addition, a photovoltaic module PV1 is connected to the load side.
[0088] like Figure 2 As shown in the figure, the specific framework structure of the photovoltaic module PV2 connected to the DC bus side through the boost module is as follows: photovoltaic module PV2, boost module, voltage and current acquisition module, drive module, DSP processor, battery and DC bus capacitor. The DSP processor is used as the main control system, and the drive module uses an IGBT module. The photovoltaic module PV2, boost module, battery and DC bus capacitor are connected in sequence. The voltage and current acquisition module is connected to the input and output ends of the boost module to collect voltage and current and send them to the DSP processor. The DSP processor controls the drive module to feedback and adjust the boost module according to the collected voltage and current. Among them, the DSP minimum system is the DSP processor, which is actually a single-chip microcomputer used to adjust the Boost boost module. The DSP minimum system is also connected to the power circuit and peripheral circuit.
[0089] The boost module uses a Boost circuit, and its schematic diagram is as follows Figure 3 shown. Figure 3In the figure, VT is a switch tube, which is controlled by the driving module. When it is turned on, the current of the photovoltaic module PV2 flows back through the switch tube and cannot flow to RL, and the Boost module stops working; when it is turned off, the Boost module works. VD is a diode, which plays a reverse cutoff role. L is an inductor, which plays a role in the dead time generated when the switch tube is turned on and off, and can play a role in continuous current. Figure 3 The Boost circuit input voltage U can be obtained pv With output voltage U o The relationship is as follows (1):
[0090] U pv ·D·T+(U pv -U 0 )·(1-D·T)=0 (1)
[0091] In the formula, the Boost circuit contains a switch tube, T is the switching period of the switch tube, and D is the duty cycle. The duty cycle is the ratio of the switch tube conduction time to the working period, and the value is between (0, 1). It can be sorted out as follows:
[0092]
[0093] To achieve impedance transformation for Boost circuit, Figure 4 As shown. The equivalent of the boost circuit after impedance transformation Figure 4 In the figure, the upper figure is the equivalent circuit after the impedance of the circuit diagram is combined, and the lower figure is the circuit diagram in the initial state.
[0094] From the relationship between input and output voltage, we can get: U o =U L (1-D), according to the theory that the power before and after the transformation is equal, we have I o =I L / (1-D), where U L is the equivalent voltage, I L is the equivalent current, and the equivalent resistance R is connected in series eq As shown in formula (2):
[0095]
[0096] In the formula, I 0 is the output current, R L is the parallel equivalent resistance;
[0097] Note: In Thevenin's theorem, any two-terminal network containing a source circuit can be equivalent to a voltage source in series with a resistor, that is, a real voltage source. L is the voltage of the equivalent voltage source, I L is the current of the equivalent current source, R eq is the equivalent series resistance, RL is the parallel equivalent resistance, the equivalent voltage source U L With the series equivalent resistance R eq Correspondingly, the equivalent current source I L With the parallel equivalent resistance R L correspond.
[0098] From formula (2), we can see that when the duty cycle D is adjusted, the Boost circuit equivalent input impedance R eq The internal resistance R of the photovoltaic panel of the photovoltaic module PV2 pv When the impedances match, the maximum output power of the photovoltaic cell is as shown in formula (3):
[0099]
[0100] The core of the topological structure of this scheme is: a photovoltaic power generation unit (photovoltaic module PV2) with a Boost boost module is connected in parallel to the DC bus, and the output end of the Boost boost module is connected in parallel to the DC bus, controlled by the drive module, and the drive module is controlled by the DSP minimum system (DSP processor). The DSP minimum system is connected to a voltage and current acquisition module, which simultaneously acquires the voltage and current of the photovoltaic power generation unit and the DC bus, and compares the voltage and current at both ends in real time. When the voltage of the DC bus drops and flickers, the DSP minimum system can compare the imbalance between the photovoltaic power generation unit and the DC bus voltage, and then control the switch tube of the Boost boost module to cut off, so that the circuit of the Boost boost module is turned on, and the voltage of the photovoltaic power generation unit can compensate the DC bus, and at the same time compensate the DC bus capacitor, and the DC bus capacitor can play the role of peak elimination and valley filling. When the DSP minimum system collects and compares the voltage of the photovoltaic power generation unit and the DC bus to reach a balance, the switch tube of the Boost boost module is controlled to be turned on, and the circuit of the Boost boost module is short-circuited, and the Boost boost module does not work.
[0101] (2) To achieve DC bus voltage regulation control, the key is to optimize and compensate the PI controller. The basic principle is: the parallel filter PAPF uses the PI controller feedback optimization method to detect the instantaneous voltage drop of the DC bus, and proposes a PI controller parameter optimization method based on multi-agent joint optimization. The intelligence of the agent is applied to the group search of the particle swarm, and the PI controller parameter objective function is jointly optimized to achieve dynamic online optimization of the PI controller parameters.
[0102] The parallel filter PAPF uses the PI controller feedback optimization method to detect the instantaneous voltage drop of the DC bus, specifically, it obtains the voltage compensation instruction based on the instantaneous reactive power dq0 method, such as Figure 5 As shown, the basic principles are as follows:
[0103] Figure 5 In the formula (4), LPF (Low pass filter) is a low pass filter. Assume that the three-phase voltage expression in the distribution network system is as shown in formula (4):
[0104]
[0105] In the formula, u a ,u b ,u c is the three-phase voltage of the distribution network, is the three-phase positive sequence component, as shown in formula (5):
[0106]
[0107] is the three-phase negative sequence component, as shown in formula (6):
[0108]
[0109] u 0 is the zero-sequence component, as shown in equation (7):
[0110]
[0111] is the positive sequence component of the nth harmonic, as shown in formula (8):
[0112]
[0113] is the negative sequence component of the nth harmonic, as shown in formula (9):
[0114]
[0115] is the negative sequence component of the nth harmonic, as shown in formula (10):
[0116]
[0117] Among them, formula (4) to formula (10) are all waveform expressions of three-phase voltage, t is time, w is angular frequency, ψ is positive phase, ψ is negative phase, U + is the voltage peak value, U - is the negative peak value of voltage;
[0118] Three-phase voltage u dq0 and u abc The transformation relationship between them is obtained by the following formula (11):
[0119]
[0120] Where: C refers to the three-phase coordinate transformation formula of dq0 to abc, as follows
[0121]
[0122] In the formula, The vector representing the positive sequence component Park
[0123] A vector representing the negative sequence component park
[0124] u 00 The vector representing the zero-sequence component
[0125] Filter out the high-order harmonics from equation (11) with a low-pass filter, and get the DC component expression (12):
[0126]
[0127] Performing dq0 inverse transformation on equation (12), we can obtain the fundamental voltage positive sequence component: As shown in formula (13):
[0128]
[0129] Then the instantaneous drop voltage of the DC bus of the parallel filter is as shown in formula (14):
[0130]
[0131] Among them, u ac Refers to the instantaneous drop voltage of phase a, u bc Refers to the instantaneous drop voltage of phase b, u cc Refers to the instantaneous drop voltage of phase c; the mathematical model of the PI controller is (15):
[0132]
[0133] K p is the proportionality coefficient, is the integral time constant. In the actual digital control field, digital PI control is used, and the integral is replaced by the summation form, and the differential is replaced by the increment form. The approximate transformation is as follows:
[0134]
[0135] In the formula, e j is the initial deviation value, j = 0, 1, 2, ... k, L is the maximum sampling sequence; T s is the sampling period, k is the sampling sequence, and the discrete PI control expression similar to e(kT) is simplified as shown in formula (17):
[0136]
[0137] In the above formula, u(k) is the output value at the kth sampling time, e(k) is the deviation value input at the kth sampling time, K I is the integration coefficient, u 0 The original initial value for starting the PI controller;
[0138] From the above analysis, it can be seen that the use of Figure 5 The PI control shown can effectively detect and compensate voltage, but if the control parameter K of the PI controller is p Improper settings will directly affect the voltage drop detection effect of the parallel filter. At present, the optimization of the control parameters of the PI controller is mainly carried out by empirical trial and error, but it is easy to fall into the local optimum, and when the fixed setting parameters are controlled by the external environment changes, its dynamic response performance and adaptability will be reduced, and it cannot meet the high-performance and high-precision voltage detection requirements. If the traditional immune transmission algorithm is adopted, although it can solve the problem that the fixed parameters cannot adapt to environmental changes, it is easy to have blindness and randomness. Therefore, the present invention proposes a PI controller parameter optimization method based on multi-agent joint optimization, and the PI controller parameter objective function is jointly optimized to solve the problems currently existing based on the immune or wonton algorithm.
[0139] Based on the PI controller parameter optimization method of multi-agent joint optimization, the PI controller parameter objective function is jointly optimized. Specifically: Figure 1 and Figure 2 , assuming that the photovoltaic module PV2 collects the DC voltage from the DC bus and enters the DSP processor through AD conversion; set the DC reference voltage u dcref =600V, enter the PI control link of the algorithm, and the specific steps for optimizing the PI controller parameters are as follows:
[0140] (21): Construction as Figure 6 The multi-agent agent system grid environment shown
[0141] In Figure (6), each Agent has a specified physical address. Different circles represent different Agents. N Agents represent the particle swarm population size N. The coordinates (x, y) inside the circle represent the physical address of the corresponding Agent in the global environment. The coordinates correspond to the Agent. Each Agent contains two attributes: speed and position. size is a positive integer, L size *L size is the total number of grids in the global environment, L size The relationship between the population size N satisfies N = L size *L sizeEach agent is equipped with 8 neighboring particles, which together form a local environment capable of interactive communication. In this multi-agent environment, the initialization settings are performed: the number of particle swarms is 100, the maximum number of allowed iterations is 100, and the position and velocity of the particles in the solution space are initialized.
[0142] (22) Calculate the fitness value of each particle: Take the objective function as follows (18):
[0143]
[0144] Where, e(t) is the absolute value of the position coordinate of the t-th particle, u(t) is the velocity of the t-th particle; w 1 、w 2 、w 3 、w 4 are weights, and w 4 >>w 1 , ey(t)=y(t)-y(t-1), y(t) is the output of the controlled object, t u For the rise time, the initial value range of the PI control parameters is set first, and then a set of optimal PI control parameters (K dcP , K dcI ), where K dcP is the proportional constant of the DC bus voltage PI regulator, K dcI The integral constant of the DC bus voltage PI regulator; ensures that the objective function value of the system response is minimized, so that the output response performance is the best;
[0145] (23) Each agent competes and cooperates with its eight neighbors and updates its adaptability values. According to the action strategy formula (19):
[0146] f(α)≤f(β)(19)
[0147] α k =β k +rand(-1,1)(β k -α k )k=1,2,…,n(20)
[0148] Where f(α) represents the fitness of α particles, and f(β) represents the fitness of β particles; k represents the position coordinates of the α particle, α' k is the updated coordinate, β krepresents the position coordinates of the β particle, n represents the total number of particles; rand(-1, 1) is a random number in the interval (-1, 1); if f(α)≤f(β), it is a high-quality particle, otherwise it is a low-quality particle; if Agentα is a high-quality particle, its position in the solution space remains unchanged, otherwise the position of Agentα in the solution space will be adjusted according to formula (20);
[0149] (24) Update the position and velocity of each agent particle in the solution space. The iterative formula is as follows (21):
[0150] v iD =wv iD +c 1 r 1 (p iD -x iD )+c 2 r 2 (p gD -x iD )
[0151] x iD =x iD +v iD
[0152] Among them, v iD is the particle velocity increment, x iD is the particle velocity, p iD is the horizontal position coordinate, p gD is the longitudinal position coordinate; ω is the inertia weight, c 1 and c 2 is the learning factor, r 1 and r 2 is a random number in the range of (0, 1); set the inertia weight ω = 0.63, the learning factor c = 1.28, r 1 =r 2 =0.54.
[0153] (25) Calculate the fitness value of each particle, select the 20% particles with the best performance, use the CLS algorithm to search, and update the individual extreme value of each particle and the total extreme value of the group at the same time;
[0154] (26) If the algorithm meets the optimization end condition, the search ends and the optimal solution is output; otherwise, go to step (27);
[0155] (27) The search area is reduced according to the following formula:
[0156]
[0157] In the formula, x mini is the minimum value of the current individual i-dimensional variable, x maxiis the maximum value of the i-dimensional variable of the current individual value; 0 <r<1,x gi is the i-th dimension variable value of the current individual extreme value;
[0158] (28) Randomly generate the remaining 80% of the particles in the population in the shrunk space and go back to step (22);
[0159] According to the above algorithm, the PI controller parameters are optimized online to generate the PI control loop current I dR Signal, the phase information is obtained by the collected load voltage Lae through the phase-locked loop, and then the PI control loop reference current I is obtained ref The signal passes through the current inner loop PI controller, IGBT driver and LC filter module in sequence to realize the power generation control of the photovoltaic module PV2.
[0160] In summary, the present invention aims at the problems existing in the structure of the current power quality controller and the PI feedback optimization problem of DC bus voltage stabilization, and proposes a power quality controller structure for photovoltaic power generation compensating the DC bus to ensure the effective compensation of the DC bus voltage energy when the DC bus is grid-connected and islanded; at the same time, in view of the problem that the DC side photovoltaic power generation itself is prone to cause bus voltage instability, a PI controller parameter optimization method based on multi-agent is further proposed, the intelligence of the agent is applied to the group search of the particle swarm, the diversity and transmission of the internal information of the particle swarm algorithm are enhanced, and the PI controller parameter objective function is jointly optimized at the same time, the optimization speed of the particle swarm is improved, so that the controller parameters can be dynamically optimized online, and the defects of large fluctuations and more disturbances in the new topology structure are solved.
Claims
1. A PI controller parameter optimization method based on multi-agent joint optimization, characterized in that: The specific steps include: (1) In the existing UPQC topology, the DC bus integrated photovoltaic power generation is used to control the DC bus voltage stability, thereby constructing a new UPQC topology. The new UPQC topology adds photovoltaic modules PV1 and PV2. The photovoltaic module PV1 is connected in parallel to the load side of the distribution network to provide power for the AC load. The photovoltaic module PV2 is connected to the DC bus side through a boost module to directly charge the DC bus capacitor and provide the power required for voltage compensation for the SAPF. When the distribution network is powered off, the AC load is powered through the PAPF. (2) To achieve DC bus voltage regulation control, the key is to optimize and compensate the PI controller. The basic principle is: the parallel filter PAPF uses the PI controller feedback optimization method to detect the instantaneous voltage drop of the DC bus, and proposes a PI controller parameter optimization method based on multi-agent joint optimization. The intelligence of the agent is applied to the group search of the particle swarm, and the PI controller parameter objective function is jointly optimized to achieve dynamic online optimization of the PI controller parameters.
2. The PI controller parameter optimization method based on multi-agent joint optimization according to claim 1 is characterized in that In step (1), the specific framework structure of the photovoltaic module PV2 connected to the DC bus side through the boost module is as follows: photovoltaic module PV2, boost module, voltage and current acquisition module, drive module, DSP processor, battery and DC bus capacitor, the DSP processor is used as the main control system, the drive module adopts an IGBT module, wherein the photovoltaic module PV2, boost module, battery and DC bus capacitor are connected in sequence, the voltage and current acquisition module is connected to the input and output ends of the boost module to collect voltage and current and send them to the DSP processor, and the DSP processor controls the drive module according to the collected voltage and current to feedback adjust the boost module.
3. The PI controller parameter optimization method based on multi-agent joint optimization according to claim 2 is characterized in that: The boost module uses a Boost circuit, and the Boost circuit input voltage U pv With output voltage U o The relationship is as follows (1): U pv ·D·T+(U pv -U0)·(1-D·T)=0 (1) In the formula, the Boost circuit contains a switch tube, T is the switching period of the switch tube, and D is the duty cycle. The duty cycle is the ratio of the switch tube conduction time to the working period, and the value is between (0, 1). It can be sorted out as follows: To realize impedance transformation for Boost circuit, we can get the relationship between input and output voltage: U o =U L (1-D), according to the theory that the power before and after the transformation is equal, we have I o =I L / (1-D), where U L is the equivalent voltage, I L is the equivalent current, and the equivalent resistance R is connected in series eq As shown in formula (2): Where I0 is the output current, R L is the parallel equivalent resistance; From formula (2), we can see that when the duty cycle D is adjusted, the Boost circuit is connected in series with an equivalent resistance R eq The internal resistance R of the photovoltaic panel of the photovoltaic module PV2 pv When the impedances match, the maximum output power of the photovoltaic cell is as shown in formula (3):
4. A PI controller parameter optimization method based on multi-agent joint optimization according to claim 1, 2 or 3, characterized in that: In step (2), the parallel filter PAPF uses a PI controller feedback optimization method to detect the instantaneous voltage drop of the DC bus, specifically, the voltage compensation instruction based on the instantaneous reactive power dq0 method is obtained. The basic principle is as follows: Assume that the three-phase voltage expression in the distribution network system is as shown in formula (4): In the formula, u a ,u b ,u c is the three-phase voltage of the distribution network, is the three-phase positive sequence component, as shown in formula (5): is the three-phase negative sequence component, as shown in formula (6): u0 is the zero-sequence component, as shown in equation (7): is the positive sequence component of the nth harmonic, as shown in formula (8): is the negative sequence component of the nth harmonic, as shown in formula (9): is the negative sequence component of the nth harmonic, as shown in formula (10): Among them, formula (4) to formula (10) are all waveform expressions of three-phase voltage, t is time, w is angular frequency, ψ is positive phase, ψ is negative phase, U + is the positive peak value of voltage, U- is the negative peak value of voltage; Three-phase voltage u dq0 and u abc The transformation relationship between them is obtained by the following formula (11): Where: C refers to the three-phase coordinate transformation formula of dq0 to abc, as follows In the formula, The vector representing the positive sequence component Park A vector representing the negative sequence component park u 00 The vector representing the zero-sequence component Filter out the high-order harmonics from equation (11) with a low-pass filter, and get the DC component expression (12): Performing dq0 inverse transformation on equation (12), we can obtain the fundamental voltage positive sequence component: As shown in formula (13): Then the instantaneous drop voltage of the DC bus of the parallel filter is as shown in formula (14): Among them, u ac Refers to the instantaneous drop voltage of phase a, u bc Refers to the instantaneous drop voltage of phase b, u cc Refers to the instantaneous drop voltage of phase c; the mathematical model of the PI controller is (15): K p is the proportionality coefficient, is the integral time constant. In the actual digital control field, digital PI control is used, and the integral is replaced by the summation form, and the differential is replaced by the increment form. The approximate transformation is as follows: In the formula, e j is the initial deviation value, j = 0, 1, 2, ... k, L is the maximum sampling sequence; T s is the sampling period, k is the sampling sequence, and the discrete PI control expression similar to e(kT) is simplified as shown in formula (17): In the above formula, u(k) is the output value at the kth sampling time, e(k) is the deviation value input at the kth sampling time, K I is the integration coefficient, u0 is the original initial value for starting the PI controller; From the above analysis, we can see that if the control parameter K of the PI controller p Improper settings will directly affect the voltage drop detection effect of the parallel filter.
5. The PI controller parameter optimization method based on multi-agent joint optimization according to claim 4 is characterized in that: In step (2), the PI controller parameter optimization method based on multi-agent joint optimization is used to jointly optimize the PI controller parameter objective function. Specifically, it is assumed that the photovoltaic module PV2 collects the DC voltage from the DC bus and enters the DSP processor through AD conversion; the DC reference voltage u is set dcref , enter the PI control link of the algorithm, and the specific steps for optimizing the PI controller parameters are as follows: (21): Construct a multi-agent agent system grid environment: each particle agent has a specified physical address, each agent contains two attributes: speed and position, and each agent is equipped with 8 surrounding neighbor particles, which together form a local environment capable of interactive communication; in this multi-agent environment, perform initialization settings: the number of particle groups and the maximum allowed number of iterations, and initialize the position and speed of the particles in the solution space; (22) Calculate the fitness value of each particle: Take the objective function as follows (18): Where, e(t) is the absolute value of the position coordinate of the tth particle, u(t) is the velocity of the tth particle; w1, w2, w3, w4 are all weights, and w4>>w1, ey(t)=y(t)-y(t-1), y(t) is the output of the controlled object, t u For the rise time, the initial value range of the PI control parameters is set first, and then a set of optimal PI control parameters (K dcP , K dcI ), where K dcP is the proportional constant of the DC bus voltage PI regulator, K dcI The integral constant of the DC bus voltage PI regulator; ensures that the objective function value of the system response is minimized, so that the output response performance is optimal; (23) Each agent competes and cooperates with its eight surrounding neighbors and updates each adaptability value; According to the action strategy formula as shown in formula (19): f(a)≤f(β) (19) a′ k =b k +rand(-1,1)(b k -a k )k=1,2,...,n (20) Where f(α) represents the fitness of α particles, and f(β) represents the fitness of β particles; k represents the position coordinates of the α particle, α' k is the updated coordinate, β k represents the position coordinates of the β particle, n represents the total number of particles; rand(-1, 1) is a random number in the interval (-1, 1); if f(α)≤f(β), it is a high-quality particle, otherwise it is a low-quality particle; if Agentα is a high-quality particle, its position in the solution space remains unchanged, otherwise the position of Agentα in the solution space will be adjusted according to formula (20); (24) Update the position and velocity of each agent particle in the solution space. The iterative formula is as follows (21): v iD =wv iD +c1r1(p iD -x iD )+c2r2(p gD -x iD ) x iD =x iD +v iD Among them, v iD is the particle velocity increment, x iD is the particle velocity, p iD is the horizontal position coordinate, p gD is the longitudinal position coordinate; ω is the inertia weight, c1 and c2 are learning factors, r1 and r2 are random numbers in the range of (0, 1); (25) Calculate the fitness value of each particle, select the 20% particles with the best performance, use the CLS algorithm to search, and update the individual extreme value of each particle and the total extreme value of the group at the same time; (26) If the algorithm meets the optimization end condition, the search ends and the optimal solution is output; otherwise, go to step (27); (27) The search area is reduced according to the following formula: In the formula, x mini is the minimum value of the current individual value i-dimensional variable, x maxi is the maximum value of the i-dimensional variable of the current individual value; 0 <r<1,x gi is the i-th dimension variable value of the current individual extreme value; (28) Randomly generate the remaining 80% of the particles in the population in the shrunk space and go back to step (22); According to the above algorithm, the PI controller parameters are optimized online to generate the PI control loop current I dR Signal, the phase information is obtained by the collected load voltage Lae through the phase-locked loop, and then the PI control loop reference current I is obtained ref The signal passes through the current inner loop PI controller, IGBT driver and LC filter module in sequence to realize the power generation control of the photovoltaic module PV2.