WO2019100284A1 - Phase locking method, apparatus and device - Google Patents

Phase locking method, apparatus and device Download PDF

Info

Publication number
WO2019100284A1
WO2019100284A1 PCT/CN2017/112562 CN2017112562W WO2019100284A1 WO 2019100284 A1 WO2019100284 A1 WO 2019100284A1 CN 2017112562 W CN2017112562 W CN 2017112562W WO 2019100284 A1 WO2019100284 A1 WO 2019100284A1
Authority
WO
WIPO (PCT)
Prior art keywords
signal wave
variable
sampling
period
grid voltage
Prior art date
Application number
PCT/CN2017/112562
Other languages
French (fr)
Chinese (zh)
Inventor
唐疑军
刘鹏飞
邓向钖
刘晓红
杨冬梅
吴壬华
Original Assignee
深圳欣锐科技股份有限公司
Priority date (The priority date is an assumption and is not a legal conclusion. Google has not performed a legal analysis and makes no representation as to the accuracy of the date listed.)
Filing date
Publication date
Application filed by 深圳欣锐科技股份有限公司 filed Critical 深圳欣锐科技股份有限公司
Priority to PCT/CN2017/112562 priority Critical patent/WO2019100284A1/en
Priority to CN201780020007.1A priority patent/CN109075796B/en
Publication of WO2019100284A1 publication Critical patent/WO2019100284A1/en

Links

Images

Classifications

    • HELECTRICITY
    • H03ELECTRONIC CIRCUITRY
    • H03LAUTOMATIC CONTROL, STARTING, SYNCHRONISATION, OR STABILISATION OF GENERATORS OF ELECTRONIC OSCILLATIONS OR PULSES
    • H03L7/00Automatic control of frequency or phase; Synchronisation
    • H03L7/06Automatic control of frequency or phase; Synchronisation using a reference signal applied to a frequency- or phase-locked loop
    • H03L7/16Indirect frequency synthesis, i.e. generating a desired one of a number of predetermined frequencies using a frequency- or phase-locked loop
    • H03L7/20Indirect frequency synthesis, i.e. generating a desired one of a number of predetermined frequencies using a frequency- or phase-locked loop using a harmonic phase-locked loop, i.e. a loop which can be locked to one of a number of harmonically related frequencies applied to it

Definitions

  • the present application relates to the field of power electronic control, and in particular, to a phase locking method, device and device.
  • Pulse Width Modulation (PWM) rectifiers can realize sinusoidal current on the grid side and operate in unity power factor state, and have the function of bidirectional energy feedback. Therefore, the PWM rectifier is widely used in the case of AC-converted DC and DC-converted AC.
  • the embodiment of the present application provides a phase locking method, device and device, in order to provide a phase locking method suitable for single phase PWM rectification, which has small calculation amount and high precision.
  • a first aspect of the embodiments of the present application provides a phase locking method, including:
  • the first signal wave Ua and the second signal wave Ub are subjected to voltage Park conversion to achieve phase locking.
  • the method before the setting an array of length L, the method further includes: determining a value of the array length L.
  • the determining the value of the array length L includes:
  • the number of sampling points in the quarter period of the signal wave is determined according to the length of time occupied by the quarter period of the signal wave and the sampling period.
  • the first signal wave Ua is generated according to the first variable S1, and generated according to the second variable S2.
  • the second signal wave Ub includes:
  • the first signal wave Ua is generated according to the element information sampled by the first variable S1
  • the second signal wave Ub is generated according to the element information sampled by the second variable S2.
  • the element information includes at least angle information and voltage value information.
  • a second aspect of the embodiments of the present application provides a phase locking device, including:
  • a sampling module for cyclically sampling a grid voltage signal within a quarter cycle of a grid voltage signal wave
  • a first setting module configured to set an array of length L, wherein the L is determined by a common frequency and a sampling frequency of the grid voltage;
  • a generating module configured to generate a first signal wave Ua according to the first variable S1, and generate a second signal wave Ub according to the second variable S2;
  • a transform module configured to perform voltage Park conversion on the first signal wave Ua and the second signal wave Ub to implement phase locking.
  • the apparatus further includes a determining module, configured to set a length L in the first setting module. Before the array, determine the value of the array length L.
  • the determining module includes:
  • a first determining unit configured to determine a period of the signal wave according to a frequency of the grid voltage signal wave
  • a second determining unit configured to determine, according to a period of the signal wave, a duration of a quarter period of the signal wave
  • a third determining unit configured to determine the sampling period according to the sampling frequency
  • a fourth determining unit configured to determine, according to a duration occupied by a quarter period of the signal wave and the sampling period, a number of sampling points in a quarter period of the signal wave, that is, a value of the length L .
  • the generating module includes:
  • a first buffer unit configured to: cyclically sample the first variable S1 in a quarter cycle of the signal wave, and buffer element information sampled by the first variable S1;
  • a second buffer unit configured to buffer element information sampled by the second variable S2 according to the cyclic sampling of the first variable S1;
  • a generating unit configured to generate a first signal wave Ua according to the element information sampled by the first variable S1, and generate a second signal wave Ub according to the element information sampled by the second variable S2.
  • the element information includes at least angle information and voltage value information.
  • a third aspect of the embodiments of the present application provides a phase locking device, including:
  • a memory for storing a phase lock program instruction
  • the processor is configured to invoke the phase lock program instruction, and execute the phase lock method in the first aspect of the embodiment of the present application or the implementation manner in any one of the first aspect.
  • the first signal wave Ua and the second signal wave Ub are subjected to voltage Park conversion to achieve phase locking, so that the phase locking method shown in the embodiment of the present application has a small calculation amount and high reliability.
  • FIG. 1 is a flowchart of a phase locking method according to an embodiment of the present application
  • FIG. 2 is a flowchart of a method for generating a first signal wave and a second signal wave according to an embodiment of the present application
  • FIG. 3 is a flowchart of a phase locking method according to another embodiment of the present application.
  • FIG. 5 is a structural diagram of a phase lock device according to an embodiment of the present application.
  • phase lock device 6 is a structural diagram of a phase lock device according to another embodiment of the present application.
  • FIG. 7 is a structural diagram of a determining module according to an embodiment of the present application.
  • FIG. 8 is a structural diagram of a generation module according to an embodiment of the present application.
  • FIG. 9 is a structural diagram of a phase lock device according to an embodiment of the present application.
  • FIG. 1 is a phase locking method provided by an embodiment of the present application, and may include at least the following steps:
  • the frequency of the grid voltage is 50 Hz ⁇ 0.2 Hz
  • the signal wave may be a sinusoidal signal or a cosine signal, and the frequency is 47-63 Hz.
  • the sampling range is one quarter of the period of the grid voltage signal.
  • the L is determined by the frequency of the grid voltage and the sampling frequency.
  • L signal points are acquired on a quarter cycle of the grid voltage signal according to a preset sampling frequency. These L signal points are sequentially stored in the array.
  • the first variable S1 can be a pointer to the current grid voltage sample value stored in the array.
  • the second variable S2 can be a pointer, and the element pointed to by the variable S2 is the element indicated by S1+1.
  • S1 points to the first element
  • S2 points to the second element
  • S1 points to the Lth element
  • S2 points to the first element.
  • the sampled grid voltage data is cyclically stored in the array, that is, if the current sampled data is stored at the end of the array, the next sampled data is stored at the beginning of the array. It can be known that the phase difference between the Nth element indicated by S1 and the Nth element indicated by S2 is 90°, where 1 ⁇ N ⁇ L.
  • S104 Generate a first signal wave Ua according to the first variable S1, and generate a second signal wave Ub according to the second variable S2.
  • FIG. 2 is a method for generating a first signal wave and a second signal wave, and at least includes the following steps:
  • the first variable S1 is cyclically sampled in a quarter cycle of the signal wave, and after sampling the Lth point, the first sample point is returned, sampling is continued, and all elements of the first variable S1 are buffered. Element information.
  • the element information may include at least angle information corresponding to the element and corresponding voltage value information.
  • S1042 Cache the element information sampled by the second variable S2 according to the cyclic sampling of the first variable S1.
  • S1 points to the last element in the array
  • S2 now points to the first element in the array.
  • the element information of each element in the array pointed to by the second variable S2 is cached.
  • the angle information of the element indicated by the first variable S1 is different from the angle information of the element indicated by the second variable S2 by 90° and remains unchanged.
  • the angle information of the element indicated by the first variable S1 is ⁇
  • the angle information of the element indicated by the second variable S2 is ⁇ .
  • the angle information ⁇ of the element indicated by the first variable S1 is 0°
  • the angle information ⁇ of the element indicated by the second variable S2 is ⁇ 90°
  • the angle information ⁇ of the element indicated by the first variable S1 is 90°.
  • the angle information ⁇ of the element indicated by the second variable S2 is 0°.
  • the element information sampled by the first variable S1 constitutes a digital signal, and the analog signal Ua is generated according to the digital signal;
  • the element information sampled by the second variable S2 constitutes a digital signal, and the analog signal Ub is generated according to the digital signal.
  • the phase difference between the Nth element indicated by S1 and the Nth element indicated by S2 is 90°. Therefore, the phase difference between the first signal wave Ua generated according to the first variable S1 and the second signal wave Ub generated according to the second variable S2 is 90°.
  • S105 performing voltage Park conversion on the first signal wave Ua and the second signal wave Ub to implement phase locking.
  • phase difference between the first signal wave Ua and the second signal wave Ub is 90°
  • Park transformation is performed on Ua and Ub, and converted into Ud and Uq components in the dq coordinate system to realize phase angle tracking.
  • the first signal wave Ua and the second signal wave Ub are subjected to voltage Park conversion to achieve phase locking, so that the phase locking method shown in the embodiment of the present application has a small calculation amount and high reliability.
  • FIG. 3 is a phase locking method according to another embodiment of the present application, and may include at least the following steps:
  • the value of L is determined by the frequency of the grid voltage and the sampling frequency.
  • the sampling frequency should be no less than twice the highest frequency in the spectrum of the analog signal. It can be known that the sinusoidal signal of the grid voltage is an analog signal, and the frequency of the sinusoidal signal wave is 47-63 Hz, and a certain adaptive frequency range needs to be extended. In the present application, the frequency range is extended to 40-70 Hz, then when sine When the frequency of the signal wave is 40 Hz, the sampling frequency is not less than 80 Hz to ensure the undistorted recovery of the analog signal.
  • the sampling frequency is not less than 140 Hz to ensure the undistorted recovery of the analog signal.
  • the higher the sampling frequency the higher the accuracy of acquiring analog signals.
  • the sampling frequency is set to 30 kHz, and the frequency of the signal wave is assumed to be 40 Hz.
  • FIG. 4 is a method for determining an L value according to an embodiment of the present application, which may include at least the following steps:
  • S2021 Determine a period of the signal wave according to a frequency of the grid voltage signal wave.
  • the frequency fs of the grid voltage signal wave is 40 Hz, and the period of the grid voltage signal wave is 25 ms.
  • S2022 Determine a duration of a quarter period of the signal wave according to a period of the signal wave.
  • the period of the grid voltage signal wave is 25 ms, and the period of the quarter period is 6250 us.
  • the sampling frequency is set to 30 kHz, and the sampling period is 33.33 us.
  • S2024 Determine, according to the duration of the quarter period of the signal wave and the sampling period, the number of sampling points in the quarter period of the signal wave, that is, the value of the length L.
  • S205 Generate a first signal wave Ua according to the first variable S1, and generate a second signal wave Ub according to the second variable S2.
  • S206 Perform voltage phase conversion on the first signal wave Ua and the second signal wave Ub to implement phase locking.
  • the first signal wave Ua and the second signal wave Ub are subjected to voltage Park conversion to realize phase locking, so that the phase locking method, device and device shown in the embodiment of the present application have small calculation amount and high reliability.
  • the phase locking device 10 can include at least a sampling module 110, a first setting module 120, a second setting module 130, a generating module 140, and a transform module 150, where:
  • the sampling module 110 is configured to cyclically sample the grid voltage information in a quarter cycle of the grid voltage signal wave.
  • the first setting module 120 is configured to set an array of length L, wherein the L is determined by the frequency of the grid voltage and the sampling frequency.
  • the generating module 140 is configured to generate a first signal wave Ua according to the first variable S1, and generate a second signal wave Ub according to the second variable S2.
  • the conversion module 150 is configured to perform voltage Park conversion on the first signal wave Ua and the second signal wave Ub to implement phase locking.
  • the phase lock device 10 may include, in addition to the sampling module 110 , the first setting module 120 , the second setting module 130 , the generating module 140 , and the transform module 150 .
  • the determining module 160 is configured to determine the value of the array length L before the first setting module 120 sets an array of length L.
  • the determining module 160 may include a first determining unit 1610, a second determining unit 1620, a third determining unit 1630, and a fourth determining unit 1640, as shown in FIG.
  • a first determining unit 1610 configured to determine a period of the signal wave according to a frequency of the grid voltage signal wave
  • a second determining unit 1620 configured to determine, according to a period of the signal wave, a duration of a quarter period of the signal wave
  • a third determining unit 1630 configured to determine the sampling period according to the sampling frequency
  • a fourth determining unit 1640 configured to determine, according to a duration occupied by a quarter period of the signal wave and the sampling period, a number of sampling points in a quarter period of the signal wave, that is, the length L value.
  • the generating module 140 may include a first buffer unit 1410, a second buffer unit 1420, and a generating unit 1430, as shown in FIG.
  • the first buffer unit 1410 is configured to cyclically sample the first variable S1 in a quarter cycle of the signal wave, and buffer the element information sampled by the first variable S1.
  • the second buffer unit 1420 is configured to buffer element information sampled by the second variable S2 according to the cyclic sampling of the first variable S1.
  • the generating unit 1430 is configured to generate a first signal wave Ua according to the element information sampled by the first variable S1, and generate a second signal wave Ub according to the element information sampled by the second variable S2.
  • the element information includes at least angle information and voltage value information.
  • the first signal wave Ua and the second signal wave Ub are subjected to voltage Park conversion to achieve phase locking, so that the phase locking method shown in the embodiment of the present application has a small calculation amount and high reliability.
  • phase locking device 20 can include at least:
  • a memory 210 configured to store a phase lock program
  • the processor 220 is configured to call a phase lock program stored in the memory 210, and execute:
  • the first signal wave Ua and the second signal wave Ub are subjected to voltage Park conversion to achieve phase locking.
  • the processor 220 before setting an array of length L, is further configured to: determine the value of the array length L.
  • the processor 220 determines the value of the array length L, including:
  • the number of sampling points in the quarter period of the signal wave is determined according to the length of time occupied by the quarter period of the signal wave and the sampling period.
  • the processor 220 generates the first signal wave Ua according to the first variable S1, and generates the second signal wave Ub according to the second variable S2, including:
  • the first signal wave Ua is generated according to the element information sampled by the first variable S1
  • the second signal wave Ub is generated according to the element information sampled by the second variable S2.
  • the element information includes at least angle information and voltage value information.
  • the first signal wave Ua and the second signal wave Ub are subjected to voltage Park conversion to realize phase locking, so that the phase locking method, device and device shown in the embodiment of the present application have small calculation amount and high reliability.
  • the modules in the apparatus of the embodiment of the present application may be combined, divided, and deleted according to actual needs.

