CN106645952B - A kind of detection method and system of signal phase difference - Google Patents

A kind of detection method and system of signal phase difference Download PDF

Info

Publication number
CN106645952B
CN106645952B CN201610907926.8A CN201610907926A CN106645952B CN 106645952 B CN106645952 B CN 106645952B CN 201610907926 A CN201610907926 A CN 201610907926A CN 106645952 B CN106645952 B CN 106645952B
Authority
CN
China
Prior art keywords
signal
frequency
detection
detected
phase difference
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
CN201610907926.8A
Other languages
Chinese (zh)
Other versions
CN106645952A (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.)
SHANGHAI HUAHONG JITONG SMART SYSTEM CO Ltd
Original Assignee
SHANGHAI HUAHONG JITONG SMART SYSTEM CO Ltd
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 SHANGHAI HUAHONG JITONG SMART SYSTEM CO Ltd filed Critical SHANGHAI HUAHONG JITONG SMART SYSTEM CO Ltd
Priority to CN201610907926.8A priority Critical patent/CN106645952B/en
Publication of CN106645952A publication Critical patent/CN106645952A/en
Application granted granted Critical
Publication of CN106645952B publication Critical patent/CN106645952B/en
Active legal-status Critical Current
Anticipated expiration legal-status Critical

Links

Classifications

    • GPHYSICS
    • G01MEASURING; TESTING
    • G01RMEASURING ELECTRIC VARIABLES; MEASURING MAGNETIC VARIABLES
    • G01R25/00Arrangements for measuring phase angle between a voltage and a current or between voltages or currents
    • G01R25/08Arrangements for measuring phase angle between a voltage and a current or between voltages or currents by counting of standard pulses

Landscapes

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

Abstract

The invention discloses a kind of detection methods of signal phase difference, include: step S100 obtain signal to be detected and frequency it is identical and with reference phase reference signal, and according to the signal frequency of the signal to be detected combine the required total sampling number of detection accuracy acquisition of information;The reference signal and the signal to be detected are combined into phase difference signal to be checked identical with the signal frequency to be detected by step S200;Step S300 obtains the pulsewidth number information of the phase difference signal to be checked according to signal frequency;The phase information of step S400 signal to be detected according to required detection accuracy information and the pulsewidth number acquisition of information.Of the invention provides the detection method and system of a kind of signal phase difference, and the purpose is to by realizing detection with frequency phase difference using small difference frequency clock sampling signal.

Description

