A terminal sliding mode phase synchronization control method and system based on improved particle swarm optimization

By improving the particle swarm optimization algorithm to automatically tune the parameters of the terminal sliding mode controller, the synchronization problem of three-phase voltage signals under harmonic and waveform distortion conditions was solved, realizing fast and stable phase synchronization control and improving the robustness and synchronization accuracy of the system.

CN121770410BActive Publication Date: 2026-05-08SHANDONG UNIV
View PDF 2 Cites 0 Cited by

Patent Information

Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
SHANDONG UNIV
Filing Date
2026-03-02
Publication Date
2026-05-08

AI Technical Summary

Technical Problem

Existing three-phase voltage signal phase extraction is prone to problems such as slow locking, unstable locking, and controller parameter dependence on empirical tuning under harmonic and waveform distortion conditions, making it difficult to simultaneously meet the requirements of fast response, steady-state accuracy, and low jitter under different operating conditions.

Method used

An improved particle swarm optimization algorithm is used to automatically tune the key parameters of the terminal sliding mode controller. By combining terminal sliding mode control and particle swarm optimization algorithm, the parameter combination of the terminal sliding mode controller is optimized through the construction of phase synchronization performance fitness function and stability analysis, so as to achieve accurate synchronization of three-phase voltage signals.

Benefits of technology

Achieving precise synchronization of three-phase voltage signals within a fixed time improves anti-disturbance capability, reduces reliance on manual parameter adjustment, balances dynamic response and jitter suppression, and optimizes steady-state performance.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121770410B_ABST
    Figure CN121770410B_ABST
Patent Text Reader

Abstract

The present application relates to the technical field of particle swarm optimization, and especially relates to a terminal sliding mode phase synchronization control method and system based on improved particle swarm optimization. The method comprises phase synchronization of fundamental voltage components of three-phase voltage based on terminal sliding mode; stability analysis of terminal sliding mode based on phase synchronization; optimization of parameter vectors of terminal sliding mode by using particle swarm optimization algorithm, including construction of phase synchronization performance fitness function and terminal sliding mode parameter setting; and output of global optimal parameters. The scheme innovatively uses a terminal sliding mode controller to realize accurate synchronization of harmonic distorted voltage phase, reaches a stable synchronization state within a fixed time, has strong anti-disturbance ability after entering a sliding mode surface, and greatly improves the anti-disturbance ability.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This invention relates to the field of particle swarm optimization technology, and in particular to a terminal sliding mode phase synchronization control method and system based on improved particle swarm optimization. Background Technology

[0002] Phase extraction and phase synchronization control of three-phase voltage signals are fundamental aspects of AC system measurement, control, and synchronous operation. The phase estimation results are typically used as the phase reference for coordinate transformation and synchronization control. In engineering applications, the three-phase voltage at the point of common coupling is often affected by background harmonics, noise, and waveform distortion, exhibiting non-sinusoidal characteristics, containing higher-order components, or superimposed unbalanced components. Under these conditions, phase synchronization control needs to possess fast phase tracking capability, maintain small synchronization errors and ripples in steady state, and have sufficient robustness to disturbances and noise. Otherwise, problems such as prolonged synchronization time, phase overshoot oscillation, or unreliable locking may occur.

[0003] In existing phase extraction schemes, hardware implementations often rely on zero-crossing detection and simulated phase discrimination. While the structure is intuitive, it is sensitive to harmonics and noise, and prone to multiple false zero-crossings that can cause phase jitter. Software implementations typically construct closed-loop regulation based on synchronous coordinate system error feedback and can be combined with filtering or decoupling structures to suppress distortion effects. However, typical contradictions still exist: when the adjustment parameters are too conservative, the lock-in time is too long and the tracking lag is too slow; when the parameters are too aggressive, overshoot oscillations are prone to occur, and steady-state ripple is difficult to reduce under harmonic conditions. To improve robustness, sliding mode control is used in the phase extraction stage due to its strong anti-disturbance capability, and finite-time convergence structures such as terminal sliding mode can also be used to improve convergence speed. However, the engineering effect of sliding mode schemes is highly dependent on the configuration of key parameters, and empirical tuning is costly. Furthermore, it is difficult to ensure that the indicators of "fast, stable, and low jitter" are met simultaneously under different harmonic contents and distortion levels. When the parameter selection is biased towards fast convergence, it is easy to introduce strong jitter and amplify the impact of measurement noise; when the parameter selection is biased towards suppressing jitter, it may lead to a slower synchronization process or an increase in steady-state residual error. Since this tuning problem usually exhibits nonlinear, nonconvex, and multi-index trade-off characteristics, it is difficult to obtain stable and reproducible parameter combinations under multiple operating conditions by simply relying on manual parameter tuning or local empirical rules.

[0004] Therefore, a parameter tuning method oriented towards harmonic backgrounds and focusing on indicators such as lock-in time, steady-state ripple, and jitter is needed to optimize the key parameters of the terminal sliding mode phase extraction controller. Swarm intelligence algorithms such as particle swarm optimization do not depend on the differentiability of the objective function and are suitable for handling multi-parameter coupling and nonlinear evaluation problems. Applying them to the optimization tuning of key parameters of sliding mode control helps to obtain parameter combinations that balance dynamic and steady-state performance under harmonic and distortion conditions. Summary of the Invention

[0005] To address the problems of slow locking, unstable locking, and empirically dependent controller parameter tuning in existing three-phase voltage signal phase extraction methods under harmonic and waveform distortion conditions, this invention provides a terminal sliding mode phase synchronization control method and system based on improved particle swarm optimization. By accurately extracting the fundamental frequency phase of the three-phase voltage signal within a fixed time period, it overcomes the shortcomings of low accuracy and slow convergence speed in traditional phase synchronization. Furthermore, for the problem of numerous and difficult-to-adjust parameters in the terminal sliding mode controller, a performance-driven parameter tuning approach is adopted. Using an improved particle swarm optimization algorithm, the key parameters of the terminal sliding mode controller are automatically optimized, ensuring phase extraction accuracy while also considering dynamic response and jitter suppression.

