CN107561360B - A kind of sinusoidal signal method for measuring phase difference based on FPGA and subtraction circuit - Google Patents

A kind of sinusoidal signal method for measuring phase difference based on FPGA and subtraction circuit Download PDF

Info

Publication number
CN107561360B
CN107561360B CN201710727323.4A CN201710727323A CN107561360B CN 107561360 B CN107561360 B CN 107561360B CN 201710727323 A CN201710727323 A CN 201710727323A CN 107561360 B CN107561360 B CN 107561360B
Authority
CN
China
Prior art keywords
sinusoidal signal
way
phase difference
fpga
peak
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.)
Active
Application number
CN201710727323.4A
Other languages
Chinese (zh)
Other versions
CN107561360A (en
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.)
Zhejiang University of Technology ZJUT
Original Assignee
Zhejiang University of Technology ZJUT
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 Zhejiang University of Technology ZJUT filed Critical Zhejiang University of Technology ZJUT
Priority to CN201710727323.4A priority Critical patent/CN107561360B/en
Publication of CN107561360A publication Critical patent/CN107561360A/en
Application granted granted Critical
Publication of CN107561360B publication Critical patent/CN107561360B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Landscapes

  • Measurement Of Resistance Or Impedance (AREA)

Abstract

A kind of sinusoidal signal method for measuring phase difference based on FPGA and subtraction circuit, comprising the following steps: 1) according to the frequency of measured signal and amplitude, the sinusoidal signal of the identical amplitude of two-way identical frequency is generated using FPGA and D/A conversion module;2) sinusoidal signal of the identical amplitude of two-way identical frequency is subtracted each other by subtraction circuit, obtains sinusoidal signal all the way;3) sinusoidal signal all the way subtracted each other is filtered, amplify and A/D sampling after be transferred in the RAM of FPGA;4) the display control software that the Wave data in RAM is transmitted to host computer will be present, and read its peak-to-peak value;5) it fits the linear relation between phase difference and A/D the sampling peak-to-peak value between two-way sinusoidal signal and is written to inside host computer procedure, to realize the detection of phase difference between two-way sinusoidal signal.The present invention mentions hardware circuit simply and is not related to complicated algorithm, and can effectively improve the precision of measurement.

Description