Landscapes

  • Stabilization Of Oscillater, Synchronisation, Frequency Synthesizers (AREA)

Abstract

A phase locking method, apparatus and device. The method comprises: circularly sampling power grid voltage information in a quarter cycle of a power grid voltage signal wave; setting an array with the length of L, L being jointly determined by a frequency of a power grid voltage and a sampling frequency; setting a first variable S1 and a second variable S2, S2=S1+1; generating a first signal wave Ua according to the first variable S1, and generating a second signal wave Ub according to the second variable S2; and performing voltage Park conversion on the first signal wave Ua and the second signal wave Ub, so as to implement phase locking. A phase difference free component is obtained by means of an array, phase angle tracking is implemented in combination with Park conversion, the computing amount is small, and the reliability is high.

Description

锁相方法、装置及设备Phase locking method, device and device 技术领域Technical field
本申请涉及电力电子控制领域,尤其涉及一种锁相方法、装置及设备。The present application relates to the field of power electronic control, and in particular, to a phase locking method, device and device.
背景技术Background technique
随着现代工业的发展,电力电子装置和非线性负载的广泛应用产生了大量的谐波,导致电力系统中谐波电流成分迅速增长,电流波形畸变,加大了线损和用电设备的损耗,系统功率因素急剧降低,严重影响电网电能质量。With the development of modern industry, the widespread application of power electronic devices and non-linear loads has generated a large number of harmonics, resulting in rapid growth of harmonic current components in power systems, distortion of current waveforms, and increased loss of line losses and electrical equipment. The system power factor is drastically reduced, which seriously affects the power quality of the grid.
由于脉冲宽度调制(Pulse Width Modulation,PWM)整流器能够实现网侧电流正弦化并且运行于单位功率因数状态下,而且又具备双向能量回馈的功能。因此PWM整流器在交流变换直流跟直流变换交流的场合得到广泛的应用。Pulse Width Modulation (PWM) rectifiers can realize sinusoidal current on the grid side and operate in unity power factor state, and have the function of bidirectional energy feedback. Therefore, the PWM rectifier is widely used in the case of AC-converted DC and DC-converted AC.
PWM整流器的一个重要性能指标是获得交流输入侧的单位功率因数。然而,受硬件延时的检测误差、电压输入谐波及相位、频率波动的影响,一般的锁相方法很难实现相位的实时有效跟踪,动态响应速度较慢,且抗扰动能力较差。因此,为了实现单位功率因数,就要实现电网输入电流实时跟踪电网输入电压,即实现输入电流和输入电压的同频同相。而且,由于单相电网只有一个自由度分量,对于单相PWM整流来说,不能像三相PWM整流那样直接进行dq坐标变换。如果在单相PWM整流里面用dq坐标变换来继续锁相,需要虚拟另外一个相位差90度的自由分量,并使用电压Park变换来处理相位角跟踪,但是该方法计算量大并且精度差。An important performance indicator of a PWM rectifier is the unity power factor at the AC input side. However, due to the hardware delay detection error, voltage input harmonics, phase and frequency fluctuations, the general phase-locking method is difficult to achieve real-time effective tracking of the phase, the dynamic response speed is slow, and the anti-disturbance capability is poor. Therefore, in order to achieve the unit power factor, it is necessary to realize the real-time tracking of the grid input voltage by the grid input current, that is, to achieve the same frequency in phase of the input current and the input voltage. Moreover, since the single-phase grid has only one degree of freedom component, for single-phase PWM rectification, the dq coordinate transformation cannot be directly performed like the three-phase PWM rectification. If the dq coordinate transformation is used to continue phase locking in single-phase PWM rectification, another free component with a phase difference of 90 degrees needs to be virtualized, and the voltage Park tracking is used to process the phase angle tracking, but the method is computationally intensive and inaccurate.
发明内容Summary of the invention
本申请实施例提供了一种锁相方法、装置及设备,以期提供一种适用于单相PWM整流的锁相方法,计算量小且精度高。The embodiment of the present application provides a phase locking method, device and device, in order to provide a phase locking method suitable for single phase PWM rectification, which has small calculation amount and high precision.
本申请实施例第一方面提供了一种锁相方法,包括:A first aspect of the embodiments of the present application provides a phase locking method, including:
在电网电压信号波的四分之一周期内循环采样电网电压信号;Cycle sampling the grid voltage signal within a quarter of the grid voltage signal wave;
设定一个长度为L的数组,其中,所述L由所述电网电压的频率、采样频率共同决定;设定第一变量S1与第二变量S2,其中,S2=S1+1; Setting an array of length L, wherein the L is determined by the frequency of the grid voltage and the sampling frequency; setting the first variable S1 and the second variable S2, wherein S2=S1+1;
根据所述第一变量S1生成第一信号波Ua,并根据所述第二变量S2生成第二信号波Ub;Generating a first signal wave Ua according to the first variable S1, and generating a second signal wave Ub according to the second variable S2;
将所述第一信号波Ua与所述第二信号波Ub进行电压Park变换,实现锁相。The first signal wave Ua and the second signal wave Ub are subjected to voltage Park conversion to achieve phase locking.
结合本申请实施例第一方面,在本申请实施例第一方面的第一种实现方式中,所述设定一个长度为L的数组之前,所述方法还包括:确定数组长度L的值。With reference to the first aspect of the embodiments of the present application, in a first implementation manner of the first aspect of the embodiments of the present application, before the setting an array of length L, the method further includes: determining a value of the array length L.
结合本申请实施例第一方面的第一种实现方式,在本申请实施例第一方面的第二种实现方式中,所述确定数组长度L的值,包括:With reference to the first implementation manner of the first aspect of the embodiment of the present application, in the second implementation manner of the first aspect of the embodiment, the determining the value of the array length L includes:
根据所述电网电压信号波的频率确定所述信号波的周期;Determining a period of the signal wave according to a frequency of the grid voltage signal wave;
根据所述信号波的周期确定所述信号波的四分之一周期所占的时长;Determining, according to a period of the signal wave, a duration of a quarter period of the signal wave;
根据所述采样频率确定所述采样周期;Determining the sampling period according to the sampling frequency;
根据所述信号波的四分之一周期所占的时长以及所述采样周期确定所述信号波的四分之一周期内的采样点数,即所述长度L的值。The number of sampling points in the quarter period of the signal wave, that is, the value of the length L, is determined according to the length of time occupied by the quarter period of the signal wave and the sampling period.
结合本申请实施例第一方面,在本申请实施例第一方面的第三种实现方式中,所述根据所述第一变量S1生成第一信号波Ua,并根据所述第二变量S2生成第二信号波Ub,包括:With reference to the first aspect of the embodiments of the present application, in a third implementation manner of the first aspect of the embodiment, the first signal wave Ua is generated according to the first variable S1, and generated according to the second variable S2. The second signal wave Ub includes:
使所述第一变量S1在所述信号波的四分之一周期内循环采样,并缓存所述第一变量S1采样的元素信息;And causing the first variable S1 to cyclically sample in a quarter cycle of the signal wave, and buffering element information sampled by the first variable S1;
根据所述第一变量S1的循环采样,缓存所述第二变量S2采样的元素信息;Causing the element information sampled by the second variable S2 according to the cyclic sampling of the first variable S1;
根据所述第一变量S1采样的元素信息生成第一信号波Ua,并根据所述第二变量S2采样的元素信息生成第二信号波Ub。The first signal wave Ua is generated according to the element information sampled by the first variable S1, and the second signal wave Ub is generated according to the element information sampled by the second variable S2.
结合本申请实施例第一方面,在本申请实施例第一方面的第四种实现方式中,所述元素信息至少包括角度信息和电压值信息。With reference to the first aspect of the embodiments of the present application, in a fourth implementation manner of the first aspect of the embodiments, the element information includes at least angle information and voltage value information.
本申请实施例第二方面提供了一种锁相装置,包括:A second aspect of the embodiments of the present application provides a phase locking device, including:
采样模块,用于在电网电压信号波的四分之一周期内循环采样电网电压信号;a sampling module for cyclically sampling a grid voltage signal within a quarter cycle of a grid voltage signal wave;
第一设定模块,用于设定一个长度为L的数组,其中,所述L由所述电网电压的频率、采样频率共同决定; a first setting module, configured to set an array of length L, wherein the L is determined by a common frequency and a sampling frequency of the grid voltage;
第二设定模块,用于设定第一变量S1与第二变量S2,其中,S2=S1+1;a second setting module, configured to set a first variable S1 and a second variable S2, wherein S2=S1+1;
生成模块,用于根据所述第一变量S1生成第一信号波Ua,并根据所述第二变量S2生成第二信号波Ub;a generating module, configured to generate a first signal wave Ua according to the first variable S1, and generate a second signal wave Ub according to the second variable S2;
变换模块,用于将所述第一信号波Ua与所述第二信号波Ub进行电压Park变换,实现锁相。And a transform module, configured to perform voltage Park conversion on the first signal wave Ua and the second signal wave Ub to implement phase locking.
结合本申请实施例第二方面,在本申请实施例第二方面的第一种实现方式在中,所述装置还包括确定模块,用于在所述第一设定模块设定一个长度为L的数组之前,确定数组长度L的值。With reference to the second aspect of the embodiments of the present application, in a first implementation manner of the second aspect of the embodiments, the apparatus further includes a determining module, configured to set a length L in the first setting module. Before the array, determine the value of the array length L.
结合本申请实施例第二方面第一种实现方式,在本申请实施例第二方面的第二种实现方式中,所述确定模块包括:With reference to the first implementation manner of the second aspect of the embodiment of the present application, in the second implementation manner of the second aspect of the embodiment, the determining module includes:
第一确定单元,用于根据所述电网电压信号波的频率确定所述信号波的周期;a first determining unit, configured to determine a period of the signal wave according to a frequency of the grid voltage signal wave;
第二确定单元,用于根据所述信号波的周期确定所述信号波的四分之一周期所占的时长;a second determining unit, configured to determine, according to a period of the signal wave, a duration of a quarter period of the signal wave;
第三确定单元,用于根据所述采样频率确定所述采样周期;a third determining unit, configured to determine the sampling period according to the sampling frequency;
第四确定单元,用于根据所述信号波的四分之一周期所占的时长以及所述采样周期确定所述信号波的四分之一周期内的采样点数,即所述长度L的值。a fourth determining unit, configured to determine, according to a duration occupied by a quarter period of the signal wave and the sampling period, a number of sampling points in a quarter period of the signal wave, that is, a value of the length L .
结合本申请实施例第二方面,在本申请实施例第二方面的第三种实现方式中,所述生成模块包括:With reference to the second aspect of the embodiments of the present application, in a third implementation manner of the second aspect of the embodiments, the generating module includes:
第一缓存单元,用于使所述第一变量S1在所述信号波的四分之一周期内循环采样,并缓存所述第一变量S1采样的元素信息;a first buffer unit, configured to: cyclically sample the first variable S1 in a quarter cycle of the signal wave, and buffer element information sampled by the first variable S1;
第二缓存单元,用于根据所述第一变量S1的循环采样,缓存所述第二变量S2采样的元素信息;a second buffer unit, configured to buffer element information sampled by the second variable S2 according to the cyclic sampling of the first variable S1;
生成单元,用于根据所述第一变量S1采样的元素信息生成第一信号波Ua,并根据所述第二变量S2采样的元素信息生成第二信号波Ub。And a generating unit, configured to generate a first signal wave Ua according to the element information sampled by the first variable S1, and generate a second signal wave Ub according to the element information sampled by the second variable S2.
结合本申请实施例第二方面,在本申请实施例第二方面的第四种实现方式中,所述元素信息至少包括角度信息和电压值信息。With reference to the second aspect of the embodiments of the present application, in a fourth implementation manner of the second aspect of the embodiments of the present application, the element information includes at least angle information and voltage value information.
本申请实施例第三方面提供了一种锁相设备,包括:A third aspect of the embodiments of the present application provides a phase locking device, including:
存储器,用于存储锁相程序指令; a memory for storing a phase lock program instruction;
处理器,用于调用所述锁相程序指令,并执行本申请实施例第一方面或第一方面任一种实现方式中的锁相方法。The processor is configured to invoke the phase lock program instruction, and execute the phase lock method in the first aspect of the embodiment of the present application or the implementation manner in any one of the first aspect.
实施本申请实施例,可以通过在电网电压信号波的四分之一周期内循环采样电网电压信号;同时根据所述电网电压的频率和采样频率设定一个长度为L的数组;再通过设定第一变量S1与第二变量S2,其中,S2=S1+1;根据所述第一变量S1生成第一信号波Ua,并根据所述第二变量S2生成第二信号波Ub;将所述第一信号波Ua与所述第二信号波Ub进行电压Park变换,实现锁相,从而使得本申请实施例所示的锁相方法计算量小,可靠性高。Embodiments of the present application may be configured to cyclically sample a grid voltage signal within a quarter cycle of a grid voltage signal wave; and simultaneously set an array of length L according to the frequency and sampling frequency of the grid voltage; a first variable S1 and a second variable S2, wherein S2=S1+1; generating a first signal wave Ua according to the first variable S1, and generating a second signal wave Ub according to the second variable S2; The first signal wave Ua and the second signal wave Ub are subjected to voltage Park conversion to achieve phase locking, so that the phase locking method shown in the embodiment of the present application has a small calculation amount and high reliability.
附图说明DRAWINGS
为了更清楚地说明本发明实施例或现有技术中的技术方案,下面将对实施例或现有技术描述中所需要使用的附图作简单地介绍,显而易见地,下面描述中的附图仅仅是本发明的一些实施例,对于本领域普通技术人员来讲,在不付出创造性劳动的前提下,还可以根据这些附图获得其他的附图。In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings used in the embodiments or the description of the prior art will be briefly described below. Obviously, the drawings in the following description are only It is a certain embodiment of the present invention, and other drawings can be obtained from those skilled in the art without any creative work.
图1为本申请实施例提供的锁相方法流程图;FIG. 1 is a flowchart of a phase locking method according to an embodiment of the present application;
图2为本申请实施例提供的生成第一信号波及第二信号波的方法流程图;2 is a flowchart of a method for generating a first signal wave and a second signal wave according to an embodiment of the present application;
图3为本申请另一实施例提供的锁相方法流程图;3 is a flowchart of a phase locking method according to another embodiment of the present application;
图4为本申请实施例提供的L值确定方法流程图;4 is a flowchart of a method for determining an L value according to an embodiment of the present application;
图5为本申请实施例提供的锁相装置结构图;FIG. 5 is a structural diagram of a phase lock device according to an embodiment of the present application;
图6为本申请另一实施例提供的锁相装置结构图;6 is a structural diagram of a phase lock device according to another embodiment of the present application;
图7为本申请实施例提供的确定模块结构图;FIG. 7 is a structural diagram of a determining module according to an embodiment of the present application;
图8为本申请实施例提供的生成模块结构图;FIG. 8 is a structural diagram of a generation module according to an embodiment of the present application;
图9为本申请实施例提供的锁相设备结构图。FIG. 9 is a structural diagram of a phase lock device according to an embodiment of the present application.
具体实施方式Detailed ways
本申请说明书、权利要求书和附图中出现的术语“包括”和“具有”以及它们任何变形,意图在于覆盖不排他的包含。例如包含了一系列步骤或单元的过程、方法、系统、产品或设备没有限定于已列出的步骤或单元,而是可选地还包括没有列出的步骤或单元,或可选地还包括对于这些过程、方法、产品或 设备固有的其它步骤或单元。The terms "comprising" and "having", and any variations thereof, appearing in the specification, the claims, and the drawings are intended to cover a non-exclusive inclusion. For example, a process, method, system, product, or device that comprises a series of steps or units is not limited to the listed steps or units, but optionally also includes steps or units not listed, or alternatively For these processes, methods, products or Other steps or units inherent to the device.
下面首先结合相关附图来举例介绍下本申请实施例方案可能用到的流程图。The flowcharts that may be used in the embodiments of the present application are first described below with reference to the related drawings.
如图1所示,图1为本申请实施例提供的锁相方法,至少可以包括以下几个步骤:As shown in FIG. 1 , FIG. 1 is a phase locking method provided by an embodiment of the present application, and may include at least the following steps:
S101:在电网电压信号波的四分之一周期内循环采样电网电压信息。S101: Cycle sampling the grid voltage information in a quarter cycle of the grid voltage signal wave.
具体地,电网电压的频率为50Hz±0.2Hz,信号波可以是正弦信号,也可以是余弦信号,频率为47~63Hz。采样范围为电网电压信号的四分之一个周期。Specifically, the frequency of the grid voltage is 50 Hz±0.2 Hz, and the signal wave may be a sinusoidal signal or a cosine signal, and the frequency is 47-63 Hz. The sampling range is one quarter of the period of the grid voltage signal.
S102:设定一个长度为L的数组。S102: Set an array of length L.
具体地,所述L由所述电网电压的频率、采样频率共同决定。Specifically, the L is determined by the frequency of the grid voltage and the sampling frequency.
具体地,按照预设的采样频率,在上述电网电压信号的四分之一个周期上采集L个信号点。将这L个信号点依次在所述数组中存储。Specifically, L signal points are acquired on a quarter cycle of the grid voltage signal according to a preset sampling frequency. These L signal points are sequentially stored in the array.
S103:设定第一变量S1与第二变量S2,其中,S2=S1+1。S103: Set the first variable S1 and the second variable S2, where S2=S1+1.
具体地,第一变量S1可以是一个指针,其指向数组中存储的当前电网电压采样值。第二变量S2可以是一个指针,变量S2指向的元素为S1+1所指元素。例如,当S1指向第一个元素时,S2指向第二个元素;当S1指向第L个元素时,S2指向第一个元素。采样的电网电压数据在数组中循环存储,即若当前采样数据存储在数组最末端,则下一采样数据存储在数组首端。可以知道的是,S1所指的第N个元素始终与S2所指的第N个元素的相位差为90°,其中,1≤N≤L。In particular, the first variable S1 can be a pointer to the current grid voltage sample value stored in the array. The second variable S2 can be a pointer, and the element pointed to by the variable S2 is the element indicated by S1+1. For example, when S1 points to the first element, S2 points to the second element; when S1 points to the Lth element, S2 points to the first element. The sampled grid voltage data is cyclically stored in the array, that is, if the current sampled data is stored at the end of the array, the next sampled data is stored at the beginning of the array. It can be known that the phase difference between the Nth element indicated by S1 and the Nth element indicated by S2 is 90°, where 1≤N≤L.
S104:根据所述第一变量S1生成第一信号波Ua,并根据所述第二变量S2生成第二信号波Ub。S104: Generate a first signal wave Ua according to the first variable S1, and generate a second signal wave Ub according to the second variable S2.
具体地,第一变量S1与第二变量S2可以是指针。由于S2=S1+1,S1所指的第N个元素始终与S2所指的第N个元素的相位差为90°。因此,根据第一变量S1生成的第一信号波Ua与根据第二变量S2生成的第二信号波Ub之间的相位差为90°。Specifically, the first variable S1 and the second variable S2 may be pointers. Since S2=S1+1, the phase difference between the Nth element indicated by S1 and the Nth element indicated by S2 is 90°. Therefore, the phase difference between the first signal wave Ua generated according to the first variable S1 and the second signal wave Ub generated according to the second variable S2 is 90°.
请参阅图2,图2为生成第一信号波及第二信号波的方法,至少包括以下几个步骤:Please refer to FIG. 2. FIG. 2 is a method for generating a first signal wave and a second signal wave, and at least includes the following steps:
S1041:使所述第一变量S1在所述信号波的四分之一周期内循环采样,并 缓存所述第一变量S1采样的元素信息。S1041: Looping the first variable S1 in a quarter cycle of the signal wave, and The element information sampled by the first variable S1 is buffered.
具体地,第一变量S1在信号波的四分之一周期内循环采样,当采样到第L个点后,返回第一个采样点,继续采样,并缓存第一变量S1采样的所有元素的元素信息。Specifically, the first variable S1 is cyclically sampled in a quarter cycle of the signal wave, and after sampling the Lth point, the first sample point is returned, sampling is continued, and all elements of the first variable S1 are buffered. Element information.
具体地,元素信息至少可以包括该元素对应的角度信息及对应的电压值信息。Specifically, the element information may include at least angle information corresponding to the element and corresponding voltage value information.
S1042:根据所述第一变量S1的循环采样,缓存所述第二变量S2采样的元素信息。S1042: Cache the element information sampled by the second variable S2 according to the cyclic sampling of the first variable S1.
具体地,第一变量S1始终指向存储在数组中的当前元素(即当前电网电压的采样值),S2=S1+1,变量S2指向的元素为S1+1所指元素。特别地,当S1指向数组中最后一个元素时,S2此时指向数组中的第一个元素。缓存第二变量S2指向的数组内的每一个元素的元素信息。Specifically, the first variable S1 always points to the current element stored in the array (ie, the sample value of the current grid voltage), S2=S1+1, and the element pointed to by the variable S2 is the element indicated by S1+1. In particular, when S1 points to the last element in the array, S2 now points to the first element in the array. The element information of each element in the array pointed to by the second variable S2 is cached.
S1043:根据所述第一变量S1采样的元素信息生成第一信号波Ua,并根据所述第二变量S2采样的元素信息生成第二信号波Ub。S1043: Generate a first signal wave Ua according to the element information sampled by the first variable S1, and generate a second signal wave Ub according to the element information sampled by the second variable S2.
具体地,第一变量S1所指元素的角度信息与第二变量S2所指元素的角度信息相差90°,且维持不变。例如,假设第一变量S1所指元素的角度信息为α,第二变量S2所指元素的角度信息为β。那么当第一变量S1所指元素的角度信息α为0°时,第二变量S2所指元素的角度信息β为-90°;那么当第一变量S1所指元素的角度信息α为90°时,第二变量S2所指元素的角度信息β为0°。Specifically, the angle information of the element indicated by the first variable S1 is different from the angle information of the element indicated by the second variable S2 by 90° and remains unchanged. For example, assume that the angle information of the element indicated by the first variable S1 is α, and the angle information of the element indicated by the second variable S2 is β. Then, when the angle information α of the element indicated by the first variable S1 is 0°, the angle information β of the element indicated by the second variable S2 is −90°; then the angle information α of the element indicated by the first variable S1 is 90°. The angle information β of the element indicated by the second variable S2 is 0°.
具体地,第一变量S1采样的元素信息组成了数字信号,并根据数字信号生成模拟信号Ua;第二变量S2采样的元素信息组成了数字信号,并根据数字信号生成模拟信号Ub。Specifically, the element information sampled by the first variable S1 constitutes a digital signal, and the analog signal Ua is generated according to the digital signal; the element information sampled by the second variable S2 constitutes a digital signal, and the analog signal Ub is generated according to the digital signal.
具体地,由于S2=S1+1,S1所指的第N个元素始终与S2所指的第N个元素的相位差为90°。因此,根据第一变量S1生成的第一信号波Ua与根据第二变量S2生成的第二信号波Ub之间的相位差为90°。Specifically, since S2=S1+1, the phase difference between the Nth element indicated by S1 and the Nth element indicated by S2 is 90°. Therefore, the phase difference between the first signal wave Ua generated according to the first variable S1 and the second signal wave Ub generated according to the second variable S2 is 90°.
S105:将所述第一信号波Ua与所述第二信号波Ub进行电压Park变换,实现锁相。S105: performing voltage Park conversion on the first signal wave Ua and the second signal wave Ub to implement phase locking.
具体地,第一信号波Ua与第二信号波Ub之间的相位差为90°,对Ua和Ub进行Park变换,转换成dq坐标系中的Ud,Uq分量,实现相位角跟踪。 Specifically, the phase difference between the first signal wave Ua and the second signal wave Ub is 90°, and Park transformation is performed on Ua and Ub, and converted into Ud and Uq components in the dq coordinate system to realize phase angle tracking.
实施本申请实施例,可以通过在电网电压信号波的四分之一周期内循环采样电网电压信号;同时根据所述电网电压的频率和采样频率设定一个长度为L的数组;再通过设定第一变量S1与第二变量S2,其中,S2=S1+1;根据所述第一变量S1生成第一信号波Ua,并根据所述第二变量S2生成第二信号波Ub;将所述第一信号波Ua与所述第二信号波Ub进行电压Park变换,实现锁相,从而使得本申请实施例所示的锁相方法计算量小,可靠性高。Embodiments of the present application may be configured to cyclically sample a grid voltage signal within a quarter cycle of a grid voltage signal wave; and simultaneously set an array of length L according to the frequency and sampling frequency of the grid voltage; a first variable S1 and a second variable S2, wherein S2=S1+1; generating a first signal wave Ua according to the first variable S1, and generating a second signal wave Ub according to the second variable S2; The first signal wave Ua and the second signal wave Ub are subjected to voltage Park conversion to achieve phase locking, so that the phase locking method shown in the embodiment of the present application has a small calculation amount and high reliability.
如图3所示,图3为本申请另一实施例提供的锁相方法,至少可以包括以下几个步骤:As shown in FIG. 3, FIG. 3 is a phase locking method according to another embodiment of the present application, and may include at least the following steps:
S201:在电网电压信号波的四分之一周期内循环采样电网电压信号。S201: Cycle sampling the grid voltage signal in a quarter cycle of the grid voltage signal wave.
与S101一致,在此不再赘述。It is consistent with S101 and will not be described here.
S202:确定数组长度L的值。S202: Determine the value of the array length L.
具体地,L的值由所述电网电压的频率、采样频率共同决定。根据香农采样定理,为了不失真的恢复模拟信号,采样频率应该不小于模拟信号频谱中最高频率的两倍。可以知道是的电网电压的正弦信号即为模拟信号,正弦信号波的频率为47~63Hz,需要扩展一定的自适应频率范围,在本申请中将该频率范围扩展为40~70Hz,那么当正弦信号波的频率为40Hz时,采样频率不小于80Hz即可保证不失真的恢复模拟信号,当正弦信号波的频率为70Hz时,采样频率不小于140Hz即可保证不失真的恢复模拟信号。采样频率越高,采集模拟信号的精度也就越高。在本申请实施例中,采样频率设为30kHz,假设信号波的频率为40Hz。Specifically, the value of L is determined by the frequency of the grid voltage and the sampling frequency. According to the Shannon sampling theorem, in order to recover the analog signal without distortion, the sampling frequency should be no less than twice the highest frequency in the spectrum of the analog signal. It can be known that the sinusoidal signal of the grid voltage is an analog signal, and the frequency of the sinusoidal signal wave is 47-63 Hz, and a certain adaptive frequency range needs to be extended. In the present application, the frequency range is extended to 40-70 Hz, then when sine When the frequency of the signal wave is 40 Hz, the sampling frequency is not less than 80 Hz to ensure the undistorted recovery of the analog signal. When the frequency of the sinusoidal signal wave is 70 Hz, the sampling frequency is not less than 140 Hz to ensure the undistorted recovery of the analog signal. The higher the sampling frequency, the higher the accuracy of acquiring analog signals. In the embodiment of the present application, the sampling frequency is set to 30 kHz, and the frequency of the signal wave is assumed to be 40 Hz.
请参阅图4。图4为本申请实施例提供的L值确定方法,至少可以包括以下几个步骤:Please refer to Figure 4. FIG. 4 is a method for determining an L value according to an embodiment of the present application, which may include at least the following steps:
S2021:根据所述电网电压信号波的频率确定所述信号波的周期。S2021: Determine a period of the signal wave according to a frequency of the grid voltage signal wave.
具体地,电网电压信号波的频率fs为40Hz,则电网电压信号波的周期为25ms。Specifically, the frequency fs of the grid voltage signal wave is 40 Hz, and the period of the grid voltage signal wave is 25 ms.
S2022:根据所述信号波的周期确定所述信号波的四分之一周期所占的时长。S2022: Determine a duration of a quarter period of the signal wave according to a period of the signal wave.
具体地,电网电压信号波的周期为25ms,则四分之一周期所占的时长为6250us。 Specifically, the period of the grid voltage signal wave is 25 ms, and the period of the quarter period is 6250 us.
S2023:根据所述采样频率确定所述采样周期。S2023: Determine the sampling period according to the sampling frequency.
具体地,采样频率设为30kHz,则采样周期为33.33us。Specifically, the sampling frequency is set to 30 kHz, and the sampling period is 33.33 us.
S2024:根据所述信号波的四分之一周期所占的时长以及所述采样周期确定所述信号波的四分之一周期内的采样点数,即所述长度L的值。S2024: Determine, according to the duration of the quarter period of the signal wave and the sampling period, the number of sampling points in the quarter period of the signal wave, that is, the value of the length L.
具体地,四分之一周期所占的时长为6250us,采样周期为33.33us,则在所述信号波的四分之一周期内的采样点数至少为6250us/33.33us=188。因此,长度L的值大于188即可。Specifically, the quarter period takes 6250us and the sampling period is 33.33us, and the number of sampling points in the quarter period of the signal wave is at least 6250us/33.33us=188. Therefore, the value of the length L is greater than 188.
可以知道的是,信号波的频率越高,周期越小。以固定的采样频率在信号波的四分之一周期内的采样点数越少。因此,计算出信号波频率最低的情况下的采样点数,即可涵盖整个频率范围内的采样情况。It can be known that the higher the frequency of the signal wave, the smaller the period. The fewer the number of samples in the quarter cycle of the signal wave at a fixed sampling frequency. Therefore, the number of sampling points in the case where the signal wave frequency is the lowest is calculated, and the sampling condition in the entire frequency range can be covered.
S203:设定一个长度为L的数组。S203: Set an array of length L.
与S102一致,在此不再赘述。It is consistent with S102 and will not be described here.
S204:设定第一变量S1与第二变量S2,其中,S2=S1+1。S204: Set the first variable S1 and the second variable S2, where S2=S1+1.
与S103一致,在此不再赘述。It is consistent with S103 and will not be described here.
S205:根据所述第一变量S1生成第一信号波Ua,并根据所述第二变量S2生成第二信号波Ub。S205: Generate a first signal wave Ua according to the first variable S1, and generate a second signal wave Ub according to the second variable S2.
与S104一致,在此不再赘述。It is consistent with S104 and will not be described here.
S206:将所述第一信号波Ua与所述第二信号波Ub进行电压Park变换,实现锁相。S206: Perform voltage phase conversion on the first signal wave Ua and the second signal wave Ub to implement phase locking.
与S105一致,在此不再赘述。It is consistent with S105 and will not be described here.
实施本申请实施例,可以通过在电网电压信号波的四分之一周期内循环采样电网电压信号;同时根据所述电网电压的频率和采样频率设定一个长度为L的数组;再通过设定第一变量S1与第二变量S2,其中,S2=S1+1;根据所述第一变量S1生成第一信号波Ua,并根据所述第二变量S2生成第二信号波Ub;将所述第一信号波Ua与所述第二信号波Ub进行电压Park变换,实现锁相,从而使得本申请实施例所示的锁相方法、装置及设备计算量小,可靠性高。Embodiments of the present application may be configured to cyclically sample a grid voltage signal within a quarter cycle of a grid voltage signal wave; and simultaneously set an array of length L according to the frequency and sampling frequency of the grid voltage; a first variable S1 and a second variable S2, wherein S2=S1+1; generating a first signal wave Ua according to the first variable S1, and generating a second signal wave Ub according to the second variable S2; The first signal wave Ua and the second signal wave Ub are subjected to voltage Park conversion to realize phase locking, so that the phase locking method, device and device shown in the embodiment of the present application have small calculation amount and high reliability.
本申请实施例相应的提供了一种锁相装置。如图5所示,锁相装置10至少可以包括采样模块110、第一设定模块120、第二设定模块130、生成模块140、变换模块150,其中: The embodiment of the present application correspondingly provides a phase lock device. As shown in FIG. 5, the phase locking device 10 can include at least a sampling module 110, a first setting module 120, a second setting module 130, a generating module 140, and a transform module 150, where:
采样模块110,用于在电网电压信号波的四分之一周期内循环采样电网电压信息。The sampling module 110 is configured to cyclically sample the grid voltage information in a quarter cycle of the grid voltage signal wave.
第一设定模块120,用于设定一个长度为L的数组,其中,所述L由所述电网电压的频率、采样频率共同决定。The first setting module 120 is configured to set an array of length L, wherein the L is determined by the frequency of the grid voltage and the sampling frequency.
第二设定模块130,用于设定第一变量S1与第二变量S2,其中,S2=S1+1。The second setting module 130 is configured to set the first variable S1 and the second variable S2, where S2=S1+1.
生成模块140,用于根据所述第一变量S1生成第一信号波Ua,并根据所述第二变量S2生成第二信号波Ub。The generating module 140 is configured to generate a first signal wave Ua according to the first variable S1, and generate a second signal wave Ub according to the second variable S2.
变换模块150,用于将所述第一信号波Ua与所述第二信号波Ub进行电压Park变换,实现锁相。The conversion module 150 is configured to perform voltage Park conversion on the first signal wave Ua and the second signal wave Ub to implement phase locking.
在一个可能的实施例中,如图6所示,锁相装置10除了包括采样模块110、第一设定模块120、第二设定模块130、生成模块140、变换模块150外,还可以包括:确定模块160,用于在所述第一设定模块120设定一个长度为L的数组之前,确定数组长度L的值。In a possible embodiment, as shown in FIG. 6 , the phase lock device 10 may include, in addition to the sampling module 110 , the first setting module 120 , the second setting module 130 , the generating module 140 , and the transform module 150 . The determining module 160 is configured to determine the value of the array length L before the first setting module 120 sets an array of length L.
在一个可能的实施例中,确定模块160可以包括第一确定单元1610、第二确定单元1620、第三确定单元1630、第四确定单元1640,如图7所示。In one possible embodiment, the determining module 160 may include a first determining unit 1610, a second determining unit 1620, a third determining unit 1630, and a fourth determining unit 1640, as shown in FIG.
第一确定单元1610,用于根据所述电网电压信号波的频率确定所述信号波的周期;a first determining unit 1610, configured to determine a period of the signal wave according to a frequency of the grid voltage signal wave;
第二确定单元1620,用于根据所述信号波的周期确定所述信号波的四分之一周期所占的时长;a second determining unit 1620, configured to determine, according to a period of the signal wave, a duration of a quarter period of the signal wave;
第三确定单元1630,用于根据所述采样频率确定所述采样周期;a third determining unit 1630, configured to determine the sampling period according to the sampling frequency;
第四确定单元1640,用于根据所述信号波的四分之一周期所占的时长以及所述采样周期确定所述信号波的四分之一周期内的采样点数,即所述长度L的值。a fourth determining unit 1640, configured to determine, according to a duration occupied by a quarter period of the signal wave and the sampling period, a number of sampling points in a quarter period of the signal wave, that is, the length L value.
在一个可能的实施例中,生成模块140可以包括第一缓存单元1410、第二缓存单元1420、生成单元1430,如图8所示。In a possible embodiment, the generating module 140 may include a first buffer unit 1410, a second buffer unit 1420, and a generating unit 1430, as shown in FIG.
第一缓存单元1410,用于使所述第一变量S1在所述信号波的四分之一周期内循环采样,并缓存所述第一变量S1采样的元素信息。The first buffer unit 1410 is configured to cyclically sample the first variable S1 in a quarter cycle of the signal wave, and buffer the element information sampled by the first variable S1.
第二缓存单元1420,用于根据所述第一变量S1的循环采样,缓存所述第二变量S2采样的元素信息。 The second buffer unit 1420 is configured to buffer element information sampled by the second variable S2 according to the cyclic sampling of the first variable S1.
生成单元1430,用于根据所述第一变量S1采样的元素信息生成第一信号波Ua,并根据所述第二变量S2采样的元素信息生成第二信号波Ub。The generating unit 1430 is configured to generate a first signal wave Ua according to the element information sampled by the first variable S1, and generate a second signal wave Ub according to the element information sampled by the second variable S2.
在一个可能的实施例中,所述元素信息至少包括角度信息和电压值信息。In a possible embodiment, the element information includes at least angle information and voltage value information.
可理解的是,本实施例的锁相装置10的各功能模块的功能可根据上述方法实施例中的方法具体实现,此处不再赘述。It is to be understood that the functions of the functional modules of the phase-locking device 10 of the present embodiment may be specifically implemented according to the method in the foregoing method embodiments, and details are not described herein again.
实施本申请实施例,可以通过在电网电压信号波的四分之一周期内循环采样电网电压信息;同时根据所述电网电压的频率和采样频率设定一个长度为L的数组;再通过设定第一变量S1与第二变量S2,其中,S2=S1+1;根据所述第一变量S1生成第一信号波Ua,并根据所述第二变量S2生成第二信号波Ub;将所述第一信号波Ua与所述第二信号波Ub进行电压Park变换,实现锁相,从而使得本申请实施例所示的锁相方法计算量小,可靠性高。Embodiments of the present application may be configured to cyclically sample grid voltage information within a quarter cycle of a grid voltage signal wave; and simultaneously set an array of length L according to the frequency and sampling frequency of the grid voltage; a first variable S1 and a second variable S2, wherein S2=S1+1; generating a first signal wave Ua according to the first variable S1, and generating a second signal wave Ub according to the second variable S2; The first signal wave Ua and the second signal wave Ub are subjected to voltage Park conversion to achieve phase locking, so that the phase locking method shown in the embodiment of the present application has a small calculation amount and high reliability.
本申请实施例相应的提供了一种锁相设备。如图9所示,锁相设备20至少可以包括:The embodiment of the present application correspondingly provides a phase lock device. As shown in FIG. 9, the phase locking device 20 can include at least:
存储器210,用于存储锁相程序;a memory 210, configured to store a phase lock program;
处理器220,用于调用存储器210中存储的锁相程序,并执行:The processor 220 is configured to call a phase lock program stored in the memory 210, and execute:
在电网电压信号波的四分之一周期内循环采样电网电压信息;Circulating sampling grid voltage information within a quarter of a period of the grid voltage signal wave;
设定一个长度为L的数组,其中,所述L由所述电网电压的频率、采样频率共同决定;Setting an array of length L, wherein the L is determined by the frequency of the grid voltage and the sampling frequency;
设定第一变量S1与第二变量S2,其中,S2=S1+1;Setting a first variable S1 and a second variable S2, wherein S2=S1+1;
根据所述第一变量S1生成第一信号波Ua,并根据所述第二变量S2生成第二信号波Ub;Generating a first signal wave Ua according to the first variable S1, and generating a second signal wave Ub according to the second variable S2;
将所述第一信号波Ua与所述第二信号波Ub进行电压Park变换,实现锁相。The first signal wave Ua and the second signal wave Ub are subjected to voltage Park conversion to achieve phase locking.
在一种可能的实施例中,在设定一个长度为L的数组之前,处理器220还用于:确定数组长度L的值。In a possible embodiment, before setting an array of length L, the processor 220 is further configured to: determine the value of the array length L.
在一种可能的实施例中,处理器220确定数组长度L的值,包括:In a possible embodiment, the processor 220 determines the value of the array length L, including:
根据所述电网电压信号波的频率确定所述信号波的周期;Determining a period of the signal wave according to a frequency of the grid voltage signal wave;
根据所述信号波的周期确定所述信号波的四分之一周期所占的时长;Determining, according to a period of the signal wave, a duration of a quarter period of the signal wave;
根据所述采样频率确定所述采样周期; Determining the sampling period according to the sampling frequency;
根据所述信号波的四分之一周期所占的时长以及所述采样周期确定所述信号波的四分之一周期内的采样点数,即所述长度L的值。The number of sampling points in the quarter period of the signal wave, that is, the value of the length L, is determined according to the length of time occupied by the quarter period of the signal wave and the sampling period.
在一种可能的实施例中,处理器220根据所述第一变量S1生成第一信号波Ua,并根据所述第二变量S2生成第二信号波Ub,包括:In a possible embodiment, the processor 220 generates the first signal wave Ua according to the first variable S1, and generates the second signal wave Ub according to the second variable S2, including:
使所述第一变量S1在所述信号波的四分之一周期内循环采样,并缓存所述第一变量S1采样的元素信息;And causing the first variable S1 to cyclically sample in a quarter cycle of the signal wave, and buffering element information sampled by the first variable S1;
根据所述第一变量S1的循环采样,缓存所述第二变量S2采样的元素信息;Causing the element information sampled by the second variable S2 according to the cyclic sampling of the first variable S1;
根据所述第一变量S1采样的元素信息生成第一信号波Ua,并根据所述第二变量S2采样的元素信息生成第二信号波Ub。The first signal wave Ua is generated according to the element information sampled by the first variable S1, and the second signal wave Ub is generated according to the element information sampled by the second variable S2.
在一种可能的实施例中,所述元素信息至少包括角度信息和电压值信息。In a possible embodiment, the element information includes at least angle information and voltage value information.
实施本申请实施例,可以通过在电网电压信号波的四分之一周期内循环采样电网电压信息;同时根据所述电网电压的频率和采样频率设定一个长度为L的数组;再通过设定第一变量S1与第二变量S2,其中,S2=S1+1;根据所述第一变量S1生成第一信号波Ua,并根据所述第二变量S2生成第二信号波Ub;将所述第一信号波Ua与所述第二信号波Ub进行电压Park变换,实现锁相,从而使得本申请实施例所示的锁相方法、装置及设备计算量小,可靠性高。Embodiments of the present application may be configured to cyclically sample grid voltage information within a quarter cycle of a grid voltage signal wave; and simultaneously set an array of length L according to the frequency and sampling frequency of the grid voltage; a first variable S1 and a second variable S2, wherein S2=S1+1; generating a first signal wave Ua according to the first variable S1, and generating a second signal wave Ub according to the second variable S2; The first signal wave Ua and the second signal wave Ub are subjected to voltage Park conversion to realize phase locking, so that the phase locking method, device and device shown in the embodiment of the present application have small calculation amount and high reliability.
本申请实施例方法中的步骤可以根据实际需要进行顺序调整、合并和删减。The steps in the method of the embodiment of the present application may be sequentially adjusted, merged, and deleted according to actual needs.
本申请实施例装置中的模块可以根据实际需要进行合并、划分和删减。The modules in the apparatus of the embodiment of the present application may be combined, divided, and deleted according to actual needs.
以上所述,以上实施例仅用以说明本发明的技术方案,而非对其限制;尽管参照前述实施例对本发明进行了详细的说明,本领域的普通技术人员应当理解:其依然可以对前述各实施例所记载的技术方案进行修改,或者对其中部分技术特征进行等同替换;而这些修改或者替换,并不使相应技术方案的本质脱离本发明各实施例技术方案的范围。 The above embodiments are only used to illustrate the technical solutions of the present invention, and are not intended to be limiting; although the present invention has been described in detail with reference to the foregoing embodiments, those skilled in the art will understand that The technical solutions described in the embodiments are modified, or some of the technical features are replaced by equivalents; and the modifications or substitutions do not deviate from the scope of the technical solutions of the embodiments of the present invention.