[0006] In a first aspect, the present invention provides a terminal sliding mode phase synchronization control method based on improved particle swarm optimization, which adopts the following technical solution:

[0007] A terminal sliding mode phase synchronization control method based on improved particle swarm optimization includes:

[0008] Obtain three-phase voltage signals;

[0009] The coordinate transformation of the three-phase voltage is performed based on the acquired three-phase voltage signal;

[0010] Phase synchronization of the fundamental voltage component of the three-phase voltage is achieved based on terminal sliding mode.

[0011] Stability analysis of terminal sliding mode based on phase synchronization;

[0012] The particle swarm optimization algorithm is used to optimize the parameter vector of the terminal sliding mode, including the construction of the phase synchronization performance fitness function and the tuning of the terminal sliding mode parameters;

[0013] Output the globally optimal parameters.

[0014] Furthermore, the coordinate transformation of the three-phase voltages based on the acquired three-phase voltage signals includes transforming the acquired grid-connected three-phase AC voltages va, vb, and vc from a stationary coordinate system to a synchronously rotating coordinate system to obtain the d-axis fundamental voltage component vd and the q-axis fundamental voltage component vq. Specifically, a Clark transformation is first performed on the three-phase AC voltages va, vb, and vc to convert them from the stationary coordinate system abc to the αβ components vα and vβ in the stationary coordinate system, expressed as:

[0015] To achieve high-precision phase-locking under voltage distortion and background harmonics, and to suppress background harmonics and noise interference while ensuring dynamic response, SOGI is used to extract the AC fundamental component in real time, obtaining the α-axis fundamental voltage vector vα1 and the β-axis fundamental voltage vector vβ1. The fundamental components vα1 and vβ1 are then extracted using a second-order generalized integrator SOGI.

[0016] ,

[0017] in ,

[0018] Finally, after Park transformation, the voltage vectors are converted into the d-axis DC voltage vector vd and the q-axis DC voltage vector vq in a rotating coordinate system. .

[0019] Furthermore, the phase synchronization of the fundamental voltage components of the three-phase voltage based on the terminal sliding mode controller includes inputting the fundamental voltage components vd and vq of the d-axis and q-axis in the rotating coordinate system to the terminal sliding mode controller, which then outputs a frequency correction amount u; and then synchronizing u with... w0 The output angular frequency is obtained by superposition. w’ The estimated phase angle is obtained by integration, and the remainder of 2π is performed to obtain the three-phase voltage output phase θ, which is the phase synchronized with the three-phase voltage signal. This phase is then used to provide the phase angle for the Park coordinate transformation, where the sliding surface of the terminal sliding mode controller is: The terminal sliding mode control law is:

[0020] ,

[0021] in a,b >0, h0,h1 >0, α+β =1 and 0<α,β<1, sig x (y)=sign(y)*|y| x The vector of parameters to be tuned is defined as: x=[a,b,h0,h1,α]; the final controller output phase is synchronized with the three-phase voltage phase to obtain the true phase of the voltage signal, and at the same time, the output phase is used to provide the phase transformation angle for the system to transform from the αβ to the dq coordinate system.

[0022] Furthermore, the phase synchronization of the fundamental voltage component of the three-phase voltage based on terminal sliding mode also includes solving the error dynamics equation based on phase synchronization. First, the fundamental voltage in the three-phase voltage signal extracted by SOGI is expressed as:

[0023] ,

[0024] in Vm This refers to the three-phase voltage amplitude. φ0 Let a be the initial phase of phase a voltage, and let the phase of phase a voltage be... The phase extracted by the terminal sliding mode controller is represented as: ,in , For control signals, To extract the initial phase, since phase information cannot be directly obtained from three-phase AC signals, the three-phase signals are transformed from the natural coordinate system to a synchronous rotating coordinate system. The coordinate transformation formula is as follows:

[0025] ,

[0026] ;

