CN112051445A - Sine wave frequency digital detection method and device based on phase estimation - Google Patents

Sine wave frequency digital detection method and device based on phase estimation Download PDF

Info

Publication number
CN112051445A
CN112051445A CN202010800984.7A CN202010800984A CN112051445A CN 112051445 A CN112051445 A CN 112051445A CN 202010800984 A CN202010800984 A CN 202010800984A CN 112051445 A CN112051445 A CN 112051445A
Authority
CN
China
Prior art keywords
sine wave
frequency
sampling
module
points
Prior art date
Legal status (The legal status 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 status listed.)
Pending
Application number
CN202010800984.7A
Other languages
Chinese (zh)
Inventor
张晶
刘雨东
Current Assignee (The listed assignees may be inaccurate. Google has not performed a legal analysis and makes no representation or warranty as to the accuracy of the list.)
Nanjing University of Science and Technology
Original Assignee
Nanjing University of Science and Technology
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 Nanjing University of Science and Technology filed Critical Nanjing University of Science and Technology
Priority to CN202010800984.7A priority Critical patent/CN112051445A/en
Publication of CN112051445A publication Critical patent/CN112051445A/en
Pending legal-status Critical Current

Links

Images

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01RMEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
    • G01R23/00Arrangements for measuring frequencies; Arrangements for analysing frequency spectra
    • G01R23/02Arrangements for measuring frequency, e.g. pulse repetition rate; Arrangements for measuring period of current or voltage
    • G01R23/10Arrangements for measuring frequency, e.g. pulse repetition rate; Arrangements for measuring period of current or voltage by converting frequency into a train of pulses, which are then counted, i.e. converting the signal into a square wave

Landscapes

  • Physics & Mathematics (AREA)
  • General Physics & Mathematics (AREA)
  • Measuring Frequencies, Analyzing Spectra (AREA)

Abstract

The invention belongs to the technical field of frequency measurement circuits, and particularly relates to a sine wave frequency digital detection method and device based on phase estimation. According to the method, four points are continuously sampled on the digital sine wave, the sampling period of the four sampling points is T, and the sine wave frequency is calculated according to the four continuous sampling points. According to the method, the frequency value can be calculated only by continuously sampling a plurality of points on the sine wave period, and a plurality of groups of sampling points can be obtained in one sine wave period so as to calculate a plurality of frequency values, so that the frequency detection real-time performance is high; the sine wave frequency digital detection method based on phase estimation does not need to convert sine waves into square waves for sine wave frequency measurement, and directly samples and measures the frequency of the sine waves, thereby reducing errors in the conversion process and improving the measurement precision.

Description