A kind of detection method and system of signal phase difference
Technical field
The present invention relates to infomation detection control fields, more particularly to the detection method and system of a kind of signal phase difference.
Background technique
Phase is one of three big elements of alternating signal, and phase difference be then the identical AC signal of two frequencies of description it Between relationship important parameter;Phase difference detection system is one of electric measurement common circuit, in industrial automation, intelligence control It is widely used in the systems such as system, mobile communication, sensor detection;Frequency same phase difference detection algorithm is in every field Important application is suffered from, most common phase difference detection algorithm is digit counter detection method, digit counter detection Algorithm and relatively simple for structure, phase difference precision is often characterized with the detection accuracy of high level pulse in practical projects.
Working frequency is generally used to be greater than high level of the high-frequency counter to signal to be detected of measured frequency to be checked when detection Pulse width is counted in setting periodic regime, if being required to the minimum pulse width detected is 1ns, is counted Number device just needs at least working frequency of 1GHz;Therefore this detection method is reached by improving the working frequency of detection circuit To required detection accuracy, if inherently very high or phase-detection precision requirement further mentions measured signal frequency It rises, existing manufacturing process is difficult to working frequency required for reaching circuit.
Summary of the invention
Of the invention provides the detection method and system of a kind of signal phase difference, and the purpose is to by utilizing small difference frequency Clock sampling signal realizes detection with frequency phase difference.
Technical solution provided by the invention is as follows:
A kind of detection method of signal phase difference, comprising: step S100 obtains signal to be detected and frequency is identical and have The reference signal of reference phase, and combine required detection accuracy acquisition of information total according to the signal frequency of the signal to be detected Sampling number;The reference signal and the signal to be detected are combined into and the signal frequency phase to be detected by step S200 Same phase difference signal to be checked;Step S300 obtains the pulsewidth number information of the phase difference signal to be checked according to signal frequency;Step The phase information of S400 signal to be detected according to required detection accuracy information and the pulsewidth number acquisition of information.
In the present invention, phase difference detection method is based under precondition known to measured signal frequency, by time domain Requirement to sample clock frequency is converted to the requirement of sampling clock precision, subtracted to reach by upper extension sampling number The purpose of small detection circuit working frequency.
Preferably, the step S300 further include: step S310 is obtained according to the required accuracy information of the signal to be detected The signal frequency is taken, and detection square-wave signal is generated according to the signal frequency;Wherein, the signal of the detection square-wave signal Frequency is the detection high-frequency higher than the signal frequency to be detected or the detection low frequency lower than the signal frequency to be detected; Step S320 is compared according to the detection square-wave signal with the phase difference signal to be checked;Step S330 is according to the step The result that S320 is compared detects the pulsewidth number of the phase difference signal to be checked;Step 340 is believed according to the detection square wave Number signal frequency obtain the pulsewidth number of the phase difference signal to be checked that the step S330 is detected and added up.
In the present invention, according to the detection accuracy of signal to be detected, total sampling number is sought, further according to total sampling time Number obtains detection frequencies, the detection frequency that the algorithm that provides through the invention obtains well below the prior art detection frequency, Two kinds of detection frequencies are provided simultaneously;One reduce the testing conditions of measured signal, and two pass through two kinds of relatively low detections Frequency can mutually provide verifying, be guaranteed for the accuracy of signal detection to be detected, solve low with high-frequency detection The problem of frequency signal, reduces its calculation amount, detects more quick.
Preferably, the step S330 includes: step S331 when the detection high-frequency is in high level, detects institute One-accumulate is carried out when stating phase difference signal to be checked from failing edge to rising edge;Execute step S340.
Preferably, the step S330 further include: step S332 is detected when the detection low frequency is in high level One-accumulate is carried out when the phase difference signal to be checked is from rising edge to failing edge;Execute step S340.
In the present invention, the arteries and veins of signal to be detected is obtained in the detection cycle of setting by the different detection frequencies of setting Wide number;It is transformed into square-wave signal by will test signal, pulsewidth number, this kind are obtained by the variation of rising edge or decline Detection mode is more intuitive, convenient.
Preferably, the step S200 further include: step S210 distinguishes the reference signal and the signal to be detected It is transformed into the square-wave signal of same frequency;Step S220 is transformed with frequency by the reference signal and the signal difference to be detected The square-wave signal of rate carries out two divided-frequency transformation;Step S230 further by after two divided-frequency the reference signal with it is described to be detected The square-wave signal of signal carries out logical operation and obtains the phase difference signal to be checked identical with the signal frequency to be detected.
In the present invention, by signal to be detected by being further transformed into phase difference signal after delayed transformation, and by its turn Change square wave suspect signal into;Sharp element task is provided with first to carry out pulsewidth counting;Secondly it is more accurate to count to pulsewidth;Most Facilitate the realization of algorithm of the invention afterwards.
Preferably, the model of total sampling number includes: σ=1/f010a, σ -- the suspect signal precision, f0-- The signal frequency of the signal to be detected, total sampling number described in 10a--.
Preferably, the high-frequency model of detection of the detection square-wave signal includes: f1=(1+1/10a) f0, f1-- institute State the detection high-frequency of detection square-wave signal.
Preferably, the low-frequency model of detection of the detection square-wave signal includes: f2=(1-1/10a) f0, f2-- institute State the detection low frequency of detection square-wave signal.
Preferably, the model of the phase information of the signal to be detected includes: the π of Δ θ=2 N (1)/10a, N (1) -- The pulsewidth number information of the phase difference signal to be checked, Δ θ -- the phase difference of the signal to be detected.
A kind of detection system of the phase difference of homogenous frequency signal, comprising: total sampling number obtains module, obtains and letter to be detected Number and frequency it is identical and with reference phase reference signal, and according to the signal frequency of the signal to be detected combine it is required The total sampling number of detection accuracy acquisition of information;Signal acquisition module to be detected obtains module with the detection accuracy and is electrically connected, will The reference signal and the signal to be detected are combined into phase difference signal to be checked identical with the signal frequency to be detected;To Pulsewidth statistical module is detected, is electrically connected with the data obtaining module to be detected, the difference to be checked is obtained according to signal frequency The pulsewidth number information of signal;Phase information obtains module, is electrically connected with the pulsewidth statistical module to be detected, according to required Detection accuracy information and the pulsewidth number acquisition of information described in signal to be detected phase information.
In the present invention, phase difference detection method is based on premise known to measured signal frequency, by extending in the time domain Requirement to sample clock frequency is converted to the requirement of sampling clock precision by sampling number, to reach reduction detection The purpose of circuit work frequency.
Compared with prior art, the present invention provides the detection method and system of a kind of signal phase difference, at least brings following A kind of technical effect:
In the present invention, total sampling number is obtained by detection accuracy, further according to total sampling number, is sought pair The detection frequency of signal to be detected is finally completed according to the pulsewidth number of the signal to be detected of detection frequency acquisition cycle time Signal phase difference to be detected is sought;The detection frequency that the present invention obtains maintains near the frequency of signal to be detected;Therefore exist During engineering detecting, it not will increase characterization processes;The more detection process adapted to, especially suitable for High-precision high-frequency rate Signal to be detected, the present invention solve the problems, such as to detect using small difference frequency clock sampling signal with frequency phase difference.
Detailed description of the invention
Below by clearly understandable mode, preferred embodiment is described with reference to the drawings, the inspection to a kind of signal phase difference Method and system characteristic, technical characteristic, advantage and its implementation is surveyed to be further described.
Fig. 1 is a kind of flow chart of detection method one embodiment of signal phase difference of the present invention;
Fig. 2 is a kind of flow chart of another embodiment of the detection method of signal phase difference of the present invention;
Fig. 3 is a kind of flow chart of another embodiment of the detection method of signal phase difference of the present invention;
Fig. 4 is a kind of structure chart of detection system one embodiment of signal phase difference of the present invention;
Fig. 5 is the signal graph of signal transformation embodiment of the present invention;
Fig. 6 is the Supreme People's Procuratorate's measured frequency embodiment statistical chart of the present invention;
Fig. 7 is the low detection frequency embodiment statistical chart of the present invention;
Fig. 8 is a kind of structure chart of another embodiment of the detection system of signal phase difference of the present invention.
Specific embodiment
In order to more clearly explain the embodiment of the invention or the technical proposal in the existing technology, Detailed description of the invention will be compareed below A specific embodiment of the invention.It should be evident that drawings in the following description are only some embodiments of the invention, for For those of ordinary skill in the art, without creative efforts, it can also be obtained according to these attached drawings other Attached drawing, and obtain other embodiments.
To make simplified form, part related to the present invention is only schematically shown in each figure, they are not represented Its practical structures as product.In addition, there is identical structure or function in some figures so that simplified form is easy to understand Component only symbolically depicts one of those, or has only marked one of those.Herein, "one" is not only indicated " only this ", can also indicate the situation of " more than one ".
The present invention provides a kind of one embodiment of the detection method of signal phase difference, comprising: step S100 obtains to be checked It surveys signal and frequency is identical and reference signal with reference phase, and according to the signal frequency combination institute of the signal to be detected The total sampling number of detection accuracy acquisition of information needed;The reference signal and the signal to be detected are combined by step S200 Phase difference signal to be checked identical with the signal frequency to be detected.Step S300, which obtains the difference to be checked according to signal frequency, to be believed Number pulsewidth number information;Step S400 is to be checked according to required detection accuracy information and the pulsewidth number acquisition of information Survey the phase information of signal.
Specifically, in the present embodiment, with reference to shown in Fig. 1 and Fig. 5;Assuming that the frequency of reference signal V1 and measured signal V2 For f0, frequency identical reference signal V1 and measured signal V2 are first for conversion into phase difference signal F to be checked, signal by amplification is whole The frequency of F is f0, if system requires to be σ to the detection accuracy of F pulsewidth, is asked according to the frequency f0 of detection accuracy and suspect signal Take total sampling number, the model that total sampling number calculates are as follows: σ=1/f010a, it is possible thereby to acquire total sampling number 10a; The pulsewidth number information of phase difference signal F to be checked assumes that the value of final counter is N (1), and the phase difference of the signal to be detected is believed The model of breath includes: the π of Δ θ=2 N (1)/10a.
In the present invention, phase difference detection method is based on premise known to measured signal frequency, by extending in the time domain Requirement to sample clock frequency is converted to the requirement of sampling clock precision by sampling number, to reach reduction detection The purpose of circuit work frequency.
Preferably, the step S300 further include: step S310 is obtained according to the required accuracy information of the signal to be detected The signal frequency is taken, and detection square-wave signal is generated according to the signal frequency;Wherein, the signal of the detection square-wave signal Frequency is the detection high-frequency higher than the signal frequency to be detected or the detection low frequency lower than the signal frequency to be detected; Step S320 is compared according to the detection square-wave signal with the phase difference signal to be checked;Step S330 is according to the step The result that S320 is compared detects the pulsewidth number of the phase difference signal to be checked;Step 340 is believed according to the detection square wave Number signal frequency obtain the pulsewidth number of the phase difference signal to be checked that the step S330 is detected and added up.
Specifically, the present embodiment is the another embodiment provided based on the above embodiment;Shown in referring to figs. 2 and 5; Detecting high-frequency is the f1 in Fig. 6, and detection low frequency is the f2 in Fig. 7;It will be respectively the side detecting frequency and generating with f1 and f2 Wave signal is compared with phase difference signal f0=f to be checked, is compared according to the speed of time delay, detects difference to be checked The pulsewidth that signal F is generated under different conditions in setting, i.e., the high level number in a cycle carry out cumulative statistics, count fruit Become N (1);The high-frequency calculation method of detection of the detection square-wave signal are as follows: f1=(1+1/10a) f0, the detection side The low-frequency calculation method of the detection of wave signal are as follows: f2=(1-1/10a) f0;Total sampling number is 10a times.
In the present invention, according to the detection accuracy of signal to be detected, total sampling number is sought, further according to total sampling time Number obtains detection frequencies, the detection frequency that the algorithm that provides through the invention obtains well below the prior art detection frequency, Two kinds of detection frequencies are provided simultaneously;One reduce the testing conditions of measured signal, and two pass through two kinds of relatively low detections Frequency can mutually provide verifying, be guaranteed for the accuracy of signal detection to be detected, solve low with high-frequency detection The problem of frequency signal, reduces its calculation amount, detects more quick.
Preferably, the step S330 includes: step S331 when the detection high-frequency is in high level, detects institute One-accumulate is carried out when stating phase difference signal to be checked from failing edge to rising edge;Execute step S340;Preferably, the step S330 Further include: step S332 when the detection low frequency is in high level, detect the phase difference signal to be checked from rising edge to One-accumulate is carried out when failing edge;Execute step S340;
Specifically, the present embodiment is the another embodiment provided based on the above embodiment;With reference to shown in Fig. 3;In conjunction with Fig. 6 is the schematic diagram of signal sampling as indicated, f1 is to detect the difference frequency signal generated under the conditions of high-frequency.Due between f1 and f0 There are small frequency difference, f1 is slightly faster than f0, therefore can sample from the failing edge of F signal to its rising edge in sampling process, This time period counter can add one in the rising edge of each f1.And when the rising edge of f1 is located between the low period of F, counter is protected It holds constant.Fig. 7 another kind method is by generating a clock signal more smaller than reference frequency f0, such as f2 as detection low frequency The difference frequency signal generated under the conditions of rate, to F signal phase difference detect, final phase difference calculating formula is identical as above formula, with The difference of f1 sampling is that f1 is rising edge to be sampled from the failing edge of F, and f2 is because slightly slower than F, is from signal F Rising edge samples failing edge, and total sampling number is 10a times.
In the present invention, the arteries and veins of signal to be detected is obtained in the detection cycle of setting by the different detection frequencies of setting Wide number;It is transformed into square-wave signal by will test signal, pulsewidth number, this kind are obtained by the variation of rising edge or decline Detection mode is more intuitive, convenient.
Preferably, the step S200 further include: step S210 distinguishes the reference signal and the signal to be detected It is transformed into the square-wave signal of same frequency;Step S220 is transformed with frequency by the reference signal and the signal difference to be detected The square-wave signal of rate carries out two divided-frequency transformation;Step S230 further by after two divided-frequency the reference signal with it is described to be detected The square-wave signal of signal carries out logical operation and obtains the phase difference signal to be checked identical with the signal frequency to be detected.
Specifically, the present embodiment is the another embodiment provided based on the above embodiment;With reference to shown in Fig. 3;In conjunction with Shown in Fig. 5;A-- amplitude, sin ω t-- reference signal, the model that reference signal is transformed into square-wave signal includes: B (t)=A Sgn [sin ω t], the waveform established are B;The model that signal to be detected is transformed into square-wave signal includes: C (t)=Asgn [sin (ω t- θ)], 0≤θ <, 2 π, θ -- phase difference, sin (ω t- θ) -- the signal to be detected, the waveform established are C;Through Waveform B becomes D after crossing two divided-frequency transformation, and waveform C becomes E, and D and E waveform carry out XOR operation, be transformed into the F with f0 same frequency Phase difference signal as to be checked, the difference for carrying out phase difference detection using f1 and f2 are as shown in Figure 6 and Figure 7: since f1 is slightly faster than F letter Number f0, therefore the rising edge of f1 can move from right to left along F signal in the sampling process to F signal;And f2 is slightly slower than F The f0 of signal, therefore the rising edge of f2 can be moved from left to right along F signal in the sampling process to F signal.F1 and f2 exist Every period by a F will deviate a regular time Δ t=1/f010a relative to F;Therefore 10a F period it Afterwards, a cycle of the f1 and f2 with regard to can completely traversal F.
In the present invention, by signal to be detected by being further transformed into phase difference signal after delayed transformation, and by its turn Change square wave suspect signal into;Sharp element task is provided with first to carry out pulsewidth counting;Secondly it is more accurate to count to pulsewidth;Most Facilitate the realization of algorithm of the invention afterwards.
The present invention also provides a kind of one embodiment of the detection method of signal phase difference, refering to what is shown in Fig. 3, comprising: Step S100 obtains signal to be detected and frequency is identical and reference signal with reference phase, and according to the signal to be detected Signal frequency combine the required total sampling number of detection accuracy acquisition of information;Step S210 by the reference signal and it is described to Detection signal is transformed into the square-wave signal of same frequency respectively;Step S220 distinguishes the reference signal and the signal to be detected The square-wave signal of transformed same frequency carries out two divided-frequency transformation;Step S230 is further by the reference signal after two divided-frequency It is obtained with the progress logical operation of the square-wave signal of the signal to be detected identical described to be checked with the signal frequency to be detected Phase difference signal;Step S310 signal frequency according to the required accuracy acquisition of information of the signal to be detected, and according to described Signal frequency generates detection square-wave signal;Wherein, the signal frequency of the detection square-wave signal is higher than the signal to be detected The detection high-frequency of frequency or detection low frequency lower than the signal frequency to be detected;Step S320 is according to the detection square wave Signal is compared with the phase difference signal to be checked;Step S331 detects institute when the detection high-frequency is in high level One-accumulate is carried out when stating phase difference signal to be checked from failing edge to rising edge;Execute step S340;Step S332 works as the detection When low frequency is in high level, one-accumulate is carried out when detecting the phase difference signal to be checked from rising edge to failing edge;It executes Step S340;Step 340 obtains the institute that the step S330 is detected and added up according to the signal frequency of the detection square-wave signal State the pulsewidth number of phase difference signal to be checked;Step S400 is according to required detection accuracy information and the pulsewidth number acquisition of information The phase information of the signal to be detected.
Specifically, sin ω t is benchmark signal, sin (ω t- θ) is signal to be detected, and generating θ by delayer is phase Difference, 0≤θ <, 2 π;Its reference signal and the frequency of letter to be detected are f0, refering to what is shown in Fig. 5, further progress amplifies the side of being shaped as Wave signal, A-- amplitude, the model that reference signal is transformed into square-wave signal includes: B (t)=Asgn [sin ω t], is established Waveform is B;The model that signal to be detected is transformed into square-wave signal includes: C (t)=Asgn [sin (ω t- θ)], is established Waveform is C;Waveform B becomes D after two divided-frequency converts, and waveform C becomes E, and D and E waveform carry out XOR operation, is transformed into and f0 The F of same frequency is phase difference signal to be checked;According to precision it is known that calculating the model that total sampling number calculates is σ=1/f0 10a;It is possible thereby to acquire total sampling number 10a;Detection frequency is further sought, according to detection frequency transformation at than to be checked Two kinds of high and low detection frequencies of measured frequency, and square-wave signal is generated, detect the high-frequency calculation method of detection of square-wave signal Are as follows: f1=(1+1/10a) f0 detects the low-frequency calculation method of detection of square-wave signal are as follows: f2=(1-1/10a) f0;It utilizes Detection square-wave signal is compared with square-wave signal to be detected, seeks the signal F in a detection cycle and unites at different frequencies The pulsewidth number N (1) of meter;Thus according to the model of the phase information of signal to be detected: the π of Δ θ=2 N (1)/10a is acquired Phase difference.
In the present invention, total sampling number is obtained by detection accuracy, further according to total sampling number, is sought pair The detection frequency of signal to be detected is finally completed according to the pulsewidth number of the signal to be detected of detection frequency acquisition cycle time Signal phase difference to be detected is sought;The detection frequency that the present invention obtains maintains near the frequency of signal to be detected;Therefore exist During engineering detecting, it not will increase characterization processes;The more detection process adapted to, especially suitable for High-precision high-frequency rate Signal to be detected, the present invention solve the problems, such as to detect using small difference frequency clock sampling signal with frequency phase difference.
A kind of detection system of the phase difference of homogenous frequency signal, comprising: total sampling number obtains module 100, obtain with it is to be checked It surveys signal and frequency is identical and reference signal with reference phase, and according to the signal frequency combination institute of the signal to be detected The total sampling number of detection accuracy acquisition of information needed;Signal acquisition module 200 to be detected obtains module with the detection accuracy 100 electrical connections, by the reference signal and the signal to be detected be combined into it is identical with the signal frequency to be detected to Phase-detecting difference signal;Pulsewidth statistical module 300 to be detected is electrically connected with the data obtaining module 200 to be detected, according to signal frequency Rate obtains the pulsewidth number information of the phase difference signal to be checked;Phase information obtains module 400, unites with the pulsewidth to be detected Module 300 is counted to be electrically connected, the signal to be detected according to required detection accuracy information and the pulsewidth number acquisition of information Phase information.
Specifically, in the present embodiment, with reference to shown in Fig. 4 combination Fig. 5,6,8;Total sampling number obtains 100 system of module Total sampling number 10a is obtained by preset detection accuracy, it is assumed that σ=1ns, and signal frequency to be detected is 100KHz, root According to model formation σ=1/f010a, i.e. 1ns=1/100KHz10a, a=4 is extrapolated;Sin ω t is benchmark signal, according to It is signal to be detected that signal acquisition module 200 to be detected, which obtains sin (ω t- θ), and generating θ by delayer is phase difference, 0≤θ 2 π of <;Its reference signal and the frequency of letter to be detected are f0, refering to what is shown in Fig. 5, further progress amplification is shaped as square-wave signal, A-- amplitude, the model that reference signal is transformed into square-wave signal includes: B (t)=Asgn [sin ω t], and the waveform established is B;The model that signal to be detected is transformed into square-wave signal includes: C (t)=Asgn [sin (ω t- θ)], and the waveform established is C;Waveform B becomes D after two divided-frequency converts, and waveform C becomes E, and D and E waveform carry out XOR operation, be transformed into and f0 same frequency F be phase difference signal to be checked;Detection frequency is further sought, frequency is detected according to pulsewidth statistical module 300 to be detected and is become It changes the two kind detection frequencies more high and low than measured frequency to be checked into, and generates square-wave signal, detect the detection high-frequency of square-wave signal Calculation method are as follows: f1=(1+1/10a) f0 detects the low-frequency calculation method of detection of square-wave signal are as follows: f2=(1-1/ 10a)f0;F1 and f2 passes through clock generation circuit module PLL40.Therefore in the present embodiment, the frequency for detecting square-wave signal is f1 The clock signal of=100.01KHz or f2=99.99KHz samples difference frequency signal F, if what rising edge clock sampled F signal is high level, then counter adds 1, if the F signal sampled is low level, counter is constant;Believed using phase difference Breath obtains module 400, after 10a sampling, it is assumed that the value of final counter is N (1), then eventually by phase difference formula: The phase difference detection that precision is 1ns may be implemented in the π of Δ θ=2 N (1)/10a.
In the present invention, phase difference detection method is based on premise known to measured signal frequency, by extending in the time domain Requirement to sample clock frequency is converted to the requirement of sampling clock precision by sampling number, to reach reduction detection The purpose of circuit work frequency.
The present invention also provides one embodiment, refering to what is shown in Fig. 8,10 electricity of reference signal B and suspect signal output module Connection, and the signal C to be detected generated by suspect signal output module 10 generate such as Fig. 5 by phase difference extraction module 20 Shown in F signal, two input signals of reference signal and signal to be detected generate B and C signal by zero-crossing comparator, pass through two Frequency dividing circuit generates D and E signal, generates F signal finally by XOR gate.When detecting the high pulse width of F signal, pulsewidth inspection Slowdown monitoring circuit 30 is made of two counters, and counter 1 is for calculating the number for needing to sample in total, i.e., 10a times, it is assumed that is 10000 times.Second counter is for recording the number for sampling high level.When counter 1 and counter 2 start simultaneously at meter Number can generate a stop signal counter of notifications 2 and stop working when the meter of counter 1 completely 10000 times.If when counter 1 is counted At full 10000 times, counter 2 the result is that b, means that the pulsewidth of F is bns, be scaled phase difference be exactly (2 π b)/ 10000.Phase Difference Measuring Precision representated by each step of counter is 2 π/10000.It is assumed that if when the meter of counter 1 is full At 10000 times, counter 2 the result is that 0, indicate there is no phase difference between reference signal and measured signal;Counter 2 the result is that 1, expression F high pulse width is 1ns, and actual phase difference is 2 π/10000;If 2 result of counter is 10000, F high level is indicated Pulsewidth is 10 μ s, and actual phase difference is 2 π.
It should be noted that above-described embodiment can be freely combined as needed.The above is only of the invention preferred Embodiment, it is noted that for those skilled in the art, in the premise for not departing from the principle of the invention Under, several improvements and modifications can also be made, these modifications and embellishments should also be considered as the scope of protection of the present invention.