A kind of sinusoidal signal method for measuring phase difference based on FPGA and subtraction circuit
Technical field
The present invention relates to phase difference measurement field, measurement side of especially a kind of two-way with phase difference between frequency sinusoidal signal Method.
Background technique
Phase difference refers to the difference of phase between two-way homogenous frequency signal, is called and differs.For two-way with the sine letter of frequency Number, it is the constant not changed with time change that phase difference, which is equal to the difference of the initial phase of this two-way sinusoidal signal,. In recent years, two-way with phase difference between frequency sinusoidal signal measurement in signal analysis, industrial automation, intelligent control, electronics And the fields such as the communication technology, biomedicine, radar, sonar, sewage treatment suffer from and are widely applied.It accurately measures by sensing The phase difference between two-way sinusoidal signal that device receives has great importance.For example, frequency is sinusoidal number of 4KHz all the way After aqueous solution, the phase of reflected signal can occur accordingly according to the size of dissolved oxygen concentration in aqueous solution Variation can be accurately detected and be dissolved in water outlet by measuring the phase difference between reflected signal and reference signal Oxygen concentration.
The measurement method of signal phase difference is segmented into software calculating method and hardware circuit method.Software calculating method can divide again At two major classes, one is the processing methods in time domain scale, that is to say, that all signal processings are carried out in time domain scale 's;Another kind is the processing method in frequency domain, i.e., signal is transformed from the time domain to frequency domain, then according to signal in frequency domain model Interior frequency characteristic is enclosed to handle signal.The biggest advantage of processing method in time domain scale is the processing side of signal Method is fairly simple, intuitive, and is easily achieved, but in the detection process, there are many factors, and measurement result to be caused to have very greatly Uncertainty, cause measurement accuracy relatively low.Processing method in frequency domain has certain anti-interference ability to noise, But this method needs to implement strictly integer-period sampled to sample, otherwise will lead to spectral leakage and frequency spectrum fence effect, and Eventually lead to biggish measurement error.And previous hardware circuit method is mainly cross zero detecting method, according to two paths of signals zero crossing Time difference calculate phase difference, calculating speed is fast, but hardware cost is high, anti-interference ability is weak, measurement accuracy is low.Therefore, existing Some signal phase difference measurement method hardware circuits are complicated, and measurement error is larger, and measurement accuracy is low.
Summary of the invention
In order to overcome the shortcomings of that the existing method measurement error for measuring sinusoidal signal phase difference is big, measurement accuracy is low, this hair Bright to provide a kind of sinusoidal signal method for measuring phase difference based on FPGA and subtraction circuit, hardware circuit is simple and is not related to Complicated algorithm, and can effectively improve the precision of measurement.
The technical solution adopted by the present invention to solve the technical problems is:
A kind of sinusoidal signal method for measuring phase difference based on FPGA and subtraction circuit, comprising the following steps:
1) according to the frequency of measured signal and amplitude, two-way same frequency is generated using FPGA and D/A conversion module The sinusoidal signal of the identical amplitude of rate;
2) sinusoidal signal of the identical amplitude of two-way identical frequency is subtracted each other by subtraction circuit, obtains sinusoidal letter all the way Number;
3) sinusoidal signal all the way subtracted each other is filtered, amplify and A/D sampling after be transferred to the RAM of FPGA In;
4) the display control software that the Wave data in RAM is transmitted to host computer will be present, and read its peak-to-peak value;
5) linear relation between the phase difference between two-way sinusoidal signal and A/D sampling peak-to-peak value and write-in are fitted Inside to host computer procedure, to realize the detection of phase difference between two-way sinusoidal signal.
Further, in the step 1), it is first determined the frequency and amplitude of measured signal, by calling in FPGA Two DDS IP kernels, the numerical value of SIN function is taken out, and generates the identical amplitude of two-way identical frequency respectively by D/A conversion Sinusoidal signal takes the starting point of DDS IP kernel mileage value that two-way sinusoidal signal is made to have certain phase difference by the way that the second tunnel is arranged, Two-way sinusoidal signal can be expressed as to following formula (1) and formula (2):
x1(t)=Asin (2 π ft+ ψ1) (1)
x2(t)=Asin (2 π ft+ ψ2) (2)
Wherein, A is the amplitude of sinusoidal signal, and f is the frequency of sinusoidal signal, ψ1, ψ2Respectively two-way sinusoidal signal is initial Phase.
Further, in the step 2), two-way is subtracted each other with the sinusoidal signal of width by analog subtracter with frequency, Formula (1) that will be above is subtracted each other with formula (2), shown in for example following formula of result (3):
Wherein, Δ ψ=ψ21, the as phase difference of two-way sinusoidal signal;When doing approximation here, the list of phase difference ψ Position is indicated with radian.
From formula (3) it can be seen that is obtained after two-way is subtracted each other with frequency with the sinusoidal signal of width is identical frequency all the way Sinusoidal signal, amplitude are the functions about phase difference, and the peak-to-peak value of the sinusoidal signal obtained after being subtracted each other by measurement measures Phase difference between two-way sinusoidal signal.
Require two-way sinusoidal signal frequency and amplitude must phase when surveying the phase difference between two-way sinusoidal signal using subtraction Together, and the amplitude of the two-way sinusoidal signal of actual measurement is possible to not identical, therefore automatic gain is devised in hardware circuit (Automatic Gain Control, AGC) circuit is controlled, measured two-way sinusoidal signal can be adjusted to identical width Subtracted each other again after value, in order not to change phase difference original between them, measured two-way sinusoidal signal is passed through respectively Their amplitude is adjusted to the identical measurement for carrying out phase difference again later by the agc circuit of identical topological structure.
Further, in the step 3), the sinusoidal signal all the way subtracted each other is filtered, is amplified and A/D is adopted It is transferred in the RAM of FPGA after sample, process is as follows:
(3.1) sinusoidal signal all the way obtained after subtracting each other is filtered
The sinusoidal signal that two-way sinusoidal signal obtains after subtracting each other needs to filter out the letter of unwanted frequency by bandpass filter Number, while retaining the sinusoidal signal of specific frequency, in order to improve the quality of A/D sampled signal, fourth-order band-pass filter is devised here Wave device, band connection frequency needs are arranged according to the frequency of measured signal.Because what we needed to measure is that frequency is 4KHz Two-way sinusoidal signal between phase difference, so the band connection frequency of bandpass filter is set as between 3KHz~5KHz.
(3.2) signal after filtering is amplified
Its amplitude of the sinusoidal signal that two paths of signals subtracts each other depend on the amplitude of two-way sinusoidal signal subtracted each other and he Between phase difference, if when phase difference very little between two-way sinusoidal signal, the width of the sinusoidal signal obtained after subtracting each other Value also can very little, need by amplification after could accurately detected, three-stage operational is devised in hardware circuit and is put Big device, and A/D sampling A/D chip is all connected with after every level-one operational amplifier, after host computer can amplify every level-one As a result it is individually read.
(3.3) signal after amplification is transferred in the RAM of FPGA by A/D sampling A/D chip
It is ambipolar by the sinusoidal signal that bandpass filter obtains, and A/D sampling A/D chip is powered using 5V unipolarity, The lifting that voltage must be carried out before A/D sampling, guarantees that the level into A/D chip is all positive value.It is generated in trigger circuit When trigger signal is high level, A/D chip operation is controlled, the analog signal after being amplified with the sample frequency acquisition of 1.25MHz, By collected 12bit digital signal there are in the RAM of FPGA, facilitate the reading of host computer.When trigger signal is low level, stop Only acquire.
Further, in the step 4), the display control software that the Wave data in RAM is transmitted to host computer will be present, And its peak-to-peak value is read, steps are as follows:
(4.1) maximum value and minimum value of waveform are read
The display control software that the Wave data in RAM is transmitted to host computer will be present, host computer often reads a numerical value It is all compared with current maximum value and minimum value, while updating maximum value and minimum value, until reading a cycle All data until, finally obtain read waveform maximum value and minimum value.
(4.2) waveform peak-to-peak value is provided
The maximum value of waveform in read complete cycle and minimum value are subtracted each other to the peak-to-peak value for just obtaining waveform, In order to reduce error, the peak-to-peak value of 10 periodic waveforms can be read, final waveform peak peak is provided after then carrying out averagely Value.
Further, it in the step 5), is communicated between FPGA and PC control software by serial ports.Host computer Software is controlled with the second road DDS IP kernel in fixed step diameter (time difference corresponding to a usually 1 ° of phase difference) control FPGA In access value starting point, make FPGA generate two-way sinusoidal signal have different phase differences, PC control software read one The peak-to-peak value of waveform corresponding to series of phase difference.According to sinusoidal signal peak-to-peak value data information corresponding to out of phase difference, intend Close out the linear relation between them.Due to having done an approximation in formula (3), so when fit linear relationship formula It must be that segmentation is fitted, usually can be relatively good at interval of 10 ° of progress linear fits, i.e., respectively at 0 °~10 °, 10 °~ It is fitted respectively between 20 ° ... 80 °~90 °.It is written to inside host computer procedure obtained linear relation is fitted, It can realize measurement of the two-way with frequency with phase difference between width sinusoidal signal.For the different situation of measured signal amplitude Under, can first pass through agc circuit their range-adjusting is the identical measurement for carrying out phase difference again later.
Technical concept of the invention are as follows: with the development of electronic science and technology, accurately measure and to be received by sensor Phase difference technology between two column sinusoidal signals has been deep into many fields, in signal analysis, industrial automation, intelligence control There is extremely universal application in the fields such as system, electronics and the communication technology, biomedicine, radar, sonar, sewage monitoring.Therefore, right Two-way realizes that accurate measurement has very important significance with the phase difference between the sinusoidal signal of frequency.
What two-way obtained after subtracting each other with frequency with the sinusoidal signal of width is the sinusoidal signal all the way of identical frequency, and amplitude is About the sin function of phase difference, when two-way sinusoidal signal phase difference is smaller, the amplitude of the sinusoidal signal obtained after subtracting each other is Linear function about phase difference.This feature after being subtracted each other with frequency with width sinusoidal signal using two-way, can design a mould Quasi- subtraction circuit is used to measure with frequency with the phase difference between the two-way sinusoidal signal of width.
It is the frequency and amplitude according to measured signal first, goes to generate the identical amplitude of two-way identical frequency using FPGA Sinusoidal signal, then subtracted each other, amplified and filtered, finally by A/D convert, Wave data is transmitted to by serial ports Position machine controls software, reads the peak-to-peak value of its waveform.Two-way sine letter is changed with certain step diameter by PC control software Phase difference between number reads corresponding waveform peak-to-peak value, and the phase difference and AD fitted between two-way sinusoidal signal samples peak Linear relation between peak value, linear relation, which is written to host computer procedure, can realize measurement two-way with frequency with width Phase difference between sinusoidal signal.For in the different situation of measured signal amplitude, agc circuit can be first passed through them Range-adjusting be it is identical after carry out the measurement of phase difference again.Compared with the method for other measurement sinusoidal signal phase differences, Its hardware circuit is relatively easy, is not related to algorithm, and improves the precision of measurement.
Beneficial effects of the present invention are mainly manifested in: hardware circuit is simple, is not related to algorithm, and measurement accuracy is higher.
Detailed description of the invention
Fig. 1 is a kind of flow chart of sinusoidal signal method for measuring phase difference based on FPGA and subtraction circuit.
Specific embodiment
The present invention is described further below with reference to flow chart.
Referring to Fig.1, a kind of sinusoidal signal method for measuring phase difference based on FPGA and subtraction circuit, comprising the following steps:
1) according to the frequency of measured signal and amplitude, two-way same frequency is generated using FPGA and D/A conversion module The sinusoidal signal of the identical amplitude of rate:
Determine that the frequency and amplitude of measured signal will be sinusoidal by calling two DDS IP kernels in FPGA first The numerical value of function takes out, and generates the sinusoidal signal of the identical amplitude of two-way identical frequency respectively by D/A conversion, passes through setting the Two tunnels take the starting point of DDS IP kernel mileage value that two-way sinusoidal signal is made to have certain phase difference, can be by two-way sinusoidal signal point (1) formula and (2) formula not being expressed as:
x1(t)=Asin (2 π ft+ ψ1) (1)
x2(t)=Asin (2 π ft+ ψ2) (2)
Wherein A is the amplitude of sinusoidal signal, and f is the frequency of sinusoidal signal, ψ1, ψ2Respectively two-way sinusoidal signal is initial Phase.
2) two-way is subtracted each other with the sinusoidal signal of width by analog subtracter with frequency, obtains sinusoidal signal all the way:
Two-way is subtracted each other with the sinusoidal signal of width by analog subtracter with frequency, i.e., by (1) formula and (2) formula above Subtract each other, result is as shown in following (3) formula:
Wherein Δ ψ=ψ21, the as phase difference of two-way sinusoidal signal.When doing approximation here, the unit of phase difference ψ It is indicated with radian.
It can be seen that obtain after subtracting each other two-way with the sinusoidal signal of width with frequency is identical frequency all the way from (3) formula Sinusoidal signal, amplitude are the functions about phase difference, can subtract each other the peak-to-peak value of the sinusoidal signal obtained later by measuring Measure the phase difference between two-way sinusoidal signal.
Require two-way sinusoidal signal frequency and amplitude must phase when surveying the phase difference between two-way sinusoidal signal using subtraction Together, and the amplitude of the two-way sinusoidal signal of actual measurement is possible to not identical, therefore automatic gain is devised in hardware circuit (Automatic Gain Control, AGC) circuit is controlled, measured two-way sinusoidal signal can be adjusted to identical width Subtracted each other again after value, in order not to change phase difference original between them, measured two-way sinusoidal signal is passed through respectively Their amplitude is adjusted to the identical measurement for carrying out phase difference again later by the agc circuit of identical topological structure.
3) sinusoidal signal all the way subtracted each other is amplified, filter and A/D sampling after be transferred to the RAM of FPGA In:
(3.1) sinusoidal signal all the way obtained after subtracting each other is filtered
The sinusoidal signal that two-way sinusoidal signal obtains after subtracting each other needs to filter out the letter of unwanted frequency by bandpass filter Number, while retaining the sinusoidal signal of specific frequency, in order to improve the quality of A/D sampled signal, fourth-order band-pass filter is devised here Wave device, band connection frequency needs are arranged according to the frequency of measured signal.Because what we needed to measure is that frequency is 4KHz Two-way sinusoidal signal between phase difference, so the band connection frequency of bandpass filter is set as between 3KHz~5KHz.
(3.2) signal after filtering is amplified
Its amplitude of the sinusoidal signal that two paths of signals subtracts each other depend on the amplitude of two-way sinusoidal signal subtracted each other and he Between phase difference, if when phase difference very little between two-way sinusoidal signal, the width of the sinusoidal signal obtained after subtracting each other Value also can very little, need by amplification after could accurately detected, three-stage operational is devised in hardware circuit and is put Big device, and A/D sampling A/D chip is all connected with after every level-one operational amplifier, after host computer can amplify every level-one As a result it is individually read.
(3.3) signal after amplification is transferred in the RAM of FPGA by A/D sampling A/D chip
It is ambipolar by the sinusoidal signal that bandpass filter obtains, and A/D sampling A/D chip is powered using 5V unipolarity, The lifting that voltage must be carried out before A/D sampling, guarantees that the level into A/D chip is all positive value.It is generated in trigger circuit When trigger signal is high level, A/D chip operation is controlled, the analog signal after being amplified with the sample frequency acquisition of 1.25MHz, By collected 12bit digital signal there are in the RAM of FPGA, facilitate the reading of host computer.When trigger signal is low level, stop Only acquire.
4) the display control software that the Wave data in RAM is transmitted to host computer will be present, and read its peak-to-peak value, step is such as Under:
(4.1) maximum value and minimum value of waveform are read
The display control software that the Wave data in RAM is transmitted to host computer will be present, host computer often reads a numerical value It is all compared with current maximum value and minimum value, while updating maximum value and minimum value, until reading a cycle All data until, finally obtain read waveform maximum value and minimum value.
(4.2) waveform peak-to-peak value is provided
The maximum value of waveform in read complete cycle and minimum value are subtracted each other to the peak-to-peak value for just obtaining waveform, In order to reduce error, the peak-to-peak value of 10 periodic waveforms can be read, final waveform peak peak is provided after then carrying out averagely Value.
5) it fits the linear relation between phase difference and the A/D sampled value between two-way sinusoidal signal and is written to Inside the machine program of position, to realize the detection of phase difference between two-way sinusoidal signal:
It is communicated between FPGA and PC control software by serial ports.PC control software is with a fixed step Diameter (time difference corresponding to usually 1 ° of phase difference) controls the starting point of access value in the second road DDS IP kernel in FPGA, produces FPGA Raw two-way sinusoidal signal has different phase differences, and PC control software reads a series of peak of waveform corresponding to phase differences Peak value.According to sinusoidal signal peak-to-peak value data information corresponding to out of phase difference, the linear relation between them is fitted. Due to having done an approximation in formula (3), so must be that segmentation is fitted when fit linear relationship formula, usually Can be relatively good at interval of 10 ° of progress linear fits, i.e., respectively between 0 °~10 °, 10 °~20 ° ... 80 °~90 ° respectively into Row fitting.It is written to inside host computer procedure obtained linear relation is fitted, can realize the same frequency of two-way with width just The measurement of phase difference between string signal.For in the different situation of measured signal amplitude, agc circuit can be first passed through him Range-adjusting be it is identical after carry out the measurement of phase difference again.
Experimental result: in test data, we using FPGA and D/A convert generate be amplitude into 1V, frequency is The sinusoidal signal of 4KHz tests institute between 0 °~60 ° with step diameter for 1 ° of phase difference being configured between two-way sinusoidal signal Corresponding AD sampled value is fitted out the linearity curve between phase difference and AD sampled value according to the data sectional tested and closes It is formula, relational expression is as follows:
Δ θ=12.668U-0.0188 (0.0015 U≤0.9255 <) (4)
Δ θ=12.989U-0.3159 (0.9255 U≤1.5294 <) (5)
Δ θ=13.718U-1.4308 (1.5294 U≤2.3789 <) (6)
Δ θ=14.140U-2.4385 (2.3879 U≤3.2252 <) (7)
Δ θ=14.589U-3.8866 (3.2252 U≤3.6703 <) (9)
Δ θ=14.990U-5.3584 (3.6703 U≤4.3600 <) (10)
Wherein, Δ θ is the phase difference (unit is °) of two-way sinusoidal signal, and U is the peak-to-peak value of the collected sinusoidal signal of AD (unit V).
The R for 6 linear relations being fitted above2(i.e. degree of fitting) shows phase difference and A/ between 0.9997~1 There is good linear relationship between D sampled value, formula (4)~(10) above are write inside program, can realize measurement Frequency is the phase difference between the two-way sinusoidal signal of 4KHz.
A/D acquisition is powered using ADS7883 chip, 12 bit resolutions, Serial output, the accurate voltage of 5V.Knot Close formula (the 4)~formula (10) in face it can be concluded that, the measurement accuracy of phase difference can achieve 0.018 °, actual measurement error It is also within ± 0.02 °.Two-way sinusoidal signal is by only having carried out level-one amplification after analog subtracter, if carried out again Level-one or two-stage amplification, measurement accuracy can be further improved, comparatively the range only measured can be reduced.This For the measurement method of phase difference compared to for other measurement methods, hardware circuit is simple, is not related to complicated algorithm, and precision has It is improved, available certain application.