Claims (11)

  1. 一种锁相方法,其特征在于,包括:A phase locking method, comprising:
    在电网电压信号波的四分之一周期内循环采样电网电压信息;Circulating sampling grid voltage information within a quarter of a period of the grid voltage signal wave;
    设定一个长度为L的数组,其中,所述L由所述电网电压的频率、采样频率共同决定;Setting an array of length L, wherein the L is determined by the frequency of the grid voltage and the sampling frequency;
    设定第一变量S1与第二变量S2,其中,S2=S1+1;Setting a first variable S1 and a second variable S2, wherein S2=S1+1;
    根据所述第一变量S1生成第一信号波Ua,并根据所述第二变量S2生成第二信号波Ub;Generating a first signal wave Ua according to the first variable S1, and generating a second signal wave Ub according to the second variable S2;
    将所述第一信号波Ua与所述第二信号波Ub进行电压Park变换,实现锁相。The first signal wave Ua and the second signal wave Ub are subjected to voltage Park conversion to achieve phase locking.
  2. 如权利要求1所述的方法,其特征在于,所述设定一个长度为L的数组之前,所述方法还包括:确定数组长度L的值。The method of claim 1 wherein said method further comprises: determining a value of an array length L prior to said setting an array of length L.
  3. 如权利要求2所述的方法,其特征在于,所述确定数组长度L的值,包括:The method of claim 2 wherein said determining a value of an array length L comprises:
    根据所述电网电压信号波的频率确定所述信号波的周期;Determining a period of the signal wave according to a frequency of the grid voltage signal wave;
    根据所述信号波的周期确定所述信号波的四分之一周期所占的时长;Determining, according to a period of the signal wave, a duration of a quarter period of the signal wave;
    根据所述采样频率确定所述采样周期;Determining the sampling period according to the sampling frequency;
    根据所述信号波的四分之一周期所占的时长以及所述采样周期确定所述信号波的四分之一周期内的采样点数,即所述长度L的值。The number of sampling points in the quarter period of the signal wave, that is, the value of the length L, is determined according to the length of time occupied by the quarter period of the signal wave and the sampling period.
  4. 如权利要求1所述的方法,其特征在于,所述根据所述第一变量S1生成第一信号波Ua,并根据所述第二变量S2生成第二信号波Ub,包括:The method according to claim 1, wherein the generating the first signal wave Ua according to the first variable S1 and generating the second signal wave Ub according to the second variable S2 comprises:
    使所述第一变量S1在所述信号波的四分之一周期内循环采样,并缓存所述第一变量S1采样的元素信息;And causing the first variable S1 to cyclically sample in a quarter cycle of the signal wave, and buffering element information sampled by the first variable S1;
    根据所述第一变量S1的循环采样,缓存所述第二变量S2采样的元素信息;Causing the element information sampled by the second variable S2 according to the cyclic sampling of the first variable S1;
    根据所述第一变量S1采样的元素信息生成第一信号波Ua,并根据所述第 二变量S2采样的元素信息生成第二信号波Ub。Generating a first signal wave Ua according to the element information sampled by the first variable S1, and according to the first The element information sampled by the two variables S2 generates a second signal wave Ub.
  5. 如权利要求4所述的方法,其特征在于,所述元素信息至少包括角度信息和电压值信息。The method of claim 4 wherein said element information comprises at least angle information and voltage value information.
  6. 一种锁相装置,其特征在于,包括:A phase locking device, comprising:
    采样模块,用于在电网电压信号波的四分之一周期内循环采样电网电压信息;a sampling module for cyclically sampling grid voltage information within a quarter cycle of a grid voltage signal wave;
    第一设定模块,用于设定一个长度为L的数组,其中,所述L由所述电网电压的频率、采样频率共同决定;a first setting module, configured to set an array of length L, wherein the L is determined by a common frequency and a sampling frequency of the grid voltage;
    第二设定模块,用于设定第一变量S1与第二变量S2,其中,S2=S1+1;a second setting module, configured to set a first variable S1 and a second variable S2, wherein S2=S1+1;
    生成模块,用于根据所述第一变量S1生成第一信号波Ua,并根据所述第二变量S2生成第二信号波Ub;a generating module, configured to generate a first signal wave Ua according to the first variable S1, and generate a second signal wave Ub according to the second variable S2;
    变换模块,用于将所述第一信号波Ua与所述第二信号波Ub进行电压Park变换,实现锁相。And a transform module, configured to perform voltage Park conversion on the first signal wave Ua and the second signal wave Ub to implement phase locking.
  7. 如权利要求6所述的装置,其特征在于,所述装置还包括确定模块,用于在所述第一设定模块设定一个长度为L的数组之前,确定数组长度L的值。The apparatus according to claim 6, wherein said apparatus further comprises a determining module for determining a value of the array length L before said first setting module sets an array of length L.
  8. 如权利要求7所述的装置,其特征在于,所述确定模块包括:The apparatus of claim 7, wherein the determining module comprises:
    第一确定单元,用于根据所述电网电压信号波的频率确定所述信号波的周期;a first determining unit, configured to determine a period of the signal wave according to a frequency of the grid voltage signal wave;
    第二确定单元,用于根据所述信号波的周期确定所述信号波的四分之一周期所占的时长;a second determining unit, configured to determine, according to a period of the signal wave, a duration of a quarter period of the signal wave;
    第三确定单元,用于根据所述采样频率确定所述采样周期;a third determining unit, configured to determine the sampling period according to the sampling frequency;
    第四确定单元,用于根据所述信号波的四分之一周期所占的时长以及所述采样周期确定所述信号波的四分之一周期内的采样点数,即所述长度L的值。 a fourth determining unit, configured to determine, according to a duration occupied by a quarter period of the signal wave and the sampling period, a number of sampling points in a quarter period of the signal wave, that is, a value of the length L .
  9. 如权利要求6所述的装置,其特征在于,所述生成模块包括:The apparatus of claim 6, wherein the generating module comprises:
    第一缓存单元,用于使所述第一变量S1在所述信号波的四分之一周期内循环采样,并缓存所述第一变量S1采样的元素信息;a first buffer unit, configured to: cyclically sample the first variable S1 in a quarter cycle of the signal wave, and buffer element information sampled by the first variable S1;
    第二缓存单元,用于根据所述第一变量S1的循环采样,缓存所述第二变量S2采样的元素信息;a second buffer unit, configured to buffer element information sampled by the second variable S2 according to the cyclic sampling of the first variable S1;
    生成单元,用于根据所述第一变量S1采样的元素信息生成第一信号波Ua,并根据所述第二变量S2采样的元素信息生成第二信号波Ub。And a generating unit, configured to generate a first signal wave Ua according to the element information sampled by the first variable S1, and generate a second signal wave Ub according to the element information sampled by the second variable S2.
  10. 如权利要求9所述的装置,其特征在于,所述元素信息至少包括角度信息和电压值信息。The apparatus according to claim 9, wherein said element information includes at least angle information and voltage value information.
  11. 一种锁相设备,其特征在于,包括:A phase locking device, comprising:
    存储器,用于存储锁相程序指令;a memory for storing a phase lock program instruction;
    处理器,用于调用所述锁相程序指令,并执行如权利要求1-5任一项所述的锁相方法。 And a processor, configured to invoke the phase locked program instruction, and perform the phase locking method according to any one of claims 1-5.
