High-precision digital phase discrimination method and digital algorithm phase discriminator
By synchronously sampling and processing triangular wave and beat frequency signals, the Fourier coefficient is calculated to measure the phase difference, which solves the inaccurate positioning and noise sensitivity of phase difference measurement in the prior art, and realizes phase difference measurement with high accuracy and low computing power requirements.
Patent Information
- Application Number
- CN202510074662.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2025-01-15
- Publication Date
- 2025-05-06
AI Technical Summary
The prior art has problems such as inaccurate positioning, sensitivity to noise, high hardware computing power requirements and low accuracy in phase difference measurement.
By synchronously sampling the triangular wave and beat frequency signals, analog-to-digital conversion and slope detection are performed, the cutting signal is the rising edge and the falling edge, the Fourier coefficient is calculated, and the phase difference between the two signals is calculated.
Effectively avoid the problem of inaccurate positioning, improve the signal-to-noise ratio of the beat frequency signal, reduce the requirements for hardware computing power, and significantly improve the calculation rate and accuracy.
Smart Images

Figure CN119936485A_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the technical field of phase detector signal processing, and more specifically to a high-precision digital phase difference detection method and a digital algorithm phase detector. Background Art
[0002] Phase detectors are widely used in laser phase ranging, interferometric direction finding, motor control, phase-locked loops, laser displacement interferometers and other fields. Their core function is to measure the phase difference between two signals. According to different implementation methods, phase detectors can be divided into two categories: analog phase detectors and digital phase detectors. Analog phase detectors are gradually replaced by digital phase detectors because they use discrete components, have a narrow linear phase detection range and low measurement accuracy. Digital phase detectors are further divided into digital circuit phase detectors based on hardware circuits and digital algorithm phase detectors based on software algorithms. The latter obtains discrete digital signals through sampling and uses digital signal processing (DSP) algorithms to accurately measure phase differences. With processors such as CPU, MPU or DSP as core units, it exhibits the advantages of simple circuits, strong anti-interference ability and high measurement accuracy, and occupies a dominant position in high-precision phase detection applications.
[0003] The traditional phase difference measurement method is based on pulse edge triggering. The disadvantage of this method is that only the position with a phase difference of π or 2π can be detected, while the intermediate process of phase change is ignored. Phase difference measurement based on time resolution is the main method currently used. Typical methods include the zero-point method, extreme value method, centroid peak method, cross-correlation method, etc. These methods mainly demodulate the phase of the sinusoidal beat frequency signal generated by heterodyne interference, retaining the process of continuous phase change, but due to the existence of DC components in the beat frequency signal, current high-frequency noise and laser frequency modulation nonlinearity.
[0004] In general, existing phase demodulation methods partially rely on feature point positioning, are partially greatly affected by noise, have high requirements on hardware computing power, and require a higher sampling rate to ensure accuracy. Summary of the invention
[0005] The technical problem to be solved by the present invention is to provide a high-precision digital phase difference detection method and a digital algorithm phase detector in view of the problems existing in the prior art.
[0006] The technical solution adopted by the present invention to solve the technical problem is: constructing a high-precision digital phase difference detection method, comprising the following steps:
[0007] synchronously sampling the triangular wave and the beat frequency signal to obtain a triangular wave signal and a beat frequency signal;
[0008] Performing analog-to-digital conversion processing on the triangular wave signal and the beat frequency signal respectively to obtain a triangular wave digital signal and a beat frequency digital signal;
[0009] Performing slope detection on the triangular wave digital signal to obtain a discrete index array synchronized with the slope of the triangular wave digital signal;
[0010] Cutting the beat frequency digital signal based on the discrete index array to obtain a plurality of segments of rising edge signals and a plurality of segments of falling edge signals;
[0011] Perform calculation based on the plurality of rising edge signals and the plurality of falling edge signals to obtain a plurality of groups of first Fourier coefficients and second Fourier coefficients;
[0012] A calculation is performed based on each group of the first Fourier coefficients and the second Fourier coefficients to obtain a phase difference between two signals; the two signals are a rising edge signal and a falling edge signal of the beat frequency signal.
[0013] In the high-precision digital phase difference detection method of the present invention, the slope detection of the triangular wave digital signal to obtain a discrete index array synchronized with the slope of the triangular wave digital signal includes:
[0014] Performing Fourier transform on the triangular wave digital signal to obtain a sinusoidal signal synchronized with the triangular wave digital signal;
[0015] Processing is performed based on the sinusoidal signal to obtain a discrete index array synchronized with the slope of the triangle wave digital signal.
[0016] In the high-precision digital phase difference detection method of the present invention, the process of performing Fourier transform on the triangular wave digital signal to obtain a sinusoidal signal synchronized with the triangular wave digital signal comprises:
[0017] Performing discrete Fourier transform on the triangular wave digital signal to obtain one-dimensional Fourier coefficients;
[0018] The Fourier coefficients other than the frequency of the triangular wave digital signal in the one-dimensional Fourier coefficients are set to zero to obtain a frequency domain signal related to the frequency and phase of the triangular wave digital signal;
[0019] Perform an inverse Fourier transform on the frequency domain signal to obtain the sinusoidal signal.
[0020] In the high-precision digital phase difference detection method of the present invention, the processing based on the sinusoidal signal to obtain a discrete index array synchronized with the slope of the triangular wave digital signal includes:
[0021] Performing differential processing on the sinusoidal signal to obtain a slope array;
[0022] The slope array is subjected to sign extraction processing to obtain a discrete index array synchronized with the slope of the triangle wave digital signal.
[0023] In the high-precision digital phase difference detection method of the present invention, the plurality of rising edge signals and the plurality of falling edge signals are synchronized with the triangular wave digital signal.
[0024] In the high-precision digital phase difference detection method of the present invention, the calculation based on the plurality of rising edge signals and the plurality of falling edge signals to obtain a plurality of groups of first Fourier coefficients and second Fourier coefficients comprises:
[0025] Performing discrete Fourier transform on each group of adjacent signals in the plurality of rising edge signals and the plurality of falling edge signals to obtain a Fourier coefficient group of each group of adjacent signals; each group of adjacent signals is a rising edge signal and a falling edge signal that are adjacent in time;
[0026] Calculation is performed based on the Fourier coefficient group of each group of adjacent signals to obtain the plurality of groups of first Fourier coefficients and second Fourier coefficients.
[0027] In the high-precision digital phase difference detection method of the present invention, the calculation based on the Fourier coefficient group of each group of adjacent signals to obtain the plurality of groups of first Fourier coefficients and second Fourier coefficients includes:
[0028] Perform amplitude calculation based on the Fourier coefficient group of the temporally adjacent rising edge signals to obtain a first amplitude array;
[0029] The first Fourier coefficient is obtained by searching based on the first amplitude array; the first Fourier coefficient is: the Fourier coefficient with the largest amplitude and positive frequency in the temporally adjacent rising edge signals except for zero frequency.
[0030] In the high-precision digital phase difference detection method of the present invention, the calculation based on the Fourier coefficient group of each group of adjacent signals to obtain the plurality of groups of first Fourier coefficients and second Fourier coefficients includes:
[0031] Perform amplitude calculation based on the Fourier coefficient group of the temporally adjacent falling edge signals to obtain a second amplitude array;
[0032] The second Fourier coefficient is obtained by searching based on the second amplitude array; the second Fourier coefficient is: the Fourier coefficient with the largest amplitude and positive frequency in the temporally adjacent falling edge signals except for zero frequency.
[0033] In the high-precision digital phase difference detection method of the present invention, the calculation based on each group of the first Fourier coefficients and the second Fourier coefficients to obtain the phase difference between the two signals includes:
[0034] Dividing each group of the first Fourier coefficients and the second Fourier coefficients to obtain each group of quotient values;
[0035] An arc tangent operation is performed on the quotient to obtain the phase difference.
[0036] The present invention also provides a digital algorithm phase detector, which is applied to the above-mentioned high-precision digital phase difference detection method, comprising:
[0037] A dual-channel synchronous sampling unit, used for synchronously sampling the triangular wave and the beat frequency signal to obtain the triangular wave signal and the beat frequency signal;
[0038] an analog-to-digital conversion unit, configured to perform analog-to-digital conversion processing on the triangular wave signal and the beat frequency signal respectively to obtain a triangular wave digital signal and a beat frequency digital signal;
[0039] A slope detection unit, used to perform slope detection on the triangular wave digital signal to obtain a discrete index array synchronized with the slope of the triangular wave digital signal;
[0040] A signal segmentation unit, used for segmenting the beat frequency digital signal based on the discrete index array to obtain a plurality of segments of rising edge signals and a plurality of segments of falling edge signals;
[0041] A phase calculation unit, configured to perform calculation based on the plurality of rising edge signals and the plurality of falling edge signals to obtain a plurality of groups of first Fourier coefficients and second Fourier coefficients;
[0042] A phase difference calculation unit is used to calculate based on each group of the first Fourier coefficients and the second Fourier coefficients to obtain the phase difference of two signals; the two signals are the rising edge signal and the falling edge signal of the beat frequency signal.
[0043] The high-precision digital phase difference detection method and digital algorithm phase detector of the present invention have the following beneficial effects: including: synchronous sampling of triangular wave signals and beat frequency signals; analog-to-digital conversion of signals to obtain triangular wave digital signals and beat frequency digital signals; slope detection of triangular wave digital signals to obtain discrete index arrays synchronized with the slope of triangular wave digital signals; cutting of beat frequency digital signals based on discrete index arrays to obtain several segments of rising edge signals and falling edge signals; calculation based on several segments of rising edge signals and falling edge signals to obtain several groups of first Fourier coefficients and second Fourier coefficients; calculation based on each group of first Fourier coefficients and second Fourier coefficients to obtain the phase difference of two signals. The present invention can effectively avoid the problem of inaccurate positioning, effectively resist noise while improving the signal-to-noise ratio of beat frequency signals, significantly improve the calculation rate, reduce the requirements for hardware computing power, and improve the accuracy of phase detection. BRIEF DESCRIPTION OF THE DRAWINGS
[0044] The present invention will be further described below with reference to the accompanying drawings and embodiments, in which:
[0045] Figure 1 It is a flow chart of the high-precision digital phase difference detection method provided by the present invention;
[0046] Figure 2 is a schematic diagram of a triangle wave and a beat frequency signal provided by the present invention;
[0047] Figure 3 It is a principle block diagram of the digital algorithm phase detector provided by the present invention. DETAILED DESCRIPTION
[0048] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0049] The present invention provides a high-precision digital phase difference detection method to eliminate the errors introduced by noise and tuning nonlinearity in the traditional phase difference detection method that relies on feature points, and reduce the requirements for hardware computing power and sampling rate. The high-precision digital phase difference detection method of the present invention is obtained by combining Fourier transform and triangular tuned continuous wave laser interference technology. Specifically, by performing Fourier transform on the segmented beat frequency signal, while removing the DC component and noise, find the frequency domain coefficient that is most relevant to the signal frequency, that is, the one with the largest power, and then divide the Fourier coefficients obtained at the rising edge and the falling edge respectively and demodulate them to obtain displacement information. Compared with the existing algorithm for demodulating the signal of tuning continuous wave laser interference, the present invention gets rid of the problem of inaccurate positioning existing in the previous phase demodulation algorithm relying on characteristic points, and also eliminates the influence of DC component and noise on phase demodulation; it can not only realize the high-precision relative distance measurement of the continuously tunable laser under the condition of low sampling rate, but also realize the continuous measurement of relative distance, record the process of the position change of the target object, and then detect the vibration, thermal deformation of the object and other processes, and solve the problem of the traditional laser relative displacement step measurement; finally, the present invention ensures a short operation time and a small amount of operation while maintaining high precision, and solves the problem of excessive calculation time commonly existing in the current traditional phase demodulation algorithm. Therefore, the present invention has the advantages of high precision, good stability, and continuous measurement, and can well improve the detection performance of the continuously tunable laser.
[0050] refer to Figure 1 , Figure 1 A schematic flow chart of a preferred embodiment of a high-precision digital phase difference detection method provided by the present invention.
[0051] Specifically, Figure 1 As shown, the high-precision digital phase difference detection method comprises the following steps:
[0052] Step S101: synchronously sampling the triangular wave and the beat frequency signal to obtain a triangular wave signal and a beat frequency signal.
[0053] The high-precision digital phase difference method is suitable for laser interferometric displacement measurement based on frequency modulated continuous wave (FMCW) with triangle wave modulation. When performing phase difference measurement, the modulation wave (ie, triangle wave) and the beat frequency signal need to be collected simultaneously.
[0054] Specifically, in the embodiment of the present invention, a dual-channel method can be used to synchronously sample the triangular wave and the beat frequency signal. Figure 2 As shown in signal A in the figure, the beat frequency signal is Figure 2 As shown in signal B.
[0055] Step S102: performing analog-to-digital conversion processing on the triangle wave signal and the beat frequency signal respectively to obtain a triangle wave digital signal and a beat frequency digital signal.
[0056] By performing analog-to-digital conversion on the triangle wave signal and the beat frequency signal respectively, two corresponding digital signals, namely the triangle wave digital signal and the beat frequency digital signal, can be obtained.
[0057] Step S103: performing slope detection on the triangular wave digital signal to obtain a discrete index array synchronized with the slope of the triangular wave digital signal.
[0058] Optionally, in an embodiment of the present invention, performing slope detection on the triangular wave digital signal to obtain a discrete index array synchronized with the slope of the triangular wave digital signal includes: performing Fourier transform on the triangular wave digital signal to obtain a sinusoidal signal synchronized with the triangular wave digital signal; and performing processing based on the sinusoidal signal to obtain a discrete index array synchronized with the slope of the triangular wave digital signal.
[0059] Among them, the Fourier transform of the triangular wave digital signal to obtain a sinusoidal signal synchronized with the triangular wave digital signal includes: performing a discrete Fourier transform on the triangular wave digital signal to obtain a one-dimensional Fourier coefficient; setting the Fourier coefficients other than the frequency of the triangular wave digital signal in the one-dimensional Fourier coefficient to zero to obtain a frequency domain signal related to the frequency and phase of the triangular wave digital signal; and performing an inverse Fourier transform on the frequency domain signal to obtain the sinusoidal signal.
[0060] Optionally, the processing based on the sinusoidal signal to obtain a discrete index array synchronized with the slope of the triangular wave digital signal includes: performing differential processing on the sinusoidal signal to obtain a slope array; performing sign processing on the slope array to obtain a discrete index array synchronized with the slope of the triangular wave digital signal.
[0061] Specifically, the triangle wave digital signal can be expressed as follows:
[0062]
[0063] Where V(t) is the expression of the triangular wave voltage transformation, t is time, Mod is modulus (that is, remainder), A is the amplitude of the triangular wave, B is the DC component of the triangular wave, and T is the period of the modulated triangular wave.
[0064] Perform discrete Fourier transform on the triangular wave digital signal, and then set the Fourier coefficients except the triangular wave frequency to zero. The specific method is as follows:
[0065] Perform discrete Fourier transform on the triangular wave digital signal to obtain the one-dimensional Fourier transform coefficients:
[0066]
[0067] (2) In the formula, F [k] is an array containing the coefficients of the input signal at the frequency corresponding to the frequency index k, where k is the frequency index, V [n] is the nth sample point of the input discrete signal, which corresponds to a discrete triangular wave signal here, and N is the data length of the input time domain signal.
[0068] Let the corresponding index of the triangle wave frequency be the frequency of y, and remove F [y ] are set to zero, and the frequency domain signal related only to the frequency and phase of the triangle wave is obtained. The sinusoidal signal synchronized with the slope of the triangle wave is obtained by inverse Fourier transform:
[0069]
[0070] (3) where F'[k] is the array after setting some coefficients of F[k] to zero, where X'[ n ] is the sinusoidal discrete signal after inverse Fourier transform, A is the amplitude of the sinusoidal signal, f is the frequency of the sinusoidal signal (corresponding to the frequency of the triangle wave), t[n] represents the time point corresponding to each sample in the discrete time signal, Corresponding to the phase of the sine signal, the above steps can obtain a sine signal that is synchronized with the slope change of the triangle wave. By performing the differential method on X'[n], the array of slope changes can be obtained, as follows:
[0071] ΔX=[(X' 2 -X 1 '), (X 3 '-X' 2 ),...,(X' N -X' N-1 )] (4).
[0072] By performing a sign operation on the slope array ΔX, we can obtain the discrete index arrays of the rising edge and the falling edge, as follows:
[0073] sgn(ΔX)=[+1,+1,...,-1,-1] (5).
[0074] (5) In the formula, sgn(ΔX)=[+1,+1,...,-1,-1] is the sign function, which is defined as follows:
[0075]
[0076] Step S104: cutting the beat frequency digital signal based on the discrete index array to obtain a plurality of segments of rising edge signals and a plurality of segments of falling edge signals.
[0077] Optionally, in an embodiment of the present invention, the plurality of rising edge signals and the plurality of falling edge signals are synchronized with the triangular wave digital signal.
[0078] Specifically, in this step, the beat frequency signal is cut according to the discrete index array (i.e., sgn(ΔX)) obtained in step S103, so as to obtain several segments of rising edge signals and falling edge signals synchronized with the rising edge and falling edge of the triangular wave, i.e., several segments of rising edge signals of the beat frequency signal synchronized with the rising edge of the triangular wave, and several segments of falling edge signals of the beat frequency signal synchronized with the falling edge of the triangular wave.
[0079] Step S105: performing calculations based on the plurality of rising edge signals and the plurality of falling edge signals to obtain a plurality of groups of first Fourier coefficients and second Fourier coefficients.
[0080] Optionally, in an embodiment of the present invention, the calculation based on the several segments of rising edge signals and the several segments of falling edge signals to obtain several groups of first Fourier coefficients and second Fourier coefficients includes: performing discrete Fourier transform on each group of adjacent signals in the several segments of rising edge signals and the several segments of falling edge signals, respectively, to obtain a Fourier coefficient group of each group of adjacent signals. Wherein, each group of adjacent signals is a rising edge signal and a falling edge signal that are adjacent in time; the calculation is performed based on the Fourier coefficient group of each group of adjacent signals to obtain the several groups of first Fourier coefficients and second Fourier coefficients.
[0081] Wherein, the calculation based on the Fourier coefficient group of each group of adjacent signals to obtain the several groups of first Fourier coefficients and second Fourier coefficients includes: performing amplitude calculation based on the Fourier coefficient group of the temporally adjacent rising edge signals to obtain a first amplitude array; searching based on the first amplitude array to obtain the first Fourier coefficient; the first Fourier coefficient is: the Fourier coefficient with the largest amplitude and positive frequency in the temporally adjacent rising edge signals except for zero frequency. The calculation based on the Fourier coefficient group of each group of adjacent signals to obtain the several groups of first Fourier coefficients and second Fourier coefficients includes: performing amplitude calculation based on the Fourier coefficient group of the temporally adjacent falling edge signals to obtain a second amplitude array; searching based on the second amplitude array to obtain the second Fourier coefficient; the second Fourier coefficient is: the Fourier coefficient with the largest amplitude and positive frequency in the temporally adjacent falling edge signals except for zero frequency.
[0082] Specifically, in this step, discrete Fourier transform is performed on each group of temporally adjacent rising edge signals and falling edge signals to obtain a Fourier coefficient group of each group of adjacent signals, wherein the Fourier coefficient group of each group of adjacent signals includes: a Fourier coefficient group corresponding to the rising edge signal and a Fourier coefficient group corresponding to the falling edge signal. That is, the Fourier coefficient group of each group of adjacent signals includes two arrays of Fourier coefficients, which are specifically expressed as follows:
[0083]
[0084] (6) In the formula, Fourier coefficient arrays corresponding to the rising edge and falling edge respectively.
[0085] Then, amplitude calculations are performed on the array of rising edge Fourier coefficients and the array of falling edge Fourier coefficients respectively to obtain a plurality of rising edge amplitudes and a plurality of falling edge amplitudes.
[0086] Searches are performed based on several rising edge amplitudes and several falling edge amplitudes to find the Fourier coefficient with the largest amplitude except zero frequency and positive frequency, as follows:
[0087] Assume the same index y and convert it to exponential form using Euler's formula:
[0088] Let the Fourier coefficients found be:
[0089] F [y] =Re(F [y] )+jIm(F [y] )=a+jb (7).
[0090] (7) In the formula, a = Re (F [y]) is the real part of the coefficient, and b = Im (F [y]) is the imaginary part of the coefficient. Euler's formula is defined as follows:
[0091]
[0092] Among them, |F [y] | is the amplitude, For phase.
[0093] Therefore, according to Euler's formula, the exponential expressions of the rising edge and the falling edge can be obtained as follows:
[0094]
[0095] (8) In the formula, are the Fourier coefficients of the rising and falling edges with frequency index y, arctan() is for inverse tangent, Im is the imaginary part of the complex number, Re is the real part of the complex number, They are the phases of the rising edge and falling edge signals respectively.
[0096] Step S106: performing calculation based on each group of the first Fourier coefficients and the second Fourier coefficients to obtain a phase difference between two signals; the two signals are a rising edge signal and a falling edge signal of the beat frequency signal.
[0097] Optionally, in an embodiment of the present invention, the calculation based on each group of the first Fourier coefficients and the second Fourier coefficients to obtain the phase difference between the two signals includes: dividing each group of the first Fourier coefficients and the second Fourier coefficients to obtain a quotient value for each group; and performing an inverse tangent operation on the quotient value to obtain the phase difference.
[0098] Specifically, by dividing the two Fourier coefficients in each group (i.e., the first Fourier coefficient and the second Fourier coefficient) and calculating the inverse tangent, the phase difference between two adjacent signals (i.e., the rising edge signal and the falling edge signal in the beat frequency signal that are adjacent in time) can be obtained. Specifically as follows:
[0099]
[0100]
[0101] In formula (10), That is, the phase difference between a group of temporally adjacent rising edge signals and falling edge signals in the beat frequency signal.
[0102] refer to Figure 3 The present invention also provides a digital algorithm phase detector, which is applied to the high-precision digital phase difference method disclosed in the embodiment of the present invention.
[0103] Specifically, Figure 3 As shown, the digital algorithm phase detector includes:
[0104] The dual-channel synchronous sampling unit 301 is used to synchronously sample the triangle wave and the beat frequency signal to obtain the triangle wave signal and the beat frequency signal. The dual-channel synchronous sampling unit can be implemented by an AD chip or an AD module built into a chip such as ARM, MCU, or DSP.
[0105] The analog-to-digital conversion unit 302 is used to perform analog-to-digital conversion processing on the triangle wave signal and the beat frequency signal respectively to obtain a triangle wave digital signal and a beat frequency digital signal.
[0106] The slope detection unit 303 is used to perform slope detection on the triangle wave digital signal to obtain a discrete index array synchronized with the slope of the triangle wave digital signal.
[0107] In the embodiment of the present invention, the slope detection unit 303 uses Fourier filtering and inverse Fourier reconstruction methods to preliminarily determine a sine wave with the same slope change as the triangle wave, and obtains a discrete index array synchronized with the slope by performing differential and sign operations on a discrete sine wave array.
[0108] The signal segmentation unit 304 is used to segment the beat frequency digital signal based on the discrete index array to obtain a plurality of segments of rising edge signals and a plurality of segments of falling edge signals.
[0109] In the embodiment of the present invention, the signal segmentation unit 304 divides the beat frequency signal into two groups of data, namely, the rising edge data and the falling edge data, according to the index array output by the slope detection unit 303 .
[0110] The phase calculation unit 305 is used to perform calculation based on the several segments of rising edge signals and the several segments of falling edge signals to obtain several groups of first Fourier coefficients and second Fourier coefficients.
[0111] In the embodiment of the present invention, the phase calculation unit 305 performs Fourier algorithm on the two sets of input data respectively, and outputs the Fourier coefficient of the positive frequency with the largest frequency except zero in the amplitude spectrum.
[0112] The phase difference calculation unit 306 is used to perform calculation based on each group of the first Fourier coefficients and the second Fourier coefficients to obtain the phase difference between two signals; the two signals are the rising edge signal and the falling edge signal of the beat frequency signal.
[0113] Specifically, the specific coordination operation process between the units in the digital algorithm phase detector here can refer to the above-mentioned high-precision digital phase difference detection method, which will not be repeated here.
[0114] The present invention can measure the phase difference between two signals without relying on a certain feature point. Therefore, compared with other phase difference detection algorithms, it can effectively avoid the problem of inaccurate positioning and has stronger applicability.
[0115] The present invention can effectively separate the high-frequency and DC components through this algorithm, effectively suppress the noise while improving the signal-to-noise ratio of the beat frequency signal, thereby improving the applicability of the system. There is no need to perform operations such as traversal, cropping, pre-processing and filtering on the collected signal. Compared with other phase difference algorithms, the calculation speed is improved and the requirements for hardware computing power are reduced. The phase is solved by the discrete Fourier algorithm, and the solution to the phase depends on the overall trend of the data rather than the local trend. In a system that maintains the same time interval sampling, the initial phase can remain relatively stable and is not affected by the noise of some sampling points, thereby improving the accuracy of the phase detection.
[0116] In this specification, each embodiment is described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the embodiments can be referred to each other. For the device disclosed in the embodiment, since it corresponds to the method disclosed in the embodiment, the description is relatively simple, and the relevant parts can be referred to the method part.
[0117] Professionals may further appreciate that the units and algorithm steps of each example described in conjunction with the embodiments disclosed herein can be implemented in electronic hardware, computer software, or a combination of the two. In order to clearly illustrate the interchangeability of hardware and software, the composition and steps of each example have been generally described in the above description according to function. Whether these functions are performed in hardware or software depends on the specific application and design constraints of the technical solution. Professionals and technicians may use different methods to implement the described functions for each specific application, but such implementation should not be considered to be beyond the scope of the present invention.
[0118] The steps of the method or algorithm described in conjunction with the embodiments disclosed herein may be implemented directly using hardware, a software module executed by a processor, or a combination of the two. The software module may be placed in a random access memory (RAM), a memory, a read-only memory (ROM), an electrically programmable ROM, an electrically erasable programmable ROM, a register, a hard disk, a removable disk, a CD-ROM, or any other form of storage medium known in the art.
[0119] The above embodiments are only for illustrating the technical concept and features of the present invention, and their purpose is to enable people familiar with the technology to understand the content of the present invention and implement it accordingly, and they cannot limit the scope of protection of the present invention. All equivalent changes and modifications made to the scope of the claims of the present invention should fall within the scope of the claims of the present invention.
Claims
1. A high-precision digital phase difference detection method, characterized in that: The following steps are involved: synchronously sampling the triangular wave and the beat frequency signal to obtain a triangular wave signal and a beat frequency signal; Performing analog-to-digital conversion processing on the triangular wave signal and the beat frequency signal respectively to obtain a triangular wave digital signal and a beat frequency digital signal; Performing slope detection on the triangular wave digital signal to obtain a discrete index array synchronized with the slope of the triangular wave digital signal; Cutting the beat frequency digital signal based on the discrete index array to obtain a plurality of segments of rising edge signals and a plurality of segments of falling edge signals; Perform calculation based on the plurality of rising edge signals and the plurality of falling edge signals to obtain a plurality of groups of first Fourier coefficients and second Fourier coefficients; A calculation is performed based on each group of the first Fourier coefficients and the second Fourier coefficients to obtain a phase difference between two signals; the two signals are a rising edge signal and a falling edge signal of the beat frequency signal.
2. The high-precision digital phase difference detection method according to claim 1, characterized in that: The step of performing slope detection on the triangular wave digital signal to obtain a discrete index array synchronized with the slope of the triangular wave digital signal comprises: Performing Fourier transform on the triangular wave digital signal to obtain a sinusoidal signal synchronized with the triangular wave digital signal; Processing is performed based on the sinusoidal signal to obtain a discrete index array synchronized with the slope of the triangle wave digital signal.
3. The high-precision digital phase difference detection method according to claim 2, characterized in that: The step of performing Fourier transform on the triangular wave digital signal to obtain a sinusoidal signal synchronized with the triangular wave digital signal comprises: Performing discrete Fourier transform on the triangular wave digital signal to obtain one-dimensional Fourier coefficients; The Fourier coefficients other than the frequency of the triangular wave digital signal in the one-dimensional Fourier coefficients are set to zero to obtain a frequency domain signal related to the frequency and phase of the triangular wave digital signal; Perform an inverse Fourier transform on the frequency domain signal to obtain the sinusoidal signal.
4. The high-precision digital phase difference detection method according to claim 2, characterized in that: The processing based on the sinusoidal signal to obtain a discrete index array synchronized with the slope of the triangular wave digital signal comprises: Performing differential processing on the sinusoidal signal to obtain a slope array; The slope array is subjected to sign extraction processing to obtain a discrete index array synchronized with the slope of the triangle wave digital signal.
5. The high-precision digital phase difference detection method according to any one of claims 1 to 4, characterized in that: The plurality of rising edge signals and the plurality of falling edge signals are synchronized with the triangular wave digital signal.
6. The high-precision digital phase difference detection method according to claim 1, characterized in that: The obtaining of a plurality of groups of first Fourier coefficients and second Fourier coefficients by performing calculations based on the plurality of rising edge signals and the plurality of falling edge signals comprises: Performing discrete Fourier transform on each group of adjacent signals in the plurality of rising edge signals and the plurality of falling edge signals to obtain a Fourier coefficient group of each group of adjacent signals; each group of adjacent signals is a rising edge signal and a falling edge signal that are adjacent in time; Calculation is performed based on the Fourier coefficient group of each group of adjacent signals to obtain the plurality of groups of first Fourier coefficients and second Fourier coefficients.
7. The high-precision digital phase difference detection method according to claim 6, characterized in that: The calculating based on the Fourier coefficient group of each group of adjacent signals to obtain the plurality of groups of first Fourier coefficients and second Fourier coefficients comprises: Perform amplitude calculation based on the Fourier coefficient group of the temporally adjacent rising edge signals to obtain a first amplitude array; The first Fourier coefficient is obtained by searching based on the first amplitude array; the first Fourier coefficient is: the Fourier coefficient with the largest amplitude and positive frequency in the temporally adjacent rising edge signals except for zero frequency.
8. The high-precision digital phase difference detection method according to claim 6, characterized in that: The calculating based on the Fourier coefficient group of each group of adjacent signals to obtain the plurality of groups of first Fourier coefficients and second Fourier coefficients comprises: Perform amplitude calculation based on the Fourier coefficient group of the temporally adjacent falling edge signals to obtain a second amplitude array; The second Fourier coefficient is obtained by searching based on the second amplitude array; the second Fourier coefficient is: the Fourier coefficient with the largest amplitude and positive frequency in the temporally adjacent falling edge signals except for zero frequency.
9. The high-precision digital phase difference detection method according to claim 1, characterized in that: The calculating based on each group of the first Fourier coefficients and the second Fourier coefficients to obtain the phase difference between the two signals includes: Dividing each group of the first Fourier coefficients and the second Fourier coefficients to obtain each group of quotient values; An arc tangent operation is performed on the quotient to obtain the phase difference.
10. A digital algorithm phase detector, applied to the high-precision digital phase difference detection method according to any one of claims 1 to 9, characterized in that: include: A dual-channel synchronous sampling unit, used for synchronously sampling the triangular wave and the beat frequency signal to obtain the triangular wave signal and the beat frequency signal; an analog-to-digital conversion unit, configured to perform analog-to-digital conversion processing on the triangular wave signal and the beat frequency signal respectively to obtain a triangular wave digital signal and a beat frequency digital signal; A slope detection unit, used to perform slope detection on the triangular wave digital signal to obtain a discrete index array synchronized with the slope of the triangular wave digital signal; A signal segmentation unit, used for segmenting the beat frequency digital signal based on the discrete index array to obtain a plurality of segments of rising edge signals and a plurality of segments of falling edge signals; A phase calculation unit, configured to perform calculation based on the plurality of rising edge signals and the plurality of falling edge signals to obtain a plurality of groups of first Fourier coefficients and second Fourier coefficients; A phase difference calculation unit is used to calculate based on each group of the first Fourier coefficients and the second Fourier coefficients to obtain the phase difference of two signals; the two signals are the rising edge signal and the falling edge signal of the beat frequency signal.