Single-phase phase-locked loop system capable of intelligently adjusting parameters
By using spectrum analysis and mirage search optimization algorithms, autonomous parameter optimization of the single-phase phase-locked loop system was achieved, solving the problems of rapid locking and steady-state error of traditional phase-locked loops in low-voltage distribution network environments, and improving the power quality and anti-disturbance performance of the power grid.
Patent Information
- Application Number
- CN202511190538.8
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-08-25
- Publication Date
- 2025-12-16
- Estimated Expiration
- 2045-08-25
AI Technical Summary
In low-voltage distribution network environments where distributed photovoltaic, energy storage, and electric vehicle charging facilities are extensively integrated, traditional single-phase phase-locked loops (PLLs) struggle to simultaneously achieve fast locking, low steady-state error, and high disturbance rejection performance, and they also lack systematic and intelligent parameter optimization methods.
The fundamental frequency and angular velocity are extracted in real time by a spectrum analysis unit. Combined with an adaptive single-phase phase-locked loop unit and a control parameter intelligent optimization unit, the optimal PI controller parameters are obtained iteratively using a mirage search optimization algorithm, thereby realizing autonomous parameter optimization and online tuning.
It enables rapid, accurate, and long-term stable parameter adjustment of the phase-locked loop, eliminating the need for manual debugging and improving grid adaptability and power quality.
Smart Images

