Frequency tracking method under constant-interval sampling

文档序号:66557 发布日期:2021-10-01 浏览:18次 中文

阅读说明:本技术 一种定间隔采样下频率跟踪方法 (Frequency tracking method under constant-interval sampling ) 是由 郝立鹏 李小青 曹祥祥 韩超 赵国平 于 2021-07-14 设计创作,主要内容包括:本发明公开了一种定间隔采样下频率跟踪方法,包括如下步骤:(1)装置AD过采样;(2)根据装置AD采样频率、电网实时频率计算调整系数;(3)提取最新两周波数据,并将提取数据前后对倒;(4)将步骤(3)中的数据,基于拉格朗日插值函数推导FFT计算数据,推导数据用T表示;(5)将步骤(4)中推导出的数据对倒;(6)将步骤(5)中提取的数据进行傅里叶FFT处理即可得到系统的测量量。本发明基于拉格朗日插值算法的采样值调整方法,根据系统频率将采样到的数据通过拉格朗日插值算法调整到整周期,解决系统频率偏差时傅里叶计算准确性问题,对于多设备采样同步或者无法进行硬件频率跟踪的场景,具有良好的表现。(The invention discloses a frequency tracking method under constant-interval sampling, which comprises the following steps: (1) device AD oversampling; (2) calculating an adjustment coefficient according to the AD sampling frequency of the device and the real-time frequency of the power grid; (3) extracting the latest two-cycle data, and inverting the extracted data front and back; (4) deducing FFT calculation data from the data in the step (3) based on a Lagrange interpolation function, wherein the deduced data is represented by T; (5) inverting the data deduced in the step (4); (6) and (5) carrying out Fourier FFT processing on the data extracted in the step (5) to obtain the measurement quantity of the system. According to the sampling value adjusting method based on the Lagrange interpolation algorithm, the sampled data are adjusted to the whole period through the Lagrange interpolation algorithm according to the system frequency, the problem of Fourier calculation accuracy in system frequency deviation is solved, and the method has good performance for scenes in which multiple devices are synchronously sampled or hardware frequency tracking cannot be carried out.)

1. A frequency tracking method under fixed-interval sampling is characterized by comprising the following steps:

(1) device AD oversampling;

(2) calculating an adjustment coefficient according to the AD sampling frequency of the device and the real-time frequency of the power grid;

(3) extracting the latest two-cycle data, and inverting the extracted data front and back;

(4) deducing FFT calculation data from the data in the step (3) based on a Lagrange interpolation function, wherein the deduced data is represented by T;

(5) inverting the data deduced in the step (4);

(6) and (5) carrying out Fourier FFT processing on the data extracted in the step (5) to obtain the measurement quantity of the fundamental amplitude, the phase and the harmonic content of the system voltage and current.

2. The frequency tracking method under constant-interval sampling according to claim 1, wherein in step (1), the device AD oversampling is specifically: when the FFT adopts 32-point calculation, the AD sampling rate adopts integral multiple, the multiple is expressed by M, and 32, 64, 96 and 128-point sampling rates are selected.

3. The frequency tracking method under constant-interval sampling according to claim 1, wherein in the step (2), the calculating of the adjustment coefficient K according to the device sampling frequency and the grid real-time frequency specifically comprises:

FCaiYangfor device AD sampling frequency, FXiTongFor electric network real-timeAnd the frequency is obtained by calculating a frequency acquisition loop of the device.

4. The frequency tracking method under constant-interval sampling according to claim 1, wherein in the step (3), the latest 2-cycle data is extracted, and the front and back of the extracted data are inverted specifically as follows: sampling is carried out on 128 points at a fixed sampling frequency of 50HZ, sampling interval time tau is counted, 256 points of data are extracted, the data are counted as x1, x2 and x3., x256, namely (0, x1) (tau, x2) (2 tau, x 3.) (255 tau, x256), and 256 tau is equal to 1/FCaiYang

The total number of the parts is counted as (0, x256) (tau, x255) (2 tau, x254). (255 tau, x1) by inverting front and back, namely x1, x256, x2, x255 and the like.

5. The frequency tracking method under fixed-interval sampling according to claim 1, wherein in the step (4), the data in the step (3) is subjected to FFT calculation data derivation based on Lagrangian interpolation function, and the derivation data is expressed by T: a 32-point fourier calculation, i.e. the calculation deduces T1, T2, T3.. T32; the derivation points were, in order, (0, T1) (M τ, T2) (2M τ, T3) (3M τ, T4.). (31M τ, T32), 31M τ being equal to 256 τ;

deriving the first point of the data as the first point T1 of the extracted data being x1, i.e., (0, T1) being (0, x 1);

the data for points 2 to 32 is derived by the following formula, n is the corresponding point number 2 to 32:

index _ f is K n M, where K is the adjustment coefficient calculated in step (2), M is the multiple in step (1), and if M is 4;

index _ n is [ index _ f ], and the index _ f is rounded;

(index _ n-1, x [ index _ n ]), (index _ n, x [ index _ n +1]) are set,

And (index _ n +1, x [ index _ n +2]) establishing a Lagrange interpolation function, and calculating Tn:

Tn=x[index_n]*(index_n+1-index_f)*(index_n+2-index_f)/2+x[index_n+1]*(index_n-index_f)*(index_n+2-index_f)-x[index_n+2]*(index_n-index_f)*(index_n+1-index_f)/2。

6. the frequency tracking method under constant-interval sampling according to claim 1, wherein in the step (5), the data pair derived in the step (4) is inversely specified as: t1 is inverted with respect to T32, T2 is inverted with respect to T31, and so on, the whole data window data acquisition, i.e., frequency tracking processing, i.e., (0, T32) (M τ, T31) (2M τ, T30.) (31M τ, T1) is completed.

Technical Field

The invention relates to the technical field of digital signal processing, in particular to a frequency tracking method under constant-interval sampling.

Background

In the power system, a relay protection device converts the voltage and current amount in the system into discrete digital signals through an AD chip and collects the discrete digital signals into a CPU, the digital signals are processed through Fast Fourier Transform (FFT) to obtain measurement quantities such as fundamental wave amplitude, phase, harmonic content and the like of the voltage and current of the system, and the measurement precision of the measurement quantities is an important index for measuring the performance of the relay protection device. When the frequency of the power system deviates from 50Hz, the sampling quantity of the measured signal is difficult to be cut off in the whole period under the condition of a fixed sampling interval, and the leakage phenomenon and the barrier effect of the FFT algorithm can cause a large measurement error of the measurement quantity. For example, 32-point sampling is fixed, and due to system frequency deviation, the sampled 32-point data is more or less than one cycle, so that a large error occurs in the fourier calculation. In order to solve the problem, a frequency tracking technology is usually applied in the existing equipment, the AD sampling interval is adjusted in real time according to the detected power grid frequency, the number of AD sampling points of each cycle is ensured to be the same, and the problem of accuracy of Fourier calculation when the system frequency fluctuates is solved. However, for a scene of multi-device (device greater than or equal to 2) sampling synchronization, adjusting the AD sampling interval in real time will reduce the synchronization accuracy between devices or improve the synchronization performance requirement of the devices, and some devices cannot adjust the AD sampling interval in real time, for example, when multiple-interval DTUs and different-interval signals are acquired by the same AD chip.

Disclosure of Invention

The invention aims to solve the technical problem of providing a frequency tracking method under fixed-interval sampling, and provides a sampling value adjusting method based on a Lagrange interpolation algorithm.

In order to solve the above technical problem, the present invention provides a method, comprising the following steps:

(1) device AD oversampling;

(2) calculating an adjustment coefficient according to the AD sampling frequency of the device and the real-time frequency of the power grid;

(3) extracting the latest two-cycle data, and inverting the extracted data front and back;

(4) deducing and deducing FFT calculation data based on a Lagrange interpolation function from the data in the step (3), wherein the deduced data is represented by T;

(5) inverting the data deduced in the step (4);

(6) and (5) carrying out Fourier FFT processing on the data extracted in the step (5) to obtain the measurement quantity of the fundamental amplitude, the phase and the harmonic content of the system voltage and current.

Preferably, in step (1), the device AD oversampling specifically includes: when the FFT adopts 32-point calculation, the AD sampling rate adopts integral multiple, the multiple is expressed by M, and sampling rates of 32, 64, 96, 128 points and the like are selected. Theoretically, the higher the multiple of the AD sampling rate, the higher the accuracy.

Preferably, in the step (2), calculating the adjustment coefficient K according to the sampling frequency of the device and the real-time frequency of the power grid specifically includes:

FCaiYangfor the sampling frequency of the device, FXiTongThe frequency is calculated by a device frequency acquisition loop and is the real-time frequency of the power grid.

Preferably, in the step (3), the latest 2-cycle data is extracted, and the front and back of the extracted data are inversely detailed as follows: sampling is carried out on 128 points at a fixed sampling frequency of 50HZ, sampling interval time tau is counted, 256 points of data are extracted, the data are counted as x1, x2 and x3., x256, namely (0, x1) (tau, x2) (2 tau, x 3.) (255 tau, x256), and 256 tau is equal to 1/FCaiYang

The total number of the parts is counted as (0, x256) (tau, x255) (2 tau, x254). (255 tau, x1) by inverting front and back, namely x1, x256, x2, x255 and the like.