Claims (9)

1. a kind of detection method of signal phase difference characterized by comprising
Step S100 obtains signal to be detected and frequency is identical and reference signal with reference phase, and according to described to be detected The signal frequency of signal combines the required total sampling number of detection accuracy acquisition of information;
The reference signal is combined into identical with the signal frequency to phase-detecting by step S200 with the signal to be detected Difference signal;
Step S300 obtains the pulsewidth number information of the phase difference signal to be checked according to the signal frequency;
Step S310 detects frequency according to the required detection accuracy acquisition of information, and is generated and detected according to the detection frequency Square-wave signal;
Wherein, the detection frequency is higher than the detection high-frequency of the signal frequency or low lower than the detection of the signal frequency Frequency;
Step S320 is compared according to the detection square-wave signal with the phase difference signal to be checked;
The result that step S330 is compared according to the step S320 detects the pulsewidth number of the phase difference signal to be checked;
Step 340 step S330 according to the detection frequency acquisition of the detection square-wave signal is detected and is added up described to be checked The pulsewidth number of phase difference signal;
Step S400 signal to be detected according to the required detection accuracy information and the pulsewidth number acquisition of information Phase information.
2. a kind of detection method of signal phase difference according to claim 1, which is characterized in that the step S330 packet It includes:
Step S331 detects the phase difference signal to be checked from failing edge to rising when the detection high-frequency is in high level Along when carry out one-accumulate;Execute step S340.
3. a kind of detection method of signal phase difference according to claim 1, which is characterized in that the step S330 is also wrapped It includes:
Step S332 detects the phase difference signal to be checked from rising edge to decline when the detection low frequency is in high level Along when carry out one-accumulate;Execute step S340.
4. a kind of detection method of signal phase difference according to claim 1, which is characterized in that the step S200 is also wrapped It includes:
The reference signal and the signal to be detected are transformed into the square-wave signal of same frequency by step S210 respectively;
The square-wave signal that the reference signal and the signal to be detected distinguish transformed same frequency is carried out two by step S220 Frequency-separating transform;
The square-wave signal of the reference signal and the signal to be detected after two divided-frequency is further carried out exclusive or by step S230 Operation obtains the phase difference signal to be checked identical with the signal frequency.
5. a kind of detection method of signal phase difference according to claim 1, which is characterized in that total sampling number Model includes:
σ=1/f010a
σ -- the suspect signal precision, the signal frequency of signal to be detected described in f0--,
Total sampling number described in 10a--.
6. a kind of detection method of signal phase difference according to claim 1, which is characterized in that the detection square-wave signal The high-frequency model of detection include:
F1=(1+1/10a) f0,
The detection high-frequency of square-wave signal is detected described in f1--.
7. a kind of detection method of signal phase difference according to claim 1, which is characterized in that the detection square-wave signal The low-frequency model of detection include:
F2=(1-1/10a) f0,
The detection low frequency of square-wave signal is detected described in f2--.
8. a kind of detection method of signal phase difference according to claim 1, which is characterized in that the signal to be detected The model of phase information includes:
The π of Δ θ=2 N (1)/10a,
The pulsewidth number information of N (1) -- the phase difference signal to be checked,
Δ θ -- the phase difference of the signal to be detected.
9. a kind of any signal phase of claim 1-8 can be performed in a kind of detection system of the phase difference of homogenous frequency signal The detection method of difference characterized by comprising
Total sampling number obtains module, obtains reference signal identical as signal to be detected and frequency and with reference phase, and The required total sampling number of detection accuracy acquisition of information is combined according to the signal frequency of the signal to be detected;
Signal message to be detected obtains module, obtains module with detection accuracy and is electrically connected, by the reference signal with it is described to be checked It surveys signal and is combined into phase difference signal to be checked identical with the signal frequency;
Pulsewidth statistical module to be detected obtains module with the signal message to be detected and is electrically connected, obtained according to the signal frequency Take the pulsewidth number information of the phase difference signal to be checked;
Phase information obtains module, is electrically connected with the pulsewidth statistical module to be detected, according to required detection accuracy information With the phase information of signal to be detected described in the pulsewidth number acquisition of information.
CN201610907926.8A 2016-10-18 2016-10-18 A kind of detection method and system of signal phase difference Active CN106645952B (en)