[0027] Then, the fundamental voltage in the three-phase voltage signal and the matrix... P(θ') The second row of multiplication results in... vq :

[0028] ,

[0029] Furthermore, the method of solving the error dynamics equation based on phase synchronization also includes combining the fundamental voltage of the three-phase voltage signal with the matrix. P(θ') Multiplication and simplification yield vd : Finally, the phase-locked loop error dynamics are derived, where vq has an initial phase φ0, and the relationship between the rate of change of vq and the rate of change of phase deviation is expressed as:

[0030] The rate of change of phase deviation is:

[0031] Substituting the phase deviation rate of change into ,get The output of the terminal sliding mode control is exactly... Replace the terminal sliding mode control output with , Written as Meanwhile, the d-axis voltage expression, after being simplified by the Park transform, is:

[0032] Define the proportionality coefficient k=v d ≈Vm, Therefore, the error dynamics equation is: .

[0033] Furthermore, the stability analysis of the terminal sliding mode based on phase synchronization includes analyzing whether the sliding mode system is stable using the Lyapunov stability criterion, selecting the energy function V(s), and choosing the Lyapunov function as V=|s|, and differentiating it with respect to both sides of the sliding surface:

[0034] From the phase-locked loop error dynamics equation, we can obtain... Then, differentiating both sides of the control law equation and substituting them to eliminate the cross terms, we get:

[0035] From the Lyapunov function V=|s|, we obtain In the formula h0,h1 >0, |s| α If >0, then ≤0; V is positive definite. The terminal sliding mode controller is stable if the condition is negative; then, the arrival time of the stable state of the terminal sliding mode controller is solved. Tr and sliding time Ts , Tr Represented as:

[0036] ,in, Ts That is, after the terminal sliding mode system reaches the sliding surface s=0, vq The time it takes to gradually reach 0 vq When the phase ratio is 0, the terminal sliding mode system reaches the equilibrium point, and the controller completes phase synchronization. Ts Represented as:

[0037] Finally, the system's stabilization time T is the sum of the arrival times Tr and Ts, i.e.

[0038] .

[0039] Furthermore, the construction of the phase synchronization performance fitness function includes a synchronization time index T. lock The error signal is defined as the error signal entering the threshold band α and remaining at a value of not less than α. hold The earliest moment; Steady-state ripple index R: measures the mean square value of vq within the steady-state window; Jitter index C: measures the average absolute value of the rate of change Δu of the control variable q within the steady-state window; Penalty term P: assigns a penalty value when particle parameters violate hard constraints or diverge during the evaluation process, and the fitness function is expressed as:

[0040] Where w1, w2, and w3 are weight coefficients, then particle swarm optimization is performed iteratively. Initialization begins by randomly generating initial positions and velocities of particles within the parameter boundaries, where the position vector represents the parameters to be tuned. The optimal position for each individual particle is pBest. i The initial position is the position corresponding to the minimum fitness obtained by particle i in the historical iterations. The global optimal position gBest is the position corresponding to the minimum fitness obtained by all particles in the historical iterations. Let the particle swarm size be N and the maximum number of iterations be Nmax. Substitute the initial position and velocity into the calculation of the initial fitness J0, pBest i gBest; and then update the inertia weights. w(t)Based on the individual optimal pBest and the global optimal gBest, the velocity of particle 𝑖 is updated according to the following formula:

[0041] in r 1, r 2 represents independent uniform random numbers, used to introduce random perturbations to avoid getting trapped in local optima. c 1 , c 2 , where pBest is the learning factor, representing the strength of a particle's learning towards its individual best and gBest, respectively.

[0042] Further, the terminal sliding mode parameter tuning includes defining the key parameters in the terminal sliding mode phase synchronization controller as a parameter vector to be tuned, x = [a, b, h0, h1, α], where a and b are sliding surface weight coefficients; h0 and h1 are arrival law intensity correlation coefficients; and α is the terminal index, satisfying the following conditions: α+β =1 and 0<α,β<1, let the search dimension be D=5, at the t-th iteration, the position vector and velocity vector of the i-th particle are respectively expressed as:

[0043] Given the boundary values ​​of each parameter, set upper and lower bounds for each dimension parameter. lbd,ubd The upper and lower bounds can be set by system parameters and experience to ensure that the parameters have physical meaning and engineering feasibility, and must satisfy the hard constraints of x mentioned above. a,b >0, h0,h1 >0, α+β =1 and 0<α,β<1; when any parameter goes out of bounds or violates hard constraints, boundary projection / reflection is used for correction; the number of particles N is set, the maximum number of iterations Nmax is set, and the inertia weight is linearly decreasing to take into account the characteristics of accelerating exploration in the early stage and convergence in the later stage.

[0044] To mitigate evaluation distortion or closed-loop instability caused by excessive parameter jumps: A speed limit is set. .

[0045] Furthermore, the output of globally optimal parameters includes, to prevent excessively large step sizes from causing search divergence, applying a limiting parameter to each dimension d:

[0046] The location has been updated to:

[0047] If a dimension goes out of bounds after the position is updated, then execute... ,Will x i(t+1) Write the code to the terminal sliding mode controller for execution, and then calculate J. i(t+1) ;like Then update pBest i ,like Then update gBest i Finally, when the maximum number of iterations is reached, or the global optimal improvement magnitude after n consecutive iterations is less than the threshold δ, the optimal parameter vector corresponding to gBest is output.

[0048] Secondly, a terminal sliding mode phase synchronization control method system based on improved particle swarm optimization includes:

[0049] The data acquisition module is configured to acquire three-phase voltage signals;

[0050] The coordinate transformation module is configured to perform coordinate transformation on the three-phase voltage based on the acquired three-phase voltage signal;

[0051] The phase synchronization module is configured to perform phase synchronization of the fundamental voltage components of the three-phase voltage based on terminal sliding mode.

[0052] The stability module is configured to perform stability analysis on the terminal sliding mode based on phase synchronization.

[0053] The particle swarm optimization module is configured to optimize the parameter vector of the terminal sliding mode using the particle swarm optimization algorithm, including the construction of the phase synchronization performance fitness function and the tuning of the terminal sliding mode parameters.

[0054] The output module is configured to output the globally optimal parameters.

[0055] Thirdly, the present invention provides a computer-readable storage medium storing a plurality of instructions adapted for loading and execution by a processor of a terminal device of the aforementioned terminal sliding mode phase synchronization control method based on improved particle swarm optimization.

[0056] Fourthly, the present invention provides a terminal device, including a processor and a computer-readable storage medium, wherein the processor is used to implement various instructions; the computer-readable storage medium is used to store multiple instructions, the instructions being adapted to be loaded and executed by the processor to provide the terminal sliding mode phase synchronization control method based on improved particle swarm optimization.

[0057] In summary, the present invention has the following beneficial technical effects:

[0058] (1) Compared with the traditional phase synchronization scheme, this scheme innovatively adopts a terminal sliding mode controller to achieve precise synchronization of the phase of harmonic distortion voltage, reaches a stable synchronization state within a fixed time, and has strong anti-interference ability after entering the sliding mode surface, which greatly improves the ability to resist external disturbances.

[0059] (2) The key parameters of the terminal sliding mode controller are automatically tuned through particle swarm optimization, reducing manual trial and error, and the tuning results are better than manual trial and error.

[0060] (3) The evaluation function directly constrains the lock-in time, steady-state ripple and jitter proxy index, which is convenient to take into account both dynamic and steady-state conditions. Attached Figure Description

[0061] Figure 1 This is a block diagram of the sliding mode phase synchronization control of a three-phase voltage terminal according to an embodiment of the present invention.

[0062] Figure 2 This is a structural diagram of a three-phase voltage terminal sliding mode controller according to an embodiment of the present invention.

[0063] Figure 3 This is a flowchart of the improved particle swarm optimization algorithm according to an embodiment of the present invention.

[0064] Figure 4 It is the phase-locked angle output by the traditional PI controller of a three-phase grid-connected inverter under 8% 5th harmonic, 5% 7th harmonic, and 3% 11th harmonic.

[0065] Figure 5 This invention relates to a three-phase grid-connected inverter and a terminal sliding mode phase synchronization system based on improved particle swarm optimization, which outputs the phase-locked angle under 8% 5th harmonic, 5% 7th harmonic, and 3% 11th harmonic conditions. Detailed Implementation

[0066] The present invention will be further described in detail below with reference to the accompanying drawings.

[0067] Example 1

[0068] Reference Figure 1 This embodiment of a terminal sliding mode phase synchronization control method based on improved particle swarm optimization includes:

[0069] Step 1: Obtain the three-phase AC voltages va, VB, and VC at the grid connection point; wherein, the three-phase AC voltages va, VB, and VC at the grid connection point are acquired through a three-phase voltage sensor.

[0070] Step 2: First, perform Clark transformation on the three-phase AC voltages va, vb, and vc to convert them from the stationary coordinate system abc to the αβ components (vα, vβ) in the stationary coordinate system. vα and vβ are expressed as:

[0071] (1)

[0072] To achieve high-precision phase-locking under voltage distortion and background harmonics, and to suppress background harmonics and noise interference while ensuring dynamic response, this embodiment uses SOGI to extract the AC fundamental component in real time, and obtain the α-axis fundamental voltage vector vα1 and the β-axis fundamental voltage vector vβ1.

[0073] The fundamental components Vα1 and Vβ1 are extracted using a second-order generalized integrator (SOGI):

[0074] ,

[0075] in (2)

[0076] Finally, after Park transformation, the vectors are converted into the d-axis DC voltage vector Vvd and the q-axis DC voltage vector vq in a rotating coordinate system.

[0077] (3)

[0078] Step 3: Input the fundamental voltage components vd and vq of the d-axis and q-axis in the rotating coordinate system to the terminal sliding mode controller, and the controller outputs the frequency correction value u; then, compare u with... w0 The output angular frequency is obtained by superposition. w’ The estimated phase angle is obtained by integration, and the 2π remainder is performed to obtain the three-phase voltage output phase θ, which is the phase synchronized with the three-phase voltage signal. The phase is then used to provide the phase angle for the park coordinate transformation.

[0079] The sliding surface of the terminal sliding mode controller is:

[0080] (4)

[0081] The terminal sliding mode control law is:

[0082] (5)

[0083] in a,b >0, h0,h1 >0, α+β =1 and 0<α,β<1, sig x (y)=sign(y)*|y| x .

[0084] The above parameters together constitute the set of key parameters to be tuned. In this embodiment, the vector of parameters to be tuned is defined as: x=[a,b,h0,h1, α];

[0085] Once the system stabilizes, the controller output phase is synchronized with the three-phase voltage phase to obtain the true phase of the voltage signal. At the same time, the output phase is used to provide the phase transformation angle for the system's transformation from the αβ to the dq coordinate system.

[0086] Step 4: Optimize the terminal sliding mode parameters from Step 3 using the particle swarm optimization algorithm, including particle encoding and parameter setting, fitness function and evaluation quantity, and particle swarm iterative update. When the maximum number of iterations is reached or the global optimal fitness is less than the threshold δ within several consecutive generations, the process terminates and obtains the optimal x*. Write x* into the terminal sliding mode controller as the final tuning parameter, so that the phase synchronization control closed loop achieves a comprehensive optimization effect of shorter synchronization time, smaller steady-state ripple, and lower jitter level under the target constraint.

[0087] Specifically, by utilizing the fundamental frequency selection characteristic of SOGI, other harmonics in the three-phase voltage signal containing harmonic components are filtered out, and the resulting three-phase fundamental voltage is expressed as:

[0088] (6)

[0089] in Vm This refers to the three-phase voltage amplitude. φ0 Let a be the initial phase of phase a voltage, and let the phase of phase a voltage be... .

[0090] The phase extracted by the proposed terminal sliding mode controller is ,in , ( (To control the signal, adjust the frequency deviation). This is the extracted initial phase.

[0091] Phase information is not easily obtained directly from three-phase AC signals. In engineering, three-phase signals are usually transformed from a natural coordinate system to a synchronous rotating coordinate system. The coordinate transformation formula is as follows:

[0092] ;

[0093] (7)

[0094] q The expression for the axis voltage is the product of the second row of the Park transform and the three-phase voltage:

[0095] (8)

[0096] Substituting the three-phase fundamental voltage, we get

[0097] (9)

[0098] make (Phase deviation, Δ during synchronization) θ =0), then Substituting into equation (7) simplifies the expression; to simplify the expression, we define... △θ To estimate the difference between the phase angle and the true phase angle: Simplified vq and △θ The relationship between them can be written as:

[0099] (10)

[0100] Similarly, the fundamental voltage in the three-phase voltage signal is compared with the matrix... P(θ') The first row of multiplication and simplification yields... vd :

[0101] (11)

[0102] Observing equation (10), the derivative yields the phase-locked loop error dynamics. An initial phase φ0 exists in vq. To eliminate the unmeasurable φ0, for... Differentiating both sides, we obtain the relationship between the rate of change of vq and the rate of change of phase deviation:

[0103] (12)

[0104] Wherein the rate of change of phase deviation: (13)

[0105] Substituting the rate of change of phase deviation into... ,get The terminal sliding mode control output is exactly... Replace the terminal sliding mode control output with , Can be written as During phase synchronization, the phase deviation Δ θ It is very small, eventually converges to 0, and satisfies the small angle approximation cos△ θ ≈1, and the d-axis voltage expression, after Park transformation simplification, is: Define the proportionality coefficient k=v d ≈Vm, Therefore, the error dynamics equation is: (14).

[0106] This formula shows that the rate of change of the q-axis voltage is proportional to the output u of the terminal sliding mode controller, with a proportionality coefficient of -k. The subsequent terminal sliding mode controller is designed with the sliding surface based on this characteristic.

[0107] Specifically, in step three, observe the terminal sliding surface function. The first term adds a coefficient 1 / k to normalize dvq / dt. k relies on the Clark and Park transforms to obtain the accurate d-axis voltage value. Normalization makes this term easier to match with the dimensions / scales of other terms, reducing difficulties caused by inconsistent amplitude scales during parameter tuning. In subsequent sliding surface calculations, the error dynamics and control law are incorporated to cancel each other out, which helps maintain the usability and tuneability of the sliding surface parameters under varying amplitude scales. The second term, sig... γ (vq) ensures the finite-time stability of the sliding phase and avoids singularities. It is used to accelerate convergence near zero error and control vq to reach 0 within a finite time during the sliding surface arrival phase. The third term is linear. When vq is far from the equilibrium point, the convergence speed of the third term is much greater than that of the second term, dominating the pull-back capability when far from the origin, allowing the terminal sliding surface to reach a stable state faster. However, at the same time, the sliding surface directly contains differential terms, and digital implementation usually requires differential or filtered estimation. Differentiation can amplify measurement noise, affecting the arrival process and jitter level, requiring reasonable parameter adjustment to mitigate the influence of differential terms.

[0108] Observational control law (15)

[0109] The formula is divided into equivalent terms. and dynamic items The equivalent term is isomorphic to the sliding surface nonlinear term, which facilitates the elimination of cross terms in the derivation; the dynamic term is... The integral of the dynamic term helps to reduce chattering caused by direct switching in traditional sliding mode. The coefficients consist of a constant term h0 and an adjustment term h1|s| for the sliding surface. α Adjustment term h1|s| α The driving force in the large error range increases with |s|, improving the arrival speed. As the sliding surface approaches the equilibrium point, the adjustment term decreases to avoid over-adjustment, while the constant term provides the basic arrival speed, preventing the driving force from being too weak in the small error range. However, at the same time, the following is introduced... u 1 The integral stage carries the risk of integral accumulation under saturation. The parameters of the terminal sliding mode controller need to be matched to each other to avoid the decline or even instability of sliding mode performance. This will be addressed in step four by parameter optimization.

[0110] Furthermore, the stability of the sliding mode system at this terminal is analyzed. Whether the sliding mode system can be stable is often determined by the Lyapunov stability criterion. By selecting the energy function V(s), when V(s) is tuned and the derivative of V(s) is negative, the sliding mode system is stable.

[0111] The Lyapunov function chosen is V=|s|.

[0112] Differentiate with respect to both sides of the sliding surface: (16)

[0113] Substitute the above error dynamics equation (13) into (16).

[0114] (17)

[0115] Differentiating both sides of the control law equation and substituting them into the above equation to eliminate the cross terms, we get:

[0116] (18)

[0117] From the Lyapunov function V=|s|, we can obtain...

[0118] (19)

[0119] Substituting (19) into (18), we get

[0120] (20)

[0121] In the formula h0,h1 >0, |s| α If >0, then ≤0;

[0122] V is positive definite. Negative constant, the terminal sliding mode controller is stable.

[0123] Furthermore, the terminal sliding mode controller can reach a steady state within a finite time, which is divided into arrival time. Tr and sliding time Ts .

[0124] Specifically, the sliding membrane system reaches the sliding surface. s=0 The time taken is Tr time, Tr The solution is as follows:

[0125] Equation (20) can be written in derivative form.

[0126] (twenty one)

[0127] By separating the variables, we can obtain

[0128] (twenty two)

[0129] Integrating both sides, from the initial time t=0 (corresponding to...) V=V0 )arrive V =0 Tr :

[0130] (twenty three)

[0131] achievable

[0132] (twenty four)

[0133] From α+β=1 (if α+β≠1), we can obtain

[0134] (25)

[0135] make ;

[0136] (26)

[0137] Substituting (26) into (25) yields

[0138] (27)

[0139] Points can be obtained

[0140] (28)

[0141] Specifically, Ts That is, after the terminal sliding mode system reaches the sliding surface s=0, vq The time it takes to gradually reach 0 vq When the phase ratio is 0, the terminal sliding mode system reaches the equilibrium point, and the controller completes phase synchronization. The calculations begin below. Ts :

[0142] From s=0, we know

[0143] (29)

[0144] Organized

[0145] (30)

[0146] To eliminate sign ( x The function should be considered first. vq Monotonicity:

[0147] vq >0 vq is a monotonically decreasing function;

[0148] When vq<0 Note that vq < 0 at this point, and vq is a monotonically increasing function;

[0149] vq =0, , vq =0 is a stable point of the system.

[0150] The above analysis shows that, vq It is a monotonic function, regardless of the initial value. vq0 Whether the value is positive, negative, or zero, the system state will monotonically tend towards the equilibrium point. vq = 0, this is a globally asymptotically stable and monotonic system, and vq Always positive or always negative sign (vq) Based on the initial state vq0 It is always 1 or -1, only when vq = 0 becomes 0.

[0151] First, let's discuss vq0 In the case of >0, at this time

[0152] (31)

[0153] Substituting into the above equation, we get

[0154] (32)

[0155] Separating variables

[0156] (33)

[0157] Let t = γ - 1 < 0, the above equation becomes

[0158] (34)

[0159] From the standard integral formula

[0160] (35)

[0161] achievable

[0162] (36)

[0163] when ,have ,but

[0164] (37)

[0165] Substituting (37) into (36), we can finally obtain

[0166] (38)

[0167] Reconsider vq0<0 The situation makes w=-vq0 ,but w0=-vq0 .

[0168] have ,and

[0169] (39)

[0170] Substituting into the original equation, we get

[0171] (40)

[0172] Simplified

[0173] (41)

[0174] vq0 The dynamic equation and the original equation when <0 vq0 The dynamic equations for values ​​greater than 0 are completely identical, except that the variable names are different. vq It was changed to w Similarly w From initial value w0 The time taken to reach 0 is:

[0175] (42)

[0176] In summary, the sliding mode phase-locked loop sliding time of this terminal Ts for:

[0177] .

[0178] The system settling time T is the sum of the arrival times Tr and Ts, i.e.

[0179] ,

[0180] Specifically, the improved particle swarm optimization algorithm in step 4 includes the following steps for tuning the parameters:

[0181] Step 4.1: Define the key parameters in the terminal sliding mode phase synchronization controller as the parameter vector to be tuned: x = [a, b, h0, h1, α], where a and b are the sliding surface weight coefficients; h0 and h1 are the arrival law intensity correlation coefficients; and α is the terminal index, satisfying the following conditions: α+β =1 and 0<α,β<1, let the search dimension be D=5, at the t-th iteration, the position vector and velocity vector of the i-th particle are respectively expressed as:

[0182] Given the boundary values ​​of each parameter, set upper and lower bounds for each dimension parameter. lbd,ubd The upper and lower bounds can be set by system parameters and experience to ensure that the parameters have physical meaning and engineering feasibility, and must satisfy the hard constraints of x mentioned above. a,b >0, h0,h1 >0, α+β=1 and 0<α,β<1; when any parameter goes out of bounds or violates hard constraints, boundary projection / reflection is used for correction; the number of particles N is set, the maximum number of iterations Nmax is set, and the inertia weight is linearly decreasing to take into account the characteristics of accelerating exploration in the early stage and convergence in the later stage.

[0183] ,

[0184] Speed ​​limits are set to suppress evaluation distortion or closed-loop instability caused by excessive parameter jumps:

[0185] ,

[0186] Step 4.2: Construct the phase synchronization performance fitness function J, and minimize J as the optimization objective. The fitness function includes the following indices: synchronization time index T. lock The error signal is defined as the error signal entering the threshold band α and remaining at a value of not less than α. hold The earliest moment is used to reflect the synchronization speed, and in the terminal sliding mode controller, it can be approximately represented by the settling time; Steady-state ripple index R: measures the mean square value of vq within the steady-state window, used to reflect the steady-state synchronization accuracy and ripple level; Jitter index C: measures the average absolute value of the rate of change Δu of the control variable q within the steady-state window, used to reflect the control jitter and noise amplification trend. Penalty term P: when particle parameters violate hard constraints, diverge during the evaluation process, or fail to meet the synchronization criterion within Tmax, a large penalty value is assigned, causing the particle to be automatically eliminated in the optimization.

[0187] The fitness function can be expressed as:

[0188] ,

[0189] Where w1, w2, and w3 are weighting coefficients used to reflect the engineering side's emphasis on synchronization speed, steady-state accuracy, and jitter suppression. At the same time, attention should be paid to T. lock The magnitudes of R, C, and P are used to configure weighting coefficients to avoid any one factor having too much weight.

[0190] Step 4.3, perform particle swarm optimization update, such as... Figure 3 As shown, particle encoding and parameter settings are used to construct a fitness function and evaluation metric. The particle swarm is iteratively updated. When the maximum number of iterations is reached or the global optimal fitness is less than the threshold δ within several consecutive generations, the process terminates and obtains the optimal x*. x* is written into the terminal sliding mode controller as the final optimization parameter to improve the phase synchronization accuracy and speed.

[0191] Follow these steps:

[0192] Step 4.3.1, Initialization: Randomly generate the initial position and velocity of the particles within the parameter boundaries, where the position vector is the parameter to be tuned; the optimal position of an individual is pBest. i The initial position is the position corresponding to the minimum fitness obtained by particle i in the historical iterations. The global optimal position gBest is the position corresponding to the minimum fitness obtained by all particles in the historical iterations. Let the particle swarm size be N and the maximum number of iterations be Nmax. Substitute the initial position and velocity into the calculation of the initial fitness J0, pBest i gBest;

[0193] Step 4.3.2, Update the inertia weights w(t) Based on the individual optimal pBest and the global optimal gBest, the velocity of particle 𝑖 is updated according to the following formula:

[0194] ,

[0195] in r 1, r 2 represents independent uniform random numbers, used to introduce random perturbations to avoid getting trapped in local optima. c 1 , c 2 The learning factor (acceleration coefficient) represents the intensity of a particle's learning towards its individual optimal pBest and its learning towards the global optimal gBest, respectively.

[0196] To prevent the search from diverging due to an excessively large step size, a limit is applied to each dimension d:

[0197] ,

[0198] Location updated to:

[0199] ,

[0200] If a dimension goes out of bounds after the position is updated, then execute...

[0201] ,

[0202] Will x i(t+1) Write the code to the terminal sliding mode controller for execution, and then calculate J. i(t+1) ;

[0203] like Then update pBest i ,like Then update gBest i .

[0204] Step 4.3.3 When the system iteration reaches the maximum number of iterations, or the global optimal improvement magnitude of the n consecutive iterations is less than the threshold δ, output the optimal parameter vector corresponding to gBest.

[0205] Experimental verification

[0206] Figure 1 This is a block diagram of the three-phase voltage terminal sliding mode phase synchronization control. First, the three-phase voltage is transformed by Clark, and harmonic components in the voltage are filtered out by SOGI. Then, Park transformation is performed, and Vd and Vq are sent to the terminal sliding mode controller to obtain the frequency deviation. The deviation is then superimposed with the fundamental frequency and the remainder is taken as 2*pi to obtain the true phase of the three-phase voltage, thus achieving synchronization.

[0207] Figure 2 This is a structural diagram of the terminal sliding mode controller for three-phase voltage according to an embodiment of the present invention. The input variable is vq, and k is approximately vd. The output u is obtained by the calculation method shown in the diagram and superimposed with the fundamental angular velocity to obtain the angular velocity.

[0208] Figure 3 This is a flowchart of the improved particle swarm optimization algorithm according to an embodiment of the present invention. After starting, the search count is initialized, followed by the initial positions and velocities of random examples. The initial values ​​J0, pbesti, and gbest are calculated, and then iterative updates are performed, including updating the iteration count, calculating the inertia weight, calculating and updating the fitness, the individual optimal position, the global optimal position, and then updating the position and velocity of each example. Boundary constraints are checked, and if the stopping condition is met, the optimized control parameters are output; otherwise, the search cycle is updated, and the iterative update algorithm continues.

[0209] Figure 4 and Figure 5 In a MATLAB simulation, with the fundamental frequency of the three-phase power grid voltage set to 50 Hz and background noise levels of 8% 5th harmonic, 5% 7th harmonic, and 3% 11th harmonic, the output phase angle of the SRF-pll system using traditional PI control is compared to the output phase angle of the terminal sliding mode phase synchronization system based on improved particle swarm optimization implemented in this invention. (Observation) Figure 4 It is known that traditional control methods require approximately four cycles to achieve stable synchronization, and the output phase exhibits jitter and distortion, resulting in a significant error compared to the actual fundamental frequency phase. Figure 5 The phase output angle proposed in this invention achieves phase synchronization in less than one cycle, with a smooth and jitter-free phase that highly coincides with the fundamental phase of the three-phase power grid voltage.

[0210] To verify the terminal sliding mode phase synchronization control method based on improved particle swarm optimization proposed in this invention, Figure 4 Simulation results of phase synchronization control under a traditional PI controller are presented. Figure 4 It can be seen that the phase synchronization time of the traditional method is relatively long. Figure 5 The proposed terminal sliding mode phase synchronization control method based on improved particle swarm optimization achieves rapid and stable phase synchronization within one cycle.

[0211] Example 2

[0212] This embodiment provides a terminal sliding mode phase synchronization control method system based on improved particle swarm optimization, including:

[0213] The data acquisition module is configured to acquire three-phase voltage signals;

[0214] The coordinate transformation module is configured to perform coordinate transformation on the three-phase voltage based on the acquired three-phase voltage signal;

[0215] The phase synchronization module is configured to perform phase synchronization of the fundamental voltage components of the three-phase voltage based on terminal sliding mode.

[0216] The stability module is configured to perform stability analysis on the terminal sliding mode based on phase synchronization.

[0217] The particle swarm optimization module is configured to optimize the parameter vector of the terminal sliding mode using the particle swarm optimization algorithm, including the construction of the phase synchronization performance fitness function and the tuning of the terminal sliding mode parameters.

[0218] The output module is configured to output the globally optimal parameters.

[0219] A computer-readable storage medium storing a plurality of instructions adapted for loading and execution by a processor of a terminal device of the aforementioned terminal sliding mode phase synchronization control method based on improved particle swarm optimization.

[0220] A terminal device includes a processor and a computer-readable storage medium, the processor being configured to implement various instructions; the computer-readable storage medium being configured to store multiple instructions adapted for loading and execution by the processor of the aforementioned terminal sliding mode phase synchronization control method based on improved particle swarm optimization.

[0221] The above are all preferred embodiments of the present invention and are not intended to limit the scope of protection of the present invention. Therefore, all equivalent changes made in accordance with the structure, shape and principle of the present invention should be covered within the scope of protection of the present invention.

Claims

1. A terminal sliding mode phase synchronization control method based on improved particle swarm optimization, characterized in that, include: Obtain three-phase voltage signals; The coordinate transformation of the three-phase voltage is performed based on the acquired three-phase voltage signals; Phase synchronization of the fundamental voltage component of the three-phase voltage is achieved based on terminal sliding mode. Stability analysis of terminal sliding mode based on phase synchronization; The particle swarm optimization algorithm is used to optimize the parameter vector of the terminal sliding mode, including the construction of the phase synchronization performance fitness function and the tuning of the terminal sliding mode parameters; Output the globally optimal parameters; The coordinate transformation of the three-phase voltages based on the acquired three-phase voltage signals includes transforming the acquired grid-connected three-phase AC voltages va, vb, and vc from a stationary coordinate system to a synchronously rotating coordinate system to obtain the d-axis fundamental voltage component vd and the q-axis fundamental voltage component vq. First, a Clark transformation is performed on the three-phase AC voltages va, vb, and vc to convert them from the stationary coordinate system abc to the αβ components vα and vβ in the stationary coordinate system, expressed as: To achieve high-precision phase-locking under voltage distortion and background harmonics, and to suppress background harmonics and noise interference while ensuring dynamic response, SOGI is used to extract the AC fundamental component in real time, obtaining the α-axis fundamental voltage vector vα1 and the β-axis fundamental voltage vector vβ1. The fundamental components vα1 and vβ1 are then extracted using a second-order generalized integrator SOGI. ,in Finally, after Park transformation, it is converted into the d-axis DC voltage vector vd and the q-axis DC voltage vector vq in a rotating coordinate system: ; Phase synchronization of the fundamental voltage components of the three-phase voltage is achieved based on a terminal sliding mode controller. This includes inputting the fundamental voltage components vd and vq along the d-axis and q-axis of the rotating coordinate system to the terminal sliding mode controller, which outputs a frequency correction u. u is superimposed with w0 to obtain the output angular frequency w', which is then integrated to obtain the estimated phase angle. A 2π remainder is then performed to obtain the three-phase voltage output phase θ, i.e., the phase synchronized with the three-phase voltage signal. This phase is used to provide the phase angle for the Park coordinate transformation. The sliding surface of the terminal sliding mode controller is: The terminal sliding mode control law is: , where a, b>0, h0, h1>0, α+β=1 and 0<α,β<1,sig x (y)=sign(y)*|y| x The vector of parameters to be tuned is defined as: x=[a,b,h0,h1,α]; the final controller output phase is synchronized with the three-phase voltage phase to obtain the true phase of the voltage signal, and at the same time, the output phase is used to provide the phase transformation angle for the system to transform from the αβ to the dq coordinate system.

2. The terminal sliding mode phase synchronization control method based on improved particle swarm optimization according to claim 1, characterized in that, The phase synchronization of the fundamental voltage component of the three-phase voltage based on terminal sliding mode also includes solving the error dynamics equation based on phase synchronization. First, the fundamental voltage in the three-phase voltage signal extracted by SOGI is expressed as: Where Vm is the amplitude of the three-phase voltage, φ0 is the initial phase of the a-phase voltage, and the phase of the a-phase voltage is... The phase extracted by the terminal sliding mode controller is represented as: ,in , For control signals, To extract the initial phase, since phase information cannot be directly obtained from three-phase AC signals, the three-phase signals are transformed from the natural coordinate system to a synchronous rotating coordinate system. The coordinate transformation formula is as follows: , Then, multiply the fundamental voltage in the three-phase voltage signal by the second row of matrix P(θ') to calculate vq: 。 3. The terminal sliding mode phase synchronization control method based on improved particle swarm optimization according to claim 2, characterized in that, The method for solving the error dynamics equation based on phase synchronization also includes simplifying the result by multiplying the fundamental voltage in the three-phase voltage signal with matrix P(θ') to obtain vd: Finally, the phase-locked loop error dynamics are derived, where vq has an initial phase φ0, and the relationship between the rate of change of vq and the rate of change of phase deviation is expressed as: The rate of change of phase deviation is: Substituting the phase deviation rate of change into ,get The terminal sliding mode control output is exactly... Replace the terminal sliding mode control output with , Written as Meanwhile, the d-axis voltage expression, after being simplified by the Park transform, is: Define the proportionality constant k=v d ≈Vm, therefore the error dynamics equation is: .

4. The terminal sliding mode phase synchronization control method based on improved particle swarm optimization according to claim 3, characterized in that, The stability analysis of the terminal sliding mode based on phase synchronization includes analyzing whether the sliding mode system is stable using the Lyapunov stability criterion, selecting the energy function V(s), and choosing the Lyapunov function as V=|s|, and differentiating it with respect to both sides of the sliding surface: From the phase-locked loop error dynamics equation, we can obtain... Then, differentiating both sides of the control law equation and substituting them to eliminate the cross terms, we get: From the Lyapunov function V=|s|, we obtain In the formula, h0, h1 > 0, |s| α If >0, then ≤0; V is positive definite. The terminal sliding mode controller is stable; then, the arrival time Tr and sliding time Ts of the stable state of the terminal sliding mode controller are solved, where Tr is denoted as; Where Ts is the time taken for vq to gradually reach 0 after the terminal sliding mode system reaches the sliding surface s=0. When vq=0, the terminal sliding mode system reaches the equilibrium point, and the controller completes phase synchronization. Ts is expressed as: Finally, the system's stabilization time T is the sum of the arrival times Tr and Ts, i.e. .

5. The terminal sliding mode phase synchronization control method based on improved particle swarm optimization according to claim 4, characterized in that, The phase synchronization performance fitness function is constructed, including the synchronization time index T. lock The error signal is defined as the error signal entering the threshold band α and remaining at a value of not less than α. hold The earliest moment; Steady-state ripple index R: measures the mean square value of vq within the steady-state window; Jitter index C: measures the average absolute value of the rate of change Δu of the control variable q within the steady-state window; Penalty term P: assigns a penalty value when particle parameters violate hard constraints or diverge during the evaluation process, and the fitness function is expressed as: Where w1, w2, and w3 are weight coefficients, then particle swarm optimization is performed iteratively. Initialization begins by randomly generating initial positions and velocities of particles within the parameter boundaries, where the position vector represents the parameters to be tuned. The optimal position for each individual particle is pBest. i The initial position is the position corresponding to the minimum fitness obtained by particle i in the historical iterations. The global optimal position gBest is the position corresponding to the minimum fitness obtained by all particles in the historical iterations. Let the particle swarm size be N and the maximum number of iterations be Nmax. Substitute the initial position and velocity into the calculation of the initial fitness J0, pBest i , gBest; then update the inertia weight w(t), and based on the individual optimal pBest and the global optimal gBest, the velocity of particle 𝑖 is updated according to the following formula: Where r1 and r2 are independent uniform random numbers used to introduce random perturbations to avoid getting trapped in local optima, and c1 and c2 are learning factors, representing the strength of the particle's learning towards the individual optimal pBest and the global optimal gBest, respectively.

6. The terminal sliding mode phase synchronization control method based on improved particle swarm optimization according to claim 5, characterized in that, The terminal sliding mode parameter tuning includes defining the key parameters in the terminal sliding mode phase synchronization controller as a parameter vector to be tuned, x = [a, b, h0, h1, α], where a and b are sliding surface weight coefficients; h0 and h1 are arrival law intensity correlation coefficients; α is the terminal index, and satisfies α + β = 1 and 0 < α, β < 1. Assuming the search dimension is D = 5, at the t-th iteration, the position vector and velocity vector of the i-th particle are respectively expressed as: Given the boundary values ​​of each parameter, upper and lower bounds [lbd, ubd] are set for each dimension parameter. These upper and lower bounds can be set by system parameters and experience to ensure that the parameters have physical meaning and engineering feasibility, and must satisfy the above hard constraints for x: a, b > 0, h0, h1 > 0, α + β = 1 and 0 < α, β < 1. When any parameter exceeds the boundary or violates the hard constraints, boundary projection / reflection is used for correction. The number of particles N and the maximum number of iterations Nmax are set, and the inertia weight is linearly decreasing to take into account the characteristics of accelerating exploration in the early stage and convergence in the later stage. To mitigate evaluation distortion or closed-loop instability caused by excessive parameter jumps: A speed limit is set. .

7. The terminal sliding mode phase synchronization control method based on improved particle swarm optimization according to claim 6, characterized in that, The output of globally optimal parameters includes a limit on each dimension d to prevent the search from diverging due to an excessively large step size: The location has been updated to: If a dimension goes out of bounds after the position is updated, then execute... , will x i(t+1) Write the code to the terminal sliding mode controller for execution, and then calculate J. i(t+1) ;like Then update pBest i ,like Then update gBest i Finally, when the maximum number of iterations is reached, or the global optimal improvement magnitude after n consecutive iterations is less than the threshold δ, the optimal parameter vector corresponding to gBest is output.

8. A terminal sliding mode phase synchronization control method system based on improved particle swarm optimization, executing the terminal sliding mode phase synchronization control method based on improved particle swarm optimization as described in claim 1, characterized in that, include: The data acquisition module is configured to acquire three-phase voltage signals; The coordinate transformation module is configured to perform coordinate transformation on the three-phase voltage based on the acquired three-phase voltage signal; The phase synchronization module is configured to perform phase synchronization of the fundamental voltage components of the three-phase voltage based on terminal sliding mode. The stability module is configured to perform stability analysis on the terminal sliding mode based on phase synchronization. The particle swarm optimization module is configured to optimize the parameter vector of the terminal sliding mode using the particle swarm optimization algorithm, including the construction of the phase synchronization performance fitness function and the tuning of the terminal sliding mode parameters. The output module is configured to output the globally optimal parameters.

Citation Information

Patent Citations

  • Sliding mode controller and phase-locked loop parameter multi-objective optimization method based on grid-connected inverter

    CN119070382A

  • Three-phase SVPWM (Space Vector Pulse Width Modulation) grid-connected inverter harmonic control method based on improved particle swarm optimization

    CN119482657A