High-speed synchronous acquisition and calculation method and device for electrical load data

文档序号:133646 发布日期:2021-10-22 浏览:31次 中文

阅读说明:本技术 一种用电负荷数据高速同步采集计算方法和装置 (High-speed synchronous acquisition and calculation method and device for electrical load data ) 是由 黄奇峰 黄艺璇 左强 杨世海 陈铭明 方凯杰 刘恬畅 程含渺 曹晓冬 陆婋泉 于 2021-07-13 设计创作,主要内容包括:本申请公开了一种用电负荷数据高速同步采集计算方法和装置,所述方法包括:步骤1:设置过采样率Mc,以过采样率Mc获取采样数据,对采样数据进行低通滤波,抽取过采样率Mc对应的采样数据;步骤2:对步骤1的采样数据进行移相处理;步骤3:利用准同步算法对步骤2移相后的采样数据进行迭代处理,计算采样数据各次谐波的幅值、频率和相角。本发明解决了信号频率混叠及噪声抑制问题;解决了由于前端抗混叠滤波器的参数不一致,造成不同的相移,以及由于不同ADC触发信号的上升沿不一致,引起触发时刻存在差异的问题;解决了现有技术中电信号参数计算准确度较低的问题。(The application discloses a method and a device for high-speed synchronous acquisition and calculation of electric load data, wherein the method comprises the following steps: step 1: setting an oversampling rate Mc, acquiring sampling data by the oversampling rate Mc, performing low-pass filtering on the sampling data, and extracting the sampling data corresponding to the oversampling rate Mc; step 2: performing phase shift processing on the sampling data in the step 1; and step 3: and (3) carrying out iterative processing on the sampled data subjected to phase shifting in the step (2) by using a quasi-synchronous algorithm, and calculating the amplitude, the frequency and the phase angle of each subharmonic of the sampled data. The invention solves the problems of signal frequency aliasing and noise suppression; the problems that different phase shifts are caused by different parameters of a front-end anti-aliasing filter, and the triggering time is different due to different rising edges of different ADC triggering signals are solved; the problem of lower electric signal parameter computational accuracy among the prior art is solved.)

1. A high-speed synchronous acquisition and calculation method for electric load data is characterized by comprising the following steps:

the method comprises the following steps:

step 1: setting an oversampling rate Mc, acquiring sampling data by the oversampling rate Mc, performing low-pass filtering on the sampling data, and extracting the sampling data corresponding to the oversampling rate Mc;

step 2: performing phase shift processing on the sampling data in the step 1;

and step 3: and (3) carrying out iterative processing on the sampled data subjected to phase shifting in the step (2) by using a quasi-synchronous algorithm, and calculating the amplitude, the frequency and the phase angle of each subharmonic of the sampled data.

2. The method for high-speed synchronous acquisition and calculation of the electrical load data according to claim 1, characterized in that:

in step 1, the set oversampling rate Mc is higher than twice the signal bandwidth of the power load data, that is, the sampled data is obtained at the oversampling rate Mc higher than twice the signal bandwidth of the power load data.

3. The method for high-speed synchronous acquisition and calculation of the electrical load data according to claim 1, characterized in that:

step 1, performing low-pass filtering on the sampled data, specifically including:

filtering the sampled data, and filtering aliasing frequencies;

performing digital-to-analog conversion on the sampled data at a time interval of 1/Js, wherein Js is oversampling frequency;

and finally, low-pass filtering the sampled data to filter high-frequency components.

4. The method for high-speed synchronous acquisition and calculation of electrical load data according to claim 3, characterized in that:

filtering the sampled data by using an analog anti-aliasing filter to filter aliasing frequencies;

performing digital-to-analog conversion on the sampled data at 1/Js time intervals by using an ADC (analog-to-digital converter);

the sampled data is low-pass filtered using a digital low-pass filter to filter high-frequency components.

5. The method for high-speed synchronous acquisition and calculation of the electrical load data according to claim 1, characterized in that:

in step 2, the sampling data in step 1 is subjected to phase shift processing by using a least square digital phase shift algorithm.

6. The method for high-speed synchronous acquisition and calculation of electrical load data according to claim 5, characterized in that:

in the step 2, the phase shift processing is carried out on the sampling data in the step 1 by using a 3-order 8-point least square digital phase shift algorithm.

7. The method for high-speed synchronous acquisition and calculation of electrical load data according to claim 5, characterized in that:

the recursion of the least square digital phase-shifting algorithm is as follows:

eout(n)=β1e(n)+β2e(n-1)+…+βme(n-m);

wherein n is the number of the current sampling point, m is the number of the recursion sampling point, and k is the polynomial order;

eout(n) is a sampling value after phase shift delta t calculated according to the currently received m-point sampling value data;

β1,β2,…,βmis a normalized coefficient;

Tsis the sampling rate of the data acquisition;

the matrix H is a constant matrix;

Gkis the gain.

8. The method for high-speed synchronous acquisition and calculation of the electrical load data according to claim 1, characterized in that:

and 3, performing iterative processing on the sampled data subjected to phase shifting in the step 2 by using a quasi-synchronous algorithm based on a complex trapezoid.

9. The method for high-speed synchronous acquisition and calculation of electrical load data according to claim 8, characterized in that:

performing iterative processing on the sampled data subjected to phase shifting in the step 2 by using a quasi-synchronous algorithm based on a complex trapezoid, which specifically comprises the following steps:

setting a sampling rate fs, the number SN +1 of sampling points in each period, the maximum harmonic frequency M, the initial time t1 and t2 of sampling data extraction, and a weight coefficient rhok

Sampling data begins to take values at initial moments t1 and t2 respectively, and the sequences after extraction are x respectivelyt1(i1) And xt2(i2),

X is to bet1(i1) And xt2(i2) Respectively using formulasCarrying out 1 st iteration operation;

wherein the content of the first and second substances,

subscript i represents the serial number of each subinterval, i is 1,2,3., (S-1) N +1, S is the number of subintervals into which the value interval is divided, i.e. the number of iterations, and the number of sampling points of each subinterval is N;

the ith subinterval of length N is:

[t0+(i-1)fs,t0+(i-1+N)fs]x (i), x (i + 1).. x (i + N) is a sampling point in the ith subinterval;

substituting the result of the 1 st iteration operation into a formulaPerforming the iteration for the s time until the iteration operation is completed to obtainAnd

wherein the content of the first and second substances,

10. the method for high-speed synchronous acquisition and calculation of electrical load data according to claim 9, characterized in that:

in step 3, the calculation formula of the amplitude, the frequency and the phase angle of each harmonic of the sampled data is as follows:

at time t1, the harmonics are:

at time t2, the harmonics are:

the harmonic amplitudes are:

γmmis an attenuation factor, s is the number of iterations;

the frequency of the mth harmonic is:

the harmonic phase angle is:

R|t0,I|t0the real part and the imaginary part after s iterations are carried out for a series of sampling points with t0 as the starting time, m is the mth harmonic, omegaΔThe angular frequency variation value is shown, and fs is the sampling rate; cs ═ i0/N+S/2,i0=1,2,…,N+1。

11. The utility model provides a high-speed synchronous acquisition computing device of electrical load data, includes oversampling module, moves module and quasi-synchronization module, its characterized in that:

the oversampling module is used for setting an oversampling rate Mc, acquiring sampling data by the oversampling rate Mc, performing low-pass filtering on the sampling data, and extracting the sampling data corresponding to the oversampling rate Mc;

the phase shifting module is used for performing phase shifting processing on the sampling data of the oversampling module;

and the quasi-synchronization module is used for performing iterative processing on the sampling data subjected to phase shifting by the phase shifting module by using a quasi-synchronization algorithm and calculating the amplitude, the frequency and the phase angle of each subharmonic of the sampling data.

Technical Field

The invention belongs to the technical field of power measurement, and relates to a high-speed synchronous acquisition and calculation method and device for power load data.

Background

The purpose of signal sampling is to compute the parametric characteristics of the signal, such as amplitude, phase, frequency, power, electrical quantity, etc. When the frequency of the power grid fluctuates, a non-positive period sampling phenomenon occurs, and the measurement of the parameters of the electric signals is influenced. Therefore, in an application scenario where accurate measurement of electrical parameters is required, a targeted selection of parameter calculation methods is required.

