A multi-frequency point phase difference estimation method based on time-frequency analysis
By using a multi-frequency phase difference estimation method based on time-frequency analysis, the problems of low phase difference estimation accuracy and phase wrapping in the existing technology are solved, and efficient and accurate phase difference measurement is achieved. It is applicable to impedance measurement, direction of arrival estimation and multi-channel receiving systems.
Patent Information
- Application Number
- CN202410452167.5
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2024-04-16
- Publication Date
- 2025-12-30
- Estimated Expiration
- 2044-04-16
AI Technical Summary
Existing phase difference estimation methods suffer from low computational accuracy and phase wrapping issues, especially when the signal period sampling is not an integer, which affects the results, and the computational complexity is high.
A multi-frequency phase difference estimation method based on time-frequency analysis is adopted. By constructing single-frequency and multi-frequency test signals and combining triggering and sine fitting algorithms, the accurate inter-channel phase difference is obtained.
It enables phase difference measurement at multiple frequency points across the entire frequency band, avoiding phase winding problems, improving testing efficiency and accuracy, and reducing computational complexity.
Smart Images

Figure CN118348314B_ABST
Abstract
Description
Technical Field
[0001] This invention relates to a multi-frequency point phase difference estimation method based on time-frequency analysis, belonging to the field of digital signal processing technology. Background Technology
[0002] When there is a phase difference between the channels of the system under test, the output signal obtained after the test signal passes through the system will also have a phase difference. Phase difference estimation is performed by estimating the phase difference between the output test signals to estimate the phase difference between the channels. It has important applications in many test and measurement systems, such as impedance measurement, direction of arrival (DOA) estimation, and multi-channel receiving systems, and is an essential preliminary step for distance estimation, phase calibration, and other tasks.
[0003] Currently, phase difference estimation has been extensively studied. Existing phase difference estimation methods mainly include cross-correlation algorithms, frequency domain algorithms, and sine fitting algorithms. Cross-correlation algorithms estimate the phase difference by cross-correlation of two sinusoidal signals; however, this significantly affects the estimation results when the signal is sampled with non-integer periods. Furthermore, the algorithm has relatively high computational complexity. Frequency domain algorithms primarily employ the Discrete Fourier Transform (DFT). This method estimates the phase difference by calculating the DFT of the signals and differentiating the DFT phases of the two signals at the maximum spectral line. This method has the advantages of low computational cost and clear physical meaning, but it ignores the influence of negative frequency components in the actual signal, leading to reduced accuracy in phase difference estimation. Sine fitting algorithms use a sine wave as the test signal. After acquiring the output signal of the device under test (DUT), the signal phase is estimated through least-squares fitting, and the difference between the estimated phase values of different channels is calculated as the estimated phase difference.
[0004] Sine fitting algorithm is a flexible and effective phase estimation method. When applied to phase difference estimation, due to the periodicity of sinusoidal signals, the phase estimate is in the range of (-π, π). If the phase difference between signals is greater than 2π, it will lead to phase wrapping problem, affecting the accuracy of the phase difference estimation result. Summary of the Invention
[0005] To address the technical problem of low phase difference calculation accuracy in existing technologies, which leads to phase wrapping issues, this invention proposes a multi-frequency point phase difference estimation method based on time-frequency analysis.
[0006] The technical solution adopted by this invention to solve the above problems is as follows: This invention proposes a multi-frequency point phase difference estimation method based on time-frequency analysis, comprising:
[0007] Step 1: Construct the test signal;
[0008] Step 2: Input the test signal into the system to obtain the output signals of multiple channels;
[0009] Step 3: Trigger the output signals of multiple channels, and obtain the accurate inter-channel phase difference based on the triggering results and the sine fitting algorithm.
[0010] Optionally, the test signals in step 1 include: single-frequency test signals and multi-frequency test signals.
[0011] Optionally, the steps in step 1 to construct the test signal include:
[0012] Step 1.1: Combine the DC signal with the single-tone sine wave signal to construct a single-frequency test signal;
[0013] Step 1.2: Insert sinusoidal signals of multiple frequencies into the DC signal to construct a multi-frequency test signal;
[0014] The expression for the single-frequency test signal is:
[0015]
[0016] T2-T1≥2t0 (2)
[0017] In formulas (1) and (2), f0 is the frequency of the sinusoidal signal, and a is the signal amplitude. t is the signal phase, T2-T1 is the duration of the sinusoidal signal, t0 is the period of the sinusoidal signal, T2 is the time when the sinusoidal signal disappears, T1 is the time when the sinusoidal signal appears, and x(t) is the single-frequency test signal.
[0018] The expression for the multi-frequency test signal is:
[0019]
[0020] f i-1 -f i-2 =f0 i=1,2,…,l (4)
[0021] T i -T i-1 ≥T P i = 1, 2, ..., l (5)
[0022] In formulas (3), (4), and (5), x(t) is the multi-frequency test signal, f0, f1, ..., f l-1 All are equally spaced frequency points covering the entire frequency band of the system, T p T is the duration of the sinusoidal signal. i T represents the time when the sinusoidal signal appears. I +T p This represents the time it takes for the sinusoidal signal to disappear.
[0023] Optionally, obtaining accurate inter-channel phase difference in step 3 includes: single-frequency inter-channel phase difference and multi-frequency inter-channel phase difference.
[0024] Optionally, the steps for obtaining the phase difference between single-frequency channels include:
[0025] Step 3.1: Trigger the single-frequency output signal, extract the sine signal of the single-frequency output signal after triggering, and record the trigger position;
[0026] Step 3.2: Obtain the estimated partial phase difference between single-frequency channels based on the trigger position;
[0027] Step 3.3: Obtain the phase estimate of the sinusoidal signal for each channel based on the sinusoidal fitting algorithm, and calculate the phase difference of the sinusoidal signal;
[0028] Step 3.4: Obtain the accurate inter-channel phase difference of a single frequency point based on the estimated phase difference of the single frequency point and the phase difference of the sinusoidal signal;
[0029] The expression for the estimated phase difference between single-frequency channels is:
[0030]
[0031] In formula (6), d is the number of integer 2πs in the phase between single-frequency channels, s1 is the trigger position of the sinusoidal signal of channel one, s2 is the trigger position of the sinusoidal signal of channel two, and f s f0 is the signal sampling rate, and f0 is the frequency of the sinusoidal signal in the two channels;
[0032] The expression for the phase difference between single-frequency channels is:
[0033]
[0034] In formula (7), The phase difference between single-frequency channels. The phase of channel one after fitting. This represents the phase of channel two after fitting.
[0035] Optionally, step 3.3, which involves obtaining the phase estimate of the sinusoidal signal for each channel, includes:
[0036] Step 3.3.1: Fit the single-frequency output signal based on the fitting mathematical model;
[0037] Step 3.3.2: Obtain the A0, B0, C0 values in the fitted data model corresponding to the minimum value of the fitted single-frequency output signal;
[0038] Step 3.3.3: Substitute the values of A0, B0, and C0 into the fitting mathematical model to obtain the phase estimate of the sinusoidal signal for each channel;
[0039] The expression for the fitted mathematical model is:
[0040] x(n)=A0cos(ω0n)+B0sin(ω0n)+C0 (8)
[0041] In formula (8), ω0 is the digital angular frequency of the sinusoidal signal, and x(n) is the nth data value of the sinusoidal signal;
[0042] The expressions for the values of A0, B0, and C0 are:
[0043]
[0044] The expression for the minimum solution of A0, B0, C0 is:
[0045]
[0046] x = [x(1), x(2), ..., x(n)] T (11)
[0047]
[0048] (x-D0s0) T (x-D0s0) (13)
[0049]
[0050] In formula (10-14), (*) T Let M be the transpose of matrix (*), and M be the number of sampling points for the sinusoidal signal. The solution of the fitted data model corresponding to the minimum value of the single-frequency output signal;
[0051] The expression for the phase estimate of the sinusoidal signal for each channel is:
[0052]
[0053]
[0054] In formulas (15) and (16), arctan is the standard arctangent value of the two parameters, and arctan∈[-π,π]. The phase estimate for each channel's sinusoidal signal.
[0055] Optionally, the steps for obtaining the phase difference between multiple frequency channels include:
[0056] Step 3.5: Trigger the multi-frequency output signal, extract the sine signal from the multi-frequency output signal after triggering, and record the trigger position;
[0057] Step 3.6: Obtain partial phase difference estimates between multi-frequency channels based on the trigger position;
[0058] Step 3.7: Calculate the frequency of the sinusoidal signal, and assign sinusoidal signals with the same frequency to each channel sequentially;
[0059] Step 3.8: Repeat steps 3.3.1-3.3.3 to estimate the phase of the sinusoidal signal corresponding to each channel frequency based on the sinusoidal fitting algorithm, and calculate the phase difference of the sinusoidal signal;
[0060] Step 3.9: Obtain the accurate phase difference between the multi-frequency channels based on the estimated partial phase difference between the multi-frequency channels and the phase difference of the sinusoidal signal.
[0061] The beneficial effects of this invention are:
[0062] 1. This invention can simultaneously measure the phase difference of multiple frequency points across the entire frequency band of a system, avoiding multiple measurements and improving testing efficiency;
[0063] 2. This invention can effectively avoid the phase winding problem of the sinusoidal fitting algorithm and accurately estimate the phase difference.
[0064] 3. This invention can estimate the phase difference between channels with relatively low computational complexity;
[0065] 4. This invention can estimate the signal phase difference with high accuracy and can be adjusted in real time according to the signal-to-noise ratio. Attached Figure Description
[0066] Figure 1 A flowchart of a multi-frequency point phase difference estimation method based on time-frequency analysis provided in an embodiment of the present invention;
[0067] Figure 2 This is a schematic diagram of the testing process provided in an embodiment of the present invention. Example
[0068] Example 1
[0069] This embodiment describes single-frequency phase difference estimation, and the steps include:
[0070] Step S1: Construct the input signal model:
[0071] Furthermore, the expression for the input signal model is:
[0072]
[0073] T2-T1≥2t0(2)
[0074] In formulas (1) and (2), f0 is the frequency of the sinusoidal signal, and a is the signal amplitude. t is the signal phase, T2-T1 is the duration of the sinusoidal signal, t0 is the period of the sinusoidal signal, T2 is the time when the sinusoidal signal disappears, T1 is the time when the sinusoidal signal appears, and x(t) is the single-frequency test signal.
[0075] like Figure 2 As shown, the signal x(t) in formula (1) is used as the input of the DUT, and the signals y1(n) and y2(n) are collected at the output terminal;
[0076] Step S2: Use the phase difference estimation algorithm to obtain the phase difference at the estimated frequency f0.
[0077] Furthermore, such as Figure 1 As shown, for the output y(n) of the test system, first use y(n) > y thre Trigger, y thre The threshold point is flat, and its position is y. thre =a / 2, assuming the result of the sinusoidal signal triggering is k, meaning the triggering position occurs at the value point n=k, to ensure the consistency of triggering between the two channels, it is necessary to find the maximum value y of the signal within the period t0 after point k. s From this, we can obtain the location s of the maximum value of the first period of the sine signal, and then extract the signal y for an integer number of periods based on the trigger position s. m And record the position S corresponding to the signal sampling point.
[0078] Step S3: Shift the sine wave signal;
[0079] Furthermore, first, the difference between the trigger positions s1 and s2 of the two channels is calculated and rounded to zero, resulting in:
[0080]
[0081] In formula (3), d is the number of integer 2πs in the phase between single-frequency channels, s1 is the trigger position of the sinusoidal signal of channel one, s2 is the trigger position of the sinusoidal signal of channel two, and f s f0 is the signal sampling rate, and f0 is the frequency of the sinusoidal signal in the two channels;
[0082] Formula (3) can be equivalent to:
[0083]
[0084] According to formula (4), the number of 2πs contained in the phase difference between the two channels can be obtained, and the signal of channel two can be shifted according to the d value;
[0085] The expression for signal shifting is:
[0086] s2′=s2+d*(f s / f0) (5)
[0087] The effective signal sampling point positions of channel 2 after relocation are S2′={s2′,s2′+1,…,s2′+i*(f s The signal value remains y ( / f0)-1}. m2 The signal position S1 and signal value y of channel one m1 It remains unchanged.
[0088] At this point, the phase difference between the two channels after signal shifting satisfies
[0089] Step S4: Use a sine fitting algorithm to fit the phase of each of the two channels to obtain the fitting results. and
[0090] Furthermore, the three-parameter sine fitting algorithm is a least-squares-based fitting algorithm. This method uses a sinusoidal signal with appropriate amplitude, frequency, and phase as the input test signal, and then fits the output waveform data to a sine wave of known frequency using the least-squares method. The mathematical model for fitting is:
[0091] x(n)=A0cos(ω0n)+B0sin(ω0n)+C0 (6)
[0092] In formula (6), A0, B0, and C0 are all set unknown parameters, f s ω0 is the digital angular frequency of the sinusoidal signal, and n is the nth data value of the sinusoidal signal.
[0093] Suppose that the data is recorded in the sampling sequence x(1), x(2), ..., x(M) corresponding to M sampling points 1, 2, ..., M. Then the algorithm is used to find the values of A0, B0 and C0 that minimize the value of (2-1).
[0094]
[0095] Since formula (6) is linear, the closed-form solution can be calculated directly. The calculation process is as follows: first, construct formulas (8) and (9):
[0096]
[0097] x = [x(1), x(2), ..., x(n)] T (9)
[0098] And assume that formula (10) is true:
[0099]
[0100] In matrix representation, formula (7) can be expressed by formula (11):
[0101] (x-D0s0) T (x-D0s0) (11)
[0102] In formula (11), (*) T Given the transpose of matrix (*), we can derive the solution that minimizes equation (7):
[0103]
[0104] Solution Substitute into equation (6), and convert from equation (13) to the form shown in equation (14),
[0105]
[0106]
[0107] In formulas (13) and (14), arctan is the standard arctangent of the two parameters, and the return value is in the range of (-π, π). This is the estimated waveform phase value.
[0108] Step S5: Based on the fitting results and Calculate the precise phase difference between the two channels:
[0109]
[0110] The delay difference can be calculated as follows:
[0111]
[0112] In formulas (15) and (16), The phase difference between single-frequency channels. The phase of channel one after fitting. This represents the phase of channel two after fitting.
[0113] Example 2
[0114] This embodiment is a multi-frequency point phase difference estimation, and the steps include:
[0115] Step S1: Construct the input signal model;
[0116] like Figure 2As shown, the further expression for the input signal model is:
[0117]
[0118] f i-1 -f i-2 =f0 i=1,2,…,l (18)
[0119] T i -T i-1 ≥T P i = 1, 2, ..., l (19)
[0120] In formulas (17), (18), and (19), x(t) is the multi-frequency test signal, f0, f1, ..., f l-1 All are equally spaced frequency points covering the entire frequency band of the system, T p T is the duration of the sinusoidal signal. i T represents the time when the sinusoidal signal appears. i +T p This represents the time it takes for the sinusoidal signal to disappear.
[0121] Step S2: Perform phase difference estimation;
[0122] like Figure 1 As shown. Furthermore, when performing phase difference estimation, y is first used... thre =a / 2 threshold level for triggering, and after triggering, k+2*T after triggering position k. p Trigger again at this point to obtain all valid signal bands Y. m ={y m1 ,y m2 ,…,y ml}, for Y m By performing FFT calculations on each element in the matrix, Y can be obtained. m The frequency F of each signal m ={f m1 ,f m2 ,…f ml}, due to signal y mi It is a single-frequency signal containing an integer number of cycles, so the FFT calculation results are accurate.
[0123] Step S3: Calculate the frequency of the sinusoidal signal and match the sinusoidal signals with the same frequency in each channel sequentially;
[0124] Furthermore, based on the calculated signal frequency F m1 and F m2 This allows the effective signal band Y in both channels to be made more efficient. m1 and Y m2The elements in the table correspond one-to-one, and the criterion for judgment is:
[0125]
[0126] In formula (20), f k f is the frequency of the same frequency signal. m1i For the valid signal in channel one, f m2j This is a valid signal in channel two;
[0127] That is, to find the frequency f that deviates from the standard frequency in two channels. k The signal whose difference is much smaller than f0 is considered to be a signal with the same frequency, f. k .
[0128] For frequencies all f k For the two-channel signals, following the steps in Implementation Method 1, the signal is first shifted, then the phase difference is estimated using a three-parameter sine fitting algorithm, and finally the phase difference of the entire system frequency band is obtained.
[0129] The above description is merely a preferred embodiment of the present invention and is not intended to limit the present invention in any way. Although the present invention has been disclosed above with reference to preferred embodiments, it is not intended to limit the present invention. Any person skilled in the art can make some modifications or alterations to the above-disclosed technical content to create equivalent embodiments without departing from the scope of the present invention. Any simple modifications, equivalent substitutions, and improvements made to the above embodiments without departing from the scope of the present invention, based on the technical essence of the present invention and within the spirit and principles of the present invention, shall still fall within the protection scope of the present invention.
Claims
1. A method for estimating phase difference of multiple frequency points based on time-frequency analysis, characterized in that, The steps of the multi-frequency point phase difference estimation method based on time-frequency analysis include: Step 1: constructing a test signal; The step of constructing a test signal in step 1 includes: Step 1.1: combining a direct current signal with a single-tone sinusoidal signal to construct a single-frequency point test signal; Step 1.2: inserting sinusoidal signals of multiple frequencies into the direct current signal respectively to construct a multi-frequency point test signal; The expression of the single-frequency point test signal is: (1) (2) In formulas (1) and (2), is the frequency of the sinusoidal signal, is the amplitude of the signal, is the phase of the signal, is the duration of the sinusoidal signal, is the period of the sinusoidal signal, is the time at which the sinusoidal signal disappears, is the time at which the sinusoidal signal appears, is a single frequency test signal; The expression of the multi-frequency point test signal is: (3) (4) (5) In formulas (3), (4) and (5), is a multi-frequency point test signal, are equally spaced frequency points covering the entire frequency band of the system, is the duration of the sinusoidal signal, is the time at which the sinusoidal signal appears, is the time at which the sinusoidal signal disappears. Step 2: inputting the test signal into a system to obtain output signals of multiple channels; Step 3: triggering the output signals of the multiple channels, and obtaining accurate inter-channel phase differences based on the triggering results and a sinusoidal fitting algorithm; The step of obtaining accurate inter-channel phase differences in step 3 includes single-frequency point inter-channel phase differences and multi-frequency point inter-channel phase differences; The step of obtaining single-frequency point inter-channel phase differences includes: Step 3.1: triggering the single-frequency point output signal, extracting the sinusoidal signal of the triggered single-frequency point output signal, and recording the triggering position; Step 3.2: obtaining single-frequency point inter-channel partial phase difference estimation values based on the triggering position; Step 3.3: obtaining phase estimation values of the sinusoidal signal of each channel based on a sinusoidal fitting algorithm, and calculating the phase difference of the sinusoidal signal; Step 3.4: obtaining accurate single-frequency point inter-channel phase differences based on the single-frequency point inter-channel partial phase difference estimation values and the phase difference of the sinusoidal signal; The expression of the single-frequency point inter-channel phase difference estimation value is: (6) In formula (6), is the number of 2π integer in the phase between the two channels, is the sine signal trigger position of channel one, is the sine signal trigger position of channel two, is the signal sampling rate, is the sine signal frequency of the two channels; The expression of the single-frequency point inter-channel phase difference is: (7) In equation (7), is the single frequency point inter-channel phase difference, is the fitted phase of channel one, is the fitted phase of channel two; The step of obtaining multi-frequency point inter-channel phase differences includes: Step 3.5: triggering the multi-frequency point output signal, extracting the sinusoidal signal in the triggered multi-frequency point output signal, and recording the triggering position; Step 3.6: obtaining multi-frequency point inter-channel partial phase difference estimation values based on the triggering position; Step 3.7: calculating the frequency of the sinusoidal signal, and sequentially corresponding the sinusoidal signals of the same frequency in each channel; Step 3.8: estimating the phase of the sinusoidal signal after the frequency corresponding of each channel based on a sinusoidal fitting algorithm, and calculating the phase difference of the sinusoidal signal; Step 3.9: obtaining accurate multi-frequency point inter-channel phase differences based on the multi-frequency point inter-channel partial phase difference estimation values and the phase difference of the sinusoidal signal.
2. The method of claim 1, wherein, The test signal in step 1 includes a single-frequency point test signal and a multi-frequency point test signal.
3. The method of claim 1, wherein, The step of obtaining phase estimation values of the sinusoidal signal of each channel in step 3.3 includes: Step 3.3.1: fitting the single-frequency point output signal based on a fitting mathematical model; Step 3.3.2: Obtain the value in the fitted data model corresponding to the minimum value of the fitted single-frequency output signal ; Step 3.3.3: The values are substituted into the fitted mathematical model to obtain the phase estimate for each channel sinusoidal signal. The values are substituted into the fitted mathematical model to obtain the phase estimate for each channel sinusoidal signal. The expression of the fitting mathematical model is: (8) In equation (8), is the digital angular frequency of the sinusoidal signal, x(n) is the first data value of the sinusoidal signal; and n is the second data value of the sinusoidal signal. The expression of the value is: (9) The expression of the minimum solution is: (10) (11) (12) (13) (14) In equation (10-14), is the transpose of the matrix , M is the number of sampling points of the sine signal, is the solution of the fitted data model corresponding to the minimum value of the single frequency point output signal; The expression of the phase estimation value of the sinusoidal signal of each channel is: (15) (16) In equations (15) and (16), arctan is the standard inverse tangent value of two parameters, and , is the phase estimate of the sinusoidal signal for each channel.