PSO-based SOGI module power grid phase design method and single-phase converter control method
By optimizing the control parameters of the SOGI module based on PSO, the problems of insufficient dynamic performance and complex parameter adjustment of Vienna converters in single-phase state are solved, and higher performance grid phase detection and control are achieved.
Patent Information
- Application Number
- CN202411706727.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-11-26
- Publication Date
- 2025-03-18
Smart Images

Figure CN119652315A_ABST
Abstract
Description
Technical Field
[0001] The present invention is applied to the technical field of power electronics, and particularly relates to a method for designing a phase of a SOGI module power grid based on PSO and a method for controlling a single-phase converter. Background Art
[0002] The three-phase three-level rectifier structure is also called the Vienna rectifier. The Vienna rectifier inherits many advantages of the three-level topology, such as low inductor current harmonic content, no bridge arm shoot-through problem, and low switch tube voltage stress, which makes it perform well in high-voltage applications. In addition, since the number of switching devices required for the Vienna rectifier is relatively small, its cost can be effectively controlled.
[0003] However, the Vienna circuit also has some inherent disadvantages. First, the midpoint voltage of the output capacitor needs to be precisely balanced to ensure stable operation of the system. Second, the Vienna rectifier only supports unidirectional flow of energy, which limits its use in certain applications that require bidirectional power transmission.
[0004] In fact, whether it is a single-phase or three-phase system, voltage synchronization is the core link of power conversion and power control devices, and is directly related to the overall performance of the system. For Vienna rectifiers, voltage synchronization signals play a vital role in generating reference current, sinusoidal wave modulation, and coordinate transformation.
[0005] Usually, the Vienna converter is used as the PFC at the input end of the three-phase power grid. Through the transformation of some rectifier circuit schemes compatible with single / three-phase input, the Vienna converter can adapt to the input of the single-phase power grid. There are many common rectifier circuit schemes compatible with single / three-phase input. Usually, the circuit topology of the three-phase input is changed to a single-phase state by some method. The mode conversion between single-phase input and three-phase input is mainly achieved through the action of devices such as contactors.
[0006] However, the grid phase detection of Vienna converter in three-phase state and single-phase state is different. Therefore, two completely different phase-locked loop technologies are required to achieve it.
[0007] Generally speaking, in the three-phase state, it may be necessary to calculate the input grid voltage through some kind of coordinate transformation to determine the orthogonal components or rotation quantities (dq coordinate system (synchronous rotating coordinate system) and αβ coordinate system (stationary two-phase coordinate system)) to perform the phase discrimination process. Alternatively, the phase discrimination process can be performed on the three branches separately under the abc coordinate system (the most intuitive three-phase coordinate system).
[0008] In contrast, a certain coordinate transformation process will also be performed in the single-phase state, but a different method is required to perform the phase detection process, or the voltage synchronization control process. This requires detecting the phase of the input grid. At the same time, many less advanced PFC technologies will use zero-crossing detection to achieve voltage synchronization.
[0009] Among them, common single-phase grid phase detection methods include SOGI (Second-Order Generalized Integrator), ANF (Adaptive Notch Filter) and Quadrature Signal Generator (QSG).
[0010] In general, these single-phase grid phase detection methods should all be created based on the classic observer theory in the principle of automatic control. This is a tool or method used to estimate the internal state of the system. The main idea is to use some measured parameters to remodel the controlled object in some way, and then input these parameters into these models to determine a certain state inside the system. These grid detection phases are analyzed or calculated by observers.
[0011] Grid phase detection is an important part of this type of phase-locked loop technology (Phase-Locked Loop, PLL). Traditional phase-locked loops include phase detection (Phase Detector, PD), filtering (Loop Filter, LF), and feedback adjustment (usually Voltage-Controlled Oscillator, VCO).
[0012] In the PFC application, the feedback process uses the phase information (mainly the phase shift of the in-phase quantity and the fundamental frequency) obtained by the phase detection to modulate the reference voltage Vm and the sinusoidal current. Therefore, there is no VCO process to operate the frequency of the input voltage in the PFC application.
[0013] In the application of power grid phase detection, we can analyze the vertical component and orthogonal component of the input voltage and current as input quantities and import them into a certain transfer function, thereby analyzing the fundamental frequency ω and the orthogonal phase shift θ of the system. q and the phase shift θ d And other parameters.
[0014] This type of observer usually has several control parameters. For example, ANF may have 2-5 control parameters depending on the actual structure (traditional ANF has only two control parameters, and some improved ANFs have more control parameters).
[0015] SOGI has 2-3 control parameters in the s-domain (in some applications, the center frequency is fixed, so one control parameter is missing). After bilinear transformation using methods such as c2d, the control parameters are expanded to 5.
[0016] Therefore, when designing these controllers, engineers need a method that can quickly and accurately optimize control parameters. The parameter design of this type of controller is usually calculated and simulated using traditional Fourier analysis and other methods, but there are too many variable parameters involved, and the ordinary complex function analysis process cannot calculate multiple parameters that are more in line with engineering practice. After all, this is a functional problem, and it is difficult to define the convergence and integrability of these functions. Even most of the time, the transformed image function and the original function are not necessarily completely equivalent. In some cases, the image function objectively exists but cannot be described (a classic example is the Dirichlet function), or even does not exist. These limitations of Fourier analysis and other methods have brought many difficulties to engineering analysis and parameter design.
[0017] Particle Swarm Optimization (PSO) is an optimization technique based on swarm intelligence, proposed by James Kennedy and Russell Eberhart in 1995. Inspired by the foraging behavior of birds, PSO simulates the social behavior of bird flocks or fish schools to find the optimal solution. The algorithm performs well in solving continuous optimization problems, combinatorial optimization problems and other complex optimization problems.
[0018] At present, most commonly used phase-locked technologies are based on zero-crossing detection methods. However, in actual power systems, due to the interference of harmonics and noise, the actual zero-crossing point of the signal is inconsistent with the theoretical zero-crossing point of the fundamental wave, and even multiple zero-crossing phenomena appear near the zero-crossing point of the fundamental wave, which not only increases the detection error but also reduces the response speed. In addition, the traditional phase-locked loop (PLL) also has limitations in processing the secondary fundamental harmonics generated by the unbalanced input voltage.
[0019] In addition, SOGI parameters are difficult to adjust. They need to be adjusted according to the system's target baseband frequency, response speed, notch characteristics, and other parameters. This is more complicated to analyze, so it is difficult to calibrate the parameters. Therefore, it is necessary to develop a method that can quickly and reliably adjust SOGI parameters according to system goals.
[0020] In addition, there are several different control structures for SOGI. There are two common ones, one with fundamental signal feedback and the other with fixed fundamental. Before bilinear transformation, the parameters of SOGI are mainly center frequency ω0, gain coefficient K, quality factor Q, and damping coefficient ζ. These parameters need to be carefully selected according to the characteristics of the system, which will affect the stability and phase tracking ability of the system. This is a functional problem involving multi-parameter optimization in engineering practice, which is very difficult to solve and analyze. Summary of the invention
[0021] The technical problem to be solved by the present invention is to overcome the deficiencies of the prior art and provide a method for designing the phase of a SOGI module power grid based on PSO and a single-phase converter control method.
[0022] The technical solution adopted by the present invention is: the present invention includes a method for designing the phase of a SOGI module power grid based on PSO and a method for controlling a single-phase converter. The SOGI module in the method for designing the phase of a SOGI module power grid based on PSO includes a second-order generalized integrator, a coordinate transformation, and a phase-locked loop that are electrically connected to each other. After the input voltage Vin enters the second-order generalized integrator, two output signals Va and qVa are output, and the phase angular velocity ω of the power grid is output through the coordinate transformation and the phase-locked loop;
[0023] The transfer functions of the two output quantities of the SOGI module in the S domain are:
[0024]
[0025] The s-domain function is transformed into the Z-domain using bilinear transformation to achieve discretization, which will facilitate the digital implementation of the SOGI process. The formula for the bilinear transformation is:
[0026]
[0027] The transfer function transformed to the Z domain is:
[0028]
[0029] Transform it into a sequence equation:
[0030] U o (k)-a1U o (k-1)-a2U o (k-2)=b0U i (k)+b2U i (k-2)
[0031] U qo (k)-a1U qo (k-1)-a2U qo(k-2) = qb0U i (k)+qb1U i (k-1)+qb2U i (k-2)
[0032] In the discrete state, the transfer function in the Z domain will have a1, a2, b0, b1 and b2, a total of five control parameters. These five control parameters are optimized by the improved PSO, and the optimized parameters are substituted into the sequence equation to achieve the optimal values of the comprehensive evaluation of the system's center frequency ω0, gain coefficient K, quality factor Q and damping coefficient ζ.
[0033] Furthermore, the coordinate transformation adopts Parker transformation, and the formula of Parker transformation is:
[0034]
[0035] After Va and qVa are transformed by Parker, there will be two output quantities: the in-phase fundamental frequency component Vd and the orthogonal fundamental frequency component Vq. The in-phase fundamental frequency component Vd is taken for PLL phase-locked loop processing to calculate the phase angular velocity ω of the power grid of the in-phase fundamental frequency component.
[0036] Furthermore, the improved PSO parameter optimization method includes the following steps:
[0037] S1. Initialization:
[0038] S11. Initialize the position and velocity of the particle swarm: Create a particle swarm, each particle represents a set of five control parameters a1, a2, b0, b1, b2 of the SOGI module, and each particle has an initial position and initial velocity;
[0039] S12. Set parameter range: define the upper and lower limits of each parameter to ensure that the position of the particle is within the allowed range;
[0040] S13. Set algorithm parameters: including population size N, number of iterations iter, inertia weight w, self-learning factor c1 and group learning factor c2;
[0041] S2. Response function:
[0042] S21. Define fitness function: The fitness function is used to evaluate the performance of the parameter combination represented by each particle;
[0043] S22. Calculate the initial fitness value: calculate the fitness value of each particle at its initial position;
[0044] S3. Update particle position and velocity:
[0045] S31. Update speed: Update the speed of each particle according to the current speed, the individual's best historical position and the individual's best historical fitness value, the group's best historical position and the group's best historical fitness value. The update speed formula is:
[0046]
[0047] in: is the velocity of the ith particle in the dth dimension, α is the inertia weight, c1 and c2 are the self-learning factor and the group learning factor, respectively, r1 and r2 are random numbers between [0,1], is the best historical position of the ith particle in the dth dimension, is the best historical position of the entire particle swarm in the dth dimension, is the current position of the ith particle in the dth dimension;
[0048] S32. Update position: Update the position of each particle according to the new velocity. The formula is:
[0049]
[0050] S4. Boundary processing:
[0051] S41. Speed boundary processing: Ensure that the speed of each particle is within the allowed range. If the speed exceeds the upper or lower limit, limit it within the boundary;
[0052] S42. Position boundary processing: ensure that the position of each particle is within the allowed range. If the position exceeds the upper or lower limit, limit it within the boundary;
[0053] S5. Update personal and group best records:
[0054] S51. Update personal best history: For each particle, if the fitness value of the new position is better than its best fitness value in history, update its personal best position and fitness value in history;
[0055] S52. Update the best historical position of the group: In the entire particle group, if the fitness value of a particle's new position is better than the best historical fitness value of the group, then update the best historical position and fitness value of the group.
[0056] S6. Iteration: repeat steps S3 to S5 until a predetermined number of iterations is reached or the fitness value changes less than a set threshold;
[0057] S7. Result analysis:
[0058] S71. Select the optimal solution: the final best position in the group history is the optimal solution, and the corresponding fitness value is the optimal fitness value;
[0059] S72. Output result: Output the optimal parameter combination and its corresponding fitness value.
[0060] Further, for the SOGI module, the fitness function in step S21 is mean square error (MSE) or spectral purity.
[0061] Furthermore, a single-phase converter control method comprises the following steps:
[0062] P1. The input voltage Vin enters the SOGI module, and the current grid phase angular velocity ω is calculated through the PSO-based SOGI module grid phase design method, and then the reference voltage value ea is obtained through sin sine operation;
[0063] P2. Subtract the target output voltage Uref from the actual output voltage Usi to obtain the output voltage difference ΔU;
[0064] P3. The output voltage difference ΔU is calculated by the voltage outer loop PI controller, and the output value is multiplied by the reference voltage value ea, and the absolute value |U is taken. m |;
[0065] P4. Subtract the voltage U1 of the positive voltage divider capacitor from the voltage U2 of the negative voltage divider capacitor to obtain the voltage difference ΔU12 of the voltage divider capacitor, which then enters the low-pass filter LPF and then enters the capacitor voltage difference P controller (proportional operation) to obtain the capacitor voltage difference U c ;
[0066] P5. Perform algebraic calculation on the input current i1 and the input results of steps P3 and P4. The calculation formula is:
[0067] v i =|U m |+U c -i1
[0068] P6.vi is multiplied by the reference voltage value ea and then enters the current inner loop PI controller.
[0069] P7. Input the output value of P6 into the PWM generator for modulation, and then output S s1 -S s4 The driving signal.
[0070] Furthermore, the single-phase converter is a single-phase Vienna converter.
[0071] The beneficial effects of the present invention are: 1. Improving the dynamic performance of the Vienna converter compatible with single / three-phase input in single-phase mode; 2. Optimizing the control parameters of the SOGI module through an improved particle swarm optimization algorithm (PSO); 3. Making the Vienna converter operate more efficiently in single-phase mode. BRIEF DESCRIPTION OF THE DRAWINGS
[0072] Figure 1 is a schematic diagram of a Vienna converter in single-phase mode;
[0073] Figure 2 is a schematic diagram of the control loop in single-phase mode;
[0074] Figure 3 This is a schematic diagram of the implementation process of GOGI;
[0075] Figure 4 It is a flowchart of improved PSO for parameter optimization;
[0076] Figure 5 It is the output model diagram of the first iteration;
[0077] Figure 6 It is the output result model diagram of the final iteration;
[0078] Figure 7 It is the verification framework diagram of the SOGI-PLL algorithm flow;
[0079] Figure 8 It is the overall schematic diagram of the model in the simulink simulation environment;
[0080] Fig. 9 It is a schematic diagram of the verification results of the SOGI-PLL algorithm process;
[0081] Fig.10 It is a schematic diagram of realizing fundamental wave tracking and power correction function under relatively complex power grid conditions.
[0082] Figure 1 In, V in is a single-phase input AC voltage source; L1 and L2 are branch inductors; D1-D4 are diodes; S s1 -S s4 is a MOS tube; C1 is the voltage-dividing capacitor at the positive end; C2 is the voltage-dividing capacitor at the negative end; R O Represents the output load; U si is the output DC voltage. DETAILED DESCRIPTION
[0083] The present invention includes a method for designing the phase of a SOGI module power grid based on PSO and a method for controlling a single-phase converter. The present invention is used in a control loop of a Vienna converter in a single-phase state as a method for designing the voltage phase.
[0084] First, let's briefly describe the applicable Vienna converter. The traditional Vienna converter is a three-phase three-level rectifier. Through the transformation of some rectifier circuit schemes compatible with single / three-phase input, the Vienna converter can be adapted to the input of the single-phase power grid. There are many such transformation technical schemes, which will not be described here one by one.
[0085] The following is a brief introduction to the technical solution for the transformation of the rectifier circuit scheme compatible with single / three-phase input of the present invention. Originally, the traditional Vienna converter has three branches, which are usually used in three-phase three-wire systems. Then, each branch is connected to the three phase lines A / B / C respectively. The technical solution for the transformation of the rectifier circuit scheme compatible with single / three-phase input of the present invention is to disconnect one of the branches from the circuit through a contactor (or directly operate the switch tube of the branch to disconnect). Then. The input ends of the remaining two branches are respectively connected to the positive and negative ends of the single-phase input. Forming a circuit such as Figure 1 This is the single-phase mode of the Vienna converter compatible with single / three-phase input to which the present invention is applicable.
[0086] This control process of the Vienna converter compatible with single / three-phase input is a relatively classic control loop with an inner and outer loop structure with PLL, which is commonly used in PFC; Figure 2 As shown, the specific control method of the single-phase / three-phase input Vienna converter in single-phase mode includes the following steps:
[0087] P1. The input voltage Vin is calculated through the SOGI module to obtain the phase angular velocity ω of the current power grid (the present invention uses radians, but whether it is radians or angles does not affect the implementation effect), and then the reference voltage value ea (the standard sinusoidal value representing the in-phase component in the power grid) is obtained through sin sinusoidal operation; P2. The target output voltage Uref is subtracted from the actual output voltage Usi to obtain the output voltage difference ΔU;
[0088] P3. The output voltage difference ΔU is calculated by the voltage outer loop PI controller, and the output value is multiplied by the reference voltage value ea, and the absolute value |U is taken. m |;
[0089] P4. Subtract the voltage U1 of the positive voltage divider capacitor from the voltage U2 of the negative voltage divider capacitor to obtain the voltage difference ΔU12 of the voltage divider capacitor, which then enters the low-pass filter LPF and then enters the capacitor voltage difference P controller (proportional operation) to obtain the capacitor voltage difference U c ;
[0090] P5. Perform algebraic calculation on the input current i1 and the input results of steps P3 and P4. The calculation formula is:
[0091] v i =|U m |+U c -i1
[0092] P6.vi is multiplied by the reference voltage value ea and then enters the current inner loop PI controller.
[0093] P7. Input the output value of P6 into the PWM generator for modulation, and then output S s1 -S s4 The driving signal.
[0094] This control process uses a SOGI module (second-order generalized integrator) to identify the phase of the input grid voltage. It belongs to the more traditional SOGI module. It includes a second-order generalized integrator, coordinate transformation and phase-locked loop.
[0095] The PLL phase-locked technology based on this type of SOGI module has the following advantages: 1. Simple implementation (compared with other PLL implementation methods); 2. Due to its fundamental frequency resonance, the generated orthogonal system will be filtered without delay through the same structure, and the generated orthogonal system can be filtered without delay because of the resonance at the fundamental frequency; 3. A sine wave with a phase difference of 90 degrees is generated, which is not affected by frequency.
[0096] The implementation process of the SOGI module used in the present invention is briefly introduced below.
[0097] like Figure 3 As shown in the figure, the SOGI module (second-order generalized integrator) in the SOGI module grid phase design method based on PSO has two input signals (Vin, ω) and two output signals Va and qVa. Va and the input voltage signal Vin are in the same frequency and phase, and qVa is orthogonal to the input voltage signal Vin, with a 90-degree phase shift.
[0098] This process can be described using transfer functions to intuitively illustrate their parameters and functions.
[0099]
[0100] The above formula is the transfer function of the two output quantities of SOGI. It is the expression in the S domain. The SOGI module under this structure has a total of 2 control parameters. They are the gain coefficient K and the angular velocity ω. Among them, the angular velocity ω is calculated and fed back from the phase-locked loop module; Hd(s) and Hq(s) represent the transfer functions of the direct-axis component and the quadrature-axis component output by the orthogonal signal generator (SOGI, Sine Oscillator with Generalized Integrator), respectively. s is a complex variable in the Laplace transform, which is used to describe the frequency response characteristics of the system.
[0101] The s-domain function is transformed into the Z-domain using bilinear transformation to achieve discretization, which will facilitate the digital implementation of the SOGI process. The formula for the bilinear transformation is:
[0102]
[0103] Where T s is the sampling period, which is the time interval between each sample in the discretization process. The choice of sampling period will affect the performance of the discretized system; z is the complex variable in the Z transform, which corresponds to the frequency variable in the discrete time domain; in digital control systems, the z transform is used to analyze and design discrete time systems; s is the complex variable in the Laplace transform, which corresponds to the frequency variable in the continuous time domain. In analog control systems, the Laplace transform is used to analyze and design continuous time systems.
[0104] The transfer function transformed to the Z domain is:
[0105]
[0106] H d (s) and H q (s) represent the transfer functions of the direct-axis component and quadrature-axis component output by the orthogonal signal generator (SOGI, Sine Oscillator with Generalized Integrator), respectively.
[0107] z is the complex variable in the Z transform.
[0108] a1, a2, b0, b1, and b2 are all parameters of the transfer function.
[0109] Transform it into a sequence equation:
[0110] U o (k)-a1U o (k-1)-a2U o (k-2)=b0U i (k)+b2U i (k-2)
[0111] U qo (k)-a1U qo (k-1)-a2U qo (k-2) = qb0U i (k)+qb1U i (k-1)+qb2U i (k-2)
[0112] In the given sequence equation, the meanings of the variables are as follows: U o (k): Current value of the direct axis component; U qo (k): current value of the quadrature axis component; U i (k): current value of the input signal; U o (k-1): a delayed value of the direct axis component, indicating the value at the previous moment; U qo (k-1): a delayed value of the quadrature axis component, indicating the value at the previous moment; U o (k-2): another delayed value of the direct axis component, indicating the value of the previous two moments; U qo (k-2): another delayed value of the quadrature axis component, indicating the value of the previous two moments; U i (k-1): a delayed value of the input signal, indicating the value at the previous moment; U i (k-2): another delayed value of the input signal, representing the value at the previous two moments; a1: a coefficient of the feedback component; a2: a coefficient of the feedback component; b0: a coefficient of the input signal; b1: a coefficient of the input signal; b2: a coefficient of the input signal; q: the proportional coefficient of the quadrature-axis component relative to the direct-axis component.
[0113] In the discrete state, the Z-domain transfer function will have a1, a2, b0, b1 and b2, a total of five control parameters, which will affect the system's center frequency ω0, gain coefficient K, quality factor Q and damping coefficient ζ. In this system, engineers are usually more interested in these characteristics.
[0114] After the SOGI module process is completed, two output signals Va and qVa are obtained, which can actually be regarded as two quantities in a stationary two-phase coordinate system.
[0115] Furthermore, the coordinate transformation adopts Parker transformation, and the formula of Parker transformation is:
[0116]
[0117] The meaning of each symbol in the Park transformation formula: Vd and Vq represent the direct-axis component and quadrature-axis component of the voltage vector in the stationary coordinate system respectively; Va and qaVa represent the direct-axis component and quadrature-axis component of the voltage vector in the rotating coordinate system respectively; θ is the angle, which represents the angle between the stationary coordinate system and the rotating coordinate system; cos(θ) and sin(θ) are the cosine and sine values of the angle θ respectively; q is the proportional coefficient, which is used to adjust the size of the voltage vector in the rotating coordinate system.
[0118] The two output signals Va and qVa of the SOGI module process can be used as the input of the Parker transformation. Through the Parker transformation matrix, two output quantities in the dq coordinate system (synchronous rotating coordinate system) are obtained: the in-phase fundamental frequency component V d and the orthogonal fundamental frequency component V q , take the in-phase fundamental frequency component V d Perform PLL phase-locked loop processing to calculate the phase angular velocity ω of the power grid with the same phase fundamental frequency component.
[0119] As mentioned above, the transfer function of the SOGI module in the Z domain will have five control parameters: a1, a2, b0, b1 and b2, which will have a complex impact on the system's center frequency ω0, gain coefficient K, quality factor Q and damping coefficient ζ.
[0120] In fact, from the perspective of mathematical theory, the transfer function in the Z domain is to convert the differential equation in the time domain into an algebraic equation in the Z domain in a discrete time system, which can simplify functional analysis and parameter design.
[0121] Because these five parameters and system characteristics are interrelated (simply put, changing one will affect the others and have varying degrees of impact on various characteristics of the system). In mathematical terms, this is a typical functional problem. It is a common type of problem in mathematics and engineering, mainly involving finding a function (or a set of functions) to optimize a specific goal or satisfy given constraints. In other words, it is a type of problem that studies how to find a function to optimize a specific goal or satisfy given constraints (at least that's how I understand this type of problem at the moment).
[0122] The calculus of variations is a branch of mathematics that studies the extreme values (minimum or maximum values) of functionals. Its mathematical idea is to change the integral path or something else by some part in order to obtain the optimal solution of the target at the extreme value.
[0123] The present invention is based on the variational method of functional problems as the basic principle, and improves a particle swarm optimization algorithm (PSO) to optimize the five control parameters (a1, a2, b0, b1 and b2) of the transfer function of the SOGI module in the Z domain. Thus, a comprehensive evaluation optimization method of the system's center frequency ω0, gain coefficient K, quality factor Q and damping coefficient ζ is achieved. In addition, various performances of SOGI phase detection in single-phase mode of this Vienna converter compatible with single / three-phase input are improved.
[0124] Particle swarm optimization (PSO) is an optimization algorithm based on swarm intelligence, which is suitable for solving functional extreme value optimization problems in multidimensional, nonlinear, and continuous spaces. By improving the PSO algorithm to optimize the five control parameters of the SOGI module, the following goals can be achieved:
[0125] 1. Center frequency ω0: Ensures that the SOGI module can accurately track the desired frequency.
[0126] 2. Gain coefficient K: adjusts the amplitude of the output signal.
[0127] 3. Quality factor Q: affects the bandwidth and selectivity of the system.
[0128] 4. Damping coefficient ζ: affects the dynamic response and stability of the system
[0129] like Figure 4 As shown in the figure, the specific steps of the improved PSO parameter optimization method are as follows:
[0130] S1. Initialization:
[0131] S11. Initialize the position and velocity of the particle swarm: Create a particle swarm, each particle represents a set of parameters (five control parameters a1, a2, b0, b1, b2 of the SOGI module), and each particle has an initial position and initial velocity;
[0132] S12. Set parameter range: define the upper and lower limits of each parameter to ensure that the position of the particle is within the allowed range;
[0133] S13. Set algorithm parameters: including population size N, number of iterations iter, inertia weight w, self-learning factor c1 and group learning factor c2;
[0134] S2. Fitness function:
[0135] S21. Define fitness function: The fitness function is used to evaluate the performance of the parameter combination represented by each particle. For the SOGI module, the fitness function can be mean square error (MSE), spectral purity or other performance indicators;
[0136] S22. Calculate the initial fitness value: calculate the fitness value of each particle at its initial position;
[0137] S3. Update particle position and velocity:
[0138] S31. Update speed: Update the speed of each particle according to the current speed, the individual's best historical position and the individual's best historical fitness value, the group's best historical position and the group's best historical fitness value. The update speed formula is:
[0139]
[0140] in: is the velocity of the ith particle in the dth dimension, α is the inertia weight, c1 and c2 are the self-learning factor and the group learning factor, respectively, r1 and r2 are random numbers between [0,1], is the best historical position of the ith particle in the dth dimension, is the best historical position of the entire particle swarm in the dth dimension, is the current position of the ith particle in the dth dimension;
[0141] S32. Update position: Update the position of each particle according to the new velocity. The formula is:
[0142]
[0143] S4. Boundary processing:
[0144] S41. Speed boundary processing: Ensure that the speed of each particle is within the allowed range. If the speed exceeds the upper or lower limit, limit it within the boundary;
[0145] S42. Position boundary processing: ensure that the position of each particle is within the allowed range. If the position exceeds the upper or lower limit, limit it within the boundary;
[0146] S5. Update personal and group best records:
[0147] S51. Update personal best history: For each particle, if the fitness value of the new position is better than its best fitness value in history, update its personal best position and fitness value in history;
[0148] S52. Update the best historical position of the group: In the entire particle group, if the fitness value of a particle's new position is better than the best historical fitness value of the group, then update the best historical position and fitness value of the group.
[0149] S6. Iteration: repeat steps S3 to S5 until a predetermined number of iterations is reached or the fitness value changes less than a set threshold;
[0150] S7. Result analysis:
[0151] S71. Select the optimal solution: the final best position in the group history is the optimal solution, and the corresponding fitness value is the optimal fitness value;
[0152] S72. Output result: Output the optimal parameter combination and its corresponding fitness value.
[0153] The following is a simplified example code implemented in MATLAB, showing how to use the improved PSO algorithm to optimize the five control parameters of the SOGI module:
[0154]
[0155]
[0156]
[0157]
[0158] This code implements the PSO algorithm, excluding the implementation of SOGI and PLL. Those processes will be implemented in simulink, partly in the form of S-function text code, and we will continue to show these processes.
[0159] Below is the PSO algorithm used for the SOGI optimization process, including some visualization processes to assist in the analysis and express the changes in fitness values in a certain dimension.
[0160] The following is a practical code, implemented in MATLAB, showing how to use the improved PSO algorithm to optimize the five control parameters of the SOGI module and visualize the fitness value changes in a certain dimension:
[0161]
[0162]
[0163]
[0164]
[0165] end
[0166] The output of the first iteration is as follows Figure 5 .
[0167] It can be seen that when the fitness value changes in various dimensions, it becomes a very nice large high-dimensional wave packet, which contains several small wave packets, indicating that there are extreme values of this functional problem in each region.
[0168] In fact, this visualization is missing several dimensions, because high-dimensional images cannot be expressed intuitively, so I chose two representative dimensions as measures to express the distance space of the reduced dimension of the Lebesgue space, and the depth of this distance space happens to be the scalar of the fitness value.
[0169] In fact, this high-dimensional wave packet pattern is a partial differential equation group selected to test the PSO algorithm process. There are many advantages to choosing this pattern to test the PSO process. The most obvious point is that there is a maximum value in almost every small interval, and there is only one maximum value for the whole. Therefore, it is very convenient to use it to test the PSO algorithm of the optimized SOGI module process.
[0170] from Figure 5 In the figure, we can see several bold circles near the extreme values of each interval of these high-dimensional wave packets. These are the solutions of the first iteration. They found the optimal solutions in their respective intervals in the first iteration.
[0171] After several iterations (you can set the number of iterations yourself, for example, our example uses 50 times), the output result is as follows: Figure 6 shown.
[0172] It can be seen that after several iterations, almost all particles (or the entire particle group) are concentrated on the top of this beautiful high-dimensional wave packet, which means that after several iterations, all particles have found a small area very close to the optimal solution of this functional problem. Then the design parameters of the optimal solution of SOGI are obtained.
[0173] like Figure 7-8 The following figure shows the SOGI module with the design parameters of the optimal solution and its appearance in the Simulink simulation environment:
[0174] Figure 7 yes Figure 3 The described algorithm process is implemented in Simulink and simulated and verified.
[0175] Figure 8 It includes Figure 1 and Figure 2 The described single / three-phase input compatible Vienna converter in single-phase mode and its control loop are implemented and verified by simulation in Simulink.
[0176] The following is the text code for implementing SOGI in the Z domain, which is written in C language. This part of the code is inserted into the S-function in the simulink simulation environment in the embodiment for verification. It can replace some functions of the SOGI algorithm.
[0177] This text code is mainly used to implement the sequence equations of the two Z-domain transfer functions%%
[0178] %% Function declaration
[0179] function[uo,quo]=Orthogonal_Generator(ui,Ts,alpha,k)%%
[0180] %%Define each intermediate variable
[0181] persistent x;
[0182] persistent y;
[0183] persistent temp;
[0184] persistent b0;
[0185] persistent b2;
[0186] persistent a1;
[0187] persistent a2;
[0188] persistent qb0;
[0189] persistent qb1;
[0190] persistent qb2;
[0191] persistent u0; %% represents ui(k)
[0192] persistent u1; %% represents ui(k-1)
[0193] persistent u2; %% represents ui(k-2)
[0194] persistent osg_u0; %% represents uo(k)
[0195] persistent osg_u1; %% represents uo(k-1)
[0196] persistent osg_u2; %% represents uo(k-2)
[0197] persistent osg_qu0; %% represents uqo(k)
[0198] persistent osg_qu1; %% represents uqo(k-1)
[0199] persistent osg_qu2;%% represents uqo(k-2)
[0200] %%
[0201] %% Initialize each intermediate variable
[0202] if isempty(x) x=0;
[0203]
[0204]
[0205]
[0206] like Figure 9-10 The figure shows the effect of its implementation. It can be seen that SOGI can reasonably track the voltage phase of the input single-phase power grid and generate a suitable modulation wave Vm.
[0207] This Vienna converter compatible with single / three-phase input can be operated in single-phase mode to achieve fundamental wave tracking and power correction functions in more complex power grid conditions.
[0208] Although the embodiments of the present invention are described with practical solutions, they do not constitute limitations on the meaning of the present invention. For those skilled in the art, it is obvious to modify the implementation scheme and combine it with other solutions based on this description.
Claims
1. A method for designing the phase of a SOGI module power grid based on PSO, characterized by: The SOGI module includes a second-order generalized integrator, a coordinate transformation and a phase-locked loop that are electrically connected to each other. After the input voltage Vin enters the second-order generalized integrator, two output signals Va and qVa are output, and the phase angular velocity ω of the power grid is output through the coordinate transformation and the phase-locked loop; The transfer functions of the two output quantities of the SOGI module in the S domain are: The s-domain function is transformed into the Z-domain by bilinear transformation to achieve discretization, which will facilitate the digital implementation of the SOGI process. The formula of the bilinear transformation is: The transfer function transformed to the Z domain is: Transform it into a sequence equation: AT o (k)-a1U o (k-1)-a2U o (k-2)=b0U i (k)+b2U i (k-2) U qo (k)-a1U qo (k-1)-a2U qo (k-2)=qb0U i (k)+qb1U i (k-1)+qb2U i (k-2) In the discrete state, the transfer function in the Z domain will have a1, a2, b0, b1 and b2, a total of five control parameters. These five control parameters are optimized by the improved PSO, and the optimized parameters are substituted into the sequence equation to achieve the optimal values of the comprehensive evaluation of the system's center frequency ω0, gain coefficient K, quality factor Q and damping coefficient ζ.
2. The method for designing the phase of the SOGI module power grid based on PSO according to claim 1 is characterized in that: The coordinate transformation adopts Parker transformation, and the formula of Parker transformation is: After Va and qVa are transformed by Parker, there will be two output quantities: the in-phase fundamental frequency component V d and the orthogonal fundamental frequency component V q , take the in-phase fundamental frequency component V d Perform PLL phase-locked loop processing to calculate the phase angular velocity ω of the power grid with the same phase fundamental frequency component.
3. The method for designing the phase of the SOGI module power grid based on PSO according to claim 2 is characterized in that: The improved PSO parameter optimization method comprises the following steps: S1. Initialization: S11. Initialize the position and velocity of the particle swarm: Create a particle swarm, each particle represents a set of five control parameters a1, a2, b0, b1, b2 of the SOGI module, and each particle has an initial position and initial velocity; S12. Set parameter range: define the upper and lower limits of each parameter to ensure that the position of the particle is within the allowed range; S13. Set algorithm parameters: including population size N, number of iterations iter, inertia weight w, self-learning factor c1 and group learning factor c2; S2. Fitness function: S21. Define fitness function: The fitness function is used to evaluate the performance of the parameter combination represented by each particle; S22. Calculate the initial fitness value: calculate the fitness value of each particle at its initial position; S3. Update particle position and velocity: S31. Update speed: Update the speed of each particle according to the current speed, the individual's best historical position and the individual's best historical fitness value, the group's best historical position and the group's best historical fitness value. The update speed formula is: in: is the velocity of the ith particle in the dth dimension, α is the inertia weight, c1 and c2 are the self-learning factor and the group learning factor, respectively, r1 and r2 are random numbers between [0,1], is the best historical position of the ith particle in the dth dimension, is the best historical position of the entire particle swarm in the dth dimension, is the current position of the ith particle in the dth dimension; S32. Update position: Update the position of each particle according to the new velocity. The formula is: S4. Boundary processing: S41. Speed boundary processing: Ensure that the speed of each particle is within the allowed range. If the speed exceeds the upper or lower limit, limit it within the boundary; S42. Position boundary processing: ensure that the position of each particle is within the allowed range. If the position exceeds the upper or lower limit, limit it within the boundary; S5. Update personal and group best records: S51. Update personal best history: For each particle, if the fitness value of the new position is better than its best fitness value in history, update its personal best position and fitness value in history; S52. Update the best historical position of the group: In the entire particle group, if the fitness value of a particle's new position is better than the best historical fitness value of the group, then update the best historical position and fitness value of the group. S6. Iteration: repeat steps S3 to S5 until a predetermined number of iterations is reached or the fitness value changes less than a set threshold; S7. Result analysis: S71. Select the optimal solution: the final best position in the group history is the optimal solution, and the corresponding fitness value is the optimal fitness value; S72. Output result: Output the optimal parameter combination and its corresponding fitness value.
4. The method for designing the phase of the SOGI module power grid based on PSO according to claim 3 is characterized in that: For the SOGI module, the fitness function in step S21 is mean square error (MSE) or spectral purity.
5. A single-phase converter control method, characterized in that: It includes the following steps: P1. The input voltage Vin enters the SOGI module, and the current grid phase angular velocity ω is calculated by the PSO-based SOGI module grid phase design method according to claim 4, and then the reference voltage value ea is obtained by sin sinusoidal operation; P2. Subtract the target output voltage Uref from the actual output voltage Usi to obtain the output voltage difference ΔU; P3. The output voltage difference ΔU is calculated by the voltage outer loop PI controller, and the output value is multiplied by the reference voltage value ea, and the absolute value |U is taken. m |; P4. Subtract the voltage U1 of the positive voltage divider capacitor from the voltage U2 of the negative voltage divider capacitor to obtain the voltage difference ΔU12 of the voltage divider capacitor, which then enters the low-pass filter LPF and then enters the capacitor voltage difference P controller (proportional operation) to obtain the capacitor voltage difference U c ; P5. Perform algebraic calculation on the input current i1 and the input results of steps P3 and P4. The calculation formula is: v i =|U m |+U c -i1 P6.vi is multiplied by the reference voltage value ea and then enters the current inner loop PI controller. P7. Input the output value of P6 into the PWM generator for modulation, and then output S s1 -S s4 The driving signal.
6. The single-phase converter control method according to claim 5, characterized in that: The single-phase converter is a single-phase Vienna converter.