Sine wave frequency digital detection method and device based on phase estimation
Technical Field
The invention belongs to the technical field of frequency measurement circuits, and particularly relates to a sine wave frequency digital detection method and device based on phase estimation.
Background
The frequency measuring circuit is widely applied to various sensors, actuators, various precision measuring instruments and the like, and has a very wide application range, so that the frequency measuring circuit with high precision and high real-time performance is pursued by researchers.
At present, the mainstream method for measuring the frequency of an analog sine wave is to convert the sine wave into a square wave with the same frequency in a digital circuit, and then to read out the frequency value by adopting a frequency digital converter based on a reset counter. However, the real-time performance of the frequency measurement method is limited, a frequency value can be read only by needing one period of time of a sine wave, the real-time performance of a low frequency domain is very poor, and the frequency measurement precision is influenced by the precision of conversion from the sine wave to a square wave. Therefore, the mainstream frequency measurement method cannot well meet the requirements in the occasions with high real-time performance and frequency accuracy and without high requirement.
Disclosure of Invention
The invention aims to provide a sine wave frequency digital detection method and a sine wave frequency digital detection device based on phase estimation.
The technical solution for realizing the purpose of the invention is as follows: a sine wave frequency digital detection method based on phase estimation is characterized in that four points are continuously sampled on a digital sine wave, the sampling period of four sampling points is T, and the sine wave frequency is calculated according to the four continuous sampling points.
Further, the calculating the sine wave frequency according to the four continuous sampling points specifically includes:
four sampling points sk、sk+1、sk+2、sk+3Respectively as follows:
sk=Asin(2πft+θ) (1)
sk+1=Asin(2πf(t+T)+θ) (2)
sk+2=Asin(2πf(t+2T)+θ) (3)
sk+3=Asin(2πf(t+3T)+θ) (4)
wherein A is the amplitude of the sine wave, f is the frequency of the sine wave signal to be detected, T is the sampling period, and T is the current time;
processing the formula to obtain:
Figure BDA0002627379710000021
the derivation of the equation (5) for the purpose of simplifying and facilitating the implementation on the hardware circuit is carried out, and finally the equation (5) becomes:
Figure BDA0002627379710000022
wherein S03Is s iskAnd sk3Sum of S12Is s isk1And sk2The sum is calculated as a sine wave frequency f by equation (6).
Furthermore, the number of the sampling points is 4n, wherein n is a natural number, and after the sine wave frequency f is calculated by each group of four sampling points, the average value of a plurality of groups is taken to obtain the final sine wave frequency.
The device for carrying out digital detection by using the digital detection method sequentially comprises the following steps:
the analog sine wave signal generation module: generating a sine wave for detection;
an analog-to-digital conversion module: sine wave sampling generated by the analog sine wave signal generation module is changed into discrete digital sine waves;
a delay sampling module: the sampling device is used for temporarily storing four continuous sampling points and then outputting the sampling points simultaneously;
an addition module: for addition operations;
a squaring module: for squaring operations;
an ACTAN module: and realizing mathematical actan trigonometric function transformation to obtain pi ft.
Furthermore, the delay sampling module adopts four stages of registers to output simultaneously.
Furthermore, when the addition module performs addition operation, the numerator in the formula (6) is regarded as sin (pi ft), and the denominator is regarded as cos (pi ft), that is, S is calculated12-S03To obtain sin2(π ft), calculate 3S12+S03To obtain cos2(πft)。
Further, the squaring module implements sin2(π ft) and cos2The transition from (π ft) to sin (π ft) and cos (π ft) may be implemented in an FPGA by calling the evolution ip core.
Compared with the prior art, the invention has the remarkable advantages that:
1) the invention adopts a sine wave frequency digital detection method based on phase estimation, frequency values can be calculated only by continuously sampling a plurality of points on a sine wave period, and a plurality of groups of sampling points can be obtained in one sine wave period so as to obtain a plurality of frequency values through calculation, so that the frequency detection real-time performance is high.
2) The sine wave frequency digital detection method based on phase estimation does not need to convert sine waves into square waves for sine wave frequency measurement, and directly samples and measures the frequency of the sine waves, thereby reducing errors in the conversion process and improving the measurement precision.
Drawings
Fig. 1 is a schematic diagram of a phase estimation frequency measurement circuit according to the present invention.
FIG. 2 is a block diagram of a delay sampling module 3 according to the present invention.
Detailed Description
The present invention is described in further detail below with reference to the attached drawing figures.
As shown in fig. 1, the frequency measurement principle of the phase estimation algorithm is to perform frequency detection by using four consecutive sampling points on a digital sine wave for calculation.
First, the module 1 is an analog sine wave signal generation module for generating a sine wave for detection. The module 2 through which the generated sine wave passes is an ADC module, i.e., an analog-to-digital conversion module, which converts the analog sine wave samples into discrete digital sine waves. After sampling, the entered module 3 is a delay sampling module, which can output four consecutive sampling data points temporarily and simultaneously to achieve the purpose of calculating four sampling points simultaneously, and the delay sampling module can be implemented in an fpga (field programmable Gate array) by adopting a mode of outputting four stages of registers simultaneously, as shown in fig. 2.
Suppose four sample points sk、sk+1、sk+2、sk+3Respectively as follows:
sk=Asin(2πft+θ) (1)
sk+1=Asin(2πf(t+T)+θ) (2)
sk+2=Asin(2πf(t+2T)+θ) (3)
sk+3=Asin(2πf(t+3T)+θ) (4)
wherein A is the amplitude of the sine wave, f is the frequency of the sine wave signal to be detected, T is the sampling period, and T is the current time.
Processing the formula to obtain:
Figure BDA0002627379710000031
this establishes a relationship between the sine wave frequency and the sampled data.
The derivation final formula for the purpose of simplifying and facilitating the realization on hardware circuits becomes:
Figure BDA0002627379710000032
wherein S03Is s iskAnd sk3Sum of S12Is s isk1And sk2And (4) summing.
The module 4 is an addition module, realizes addition operation in the formula (6), and during calculation, the numerator in the formula (6) is regarded as sin (pi ft) and the denominator is regarded as cos (pi ft), namely S is calculated12-S03To obtain sin2(π ft), calculate 3S12+S03To obtain cos2(π ft). Module 5 is an evolution module, implementing sin2(π ft) and cos2The conversion from (pi ft) to sin (pi ft) and cos (pi ft) can be realized in FPGA by calling an opening ip (interactive property) core. The last module 6 is an ACTAN module, mathematical ACTAN trigonometric function transformation is realized to obtain pi ft, so that a sine wave frequency f value is obtained through simple calculation, the division and ACTAN realization of the last sin (pi ft) and cos (pi ft) can be realized by calling a CORDIC (coordinate Rotation Digital computer) ip core in an FPGA, the specific circuit realization only needs shifting and adding, and the circuit resources are saved.
The use is 4 continuous sampling points in this frequency measurement principle realization, but not only is limited to 4 continuous sampling points, can adopt more sampling points (the multiple of 4) to calculate in the reality, and four sampling points of earlier every group calculate according to the above-mentioned formula, get at last and average, and the sampling point can improve holistic frequency measurement precision more, but can lead to the real-time variation, and the sampling point number needs balance according to actual need.