In China, the ideal grid voltage and current frequency is 50Hz, and under the condition of pure fundamental wave (standard 50Hz) or harmonic wave (integral multiple of 50Hz), when the sampling frequency is integral multiple of the signal frequency and is greater than the Nyquist frequency, the ideal measurement precision can be obtained by a time domain analysis method or Fourier transform. However, the frequency of the actual grid signal often fluctuates, so that the time domain analysis introduces asynchronous errors. The "power supply operation rules" stipulate that, in a normal condition of the power system, the allowable deviation of the power supply frequency is as follows: the frequency deviation of the installed capacity of the power grid at 300 ten thousand kilowatts and above is +/-0.2 Hz; the frequency deviation of the installed capacity of the power grid below 300 ten thousand kilowatts is +/-0.5 Hz; under abnormal conditions of the power system, the allowable deviation of the power supply frequency should not exceed +/-1.0 Hz.

At present, the asynchronous sampling error can be reduced by increasing the number N of sampling points, but the sampling rate of a metering chip used by domestic mainstream electric meter manufacturers is limited, so that the sampling rate cannot be increased infinitely. For example, the sampling rate of a metering chip of a tin-free constant-flux single-phase electric energy meter is 800Hz, and the sampling rate of a metering chip of a single-phase electric energy meter in a forest is 1600Hz, so that a non-whole period sampling error always exists along with frequency fluctuation, and the measurement error of an electric signal parameter is large.

Disclosure of Invention

In order to solve the defects in the prior art, the application provides a method and a device for high-speed synchronous acquisition and calculation of electric load data, wherein oversampling, a least square digital phase-shifting algorithm and a quasi-synchronous algorithm are comprehensively adopted, so that the signal resolution is improved, and the problems of signal frequency aliasing and noise suppression, different phase shifts and different triggering moments are solved; the problem of low calculation accuracy of the electrical signal parameters is solved, and the calculation accuracy of the electrical parameters is improved.

In order to achieve the above purpose, the invention adopts the following technical scheme:

a high-speed synchronous acquisition and calculation method for electric load data comprises the following steps:

step 1: setting an oversampling rate Mc, acquiring sampling data by the oversampling rate Mc, performing low-pass filtering on the sampling data, and extracting the sampling data corresponding to the oversampling rate Mc;

step 2: performing phase shift processing on the sampling data in the step 1;

and step 3: and (3) carrying out iterative processing on the sampled data subjected to phase shifting in the step (2) by using a quasi-synchronous algorithm, and calculating the amplitude, the frequency and the phase angle of each subharmonic of the sampled data.

The invention further comprises the following preferred embodiments:

preferably, in step 1, the oversampling rate Mc is set to be higher than twice the signal bandwidth of the electrical load data, i.e. the sampled data is acquired at the oversampling rate Mc higher than twice the signal bandwidth of the electrical load data.

Preferably, the low-pass filtering the sample data in step 1 specifically includes:

filtering the sampled data, and filtering aliasing frequencies;

performing digital-to-analog conversion on the sampled data at a time interval of 1/Js, wherein Js is oversampling frequency;

and finally, low-pass filtering the sampled data to filter high-frequency components.

Preferably, the sampled data is filtered using an analog anti-aliasing filter to filter aliasing frequencies;

performing digital-to-analog conversion on the sampled data at 1/Js time intervals by using an ADC (analog-to-digital converter);

the sampled data is low-pass filtered using a digital low-pass filter to filter high-frequency components.

Preferably, in step 2, the sampling data of step 1 is phase-shifted by using a least square digital phase-shifting algorithm.

Preferably, in step 2, a 3-order 8-point least square digital phase shift algorithm is used to perform phase shift processing on the sampled data in step 1.

Preferably, the recursion of the least squares digital phase shift algorithm is:

eout(n)=β1e(n)+β2e(n-1)+…+βme(n-m);

wherein n is the number of the current sampling point, m is the number of the recursion sampling point, and k is the polynomial order;

eout(n) is a sampling value after phase shift delta t calculated according to the currently received m-point sampling value data;

β1,β2,…,βmis a normalized coefficient;

Tsis the sampling rate of the data acquisition;