PCT/CN2017/112562 2017-11-23 2017-11-23 Phase locking method, apparatus and device WO2019100284A1 (en)

Priority Applications (2)

Application Number Priority Date Filing Date Title
PCT/CN2017/112562 WO2019100284A1 (en) 2017-11-23 2017-11-23 Phase locking method, apparatus and device
CN201780020007.1A CN109075796B (en) 2017-11-23 2017-11-23 Phase locking method, device and equipment

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
PCT/CN2017/112562 WO2019100284A1 (en) 2017-11-23 2017-11-23 Phase locking method, apparatus and device

Publications (1)

Publication Number Publication Date
WO2019100284A1 true WO2019100284A1 (en) 2019-05-31

Family

ID=64812358

Family Applications (1)

Application Number Title Priority Date Filing Date
PCT/CN2017/112562 WO2019100284A1 (en) 2017-11-23 2017-11-23 Phase locking method, apparatus and device

Country Status (2)

Country Link
CN (1) CN109075796B (en)
WO (1) WO2019100284A1 (en)

Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100850496B1 (en) * 2007-02-28 2008-08-05 주식회사 실리콘웍스 High speed serial interface
CN101673952A (en) * 2009-08-14 2010-03-17 燕山大学 Precise phase locking method based on cross decoupling self-adaptive complex filter
CN103078633A (en) * 2013-01-15 2013-05-01 南京南瑞继保电气有限公司 Single-phase phase-locked loop
CN103558436A (en) * 2013-10-31 2014-02-05 哈尔滨工业大学 Method for network voltage amplitude, frequency and phase angle detection based on one-phase phase-locked loop algorithm