Priority Applications (1)

Application Number Priority Date Filing Date Title
CN201610907926.8A CN106645952B (en) 2016-10-18 2016-10-18 A kind of detection method and system of signal phase difference

Applications Claiming Priority (1)

Application Number Priority Date Filing Date Title
CN201610907926.8A CN106645952B (en) 2016-10-18 2016-10-18 A kind of detection method and system of signal phase difference

Publications (2)

Publication Number Publication Date
CN106645952A CN106645952A (en) 2017-05-10
CN106645952B true CN106645952B (en) 2019-06-25

Family

ID=58855959

Family Applications (1)

Application Number Title Priority Date Filing Date
CN201610907926.8A Active CN106645952B (en) 2016-10-18 2016-10-18 A kind of detection method and system of signal phase difference

Country Status (1)

Country Link
CN (1) CN106645952B (en)

Families Citing this family (5)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
CN109698804B (en) * 2017-10-23 2021-07-16 上海华虹计通智能系统股份有限公司 Demodulation module, demodulation circuit and high-frequency card reader
CN111351958B (en) * 2018-12-21 2021-11-02 上海华虹计通智能系统股份有限公司 Time delay detection method and device, and fluid speed measurement method and system
CN111281396B (en) * 2020-01-22 2022-09-06 哈尔滨理工大学 Super-resolution method for respiratory motion signals of chest and abdomen surfaces
CN113359021B (en) * 2021-06-23 2022-10-21 深圳市锦祥自动化设备有限公司 Static synchronous check relay and high-precision phase difference and amplitude difference judgment system
CN113702701A (en) * 2021-08-09 2021-11-26 成都玖锦科技有限公司 Amplitude-phase characteristic measuring method based on comb wave signal

Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO1989001634A1 (en) * 1984-10-25 1989-02-23 Asix Systems Corporation Method of measuring skew or phase difference in electronic systems
CN101031805A (en) * 2004-10-01 2007-09-05 松下电器产业株式会社 Phase difference measuring circuit
KR20100051167A (en) * 2008-11-07 2010-05-17 한국표준과학연구원 Phase angle error measurement apparatus of shunt resistance using pulse counting and measurement method thereof
CN102095934A (en) * 2010-12-17 2011-06-15 南京邮电大学 Measuring method for phase difference of alternating current signals
CN201917612U (en) * 2010-09-30 2011-08-03 上海华建电力设备股份有限公司 Phase difference measuring device
CN102426294A (en) * 2011-08-05 2012-04-25 北京星网锐捷网络技术有限公司 Clock phase difference measurement method and device
CN103197145A (en) * 2013-03-02 2013-07-10 西安电子科技大学 Method and system of ultrahigh resolution phase difference measurement
CN103499742A (en) * 2013-10-18 2014-01-08 河南省计量科学研究院 Method for reducing influence on high-precision phase measurement due to signal amplitude change
CN103809025A (en) * 2012-11-15 2014-05-21 上海船舶运输科学研究所 Ship generator set grid-connected phase difference detection method