the matrix H is a constant matrix;

Gkis the gain.

Preferably, in step 3, the sampled data phase-shifted in step 2 is subjected to iterative processing by using a quasi-synchronous algorithm based on a complex trapezoid.

Preferably, the iterative processing is performed on the sampled data after the phase shifting in step 2 by using a quasi-synchronous algorithm based on a complex trapezoid, which specifically includes:

setting a sampling rate fs, the number SN +1 of sampling points in each period, the maximum harmonic frequency M, the initial time t1 and t2 of sampling data extraction, and a weight coefficient rhok

Sampling data begins to take values at initial moments t1 and t2 respectively, and the sequences after extraction are x respectivelyt1(i1) And xt2(i2),

X is to bet1(i1) And xt2(i2) Respectively using formulasCarrying out 1 st iteration operation;

wherein the content of the first and second substances,

subscript i represents the serial number of each subinterval, i is 1,2,3., (S-1) N +1, S is the number of subintervals into which the value interval is divided, i.e. the number of iterations, and the number of sampling points of each subinterval is N;

the ith subinterval of length N is:

[t0+(i-1)fs,t0+(i-1+N)fs]x (i), x (i + 1).. x (i + N) is a sampling point in the ith subinterval;

substituting the result of the 1 st iteration operation into a formulaPerforming the iteration for the s time until the iteration operation is completed to obtainAnd

wherein the content of the first and second substances,

preferably, in step 3, the calculation formula of the amplitude, frequency and phase angle of each harmonic of the sampled data is:

at time t1, the harmonics are:

at time t2, the harmonics are:

the harmonic amplitudes are:

γmmis an attenuation factor, s is the number of iterations;

the frequency of the mth harmonic is:

the harmonic phase angle is:

R|t0,I|t0the real and imaginary parts after s iterations for a series of sample points starting at t0, m is the mth harmonic,ωΔthe angular frequency variation value is shown, and fs is the sampling rate; cs ═ i0/N+S/2,i0=1,2,…,N+1。

The invention also discloses a high-speed synchronous acquisition and calculation device for the electrical load data, which comprises an oversampling module, a phase-shifting module and a quasi-synchronous module;

the oversampling module is used for setting an oversampling rate Mc, acquiring sampling data by the oversampling rate Mc, performing low-pass filtering on the sampling data, and extracting the sampling data corresponding to the oversampling rate Mc;

the phase shifting module is used for performing phase shifting processing on the sampling data of the oversampling module;

and the quasi-synchronization module is used for performing iterative processing on the sampling data subjected to phase shifting by the phase shifting module by using a quasi-synchronization algorithm and calculating the amplitude, the frequency and the phase angle of each subharmonic of the sampling data.

The beneficial effect that this application reached:

the invention adopts the oversampling technology to improve the signal resolution, and solves the problems of signal frequency aliasing and noise suppression; by adopting a least square digital phase shift algorithm, the problems that different phase shifts are caused due to different parameters of a front-end anti-aliasing filter, and the triggering moments are different due to different rising edges of different ADC triggering signals are solved; the problem of low calculation accuracy of electrical signal parameters in the prior art is solved by adopting a quasi-synchronization algorithm based on a complex trapezoid.

Drawings

FIG. 1 is a schematic flow chart of a high-speed synchronous acquisition and calculation method for electrical load data according to the present invention;

FIG. 2 is a schematic diagram of low pass filtering of sampled data according to an embodiment of the present invention;

FIG. 3 is a diagram of a digital phase-shifting simulation waveform according to an embodiment of the present invention;

fig. 4 is a schematic structural diagram of a high-speed synchronous acquisition and calculation device for electrical load data according to the present invention.

Detailed Description

The present application is further described below with reference to the accompanying drawings. The following examples are only for illustrating the technical solutions of the present invention more clearly, and the protection scope of the present application is not limited thereby.

As shown in fig. 1, the method for synchronously acquiring and calculating the electrical load data at a high speed of the present invention comprises the following steps:

step 1: setting an oversampling rate Mc, acquiring sampling data by the oversampling rate Mc, performing low-pass filtering on the sampling data, and extracting the sampling data corresponding to the oversampling rate Mc;