Figure CN121150690A_ABST
Abstract
Description
TECHNICAL FIELD
[0001] The application relates to a single-phase phase-locked loop system with intelligent parameter adjustment. BACKGROUND
[0002] With the large number of distributed photovoltaic, energy storage and electric vehicle charging facilities being connected, the power quality of low-voltage distribution networks is deteriorating. Traditional single-phase phase-locked loops usually use fixed parameter PI controllers and fixed delay filters, which are difficult to meet the requirements of fast locking, low steady-state error and high disturbance rejection performance in the above environment. Some documents propose adaptive PI or variable delay filters, but the parameter updating rules depend on expert experience, and there is a lack of systematic and intelligent online tuning methods, resulting in a huge amount of work in field debugging. Therefore, there is an urgent need for a phase-locked loop system that can identify the characteristics of the power grid in real time and autonomously complete parameter optimization. SUMMARY
[0003] The application provides a single-phase phase-locked loop system with intelligent parameter adjustment to solve the technical problem of the above-mentioned traditional early warning method being not accurate enough, and specifically adopts the following technical scheme:
[0004] A single-phase phase-locked loop system with intelligent parameter adjustment comprises:
[0005] A spectrum analysis unit is configured to perform real-time frequency domain transformation on a single-phase power grid voltage and output a fundamental frequency f c , a fundamental angular velocity ω c and a cascaded delay signal cancellation parameter n i in real time.
[0006] An adaptive single-phase phase-locked loop unit is configured to sequentially arrange an improved third-order generalized integrator, a dq converter, a cascaded delay signal canceller CDSC, a PI controller, an integrator and a modulus extractor along a signal path, wherein the cascaded delay signal canceller CDSC takes the fundamental frequency f c as a reference frequency and takes the fundamental angular velocity ω c as a reference angular velocity of an input end of the integrator, an angular velocity increment Δω output by the PI controller is added to the fundamental angular velocity ω c to determine a phase-locked angle θ together, and the proportional coefficient k p and the integral coefficient k i of the PI controller are refreshed online by an external device and take effect immediately.
[0007] A control parameter intelligent optimization unit is configured to iteratively obtain optimal [k p , k i ] based on a mirage search optimization algorithm MSO and deliver the optimal [k p , k i ] to the adaptive single-phase phase-locked loop unit.
[0008] Further, the spectrum analysis unit processes the sliding cycle queue with FFT of 5Hz resolution, and extracts five spectral lines with the largest amplitude using five-element minimum heap, and then converts to obtain the fundamental frequency f c , fundamental angular velocity ω c and cascade delay signal cancellation parameter n i .
[0009] Further, the spectrum analysis unit writes the current fundamental frequency f c , fundamental angular velocity ω c and cascade delay signal cancellation parameter n i into the Flash every 10 minutes to restore the historical parameters after power failure and restart.
[0010] Further, the improved third-order generalized integrator sets a band-stop pole at zero frequency, and generates a pair of orthogonal signals at the output for the dq converter to eliminate DC offset and high-order harmonics.
[0011] Further, the cascade delay signal canceller CDSC is composed of four cascaded delay signal cancellation units, and each delay amount Δt i = 1 / (n i ·f c ), where n1-n4 correspond to the 2nd-5th main harmonics, realizing successive filtering.
[0012] Further, after receiving new [k p , k i ], the PI controller updates the coefficients through non-disturbance switching mode, ensuring continuous operation of the phase-locked loop and stepless output.
[0013] Further, the objective function of the control parameter intelligent optimization unit is:
[0014]
[0015] Where Δω(t) is the value of the error Δω output by the single-phase phase-locked loop PI controller at time t, and T is the time length required for the phase-locked loop to successfully phase-lock.
[0016] Further, the MSO initializes 20 observation positions, and alternately performs upper mirage global search and lower mirage local search within the total iteration round T o to output the position with the minimum fitness as the optimal [k p , k i ].
[0017] Further, the upper mirage stage determines the left or right correction direction of the observation position through the random direction flag dir∈{1,2}, and the correction amount linearly decays with iteration.
[0018] Furthermore, the intelligent optimization unit for control parameters will obtain the optimal [k] p ,k i Write to non-volatile memory, which is Flash, and simultaneously store the optimization enable flag, optimization completion flag, and history [k]. p ,k i This is used by the system state machine to achieve one-click self-tuning.
[0019] The single-phase phase-locked loop system with intelligent parameter adjustment provided by this invention eliminates the need for manual parameter adjustment, and provides fast, accurate, and long-term stable phase locking. Attached Figure Description
[0020] To more clearly illustrate the technical solutions in the embodiments of this application or the prior art, the drawings used in the description of the embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are only some embodiments of this application. For those skilled in the art, other drawings can be obtained based on these drawings without creative effort.
[0021] Figure 1 This is a schematic diagram of a single-phase phase-locked loop system with intelligent parameter adjustment according to the present invention. Detailed Implementation
[0022] The embodiments of this application are described in detail below. Examples of the embodiments are shown in the accompanying drawings, wherein the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The embodiments described below with reference to the accompanying drawings are exemplary and intended to explain this application, and should not be construed as limiting this application.
[0023] like Figure 1 As shown, this application discloses a single-phase phase-locked loop system with intelligent parameter adjustment, comprising: a spectrum analysis unit, an adaptive single-phase phase-locked loop unit, and a control parameter intelligent optimization unit.
[0024] The spectrum analysis unit analyzes the fundamental and harmonic signals of the single-phase grid voltage signal in real time. Specifically, the spectrum analysis unit performs frequency domain transformation on the single-phase grid voltage in real time and outputs the fundamental frequency f in real time. c ω c and cascaded delay signal cancellation parameter n i .
[0025] The adaptive single-phase phase-locked loop unit sequentially includes an improved third-order generalized integrator, a dq converter, a cascaded delay signal canceller (CDSC), a PI controller, an integrator, and a modulus extractor along the signal path. The cascaded delay signal canceller (CDSC) operates at the fundamental frequency f. c Using the reference frequency and the fundamental angular velocity ωc The reference angular velocity as the input of the integrator is the angular velocity increment Δω outputted by the PI controller plus the fundamental angular velocity ω c The proportional coefficient k p and the integral coefficient k i of the PI controller are determined by the sum of the angular velocity increment Δω outputted by the PI controller and the fundamental angular velocity ω p The proportional coefficient k i and the integral coefficient k p of the PI controller are updated by the external online refreshment and take effect immediately. i The double buffering mechanism in the PI controller enables the updating of k p and k i in a single interrupt period without interrupting the continuous operation of the phase-locked loop.
[0026] The control parameter intelligent optimization unit iteratively calculates the optimal [k p , k i ] based on the mirage search optimization algorithm MSO and delivers them to the adaptive single-phase phase-locked loop unit. The control parameter intelligent optimization unit also writes the optimal [k p , k i ] into the non-volatile memory to complete the parameter self-tuning in a closed loop. The control parameter intelligent optimization unit completing the parameter self-tuning in a closed loop means that it not only gives the optimal parameters once, but also re-triggers the MSO when the power grid operating condition changes again, realizing the true sense of lifelong commissioning-free.
[0027] In the embodiments of the present application, the spectrum analysis unit processes the sliding cycle queue with the FFT of 5Hz resolution, and extracts the five spectral lines with the largest amplitudes by using the five-element small-root heap, and then converts to obtain the fundamental frequency f c , the fundamental angular velocity ω c and the cascaded delay signal elimination parameter n i .
[0028] Specifically, the spectrum analysis unit continuously receives the instantaneous value voltage value u measured by the grid voltage division check circuit of the inverter, puts the voltage value u into the signal cycle queue, when the signal cycle queue data storage overflows, the historical signal data is overwritten in the first-in-first-out manner, and the fast Fourier transform is started to calculate the data of the signal cycle queue, and a frequency domain complex array with a resolution of 5Hz is outputted.
[0029] The modulus of each element of the frequency domain complex array is calculated to obtain an amplitude array of each frequency component in the frequency domain. The amplitude of the 0Hz component is removed, i.e. the first element of the array is set to 0. A small-root heap containing 5 elements is constructed to search for the 5 elements with the largest amplitudes from the amplitude array, and the amplitudes and array index values of the 5 elements are saved. The search results of the small-root heap are {(Idx i, Amp i ), 1≤i≤5}, Idx i is the original array index value, and Amp i is the amplitude of the frequency component.
[0030] The elements in the small root heap are sorted by amplitude Ampi from large to small, and the result is converted into the frequency of the component and its amplitude {(f i ,Amp i ),1≤i≤5}. Where, f i =5×(Idx i- 1) is the frequency.
[0031] The fundamental frequency of the signal is f c =f1, and the four main harmonic frequencies are (f2, f3, f 4, f5). The fundamental angular velocity ω c =2πf c , and the cascade delay signal elimination parameter n i =2·(f i+1 / f1-1),1≤i≤4, n i is rounded to an integer.
[0032] The fundamental frequency f c , the fundamental angular velocity ω c , the cascade delay signal elimination parameters n1, n2, n3, n4 are transmitted in real time to the single-phase phase-locked loop unit. The fundamental frequency f c is used as the reference frequency of the cascade delay signal eliminator. The fundamental angular velocity ω c is used as the reference angular velocity of the integrator input end, and is added to the control amount Δω of the PI controller output end.
[0033] In the embodiments of the present application, the frequency spectrum analysis unit writes the current fundamental frequency f c , the fundamental angular velocity ω c , and the cascade delay signal elimination parameter n i into the Flash every 10 min, to restore the historical parameters after power failure and restart.
[0034] The adaptive single-phase phase-locked loop unit queries whether the fundamental frequency f c , the fundamental angular velocity ω c , the cascade delay signal elimination parameter n i , and the PI controller parameter [k p ,k i ] are saved in the storage medium Flash, reads and assigns them to the corresponding adaptive parameters of the phase-locked loop if they are saved, or assigns the default parameter values if they are not saved, and the default values of the adaptive parameters are shown in Table 1.
[0035] Table 1: Default values of adaptive parameters of the phase-locked loop
[0036] ω n1 [n2] [n3] [n4] k p ]]> k i ]]> 50 (Hz) 4 8 16 32 0.5 0.1
[0037] In the embodiment of the present application, the cascade delay signal canceller CDSC is composed of four cascade delay signal cancellation units, and each delay amount Δt i = 1 / (n i ·f c ), where n1-n4 respectively correspond to the 2nd-5th main harmonics, and the successive filtering is realized. Specifically, the cascade delay signal cancellation parameters n1, n2, n3, n4 are respectively assigned to the first delay signal canceller, the second delay signal canceller, the third delay signal canceller, and the fourth delay signal canceller of the cascade delay signal canceller, and the delay amount of the delay signal canceller is 1 / (n i ·f c ).
[0038] In the embodiment of the present application, the improved third-order generalized integrator sets a band-stop pole at zero frequency, and generates a pair of orthogonal signals at the output end for the dq converter to use, so as to eliminate the DC offset and high-order harmonics.
[0039] In the embodiment of the present application, after receiving new [k p ,k i ], the PI controller updates the coefficients through the non-disturbance switching mode, so as to ensure the continuous operation of the phase-locked loop and the stepless output.
[0040] The intelligent optimization of the control parameter is queried. If the intelligent optimization of the control parameter is not enabled, the intelligent optimization unit of the control parameter is not started. If the intelligent optimization of the control parameter is enabled, the optimization completion flag is set to be invalid, the PI control parameter optimization model is constructed, the MSO is started to solve the optimal PI controller parameter, the optimal PI controller parameter result is saved to the Flash storage medium, the PI parameter is transmitted to the PI controller of the single-phase phase-locked loop, and the PI parameter is updated and takes effect in real time.
[0041] In the embodiment of the present application, the MSO initializes 20 observation positions, and alternately performs the upper mirage global search and the lower mirage local search in the total iteration round T o , so as to output the position with the minimum fitness as the optimal [k p ,k i ].
[0042] In the embodiment of the present application, the left or right correction direction of the observation position in the upper mirage stage is determined by the random direction flag dir ∈ {1, 2}, and the correction amount linearly decays with the iteration.
[0043] In the embodiment of the present application, the objective function of the intelligent optimization unit of the control parameter is:
[0044]
[0045] Wherein Δω(t) is the error Δω output by the PI controller of the single-phase phase-locked loop at time t, and T is the time length required for the phase-locked loop to successfully lock phase.
[0046] Specifically, the observation positions of the MSO algorithm are initialized. The PI controller parameters are an observation position x = [k p ,k i ], 20 observation positions x i 0 = [p i 0 ,i i 0 ], i ∈ [1, 20] are initialized, wherein the subscript i represents the observation position number, and the superscript 0 represents that the algorithm iteration number is 0, i.e., the initial value. The initialization method is as follows: rand is a random number between 0 and 1.
[0047]
[0048] The objective function of the mirage search algorithm is set as:
[0049]
[0050] Wherein Δω(t) is the error Δω output by the PI controller of the adaptive single-phase phase-locked loop unit at time t, T is the time length required for the phase-locked loop to successfully lock phase, and the value of the objective function is the adaptive value. For each initial position x i 0, the adaptive value f(x i 0 ), i ∈ [1, 20] is calculated according to the objective function, the adaptive values are sorted, the observation position with the smallest adaptive value is assigned to x best , and the adaptive value is saved as f best .
[0051] The optimal observation position is globally searched according to the principle of mirage formation. n observation positions are randomly selected, and the observation positions are updated according to the upper mirage position exploration method.
[0052]
[0053] Wherein t o is the current iteration round of the MSO algorithm, T o is the total iteration round allowed by the MSO algorithm. The observation height h i of the selected n observation positions x i is updated according to the following formula.
[0054]
[0055] The α and β coefficients of the observation position are updated according to the following formula.
[0056]
[0057] The position of the upper mirage is explored and updated, generating a random integer dir = randi(2) of 1 or 2.
[0058] If dir = 1, it means left update, and the observation position correction amount is observed as follows,
[0059]
[0060] If dir = 2 and α < β < 0.5π, it means right update, and the observation position correction amount is observed as follows,
[0061]
[0062] If dir = 2 and β < α < 0.5π, it means right update, and the observation position correction amount is observed as follows,
[0063]
[0064] The modified observation position is selected randomly n times, and the position is corrected as follows,
[0065]
[0066] The modified observation position According to the target function, its fitness value is calculated The fitness values are sorted, and the observation position with the smallest fitness value is assigned to x best , and the fitness value is saved as f best .
[0067] The principle of simulating the formation of the lower mirage to explore the optimal observation position locally. Update the observation height h of each observation position as follows,
[0068]
[0069] Update the γ, ω coefficient as follows,
[0070]
[0071] According to the position correction amount of the lower mirage layout exploration of all observation positions, the position correction amount is observed as follows,
[0072]
[0073] Correct the position of all observation positions as follows,
[0074]
[0075] The modified observation position Find its fitness value based on the objective function. Sort the fitness values and assign the observation position with the smallest fitness value to x. best Its fitness value is stored as f best .
[0076] Reaching the maximum number of iterations T in the MSO algorithm o Then, save x best =[k pbest ,k ibest The parameters are stored in the Flash storage medium, where k pbest k ibest These are the PI controller parameter values intelligently optimized using the MSO algorithm. The optimized PI controller parameter values are then passed to the adaptive single-phase phase-locked loop unit, with the optimization enable flag set to disabled and the optimization complete flag set to enabled.
[0077] In the embodiments of this application, the non-volatile memory is Flash, which simultaneously stores the optimization enable flag, the optimization completion flag, and the history [k]. p ,k i This is used by the system state machine to achieve one-click self-tuning.
[0078] The foregoing has shown and described the basic principles, main features, and advantages of the present invention. Those skilled in the art should understand that the above embodiments do not limit the present invention in any way, and all technical solutions obtained by equivalent substitution or equivalent transformation fall within the protection scope of the present invention.
Claims
1. A single-phase phase-locked loop system with intelligent parameter adjustment, characterized in that, include: The spectrum analysis unit is used to perform real-time frequency domain transformation on single-phase grid voltage and output the fundamental frequency f in real time. c ω c and cascaded delay signal cancellation parameter n i ; An adaptive single-phase lock-in loop unit, arranged sequentially along the signal path, comprises a third-order generalized integrator, a dq converter, a cascaded delay signal canceller (CDSC), a PI controller, an integrator, and a modulus extractor. The cascaded delay signal canceller (CDSC) operates at the fundamental frequency f. c Using the reference frequency and the fundamental angular velocity ω c As the reference angular velocity at the integrator input, the angular velocity increment Δω output by the PI controller is related to the fundamental angular velocity ω. c The summation determines the phase-locked angle θ, and the proportional coefficient k of the PI controller... p Integral coefficient k i Refreshed online from outside and takes effect immediately; The intelligent optimization unit for control parameters uses the Mirage Search Optimization (MSO) algorithm to iteratively find the optimal [k] parameter. p ,k i And pass it to the adaptive single-phase phase-locked loop unit.
2. The single-phase phase-locked loop system with intelligent parameter adjustment according to claim 1, characterized in that, The spectrum analysis unit processes the sliding circular queue using a 5Hz resolution FFT and extracts the five spectral lines with the largest amplitudes using a five-element min-heap, thereby calculating the fundamental frequency f. c ω c and cascaded delay signal cancellation parameter n i .
3. The single-phase phase-locked loop system with intelligent parameter adjustment according to claim 2, characterized in that, The spectrum analysis unit updates the current fundamental frequency f every 10 minutes. c ω c and cascaded delay signal cancellation parameter n i Write to Flash to restore historical parameters after a power outage and restart.
4. The single-phase phase-locked loop system with intelligent parameter adjustment according to claim 1, characterized in that, The improved third-order generalized integrator has a stopped pole at zero frequency and generates a pair of quadrature signals at the output for use by the dq converter to eliminate DC offset and higher-order harmonics.
5. The single-phase phase-locked loop system with intelligent parameter adjustment according to claim 1, characterized in that, The cascaded delay signal canceller CDSC consists of four stages of series delay signal cancelling units, with a delay amount Δt in each stage. i =1 / (n i ·f c ), where n1 to n4 correspond to the 2nd to 5th major harmonics, respectively, to achieve successive filtering.
6. The single-phase phase-locked loop system with intelligent parameter adjustment according to claim 1, characterized in that, The PI controller receives a new [k] p ,k i After that, the coefficients are updated through a non-disruptive switching method to ensure continuous operation of the phase-locked loop and stepless output.
7. The single-phase phase-locked loop system with intelligent parameter adjustment according to claim 1, characterized in that, The objective function of the intelligent optimization unit for control parameters is: Where Δω(t) is the value of the error Δω output by the single-phase phase-locked loop PI controller at time t, and T is the time required for the phase-locked loop to successfully lock the phase.
8. The single-phase phase-locked loop system with intelligent parameter adjustment according to claim 7, characterized in that, The MSO initializes 20 observation positions, and in the total iteration round T... o Alternately perform global search in the upper mirage and local search in the lower mirage, and take the position with the minimum output fitness as the optimal [k]. p ,k i ].
9. The single-phase phase-locked loop system with intelligent parameter adjustment according to claim 8, characterized in that, The upper mirage stage determines the left or right correction direction of the observation position through a random direction flag dir∈{1,2}, and the correction amount decreases linearly with iteration.
10. The single-phase phase-locked loop system with intelligent parameter adjustment according to claim 1, characterized in that, The intelligent optimization unit for the control parameters will obtain the optimal [k] p ,k i Write to non-volatile memory, which is Flash, and simultaneously store the optimization enable flag, optimization completion flag, and history [k]. p ,k i ].
Citation Information
Patent Citations
Phase locking method applied to power grid voltage imbalance and distortion conditions
CN108365617A
Adaptive three-phase grid-connected converter phase-locked loop and phase-locking control method thereof
CN110165706A
Composite phase-locked loop parameter optimization method based on grid-connected condition
CN115986814A
Three-phase grid-connected phase-locked loop based on double-layer filtering
CN117081152A
Harmonic detection method and system of power grid and computer equipment
CN117890673A
Cited By
Control parameter optimization method of phase-locked loop and related equipment
CN121542717A