Patent Citations (9)

* Cited by examiner, † Cited by third party
Publication number Priority date Publication date Assignee Title
WO1989001634A1 (en) * 1984-10-25 1989-02-23 Asix Systems Corporation Method of measuring skew or phase difference in electronic systems
CN101031805A (en) * 2004-10-01 2007-09-05 松下电器产业株式会社 Phase difference measuring circuit
KR20100051167A (en) * 2008-11-07 2010-05-17 한국표준과학연구원 Phase angle error measurement apparatus of shunt resistance using pulse counting and measurement method thereof
CN201917612U (en) * 2010-09-30 2011-08-03 上海华建电力设备股份有限公司 Phase difference measuring device
CN102095934A (en) * 2010-12-17 2011-06-15 南京邮电大学 Measuring method for phase difference of alternating current signals
CN102426294A (en) * 2011-08-05 2012-04-25 北京星网锐捷网络技术有限公司 Clock phase difference measurement method and device
CN103809025A (en) * 2012-11-15 2014-05-21 上海船舶运输科学研究所 Ship generator set grid-connected phase difference detection method
CN103197145A (en) * 2013-03-02 2013-07-10 西安电子科技大学 Method and system of ultrahigh resolution phase difference measurement
CN103499742A (en) * 2013-10-18 2014-01-08 河南省计量科学研究院 Method for reducing influence on high-precision phase measurement due to signal amplitude change

