A grid synchronization software phase-locked loop based on a moving average filter structure
Patent Information
- Application Number
- CN202311228204.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2023-09-21
- Publication Date
- 2026-10-27
- Estimated Expiration
- 2043-09-21
AI Technical Summary
然而,当电网电压发生较大程度的畸变时,这两种锁相环的滤波能力受限,在电网电压含有较多谐波时,仍然无法准确锁定相位,并且结构复杂,计算量大
[0026]本发明的有益效果在于:提高了锁相环对电网电压中谐波的滤除能力和锁相环在非理想电网电压工况条件下的锁相精度。对比其他锁相环滤波方法,该发明更好的抗谐波干扰能力,能够更加精准地锁相。
Smart Images

Figure CN117394850B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of power grid technology and relates to a power grid synchronization software phase-locked loop based on a moving average filter structure. Background Technology
[0002] In recent years, with the expansion of renewable energy, distributed generation and grid-connected inverters, primarily powered by new energy sources such as solar and wind power, have been widely adopted. In distributed generation grid connection, the key is to ensure that the inverter's output current waveform and phase are synchronized with the grid voltage to maintain stable grid operation. A commonly used phase-locked loop (PLL) technology is the software phase-locked loop (SRF-PLL) based on a synchronous rotating coordinate system. It utilizes a rotating coordinate system transformation method to achieve phase detection, featuring fast dynamic response and simple implementation. Under ideal grid conditions, it can quickly and accurately detect the frequency and phase of the grid voltage. However, in actual power system operation, various faults such as grid imbalance, distortion, voltage drop, noise, and frequency deviation often interfere, reducing the quality of grid-connected power. Traditional software PLLs based on synchronous coordinate systems cannot handle these problems, generating oscillation interference with amplitudes multiples of the fundamental frequency, leading to phase detection errors.
[0003] To overcome the shortcomings of SRF-PLL, existing grid-connected inverters employ dual second-order generalized integrator phase-locked loops (DSOGI-PLL). DSOGI-PLL separates positive and negative sequence voltages using the symmetrical component method. When the grid voltage is unbalanced, it utilizes a cross-decoupling network to separate the positive and negative sequence voltage components, proposing a decoupled dual synchronous rotating coordinate system phase-locked loop (DDSRF-PLL). However, when the grid voltage undergoes significant distortion, the filtering capability of these two types of phase-locked loops is limited. When the grid voltage contains numerous harmonics, they still cannot accurately lock the phase, and their structures are complex and computationally intensive.
[0004] Therefore, it is essential to conduct in-depth research and modeling based on the existing SRF-PLL model to obtain a digital phase-locked loop (PLL) capable of quickly and accurately acquiring grid voltage-related information when the grid voltage contains a large number of harmonics. To this end, this invention proposes a PLL with an improved moving average filter structure, which provides greater attenuation of grid voltage harmonic components. Simulation experiments verify that the novel PLL structure designed in this invention significantly improves the filtering performance of grid voltage harmonic components, further optimizes phase synchronization, and has a very significant effect on improving the power quality of grid-connected systems. It is particularly suitable for applications with weak grids, large voltage fluctuations, and abrupt phase changes. Summary of the Invention
[0005] In view of this, the purpose of this invention is to provide a software phase-locked loop (PLL) for power grid synchronization based on a moving average filter structure. Addressing the problem that traditional second-order generalized integrator PLL systems fail to adequately attenuate harmonic components when the grid voltage contains high levels of these components, leading to significant fluctuations in the detected grid synchronization signal and even system phase-locking failure, this invention proposes a novel PLL structure that can attenuate all harmonic components, thereby greatly improving the quality of grid-connected power.
[0006] To achieve better phase-locked loop (PLL) performance, this invention designs a novel software PLL for grid voltage synchronization with an improved moving average filter structure. This novel PLL includes an improved moving average filter, a phase detector module, a loop filter module, and a voltage-controlled oscillator (VCO) module. The phase detector, composed of a Clarke transform module and a Park transform module, converts the three-phase grid voltage signal filtered by the improved moving average filter into a DC component in a synchronous rotating reference frame. The loop filter primarily filters out invalid AC signals from the phase detector output signal, transforming it into a DC signal containing frequency information. The loop filter is constructed using a traditional proportional-integral (PI) control loop. Then, the estimated angular frequency signal is integrated using the VCO to obtain the estimated phase angle signal. Finally, the obtained phase angle signal is used as the rotation transformation angle and fed into the Park transform.
[0007] To achieve the above objectives, the present invention provides the following technical solution:
[0008] A power grid synchronization software phase-locked loop based on a moving average filter structure includes an improved moving average filter, a Clarke transform module, a Park transform module, a PI controller module, and an integrator module.
[0009] The improved moving average filter takes a three-phase grid voltage signal as input, filters the three-phase grid voltage containing harmonics, removes harmonic components other than the fundamental wave from the three-phase grid voltage, and outputs the harmonic-free three-phase grid voltage to the Clarke converter module and the Park module.
[0010] The Clarke and Park modules are connected to the filtered three-phase grid voltage at their inputs, transforming the three-phase grid voltage into orthogonal two-phase grid signals v in a synchronous rotating coordinate system. d and v q and v q Input into the phase-locked loop;
[0011] The input terminals of the PI controller module and the 1 / s integral module are connected to signal v. qThe signal is processed by the PI controller module and the 1 / s integrator module to output the accurate frequency and phase angle of the grid voltage signal.
[0012] Optionally, the transfer function G of the improved moving average filter IMAF (s) is:
[0013] G IMAF (s)=G1G MAF
[0014] in:
[0015]
[0016]
[0017] Where G1(s) is the transfer function of the resonator, G MAF (s) is the transfer function of the moving average filter, a is the damping coefficient, and ω is the transfer function of the moving average filter. n T is the resonant angular frequency. a This is the sliding window of the moving average filter.
[0018] Optionally, the transfer function of the improved moving average filter phase-locked loop is:
[0019]
[0020] Where, k p-pll k is the proportional gain of the PI controller. i-pll This represents the integral coefficient of the PI controller.
[0021] Optionally, in the Clarke transformation module, the three-phase voltage after harmonic filtering undergoes both Clarke and Park transformations. The Clarke transformation formula is as follows:
[0022]
[0023] After processing via the Park transform, the expression for the Park transform is:
[0024]
[0025] The q-axis component v at the output of the Park transform stage q The input is fed into the phase-locked loop (PLL), and the frequency output of the PLL is used as the grid voltage frequency estimate ω0; the phase output of the PLL is used as the grid voltage phase estimate θ0, which is then input into the Park transform stage.
[0026] The beneficial effects of this invention are: it improves the phase-locked loop's ability to filter harmonics in the grid voltage and enhances its phase-locking accuracy under non-ideal grid voltage conditions. Compared to other phase-locked loop filtering methods, this invention offers better resistance to harmonic interference and enables more precise phase-locking.
[0027] Other advantages, objectives, and features of the invention will be set forth in part in the description which follows, and in part will be apparent to those skilled in the art from the following examination, or may be learned from practice of the invention. The objectives and other advantages of the invention can be realized and obtained through the following description. Attached Figure Description
[0028] To make the objectives, technical solutions, and advantages of the present invention clearer, the preferred embodiments of the present invention will be described in detail below with reference to the accompanying drawings, wherein:
[0029] Figure 1 The block diagram of a phase-locked loop control based on a synchronous rotating coordinate system is shown.
[0030] Figure 2 This is a control block diagram based on a software phase-locked loop using an improved moving average filter.
[0031] Figure 3 The logarithmic amplitude-phase characteristic curve of the moving average filter when the sliding window Ta = 0.02s is shown.
[0032] Figure 4 The structure diagram for improving the moving average filter;
[0033] Figure 5 This is the logarithmic amplitude-phase characteristic curve of the resonator;
[0034] Figure 6 To improve the logarithmic amplitude-phase characteristic curve of the moving average filter;
[0035] Figure 7 The phase angle diagram is based on the phase-locked loop of the synchronous rotating coordinate system when the grid voltage has no harmonics.
[0036] Figure 8 The phase angle diagram is the phase-locked loop based on the improved moving average filter when the grid voltage has no harmonics.
[0037] Figure 9 The phase angle diagram is based on a synchronous rotating coordinate system phase-locked loop when the grid voltage contains harmonics.
[0038] Figure 10 This is a phase angle diagram of the phase-locked loop based on an improved moving average filter when the grid voltage contains harmonics. Detailed Implementation
[0039] The following specific examples illustrate the implementation of the present invention. Those skilled in the art can easily understand other advantages and effects of the present invention from the content disclosed in this specification. The present invention can also be implemented or applied through other different specific embodiments, and various details in this specification can be modified or changed based on different viewpoints and applications without departing from the spirit of the present invention. It should be noted that the illustrations provided in the following embodiments are only schematic representations of the basic concept of the present invention. Unless otherwise specified, the following embodiments and features can be combined with each other.
[0040] The accompanying drawings are for illustrative purposes only and are schematic diagrams, not actual pictures. They should not be construed as limiting the invention. To better illustrate the embodiments of the invention, some parts in the drawings may be omitted, enlarged, or reduced, and do not represent the actual product dimensions. It is understandable to those skilled in the art that some well-known structures and their descriptions may be omitted in the drawings.
[0041] In the accompanying drawings of the embodiments of the present invention, the same or similar reference numerals correspond to the same or similar components. In the description of the present invention, it should be understood that if terms such as "upper," "lower," "left," "right," "front," and "rear" indicate the orientation or positional relationship based on the orientation or positional relationship shown in the drawings, they are only for the convenience of describing the present invention and simplifying the description, and do not indicate or imply that the device or element referred to must have a specific orientation, or be constructed and operated in a specific orientation. Therefore, the terms used to describe positional relationships in the drawings are only for illustrative purposes and should not be construed as limiting the present invention. For those skilled in the art, the specific meaning of the above terms can be understood according to the specific circumstances.
[0042] To address the problem of insufficient anti-interference capability of traditional software phase-locked loop (PLL) filtering stages when three-phase grid voltage contains harmonics, this invention proposes a new grid voltage synchronization PLL with an improved moving average filter. This PLL can filter out harmonics when the grid voltage contains a large number of harmonics, thereby further optimizing the phase synchronization effect and significantly improving the quality of grid-connected power.
[0043] The principle of this invention:
[0044] The phase-locked loop with improved moving average filter of the present invention consists of an improved moving average filter, a Clarke conversion module and a Park conversion module for three-phase grid voltage, a PI controller, and an integrator 1 / s module.
[0045] The improved moving average filter is input to the three-phase grid voltage signal. This module can filter the three-phase grid voltage containing harmonics, filter out the harmonic components other than the fundamental wave in the three-phase grid voltage, and output the three-phase grid voltage without harmonic components to the Clarke converter module and the Park module.
[0046] The Clarke and Park modules are connected to the filtered three-phase grid voltage at their inputs, converting the three-phase grid voltage into orthogonal two-phase grid signals v in a synchronous rotating coordinate system. d and v q and the transformed signal v q Input into the phase-locked loop.
[0047] The input terminals of the PI controller module and the 1 / s integral module are connected to signal v. q The signal is processed by the PI controller module and the 1 / s integrator module to output the accurate frequency and phase angle of the grid voltage signal.
[0048] The principle of this invention is to first filter the three-phase grid-connected voltage, retaining only the fundamental component, then input the signal wave with the harmonic components filtered out into a phase-locked loop (PLL) for phase locking, and finally output the phase angle of the grid-connected voltage from the PLL.
[0049] The following will illustrate an implementation example of the improved moving average filter phase-locked loop for eliminating grid voltage harmonic distortion according to the present invention, with reference to the accompanying drawings:
[0050] refer to Figure 1 , Figure 1 This diagram illustrates a traditional phase-locked loop (PLL) structure based on a synchronous rotating coordinate system, which is widely used. Under ideal three-phase grid voltage, this PLL exhibits good phase-locking performance. However, when the three-phase grid voltage contains harmonics, the PLL fails to lock the phases, leading to a decline in grid power quality. Therefore, filtering the three-phase grid voltage becomes particularly important.
[0051] Figure 2 The diagram shows the structure of a phase-locked loop based on an improved moving average filter. This improved moving average filter phase-locked loop is based on a synchronous rotating coordinate system phase-locked loop, with a filtering module added in front of it. This allows for filtering of the three-phase grid voltage signal, thereby improving phase tracking.
[0052] Figure 2 In the three-phase power grid voltage signal input, the three-phase voltage U contains odd harmonics. a U b U c The expression is:
[0053]
[0054] The formula for the Clarke transform of a three-phase input signal is:
[0055]
[0056] The expression for the Park transform is:
[0057]
[0058] Continuous implementation of the moving average filter:
[0059] The moving average filter (MAF) is a linear-phase finite impulse response (FIR) filter that can serve as an ideal low-pass filter under certain conditions.
[0060] Assuming the input and output signals of the MAF are x(t) and y(t) respectively, the MAF can be represented in the continuous domain as:
[0061]
[0062] Where T represents a The window length, from equation (1), gives the transfer function of MAF in the frequency domain as:
[0063]
[0064] Due to the pure time delay term e -sTa The existence of MAF results in a duration of T. a The transition process.
[0065] Substituting s = jω into equation (2) and simplifying it, we can obtain the expressions for the amplitude and phase of the MAF as follows:
[0066]
[0067] As can be seen from equation (3), MAF provides unity gain at zero frequency, and at the frequency point f = n / T a At each of the points (n = 1, 2, 3…), G holds. MAF (jω)=0. This means that the MAF can pass through the DC component and can completely block frequency components that are integer multiples of 1 / Ta in hertz.
[0068] From the above analysis, we can conclude that: introducing G... MAF (s) can effectively suppress and attenuate signals of a specific frequency and its integer multiples thereof.
[0069] Assume T is set a=0.02. At this time, the corresponding sliding window is 50Hz. The moving average filter can suppress and attenuate signals of 50Hz and integer multiples of 50Hz.
[0070] Figure 3 The sliding window has a length of T. a Bode plot of the moving average filter corresponding to =0.02, from Figure 3 It can be seen that signals with frequencies that are integer multiples of 50Hz are suppressed, demonstrating excellent harmonic suppression capabilities.
[0071] However, since the fundamental frequency of the three-phase grid voltage signal is also 50Hz, when the sliding window is set to 50Hz, the sliding average filter will also cause attenuation of the fundamental frequency while attenuating the grid voltage signal.
[0072] Improved implementation of the moving average filter:
[0073] Depend on Figure 3 It can be seen that while the moving average filter attenuates harmonics, it also attenuates the fundamental frequency. If the fundamental frequency is also attenuated, the phase-locked loop (PLL) will be unable to continue phase locking, and the grid synchronization will fail.
[0074] If the fundamental component can be preserved while attenuating the harmonic components, the phase-locked loop can effectively lock the grid connection voltage without being affected by harmonic signals. Therefore, this invention improves the moving average filter so that it does not attenuate the fundamental wave, but only attenuates harmonics that are integer multiples of the fundamental wave.
[0075] Let the transfer function of the improved moving average filter be:
[0076]
[0077] Where a is the damping coefficient, s is the Laplace operator, and ω n Resonant frequency
[0078] like Figure 4 As shown, the improved moving average filter G IMAF The transfer function of G(s) consists of two parts: the resonator G1(s) and the moving average filter G. MAF It consists of (s), where the resonator G1(s) and the moving average filter G MAF The transfer function expression for (s) is:
[0079]
[0080]
[0081] The Bird diagram of G1(s) is as follows Figure 5 As shown, the damping coefficient a is taken as 1, from Figure 5 We can observe that G1 can be considered as a resonator, based on the resonant frequency ω. n The difference can produce resonance at a fixed frequency, and has no effect on the amplitude and phase of signals at other frequencies.
[0082] Considering the amplitude and phase characteristics of the resonator and the moving average filter, the resonator and the moving average filter can be combined to improve the traditional moving average filter. The Bode plot of the improved moving average filter is shown below. Figure 6 As shown in the Bode plot, the improved moving average filter does not attenuate the fundamental component, but it does attenuate harmonics that are integer multiples of the fundamental signal.
[0083] At this point, the structural design of the grid voltage synchronization phase-locked loop based on the improved moving average filter has been completed.
[0084] To verify the speed and accuracy of the proposed phase-locked loop (PLL) based on an improved moving average filter when the grid voltage contains abundant harmonics, simulations were performed using Matlab / Simulink software. Comparative simulations were conducted with and without harmonics in the three-phase grid voltage. In the simulations, the fundamental frequency of the grid voltage was 50Hz, and the amplitude of the three-phase grid voltage was 311. The comparison object was a traditional PLL based on a synchronous rotating coordinate system. The k-axis of the PI controller in the PLL of this invention... p-pll =3.47, k i-pll It was 1873.
[0085] The specific operating steps are as follows:
[0086] The first step is to create a system in Simulink software such as... Figure 1 He Ru Figure 2 The simulation models shown are based on a phase-locked loop and an improved moving average filter phase-locked loop in a synchronous rotating coordinate system.
[0087] Step 2: Inject an ideal base frequency voltage signal with an amplitude of 311V and a frequency of 50Hz into the input three-phase voltage signal U of the two phase-locked loops respectively, and analyze the following waveform of the input base frequency voltage signal by the two phase-locked loops.
[0088] The third step involves injecting a fundamental frequency voltage signal with an amplitude of 311V and a frequency of 50Hz into the input voltage signal U of the two phase-locked loop structures, and then injecting 20% of the 3rd, 5th, 7th, 11th, and 13th harmonic components into the fundamental frequency voltage signal, and observing the phase waveforms of the two phase-locked loops tracking the fundamental frequency voltage signal.
[0089] The fourth step is to analyze the waveform. Figure 7 and Figure 8 The figures show the phase angles locked by a traditional phase-locked loop (PLL) based on a synchronous rotating coordinate system and a PLL based on an improved moving average filter, respectively. As can be seen from the figures, under ideal grid voltage conditions, both PLLs lock in good phase angles. When a certain amount of harmonics is introduced into the three-phase grid voltage, the locked phase angles become as follows... Figure 9 and Figure 10 As shown, the phase angle locked by the phase-locked loop based on the synchronous rotating coordinate system is distorted and does not meet the requirements. However, the phase angle locked by the phase-locked loop based on the improved moving average filter does not have any distortion and meets the requirements. This shows that the phase-locked loop based on the improved moving average filter has a very significant effect.
[0090] Finally, it should be noted that the above embodiments are only used to illustrate the technical solutions of the present invention and are not intended to limit it. Although the present invention has been described in detail with reference to preferred embodiments, those skilled in the art should understand that modifications or equivalent substitutions can be made to the technical solutions of the present invention without departing from the spirit and scope of the present invention, and all such modifications or substitutions should be covered within the scope of the claims of the present invention.
Claims
1. A software phase-locked loop for power grid synchronization based on a moving average filter structure, characterized in that: This includes an improved moving average filter, Clarke transform module, Park transform module, PI controller module, and integrator module; The improved moving average filter takes a three-phase grid voltage signal as input, filters the three-phase grid voltage containing harmonics, removes harmonic components other than the fundamental wave from the three-phase grid voltage, and outputs the harmonic-free three-phase grid voltage to the Clarke converter module and the Park module. The Clarke and Park modules are connected to the filtered three-phase grid voltage at their inputs, converting the three-phase grid voltage into orthogonal two-phase grid signals in a synchronous rotating coordinate system. v d and v q , And v q Input into the phase-locked loop; The input terminals of the PI controller module and the 1 / s integral module are connected to signals. v q The signal is processed by the PI controller module and the 1 / s integrator module to output the accurate frequency and phase angle of the grid voltage signal; The transfer function of the improved moving average filter G IMAF ( s )for: in, G 1( s Let be the transfer function of the resonator. G MAF ( s Let be the transfer function of the moving average filter. a The damping coefficient is... n The resonant angular frequency, T a This is the sliding window of the moving average filter.
2. The power grid synchronization software phase-locked loop based on a moving average filter structure according to claim 1, characterized in that: The transfer function of the improved moving average filter phase-locked loop is: in, k p-pll The proportional gain of the PI controller. k i-pll The integral coefficient of the PI controller. s Represents the Laplace operator. The frequency of the phase-locked loop output is used as an estimate of the grid voltage frequency.
3. The power grid synchronization software phase-locked loop based on a moving average filter structure according to claim 1, characterized in that: In the Clarke transform module, the three-phase voltage after harmonic filtering undergoes both Clarke and Park transforms. The Clarke transform formula is as follows: After processing via the Park transform, the expression for the Park transform is: The output of the Park transform stage q Axial components v q The input is fed into a phase-locked loop (PLL), and the frequency output by the PLL is used as an estimate of the grid voltage frequency. ω 0; Phase of the phase-locked loop output θ 0 is used as the grid voltage phase estimate and is input to the Park transformation stage.
Citation Information
Patent Citations
Phase-locked loop and phase locking method
CN105680854A
Phase locking method, apparatus and device for power system
CN109067393A