in particular, an important noise source for the sampling process is the ADC quantization noise, typically 1/2LSB, which is the resolution of the sampling system. The quantization step of the ADC is generally uniform, the input sample value is discarded to the closest quantization level, the higher the ADC bit number, the more the quantization order, and the relationship between the quantization order and the ADC bit number is:

C=2n

wherein C is the quantization order, and n is the number of bits of the ADC. The larger n, the higher the resolution, i.e., the smaller and more subtle signal differences can be resolved.

Let 1/2LSB be e, the quantization error of ADC is randomly and uniformly distributed in [ -e, + e ] by the error, the variance of quantization noise is:

for a signal of amplitude a, the noise power sampled using an N-bit ADC is:

the Signal-to-Noise Ratio (SNR) of the ADC is:

in the formula (I), the compound is shown in the specification,is a signal functionAnd (4) rate. As can be seen from the above formula, increasing the number of bits of the ADC can effectively increase the signal-to-noise ratio.

For a fixed bit number ADC, after passing through a low pass filter, the noise power is:

in the formula, σlp 2For the low-pass filtered noise power, M is the oversampling multiple, i.e., the oversampling rate. At this time, the signal-to-noise ratio after sampling is:

as can be seen from the above formula, after the oversampling is carried out by M times, the signal-to-noise ratio is improved by 10 logs10M, which is equivalent to increasing the number of bits N of the ADC.

If the oversampling ratio Mc is increased by 4 times, it is equivalent to increasing the ADC bit number by 1 bit, i.e. it is equivalent to increasing the resolution of the ADC.

The oversampling rate Mc is set to be higher than twice the signal bandwidth of the electrical load data, i.e., the sampled data is acquired at the oversampling rate Mc higher than twice the signal bandwidth of the electrical load data.

As shown in fig. 2, the low-pass filtering the sample data specifically includes:

filtering the sampled data by using an analog anti-aliasing filter to filter aliasing frequency;

then, performing digital-to-analog conversion on the sampled data at 1/Js time intervals by using an ADC (analog-to-digital converter), wherein Js is oversampling frequency;

and finally, carrying out low-pass filtering processing on the sampled data by using a digital low-pass filter, and filtering high-frequency components.

Step 2: performing phase shift processing on the sampling data in the step 1;

in specific implementation, the sampling data in the step 1 is subjected to phase shift processing by using a least square digital phase shift algorithm, so that different phase shifts caused by inconsistent parameters of a front-end anti-aliasing filter are solved.

The recursion of the least square digital phase-shifting algorithm is as follows:

eout(n)=β1e(n)+β2e(n-1)+…+βme(n-m);

wherein n is the number of the current sampling point, m is the number of the recursion sampling point, and k is the polynomial order;

eout(n) is a sampling value after phase shift delta t calculated according to the currently received m-point sampling value data;

β1,β2,…,βmis a normalized coefficient;

Tsis the sampling rate of the data acquisition;

the matrix H is a constant matrix;

Gkis the gain.

The accuracy of the 3-order 8-point least square digital phase-shifting algorithm is simulated as follows, and the gain G is setkSet the sampling rate T as 1sAt 4kHz, and a signal frequency of 50 Hz. A time delay of 1 mus corresponds to a phase deviation of 1.08' at 50 Hz.

Suppose the signal is uiSin (100 tt), the time required for phase shifting is respectively 62.5 μ s forward or 62.5 μ s backward, the number of points to be phase shifted is respectively 0.25 forward or 0.25 backward, and the normalized delay constant coefficients calculated according to the normalization coefficient formula are shown in table 1.

TABLE 1 delay constant coefficient for digital phase shift

According to the above tableCalculated result, substituted into eoutIn (n), the outputs of the forward and backward shifts are calculated, respectively. The simulated waveform is shown in FIG. 3, and the phase error and amplitude error before and after phase shifting are shown in Table 2.

TABLE 2 phase and amplitude errors before and after phase shifting

As can be seen from simulation results, the 3-order 8-point least square digital phase-shifting algorithm has high phase-shifting accuracy. Further analyzing the characteristics of the algorithm in the frequency domain, the phase shifting method is within about 40 harmonics, the gain of the amplitude-frequency characteristic is about 1, and the phase shifting method has a linear phase characteristic, namely the amplitude of the algorithm is not changed, and the group delay time is constant.