Also Published As

Publication number Publication date
CN106645952A (en) 2017-05-10

Similar Documents

Publication Publication Date Title
CN106645952B (en) A kind of detection method and system of signal phase difference
CN101806832B (en) Measuring method for frequencies of low-frequency signals
CN103487649B (en) Method and device capable of measuring both frequency of continuous waves and frequency of pulse modulation carrier waves
CN102116798A (en) Power grid frequency measurement method and device
CN107728460B (en) A kind of high-resolution time interval measurement method
CN103383412B (en) A kind of method of self-adaptation software and hardware frequency-tracking sampling
CN102928677A (en) Nano pulse signal acquiring method
CN101907656B (en) Method for measuring phase difference of common-frequency signal with fixed phase drift
CN109490624B (en) Pulse signal frequency measurer
CN105699738A (en) PWM-based AC signal effective value measurement method
CN103968960B (en) Method for measuring synchronization precision of synchronous pulse laser
CN103075968A (en) High-frequency digital signal edge locking-based laser heterodyne interference signal processing method
CN102809687A (en) Digital measurement method for alternating-current frequency
CN201859177U (en) Measurement module for low-frequency alternating current signal in relay protection device
CN106772193B (en) Measuring method using current transformer frequency characteristic measuring device
CN206223867U (en) A kind of phase detection device
CN103575981A (en) Method for accurately measuring alternating current frequency
CN103575979A (en) Method for digital measuring of alternating current frequency
CN101702617B (en) High-precision +/-180 DEG digital phase distinguishing method and applying device thereof
Wei et al. The study of spread spectrum time domain reflectometry for cable fault detection and location on-line
CN102928666A (en) Digital measurement method for phase difference of alternating current
KR20150015200A (en) Device for measuring frequency of power based on zero-crossing and method for measuring frequency of power based on zero-crossing
CN106018962B (en) Phase difference is the automatic digital phase discriminator and system of 0 to 2 π between a kind of signal
CN103529687B (en) Pulse interval measuring device
CN104808060A (en) Method for digitally measuring the phase difference of electrical signals

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