Claims (7)

1. a kind of sinusoidal signal method for measuring phase difference based on FPGA and subtraction circuit, it is characterised in that: the method includes Following steps:
1) according to the frequency of measured signal and amplitude, two-way identical frequency phase is generated using FPGA and D/A conversion module With the sinusoidal signal of amplitude;
2) sinusoidal signal of the identical amplitude of two-way identical frequency is subtracted each other by subtraction circuit, obtains sinusoidal signal all the way;
3) sinusoidal signal all the way subtracted each other is filtered, amplify and A/D sampling after be transferred in the RAM of FPGA, Process is as follows:
(3.1) sinusoidal signal all the way obtained after subtracting each other is filtered
Fourth-order band-pass filter is devised, the band connection frequency of bandpass filter is set as between 3KHz~5KHz;
(3.2) signal after filtering is amplified
Three-stage operational amplifier is devised, and is all connected with A/D sampling A/D chip after every level-one operational amplifier, host computer can Individually to be read to the result after the amplification of every level-one;
(3.3) signal after amplification is transferred in the RAM of FPGA by A/D sampling A/D chip
When the trigger signal that trigger circuit generates is high level, A/D chip operation is controlled, is adopted with the sample frequency of 1.25MHz Analog signal after collection amplification facilitates the reading of host computer by collected 12bit digital signal there are in the RAM of FPGA; When trigger signal is low level, stop acquisition;
4) the display control software that the Wave data in RAM is transmitted to host computer will be present, and read its peak-to-peak value;
5) it fits the linear relation between phase difference and A/D the sampling peak-to-peak value between two-way sinusoidal signal and is written to Inside the machine program of position, to realize the detection of phase difference between two-way sinusoidal signal.
2. a kind of sinusoidal signal method for measuring phase difference based on FPGA and subtraction circuit as described in claim 1, feature It is: in the step 1), it is first determined the frequency and amplitude of measured signal, by calling two DDS IP in FPGA Core takes out the numerical value of SIN function, generates the sinusoidal signal of the identical amplitude of two-way identical frequency respectively by D/A conversion, The starting point of DDS IP kernel mileage value is taken to make two-way sinusoidal signal that there is certain phase difference by the way that the second tunnel is arranged, by two-way sine Signal is expressed as following formula (1) and formula (2):
x1(t)=Asin (2 π ft+ ψ1) (1)
x2(t)=Asin (2 π ft+ ψ2) (2)
Wherein, A is the amplitude of sinusoidal signal, and f is the frequency of sinusoidal signal, ψ1, ψ2The respectively initial phase of two-way sinusoidal signal Position.
3. a kind of sinusoidal signal method for measuring phase difference based on FPGA and subtraction circuit as claimed in claim 2, feature It is: in the step 2), two-way is subtracted each other with the sinusoidal signal of width by analog subtracter with frequency, i.e., by formula above (1) subtract each other with formula (2), shown in for example following formula of result (3):
Wherein, Δ ψ=ψ21, the as phase difference of two-way sinusoidal signal, when doing approximation here, the unit of phase difference ψ is used Radian indicates;
It can be seen that is obtained after subtracting each other two-way with the sinusoidal signal of width with frequency is the sine of identical frequency all the way from (3) formula Signal, amplitude are the functions about phase difference, and the peak-to-peak value of the sinusoidal signal obtained after being subtracted each other by measurement measures two-way Phase difference between sinusoidal signal.
4. a kind of sinusoidal signal method for measuring phase difference based on FPGA and subtraction circuit as claimed in claim 3, feature It is: devises automatic gain control circuit in hardware circuit, measured two-way sinusoidal signal can be adjusted to identical Amplitude after subtracted each other again;Measured two-way sinusoidal signal passes through the automatic growth control electricity of identical topological structure respectively Their amplitude is adjusted to the identical measurement for carrying out phase difference again later by road.
5. a kind of sinusoidal signal method for measuring phase difference based on FPGA and subtraction circuit as described in one of Claims 1 to 4, It is characterized by: the display control software that the Wave data in RAM is transmitted to host computer will be present, and read in the step 4) Its peak-to-peak value, steps are as follows:
(4.1) maximum value and minimum value of waveform are read
Will be present the display control software that the Wave data in RAM is transmitted to host computer, host computer often read a numerical value all with Current maximum value and minimum value is compared, while updating maximum value and minimum value, the institute until reading a cycle Until there are data, the maximum value and minimum value for reading waveform are finally obtained;
(4.2) waveform peak-to-peak value is provided
The maximum value of waveform in read complete cycle and minimum value are subtracted each other to the peak-to-peak value for just obtaining waveform, read The peak-to-peak value for setting quantity periodic waveform provides final waveform peak-to-peak value after then carrying out averagely.
6. a kind of sinusoidal signal method for measuring phase difference based on FPGA and subtraction circuit as described in one of Claims 1 to 4, It is characterized by: being communicated between FPGA and PC control software by serial ports in the step 5), PC control is soft For part with the starting point of access value in the second road DDS IP kernel in a fixed step size controlling FPGA, the two-way for generating FPGA is sinusoidal Signal has different phase differences, and PC control software reads a series of peak-to-peak value of waveform corresponding to phase differences, according to not Sinusoidal signal peak-to-peak value data information corresponding to same-phase difference, fits the linear relation between them.
7. a kind of sinusoidal signal method for measuring phase difference based on FPGA and subtraction circuit as claimed in claim 6, feature It is: at interval of 10 ° of progress linear fits, i.e., is intended respectively between 0 °~10 °, 10 °~20 ° ... 80 °~90 ° respectively It closes, is written to inside host computer procedure obtained linear relation is fitted, can realize that two-way is believed with frequency with width sine The measurement of phase difference between number.
CN201710727323.4A 2017-08-23 2017-08-23 A kind of sinusoidal signal method for measuring phase difference based on FPGA and subtraction circuit Active CN107561360B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201710727323.4A CN107561360B (en) 2017-08-23 2017-08-23 A kind of sinusoidal signal method for measuring phase difference based on FPGA and subtraction circuit

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201710727323.4A CN107561360B (en) 2017-08-23 2017-08-23 A kind of sinusoidal signal method for measuring phase difference based on FPGA and subtraction circuit