Claims (7)

1. The sine wave frequency digital detection method based on phase estimation is characterized in that four points are continuously sampled on a digital sine wave, the sampling period of the four sampling points is T, and the sine wave frequency is calculated according to the four continuous sampling points.
2. The method according to claim 1, wherein said calculating the sine wave frequency from four consecutive sample points is specified as:
four sampling points sk、sk+1、sk+2、sk+3Respectively as follows:
sk=Asin(2πft+θ) (1)
sk+1=Asin(2πf(t+T)+θ) (2)
sk+2=Asin(2πf(t+2T)+θ) (3)
sk+3=Asin(2πf(t+3T)+θ) (4)
wherein A is the amplitude of the sine wave, f is the frequency of the sine wave signal to be detected, T is the sampling period, and T is the current time;
processing the formula to obtain:
Figure FDA0002627379700000011
the derivation of the equation (5) for the purpose of simplifying and facilitating the implementation on the hardware circuit is carried out, and finally the equation (5) becomes:
Figure FDA0002627379700000012
wherein S03Is s iskAnd sk3Sum of S12Is s isk1And sk2The sum is calculated as a sine wave frequency f by equation (6).
3. The method of claim 1, wherein the number of the sampling points is 4n, where n is a natural number, and after the sinusoidal frequency f is calculated for each set of four sampling points, the final sinusoidal frequency is obtained by averaging the sets.
4. An apparatus for digital detection using the digital detection method of any one of claims 1 to 3, comprising in sequence:
the analog sine wave signal generation module: generating a sine wave for detection;
an analog-to-digital conversion module: sine wave sampling generated by the analog sine wave signal generation module is changed into discrete digital sine waves;
a delay sampling module: the sampling device is used for temporarily storing four continuous sampling points and then outputting the sampling points simultaneously;
an addition module: for addition operations;
a squaring module: for squaring operations;
an ACTAN module: and realizing mathematical actan trigonometric function transformation to obtain pi ft.
5. The apparatus of claim 4, wherein the delayed sampling module employs four stages of registers for simultaneous output.
6. The apparatus of claim 4, wherein the adding module performs the addition operation by considering the numerator and the denominator in the formula (6) as sin (π ft) and cos (π ft), respectively, i.e. calculating S12-S03To obtain sin2(π ft), calculate 3S12+S03To obtain cos2(πft)。
7. The apparatus of claim 6, wherein the squaring module implements sin2(π ft) and cos2The transition from (π ft) to sin (π ft) and cos (π ft) may be implemented in an FPGA by calling the evolution ip core.
CN202010800984.7A 2020-08-11 2020-08-11 Sine wave frequency digital detection method and device based on phase estimation Pending CN112051445A (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN202010800984.7A CN112051445A (en) 2020-08-11 2020-08-11 Sine wave frequency digital detection method and device based on phase estimation

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN202010800984.7A CN112051445A (en) 2020-08-11 2020-08-11 Sine wave frequency digital detection method and device based on phase estimation

Publications (1)

Publication Number Publication Date
CN112051445A true CN112051445A (en) 2020-12-08

Family

ID=73601695

Family Applications (1)

Application Number Title Priority Date Filing Date
CN202010800984.7A Pending CN112051445A (en) 2020-08-11 2020-08-11 Sine wave frequency digital detection method and device based on phase estimation

Country Status (1)

Country Link
CN (1) CN112051445A (en)

Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104330644A (en) * 2014-10-29 2015-02-04 广东电网有限责任公司电力科学研究院 Method and system for detecting amplitude value of sine wave signal in power system
CN110794208A (en) * 2019-11-14 2020-02-14 中电科仪器仪表有限公司 Broadband rapid modulation domain frequency measurement method based on digital phase calculation

Patent Citations (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN104330644A (en) * 2014-10-29 2015-02-04 广东电网有限责任公司电力科学研究院 Method and system for detecting amplitude value of sine wave signal in power system
CN110794208A (en) * 2019-11-14 2020-02-14 中电科仪器仪表有限公司 Broadband rapid modulation domain frequency measurement method based on digital phase calculation

Non-Patent Citations (1)

* Cited by examiner, † Cited by third party
Title
王伟旭: "《用相位推算法实现瞬时测频》", 《中国优秀硕士学位论文全文数据库 (工程科技Ⅱ辑)》 *

Similar Documents

Publication Publication Date Title
CN206321704U (en) Electric energy computation chip and electric energy meter
WO2018188228A1 (en) High-precision frequency measuring system and method
CN104897962B (en) The short sample high-precision frequency measurement method of simple signal and its device based on coprime perception
CN104007316B (en) A kind of High Precision Frequency method under lack sampling speed and measuring instrument thereof
CN104181577A (en) Beam position and phase measurement system and method based on full digitalization technology
CN109633262A (en) Three phase harmonic electric energy gauging method, device based on composite window multiline FFT
CN103257271A (en) Device and method for detecting micro grid harmonic wave and inter-harmonics based on STM32F107VCT6
CN103457603B (en) A kind of method that ADC dynamic parameter is tested based on average frequency spectrum
CN203287435U (en) A micro electrical network harmonic wave and inter-harmonic wave test apparatus based on an STM32F107VCT6
CN103983849B (en) A kind of Electric Power Harmonic Analysis method of real-time high-precision
CN110266311A (en) A kind of TIADC system mismatch error calibrating method, device, equipment and medium
CN109764897B (en) High-speed signal acquisition and subdivision method and system for sine and cosine encoder
CN112014640A (en) Multi-channel frequency standard comparison test system and working method thereof
CN101420228A (en) The analog-to-digital method and apparatus of multrirange
CN114509598A (en) Automatic detection method and system for zero crossing point of fundamental voltage
JP2004528742A (en) High-speed filter
CN103969508A (en) Real-time high-precision power harmonic analysis method and device
RU104402U1 (en) FUNCTIONAL GENERATOR
CN117169590B (en) Power harmonic analysis method and device based on software variable sampling rate
CN112051445A (en) Sine wave frequency digital detection method and device based on phase estimation
CN205670191U (en) A kind of echo wave signal acquisition device of LDV technique
CN109901382B (en) Regular sampling PWM (pulse-Width modulation) optimization method of digital control system
WO2003081264A1 (en) Electronic watthour meter and power-associated quantity calculating circuit
CN109521269A (en) A kind of am signals digitlization frequency measuring method
RU101291U1 (en) FUNCTIONAL GENERATOR

Legal Events

Date Code Title Description
PB01 Publication
PB01 Publication
SE01 Entry into force of request for substantive examination
SE01 Entry into force of request for substantive examination
RJ01 Rejection of invention patent application after publication

Application publication date: 20201208