And step 3: and (3) carrying out iterative processing on the sampled data subjected to phase shifting in the step (2) by using a quasi-synchronous algorithm, and calculating the amplitude, the frequency and the phase angle of each subharmonic of the sampled data.

In specific implementation, the iterative processing is performed on the sampled data subjected to phase shifting in step 2 by using a quasi-synchronous algorithm based on a complex trapezoid, and the method specifically comprises the following steps:

setting a sampling rate fs, the number SN +1 of sampling points in each period, the maximum harmonic frequency M, the initial time t1 and t2 of sampling data extraction, and a weight coefficient rhok

Sampling data begins to take values at initial moments t1 and t2 respectively, and the sequences after extraction are x respectivelyt1(i1) And xt2(i2),

X is to bet1(i1) And xt2(i2) Respectively using formulasCarrying out 1 st iteration operation;

wherein the content of the first and second substances,

the weight of each weight coefficient is shown in Table 3.

TABLE 3 weight of each weight coefficient

Weight coefficient ρ1 ρ2 ρ3 ... ρN-1 ρN ρN+1
Weight value 1 2 2 ... 2 2 1

The subscript i indicates the number of each subinterval, i is 1,2,3., (S-1) N +1, S is the number of subintervals into which the value interval is divided, i.e., the number of iterations, and N sampling points are provided for each subinterval.

The ith subinterval of length N is [ t ]0+(i-1)fs,t0+(i-1+N)fs]X (i), x (i + 1).. x (i + N) is a sampling point in the ith subinterval.

Substituting the result of the 1 st iteration operation into a formulaPerforming the iteration for the s time until the iteration operation is completed to obtainAnd

wherein the content of the first and second substances,

the calculation formula of the amplitude, the frequency and the phase angle of each harmonic of the sampled data is as follows:

at time t1, the harmonics are:

at time t2, the harmonics are:

the harmonic amplitudes are:γmmfor attenuation factor, s is the number of iterations

The frequency of the mth harmonic is:

the harmonic phase angle is:R|t0,I|t0the real part and the imaginary part after s iterations are carried out for a series of sampling points with t0 as the starting time, m is the mth harmonic, omegaΔThe angular frequency variation value is fs, and the sampling rate is fs.

Let Cs be i0/N+S/2,i0=1,2,...,N+1,fNS=Nfs。

As shown in fig. 4, the high-speed synchronous acquisition and calculation device for electrical load data of the present invention includes an oversampling module, a phase shift module and a quasi-synchronization module;

the oversampling module is used for setting an oversampling rate Mc, acquiring sampling data by the oversampling rate Mc, performing low-pass filtering on the sampling data, and extracting the sampling data corresponding to the oversampling rate Mc;

the phase shifting module is used for performing phase shifting processing on the sampling data of the oversampling module;

and the quasi-synchronization module is used for performing iterative processing on the sampling data subjected to phase shifting by the phase shifting module by using a quasi-synchronization algorithm and calculating the amplitude, the frequency and the phase angle of each subharmonic of the sampling data.

In conclusion, the invention adopts the oversampling technology to improve the signal resolution, and solves the problems of signal frequency aliasing and noise suppression; by adopting a least square digital phase shift algorithm, the problems that different phase shifts are caused due to different parameters of a front-end anti-aliasing filter, and the triggering moments are different due to different rising edges of different ADC triggering signals are solved; the problem of low calculation accuracy of electrical signal parameters in the prior art is solved by adopting a quasi-synchronization algorithm based on a complex trapezoid.

The present applicant has described and illustrated embodiments of the present invention in detail with reference to the accompanying drawings, but it should be understood by those skilled in the art that the above embodiments are merely preferred embodiments of the present invention, and the detailed description is only for the purpose of helping the reader to better understand the spirit of the present invention, and not for limiting the scope of the present invention, and on the contrary, any improvement or modification made based on the spirit of the present invention should fall within the scope of the present invention.

13页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:轨道交通再生制动能量计量方法及计量设备

网友询问留言

已有0条留言

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

精彩留言,会给你点赞!