Publications (2)

Publication Number Publication Date
CN107561360A CN107561360A (en) 2018-01-09
CN107561360B true CN107561360B (en) 2019-11-05

Family

ID=60976765

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201710727323.4A Active CN107561360B (en) 2017-08-23 2017-08-23 A kind of sinusoidal signal method for measuring phase difference based on FPGA and subtraction circuit

Country Status (1)

Country Link
CN (1) CN107561360B (en)

Families Citing this family (2)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN110988479A (en) * 2019-12-27 2020-04-10 珠海市科荟电器有限公司 System and method for testing phase difference of signals with same frequency period
CN111220846B (en) * 2020-03-10 2022-04-19 星汉时空科技(北京)有限公司 High-speed sampling full-digitalization frequency stability testing equipment and method

Family Cites Families (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
EP1876945B1 (en) * 2005-03-04 2012-12-05 CardioMems, Inc. Communicating with an implanted wireless sensor
CN102645585A (en) * 2012-05-14 2012-08-22 中国航空工业集团公司北京长城计量测试技术研究所 Synchronous rapid measuring method and device for ultralow frequency sinusoidal signal phase difference
CN102654771B (en) * 2012-05-16 2014-03-26 电子科技大学 Automatic calibration method and system of analog channel
CN103543334B (en) * 2013-10-24 2015-09-02 北京理工大学 A kind of measuring method of the phase difference measuring apparatus based on FFT
CN104967488B (en) * 2015-04-27 2017-08-29 西安空间无线电技术研究所 A kind of microwave photon third order intermodulation complete inhibition system based on DPMZM

Also Published As

Publication number Publication date
CN107561360A (en) 2018-01-09

Similar Documents

Publication Publication Date Title
CN107144719A (en) A kind of high-precision testing weak signals instrument and method of testing
CN105841645B (en) A kind of thickness measuring method based on electromagnetic acoustic
CN101251390A (en) Apparatus for detecting weak signal based on time-frequency transformation
CN107561360B (en) A kind of sinusoidal signal method for measuring phase difference based on FPGA and subtraction circuit
CN103989462A (en) Method for extracting first characteristic point and second characteristic point of pulse waveform
CN107505497B (en) Time domain measurement method for peak value and peak value of signal of passive magnetoelectric rotation speed sensor
CN104808251A (en) Method for improving frequency measuring precision of larmor signal of Overhauser magnetometer and circuit thereof
CN104749077A (en) Suspension particle concentration detection system based on ultrasonic waves
CN105572462A (en) Current detector
CN104729967A (en) Ultrasonic-based sludge concentration monitoring system
CN201378190Y (en) Digital thunder and lightning detection device
CN109406588A (en) Soil nitrate-N multi-parameter detecting method and instrument based on ion selective electrode
CN104062004B (en) Extremely-weak light signal detection device and method
CN104688241A (en) Monitoring circuit used for quartz crystal microbalance blood sugar monitoring system
CN106569162B (en) A kind of the analog bandwidth measurement method and device of logic analyser probe
CN110609172A (en) System and method for measuring carrier frequency of pulse modulation signal
CN202209988U (en) Intelligent control sound and vibration measuring instrument
CN106817129A (en) A kind of apparatus for detecting weak signal based on C8051F020
CN105629059A (en) Signal detection method
CN205619988U (en) Gaseous ration meter of gassiness volume desorption
CN203908675U (en) Extremely weak light signal detection device
CN115060666A (en) Calibration method of water quality parameter sensor and water quality parameter measuring method and device
CN206362943U (en) Water signal supervisory instrument is visited in a kind of magnetic resonance with HDR
CN103438911B (en) LC resonant transducer reading system under fixed pattern frequently and method
CN101382593A (en) Method for detecting weak low frequency signal form unknown strong frequency conversion signal

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
GR01 Patent grant
GR01 Patent grant