Family Cites Families (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
US7227395B1 (en) * 2005-02-09 2007-06-05 Altera Corporation High-performance memory interface circuit architecture
US8823416B2 (en) * 2010-07-14 2014-09-02 Virginia Tech Intellectual Properties, Inc. Use of PLL stability for islanding detection
CN102983858B (en) * 2012-11-29 2013-11-27 深圳市晶福源电子技术有限公司 Phase-locked loop and phase-locking method thereof
CN103267897B (en) * 2013-05-15 2015-04-08 电子科技大学 Three-phase-locked loop based on reversed Park conversion
CN103472302B (en) * 2013-09-16 2016-06-15 宁夏隆基宁光仪表有限公司 The method detecting electric network voltage phase with single-phase photovoltaic grid-connected inverter
CN104267258B (en) * 2014-10-28 2016-09-14 湖南工业大学 A kind of harmonic wave instantaneous power computational methods utilizing incomplete S-transformation
CN104330622B (en) * 2014-10-29 2017-06-09 广东电网有限责任公司电力科学研究院 The frequency measurement method and system of sine wave signal in power system
CN105429634B (en) * 2015-09-16 2018-02-23 北京京东方能源科技有限公司 Single-phase lock phase control method and device
CN107294527B (en) * 2016-04-13 2023-01-10 中兴通讯股份有限公司 Synchronous rotating coordinate system phase-locked loop and testing method and device thereof

Patent Citations (4)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
KR100850496B1 (en) * 2007-02-28 2008-08-05 주식회사 실리콘웍스 High speed serial interface
CN101673952A (en) * 2009-08-14 2010-03-17 燕山大学 Precise phase locking method based on cross decoupling self-adaptive complex filter
CN103078633A (en) * 2013-01-15 2013-05-01 南京南瑞继保电气有限公司 Single-phase phase-locked loop
CN103558436A (en) * 2013-10-31 2014-02-05 哈尔滨工业大学 Method for network voltage amplitude, frequency and phase angle detection based on one-phase phase-locked loop algorithm

Also Published As

Publication number Publication date
CN109075796B (en) 2022-07-05
CN109075796A (en) 2018-12-21

Similar Documents

Publication Publication Date Title
CN113341226B (en) Harmonic detection method, device, frequency converter and storage medium
CN115575707A (en) Harmonic detection device and method based on combination of improved FFT algorithm and wavelet transform
CN106154034B (en) A kind of harmonic measuring device and method of power module
CN109406854B (en) Harmonic instruction current obtaining method, device and equipment of single-phase active filter
CN109659983B (en) Software phase-locked loop implementation method and device based on IDFT
WO2019100284A1 (en) Phase locking method, apparatus and device
CN103149436A (en) Inter-harmonic detection system of three-phase active power distribution network
CN116795168A (en) Virtual flux linkage-based frequency converter aging power factor control method
CN106324342A (en) Harmonic wave detecting method based on table look-up
Vujičić et al. Concept of stochastic measurements in the Fourier domain
CN114527326A (en) Method and device for measuring power grid impedance, related equipment and storage medium
Chen et al. Application of adaptive model-based scheme for harmonic diagnosis and compensation of grid-connected converters
CN114397496A (en) Phase measurement method, system and medium applied to voltage and current of standard meter
CN111082691B (en) Method and system for generating SPWM wave by utilizing FPGA
KR101125111B1 (en) Method for acquiring fundamental frequency component of phase-locked loop and phase-locked loop controller using the method
Yonghui et al. Power harmonic analysis based on all-phase FFT
Liu et al. Design and implementation of DSP based high-frequency SPWM generator
CN110879311A (en) Method for calculating power of power grid
Zhang et al. Study of harmonic analysis based on improved discrete Fourier transform
CN117169590B (en) Power harmonic analysis method and device based on software variable sampling rate
CN109254203B (en) Phase locking method and system for three-phase power system
Chen et al. An optimized reference current detection method for active power filter
Lu et al. A novel synchronization method designed for single-phase distorted grid
CN109917170B (en) Method for detecting dq current of single-phase pulse rectifier without phase-locked loop
Han et al. Dynamic Optimization for Shunt Active Power Filter to Selectively Extract Harmonics with Vector Discrete Fourier Transform

Legal Events

Date Code Title Description
121 Ep: the epo has been informed by wipo that ep was designated in this application

Ref document number: 17932870

Country of ref document: EP

Kind code of ref document: A1

NENP Non-entry into the national phase

Ref country code: DE

122 Ep: pct application non-entry in european phase

Ref document number: 17932870

Country of ref document: EP

Kind code of ref document: A1