Preferably, in step (4), the FFT computation data is derived from the data in step (3) based on the lagrangian interpolation function, and the derived data is represented by T: a 32-point fourier calculation, i.e. the calculation deduces T1, T2, T3.. T32; the derivation points were, in order, (0, T1) (M τ, T2) (2M τ, T3) (3M τ, T4.). (31M τ, T32), 31M τ being equal to 256 τ;

deriving the first point of the data as the first point T1 of the extracted data being x1, i.e., (0, T1) being (0, x 1);

the data for points 2 to 32 is derived by the following formula, n is the corresponding point number 2 to 32:

index _ f is K n M, where K is the adjustment coefficient calculated in step (2), M is the multiple in step (1), and if M is 4;

index _ n is [ index _ f ], and the index _ f is rounded;

(index _ n-1, x [ index _ n ]), (index _ n, x [ index _ n +1]) are set,

And (index _ n +1, x [ index _ n +2]) establishing a Lagrange interpolation function, and calculating Tn:

Tn=x[index_n]*(index_n+1-index_f)*(index_n+2-index_f)/2+x[index_n+1]*(index_n-index_f)*(index_n+2-index_f)-x[index_n+2]*(index_n-index_f)*(index_n+1-index_f)/2。

preferably, in step (5), the data pair derived in step (4) is inversely specified as: t1 is inverted with respect to T32, T2 is inverted with respect to T31, and so on, the whole data window data derivation interception, i.e., frequency tracking, is completed, i.e., (0, T32) (M τ, T31) (2M τ, T30.) (31M τ, T1).

The invention has the beneficial effects that: according to the sampling value adjusting method based on the Lagrange interpolation algorithm, the sampled data are adjusted to the whole period through the Lagrange interpolation algorithm according to the system frequency, the problem of Fourier calculation accuracy in system frequency deviation is solved, and the method has good performance for scenes in which multiple devices are synchronously sampled or hardware frequency tracking cannot be carried out.

Detailed Description

Taking the system frequency of 50Hz, the device is fixed and samples 128 points per period, extracts 32 points of data at intervals of 4 points, and obtains the measurement quantities of fundamental amplitude, phase, harmonic content and the like of the voltage and current of the system through Fast Fourier Transform (FFT) processing, the method is implemented as follows:

step 1: the device performs AD oversampling, namely FFT adopts 32-point calculation, and the AD sampling rate is 4 times of that of 128-point sampling;

step 2: calculating a coefficient K according to the sampling frequency of the device and the real-time frequency of the power grid:

FCaiYangthe device sampling frequency, sampling frequency 50 HZ;

FXiTongthe frequency is calculated by a device frequency acquisition loop and is the real-time frequency of the power grid.

And step 3: and extracting the latest 2-cycle data, and inverting the extracted data front and back. Sampling interval time tau, extracting 256 points of data, wherein the data is counted as x1, x2, x3... x256, namely (0, x1) (tau, x2) (2 tau, x 3.) (255 tau, x256), and 256 tau is equal to 1/50 ms.

The front and back data are inverted, namely x1, x256, x2, x255 and the like, and are counted as (0, x256) (tau, x255) (2 tau, x254). (255 tau, x 1);

and 4, step 4: applying the method in the step 3 to the data in the step to derive FFT calculation data, wherein the derivative data is represented by T, and taking 32-point Fourier calculation as an example, T1, T2 and T3.. T32 are derived through calculation; the derivation points were, in order, (0, T1) (M τ, T2) (2M τ, T3) (3M τ, T4.). (31M τ, T32), 31M τ being equal to 256 τ.

Deriving the first point of the data as the first point T1 of the extracted data being x1, i.e., (0, T1) being (0, x 1);

for the data of the 2 nd to 32 nd points, n is the corresponding data of the 2 nd to 32 th points by the following formula:

index _ f is K n M, K is the coefficient calculated in step 2, M is equal to 4;

index _ n is [ index _ f ], and the index _ f is rounded;

(index _ n-1, x [ index _ n ]), (index _ n, x [ index _ n +1]) are set,

Establishing a Lagrange interpolation function for three points (index _ n +1, x [ index _ n +2]), and solving an interception point Tn:

Tn=x[index_n]*(index_n+1-index_f)*(index_n+2-index_f)/2+x[index_n+1]*(index_n-index_f)*(index_n+2-index_f)-x[index_n+2]*(index_n-index_f)*(index_n+1-index_f)/2;

and 5: inverting the data deduced in the step 4, namely inverting T1 and T32, inverting T2 and T31, and so on, so as to finish the whole data window data deduction, namely frequency tracking processing of the patent of the invention, namely (0, T32) (M tau, T31) (2M tau, T30.) (31M tau, T1);

step 6: and (5) performing Fourier transform (FFT) processing on the data extracted in the step (5) to obtain measurement quantities such as fundamental amplitude, phase and harmonic content of the system voltage and current.

5页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:一种基于智能开关的谐波监测系统

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!