Phase difference measurement method, device and equipment of sinusoidal signal and medium

By performing quadrature demodulation on the sinusoidal signal, removing abnormal jump data points, and averaging the data, the problem of balancing speed and accuracy in phase difference measurement was solved, achieving high-precision and high-speed phase difference measurement.

CN120928036AActive Publication Date: 2025-11-11ZHEJIANG LAB
View PDF 4 Cites 0 Cited by

Patent Information

Application Number
CN202511467789.6
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2025-10-14
Publication Date
2025-11-11
Estimated Expiration
2045-10-14

AI Technical Summary

Technical Problem

Existing phase difference measurement algorithms struggle to balance high precision and high speed, especially in the initialization of astronomical radio frequency telescopes with phased array antennas, where they suffer from high computational resource requirements and measurement errors.

Method used

By performing quadrature demodulation on the two input sinusoidal signals, the phase value time series is obtained, abnormal jump data points are identified and removed, and the target phase difference time series is averaged to ensure the stability and reliability of the measurement results.

Benefits of technology

It achieves a phase difference measurement accuracy of better than 10 degrees under a signal-to-noise ratio greater than 6dB, while also taking into account a high measurement speed, thus balancing measurement speed and accuracy.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120928036A_ABST
    Figure CN120928036A_ABST
Patent Text Reader

Abstract

The invention relates to the technical field of signal processing, and discloses a sinusoidal signal phase difference measurement method, device and equipment and a medium, and the method comprises the steps: carrying out the orthogonal demodulation of two paths of input sinusoidal signals, and obtaining the phase value time sequences of the two paths of sinusoidal signals; subtracting the phase value time sequences of the two sinusoidal signals to obtain a preliminary phase difference value time sequence; identifying and removing abnormal jump data points in the initial phase difference value time sequence to obtain a target phase difference value time sequence; and carrying out average processing on the target phase difference value time sequence to obtain a target phase difference corresponding to the two paths of sinusoidal signals. According to the technical scheme provided by the invention, under the noise condition that the signal-to-noise ratio is greater than 6dB, the phase difference measurement precision is superior to 10 degrees, and meanwhile, the technical effects of relatively high measurement speed are achieved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of signal processing technology, and in particular to a method, apparatus, device and medium for measuring the phase difference of a sinusoidal signal. Background Technology

[0002] In the field of signal processing, measuring the phase difference of sinusoidal signals of the same frequency is widely used in various industries such as communications, power, and medicine. According to the Nyquist sampling theorem, the sampling time is positively correlated with the phase difference resolution and negatively correlated with the noise amplitude, leading to a trade-off between measurement speed and accuracy.

[0003] Current phase difference measurement algorithms can be divided into two categories: high-speed and high-precision. The former is suitable for high-speed applications but has low computational complexity, while the latter is suitable for high-precision requirements but consumes large computational resources. In some practical applications, such as the initialization of astronomical radio frequency telescopes with phased array antennas, both high precision and high speed are required. Existing high-speed algorithm improvements, such as Kalman filtering and wavelet transform, although improving speed, still face the problems of high computational resource requirements and measurement errors.

[0004] Therefore, how to balance measurement speed and measurement accuracy in phase difference measurement is a technical problem that urgently needs to be solved. Summary of the Invention

[0005] This application provides a method, apparatus, device, and medium for measuring the phase difference of a sinusoidal signal, which achieves a phase difference measurement accuracy of better than 10 degrees under noise conditions with a signal-to-noise ratio greater than 6dB, while also taking into account a high measurement speed.

[0006] To achieve the above objectives, the main technical solutions adopted in this application include: In a first aspect, embodiments of this application provide a method for measuring the phase difference of a sinusoidal signal, the method comprising: The two input sinusoidal signals are subjected to quadrature demodulation processing to obtain the phase value time series of the two sinusoidal signals respectively; Subtract the phase value time series of the two sinusoidal signals to obtain a preliminary phase difference time series; Identify and remove anomalous jump data points in the preliminary phase difference time series to obtain the target phase difference time series; The target phase difference is obtained by averaging the time series of the target phase difference values.

[0007] This embodiment provides a method for measuring the phase difference of sinusoidal signals. It obtains the phase value time series of two sinusoidal signals through quadrature demodulation processing, then calculates the phase difference time series of the two sinusoidal signals, and removes abnormal jump data points to improve data accuracy. Finally, it performs averaging on the target phase difference time series to further smooth the data and ensure the stability and reliability of the measurement results. This process successfully balances measurement speed and accuracy, achieving both rapid phase difference acquisition and high measurement precision, thus realizing an effective balance between the two.

[0008] In one embodiment, the step of performing quadrature demodulation processing on the input sinusoidal signal to obtain the phase value time series of the two sinusoidal signals respectively includes: Power division processing is performed on either of the two sinusoidal signals to obtain the first branch sinusoidal signal and the second branch sinusoidal signal corresponding to the respective sinusoidal signal. The phase angle of the first branch sinusoidal signal is adjusted, and the phase angle-adjusted first branch sinusoidal signal is converted from analog to digital to obtain the first branch digital signal; The second branch sinusoidal signal is converted from analog to digital to obtain the second branch digital signal; Phase calculations are performed based on the first branch digital signal and the second branch digital signal to obtain the phase value time series that matches any of the sinusoidal signals.

[0009] This embodiment decomposes the original signal into two independent branch signals through power division processing, providing a clear signal source for subsequent phase calculations. Next, the phase angle of the first branch signal is adjusted and it is converted into a digital signal to improve accuracy and avoid the accumulation of signal errors. The second branch signal is also converted into a digital signal through analog-to-digital conversion, simplifying the processing flow. Finally, through an efficient phase calculation method, the calculation speed can be improved while maintaining high accuracy. The entire process ensures measurement accuracy while also improving computational efficiency.

[0010] In one embodiment, the step of performing phase calculation based on the first branch digital signal and the second branch digital signal to obtain a time series of phase values ​​matching any sinusoidal signal includes: The initial phase value is obtained based on the ratio between the first branch digital signal and the second branch digital signal; Perform a modulo operation on the initial phase value to obtain the modulo-determined phase value; The phase value after taking the modulus is adjusted according to the preset angle range to obtain the phase value time sequence that matches any of the sinusoidal signals.

[0011] This embodiment rapidly calculates the initial phase value based on the ratio of the first branch digital signal and the second branch digital signal, ensuring calculation speed and providing accurate phase values. Next, a modulo operation is used to limit the initial phase value to a standardized range, eliminating discontinuities caused by phase values ​​exceeding the range and ensuring calculation stability. Finally, the modulo-taken phase value is adjusted according to a preset angle range, resulting in a smooth transition and avoiding errors caused by extreme value jumps. Through this series of processes, both high measurement efficiency and high measurement accuracy are ensured, achieving a balance between speed and accuracy in phase difference measurement.

[0012] In one embodiment, subtracting the phase value time series of the two sinusoidal signals to obtain a preliminary phase difference time series includes: When the measurement result of subtracting the phase value of another sinusoidal signal from the phase value of one sinusoidal signal and adding measurement noise is greater than or equal to zero, the measurement result or the measurement result minus a preset angle threshold is determined as the value of the phase difference time series. When the measurement result of subtracting the phase value of another sine signal from the phase value of one sine signal and adding measurement noise is less than zero, the measurement result or the measurement result plus the preset angle threshold is determined as the value of the phase difference time series.

[0013] This embodiment determines the phase difference directly as either the calculated phase difference plus noise or the result of the calculated phase difference minus a preset angle threshold if the result is greater than or equal to zero; otherwise, it determines the phase difference as either the calculated phase difference plus the preset angle threshold, ensuring accurate phase difference values. This method enables rapid identification and adjustment of the phase difference while maintaining high precision, avoiding complex calculations and significantly improving measurement speed and accuracy.

[0014] In one implementation, identifying and removing anomalous jump data points from the preliminary phase difference time series to obtain the target phase difference time series includes: The preliminary phase difference time series is classified to obtain preliminary classification results; the preliminary classification results include a first anomalous jump for positive 360 ​​degrees, no anomalous jump, and a second anomalous jump for negative 360 ​​degrees; Determine the standard deviation corresponding to any preliminary classification result, and determine the absolute value of the difference between each data point and the median of its respective preliminary classification result; Data points whose absolute value is greater than a specified multiple of the standard deviation are identified as abnormal jump data points; The abnormal jump data points are deleted from the preliminary classification results to obtain the target phase difference time series.

[0015] This embodiment categorizes the initial phase difference time series into three types: a first anomalous jump representing a positive 360-degree transition, no anomalous jumps, and a second anomalous jump representing a negative 360-degree transition, providing a foundation for subsequent identification of anomalous jump data points. Next, the standard deviation of each data type and the absolute value of the difference between each data point and the median are calculated to identify anomalous jump data points deviating from the normal fluctuation range. Anomalous jump data points are removed from the data set by specifying a multiple of the standard deviation, ensuring data accuracy. Finally, the data is further optimized by iteratively removing anomalous jump data points, ensuring a more stable and accurate phase difference time series. This method can improve measurement speed while maintaining high measurement accuracy, effectively balancing the speed and accuracy of phase difference measurement.

[0016] In one embodiment, the method further includes: Determine the absolute difference between the means of every two preliminary classification results; If the absolute difference is less than a preset distance threshold, the corresponding preliminary classification results are merged to obtain a new classification result.

[0017] In one implementation, averaging the time series of the target phase difference to obtain the target phase difference corresponding to the two sinusoidal signals includes: In the target phase difference time series, obtain the target classification result with the largest number of data points; The data points in the target classification results are averaged to obtain the corresponding target mean. The target mean is determined as the target phase difference corresponding to the two sinusoidal signals.

[0018] This embodiment selects the most representative signal data by acquiring the target classification result with the largest number of data points, ensuring measurement accuracy and improving processing speed. Next, by averaging the data points in this classification, noise and short-term fluctuations are removed, further improving measurement accuracy while avoiding complex calculation steps, thus ensuring high processing speed. Finally, the target mean is determined as the final target phase difference, ensuring the stability and reliability of the results. The overall method effectively improves measurement speed while maintaining high measurement accuracy, achieving a good balance between the two.

[0019] Secondly, embodiments of this application provide a phase difference measurement device for a sinusoidal signal, the device comprising: The quadrature demodulation processing unit is used to perform quadrature demodulation processing on the two input sinusoidal signals to obtain the phase value time series of the two sinusoidal signals respectively. The subtraction processing unit is used to subtract the phase value time series of the two sinusoidal signals to obtain a preliminary phase difference time series. An abnormal jump processing unit is used to identify and remove abnormal jump data points in the preliminary phase difference time series to obtain the target phase difference time series. An averaging unit is used to average the time series of the target phase difference value to obtain the target phase difference corresponding to the two sinusoidal signals.

[0020] Thirdly, embodiments of this application provide a computer device, including: The system includes a memory and a processor, which are interconnected. The memory stores computer instructions, and the processor executes these computer instructions to perform the aforementioned method for measuring the phase difference of a sinusoidal signal.

[0021] Fourthly, embodiments of this application provide a computer-readable storage medium storing computer instructions for causing a computer to execute the aforementioned method for measuring the phase difference of a sinusoidal signal. Attached Figure Description

[0022] To more clearly illustrate the technical solutions in the specific embodiments of this application or the prior art, the drawings used in the description of the specific embodiments or the prior art will be briefly introduced below. Obviously, the drawings described below are some embodiments of this application. For those skilled in the art, other drawings can be obtained from these drawings without creative effort.

[0023] Figure 1 A flowchart illustrating a method for measuring the phase difference of a sinusoidal signal, provided as an embodiment of this application; Figure 2 A flowchart of step S1 provided in the embodiments of this application; Figure 3 A flowchart of step S17 provided in an embodiment of this application; Figure 4 A flowchart of step S3 provided in the embodiments of this application; Figure 5 A flowchart of step S5 provided in an embodiment of this application; Figure 6 A flowchart of step S7 provided in an embodiment of this application; Figure 7 A schematic diagram of the implementation apparatus provided in the embodiments of this application; Figure 8 The phase value time series of two sinusoidal signals and Time series of initial phase difference ; Figure 9 This is a schematic diagram of the result of the three-stage clustering step in the cluster averaging tool. Figure 10 A schematic diagram illustrating the results of the step in removing outlier data points from the cluster averager. Figure 11 This is a schematic diagram showing the result of the cluster averaging step of merging nearest-neighbor clusters. Figure 12 The relationship between the maximum phase measurement error and the average number of points for the four algorithms when the signal-to-noise ratio is 0dB. Figure 13 The relationship between the maximum phase measurement error and the average number of points for the four algorithms when the signal-to-noise ratio is 6dB. Figure 14 The relationship between the maximum phase measurement error and the average number of points for the four algorithms when the signal-to-noise ratio is 10dB. Figure 15 The relationship between the maximum phase measurement error and the average number of points for the four algorithms when the signal-to-noise ratio is 20dB. Figure 16 The relationship between the maximum phase measurement error and the average number of points for the four algorithms when the signal-to-noise ratio is 30dB. Figure 17 The relationship between the maximum phase measurement error and the average number of points for the four algorithms when the signal-to-noise ratio is 40dB. Figure 18 The relationship between phase measurement error and phase difference for four algorithms; Figure 19 A block diagram of a phase difference measuring device for a sinusoidal signal provided in an embodiment of this application; Figure 20 This is a schematic diagram of the structure of a computer device provided in an embodiment of this application. Detailed Implementation

[0024] To make the objectives, technical solutions, and advantages of the embodiments of this application clearer, the technical solutions of the embodiments of this application will be clearly and completely described below with reference to the accompanying drawings. Obviously, the described embodiments are only some embodiments of this application, not all embodiments. Based on the embodiments of this application, all other embodiments obtained by those skilled in the art without creative effort are within the scope of protection of this application.

[0025] In the field of signal processing, measuring the phase difference between two sinusoidal signals of the same frequency is a fundamental and widely applied problem, involving multiple industries and fields, such as communications, power, industrial control, medical and scientific instruments, image and audio processing, etc. Specific applications include radar, sonar, power grids, motor control, optical sensors, and electroencephalography (EEG). Measuring the phase difference of signals plays a crucial role in achieving precise control and diagnosis.

[0026] According to the Nyquist sampling theorem, there is a positive correlation between signal sampling time and phase difference resolution, while there is a negative correlation between sampling time and noise amplitude. Therefore, there is an inherent contradiction between the measurement speed and accuracy of phase difference. Balancing sampling time, computational complexity, and measurement accuracy under certain noise levels and accuracy requirements becomes a key issue.

[0027] Phase difference measurement algorithms can be mainly divided into two categories: high-speed algorithms and high-precision algorithms. High-speed algorithms (such as zero-crossing detection, high-frequency clock filling and counting, and quadrature demodulation) have low computational complexity and are suitable for applications with high speed requirements, typically using simple hardware resources. In contrast, high-precision algorithms (such as cross-correlation function peak refinement, multiple signal classification (MUSIC) algorithms, and FFT phase methods) are suitable for applications with high precision requirements, but have higher computational complexity and require significant hardware resources.

[0028] In practical applications, such as the initialization process of astronomical radio frequency telescopes based on phased array antennas, both high precision and high speed are required. Since high-precision algorithms (such as the MUSIC algorithm and FFT phase method) consume significant computational resources, improvements to high-speed algorithms are necessary to meet these requirements. Existing high-speed algorithm improvements include multi-cycle signal averaging, narrowband filtering, Kalman filtering, and wavelet transform, but these methods often require substantial computational resources, especially hardware multipliers. Furthermore, averaging multiple phase difference measurements may suffer from anomalous jumps of ±360 degrees, leading to measurement errors.

[0029] Therefore, how to balance measurement speed and measurement accuracy in phase difference measurement is a technical problem that urgently needs to be solved.

[0030] To address the aforementioned technical problems, according to an embodiment of this application, a method for measuring the phase difference of a sinusoidal signal is provided. It should be noted that the steps shown in the flowchart in the accompanying drawings can be executed in a computer system such as a set of computer-executable instructions. Furthermore, although a logical order is shown in the flowchart, in some cases, the steps shown or described may be executed in a different order than that shown here.

[0031] This embodiment provides a method for measuring the phase difference of a sinusoidal signal. Figure 1 A flowchart illustrating a method for measuring the phase difference of a sinusoidal signal, as provided in this application embodiment, is shown below. Figure 1 As shown, the process includes the following steps: Step S1: Perform quadrature demodulation processing on the two input sinusoidal signals to obtain the phase value time series of the two sinusoidal signals respectively.

[0032] Specifically, after power division of the two input sinusoidal signals, each signal is first split into two in-phase signals. One signal is converted into a cosine branch by a 90° phase shifter, while the other remains a sinusoidal branch. The two branches are then synchronously sampled by an analog-to-digital converter to form a pair of digital quadrature signals. The instantaneous phase is calculated point-by-point using the arctangent function on the ratio of this pair of quadrature signals. Then, the folded phase is unfolded into a continuous curve from 0° to 180° through "modulo-mapping," thus obtaining a phase value time series without jumps. The entire process can be achieved using only addition, subtraction, comparison, and table lookup operations. This eliminates the ±180° discontinuity caused by traditional atan2 folding and significantly reduces the dependence on multipliers or FFT, laying a fast and robust digital foundation for subsequent high-precision, low-power phase difference measurement.

[0033] Step S3: Subtract the phase value time series of the two sinusoidal signals to obtain a preliminary phase difference time series.

[0034] Specifically, by subtracting the phase value time series of the two channels that have been corrected to a continuous range of 0°-180° point by point, a preliminary phase difference time series can be obtained. Ideally, this difference directly reflects the true phase difference between the two signals. However, due to measurement noise and ±180° folding residue, abnormal jump data points of ±360° may appear in the sequence. These jumps and noise overlap, causing a systematic deviation of up to ±180° to be generated by simple averaging. Therefore, subsequent steps are needed to identify and remove these deviations to obtain an unbiased and low-noise final phase difference.

[0035] Step S5: Identify and remove abnormal jump data points in the preliminary phase difference time series to obtain the target phase difference time series.

[0036] Specifically, to address the ±360° jumps and measurement noise mixed in the initial phase difference time series, it is first explicitly split into three categories: "positive jumps, no jumps, and negative jumps" using three-way clustering. Then, within each category, abnormal jump data points are removed using the median criterion, and finally, the sample set with the most points is retained. Through this four-step process of "classification-cleaning-merging-selection", abnormal jumps are accurately removed, and the remaining data has neither systematic shifts nor significantly reduced random noise. This yields a continuous and reliable target phase difference time series, laying a clean sample foundation for subsequent high-precision averaging.

[0037] Step S7: Average the target phase difference time series to obtain the target phase difference corresponding to the two sinusoidal signals.

[0038] Specifically, after deleting anomalous jump data points, the target phase difference time series retains only the core data points with high signal-to-noise ratios that correspond to the true phase difference. Averaging these data points directly approximates the true phase difference statistically. Therefore, the resulting target phase difference possesses the characteristics of being unbiased, having low variance, high precision, and high measurement speed.

[0039] This embodiment provides a method for measuring the phase difference of sinusoidal signals. It obtains the phase value time series of two sinusoidal signals through quadrature demodulation processing, then calculates the phase difference time series of the two sinusoidal signals, and removes abnormal jump data points to improve data accuracy. Finally, it performs averaging on the target phase difference time series to further smooth the data and ensure the stability and reliability of the measurement results. This process successfully balances measurement speed and accuracy, achieving both rapid phase difference acquisition and high measurement precision, thus realizing an effective balance between the two.

[0040] Figure 2 The flowchart for step S1 provided in the embodiments of this application may include the following steps: Step S11: Perform power division processing on either of the two sinusoidal signals to obtain the first branch sinusoidal signal and the second branch sinusoidal signal corresponding to the sinusoidal signal.

[0041] Specifically, for either of the two sinusoidal signals... The power is divided into two identical signals, namely the first branch sinusoidal signal U. a,1 (t) and the second branch sinusoidal signal U a,2 (t), where U a,t U represents the signal voltage value of a sinusoidal signal a at time t. a,0 ω is the amplitude of a sinusoidal signal a, i.e., the maximum voltage value; ω is the angular frequency of the sinusoidal signal a, which is related to the frequency f0 of the signal, f0=ω / 2π; Let U be the initial phase of a sinusoidal signal 'a'. Therefore, the first branch sinusoidal signal U... a,1 (t) and the second branch sinusoidal signal U a,2 (t) is: in, This is the fixed phase shift of the power divider.

[0042] Step S13: Adjust the phase angle of the first branch sinusoidal signal, and perform analog-to-digital conversion on the first branch sinusoidal signal after phase angle adjustment to obtain the first branch digital signal.

[0043] Specifically, the first branch sinusoidal signal U a,1 (t) By using a 90-degree phase shifter, change U a,1 The phase of (t) is used to obtain the first branch digital signal U after phase angle adjustment. a,3 (t): This adjustment makes the original first-branch sine signal U... a,1 (t) becomes a cosine signal that is related to time t.

[0044] The first branch sinusoidal signal U after phase angle adjustment a,3 (t) Perform analog-to-digital conversion. The process of analog-to-digital conversion is the discretization of a continuous signal, using a sampling period T. s Discrete sampling is performed to obtain the first branch digital signal U a,3 [n]: Wherein, the sampling frequency f s =1 / T s , satisfying f s ≥10f0, to ensure that the digital signal can record the details of the analog signal, where n is the sample number.

[0045] Step S15: Perform analog-to-digital conversion on the second branch sine signal to obtain the second branch digital signal.

[0046] Specifically, the second branch sinusoidal signal U a,2 (t) is converted from analog to digital to the second branch digital signal U. a,4 [n], that is: Step S17: Perform phase calculation based on the first branch digital signal and the second branch digital signal to obtain the phase value time series that matches any sinusoidal signal.

[0047] Specifically, the phase difference between the first and second branch digital signals can be obtained by calculating the ratio of their values. After calculating the phase difference using an efficient algorithm (such as atan2), a time series of phase values ​​matching any sinusoidal signal is obtained. This series changes over time, reflecting the phase characteristics of the signal. Appropriate processing, such as modulo operations and angle adjustments, ensures that the calculated phase values ​​are within a preset range, thereby avoiding discontinuities or errors.

[0048] This embodiment decomposes the original signal into two independent branch signals through power division processing, providing a clear signal source for subsequent phase calculations. Next, the phase angle of the first branch signal is adjusted and it is converted into a digital signal to improve accuracy and avoid the accumulation of signal errors. The second branch signal is also converted into a digital signal through analog-to-digital conversion, simplifying the processing flow. Finally, through an efficient phase calculation method, the calculation speed can be improved while maintaining high accuracy. The entire process ensures measurement accuracy while also improving computational efficiency.

[0049] Figure 3 The flowchart for step S17 provided in the embodiments of this application may include the following steps: Step S171: Obtain the initial phase value based on the ratio between the first branch digital signal and the second branch digital signal.

[0050] Specifically, the initial phase value is calculated using the atan2 function: Due to signal U a,3 [n] is obtained through cosine transform, U a,4 [n] represents the sinusoidal transformed signal. The phase difference between the signals can be obtained by calculating the ratio and using the atan2 function. The initial phase value output by atan2 falls between -180° and +180°. This phase value is initial but may change due to continuous sampling, especially when the signal undergoes periodic changes.

[0051] Step S173: Perform a modulo operation on the initial phase value to obtain the modulo-determined phase value.

[0052] Specifically, due to the true phase The phase value increases continuously over time. Therefore, whenever the atan2 output jumps from +180° to -180°, a 360° jump occurs (e.g., from +180° to -180°), causing discontinuities. To address this, a modulo operation is needed to map the phase value to the range of 0° to 360°. The purpose of this is to standardize all initial phase values ​​to a smoother range, eliminating discontinuities caused by phase jumps. Therefore, the initial phase value is moduloed as follows: Where h() represents atan -1 The ( ) function's effect on the jump of continuous phase changes the initial phase value 360° mold taking operation.

[0053] Step S175: Adjust the phase value after taking the modulus according to the preset angle range to obtain a phase value time series that matches any sinusoidal signal.

[0054] Specifically, since the modulo operation only guarantees that the interval falls within 0°-360°, but there may still be discontinuities at 180° (because 180° and 360° are actually only 180° apart), the phase value after modulo operation needs to be adjusted to fold the 180°-360° range back to 0°-180°, eliminating the ±180° jump. Specifically, the g function is used to adjust the phase value after modulo operation: If the phase value after modulo operation is between 0° and 180°, it remains unchanged; if the phase value after modulo operation is between 180° and 360°, 180° is subtracted, mapping it to the range of 0° to 180°. In this way, the adjusted phase value can eliminate the phase jump caused by the atan2 function, making the phase of the signal continuous.

[0055] Similarly, for the processing of another sinusoidal signal, the resulting phase value time series is: .

[0056] This embodiment rapidly calculates the initial phase value based on the ratio of the first branch digital signal and the second branch digital signal, ensuring calculation speed and providing accurate phase values. Next, a modulo operation is used to limit the initial phase value to a standardized range, eliminating discontinuities caused by phase values ​​exceeding the range and ensuring calculation stability. Finally, the modulo-taken phase value is adjusted according to a preset angle range, resulting in a smooth transition and avoiding errors caused by extreme value jumps. Through this series of processes, both high measurement efficiency and high measurement accuracy are ensured, achieving a balance between speed and accuracy in phase difference measurement.

[0057] Figure 4 The flowchart for step S3 provided in the embodiments of this application may include the following steps: Step S31: When the measurement result after subtracting the phase value of another sine signal from the phase value of one sine signal and adding the measurement noise is greater than or equal to zero, the measurement result or the measurement result minus the preset angle threshold is determined as the value of the phase difference time series.

[0058] Specifically, the preliminary phase difference time series At any sampling point n, considering the measurement noise ξ[n], the measurement result is... It is one of the following three: (1) No jump: (2) Negative jump: (3) Positive jump: Since ξ[n] is random, the actual transition points are overwhelmed by noise, making it difficult to distinguish between transitions and noise.

[0059] The preset angle threshold is 360°. If the value falls within the +360° transition or is not a transition, then it is considered that the candidate phase difference time series value is "possibly falling within the +360° transition or is not a transition". or -360°.

[0060] Step S33: When the measurement result after subtracting the phase value of another sine signal from the phase value of one sine signal and adding the measurement noise is less than zero, the measurement result or the measurement result plus a preset angle threshold is determined as the value of the phase difference time series.

[0061] Specifically, like If the value falls within a -360° transition or is not a transition, then it is considered that the candidate phase difference time series value is "possibly falling within a -360° transition or is not a transition". or +360°.

[0062] It should be noted that the purpose of steps S31 to S33 is to list all possible candidate values, and the actual identification of which one is the "true value" needs to be completed in subsequent steps.

[0063] This embodiment determines the phase difference directly as either the calculated phase difference plus noise or the result of the calculated phase difference minus a preset angle threshold if the result is greater than or equal to zero; otherwise, it determines the phase difference as either the calculated phase difference plus the preset angle threshold, ensuring accurate phase difference values. This method enables rapid identification and adjustment of the phase difference while maintaining high precision, avoiding complex calculations and significantly improving measurement speed and accuracy.

[0064] Figure 5 The flowchart for step S5 provided in the embodiments of this application may include the following steps: Step S51: Classify the preliminary phase difference time series to obtain preliminary classification results; the preliminary classification results include the first anomalous jump for positive 360 ​​degrees, the absence of anomalous jumps, and the second anomalous jump for negative 360 ​​degrees.

[0065] Specifically, a clustering algorithm is used to classify the initial phase difference time series into three categories of data points: a first anomalous jump of +360°, no anomalous jump, and a second anomalous jump of -360°. Clustering algorithms include, but are not limited to, K-Means, Agglomerative Clustering (AGNES), and Gaussian Mixture Model (GMM).

[0066] Step S53: Determine the standard deviation corresponding to any preliminary classification result, and determine the absolute value of the difference between each data point and the median of its respective preliminary classification result.

[0067] Specifically, the standard deviations of the three types of data points are calculated separately, and the absolute value of the difference between each data point and the median of its preliminary classification result is determined.

[0068] Step S55: Data points whose absolute value is greater than a specified multiple of the standard deviation are identified as abnormal jump data points.

[0069] Specifically, data points whose absolute values ​​are greater than a specified multiple of the standard deviation are identified as anomalous data points. Preferably, the specified multiple is 3.

[0070] In a preferred embodiment, the method further includes: determining the absolute difference between the means of every two preliminary classification results; and merging the corresponding preliminary classification results to obtain a new classification result if the absolute difference is less than a preset distance threshold.

[0071] Specifically, the means of the three classes of data points are calculated separately, and the absolute difference between the current means of any two classes is calculated. If the absolute difference is less than 60 degrees, it indicates that they are likely to be misclassified into two clusters due to noise affecting the same true phase difference, so these two classes are merged into one class. If all pairwise absolute differences are greater than or equal to 60 degrees, the original triadic structure is maintained. This can eliminate the redundancy caused by overclassification, further simplify the samples, and improve the robustness of the final means.

[0072] Step S57: Remove the abnormal jump data points from the preliminary classification results to obtain the target phase difference time series.

[0073] Remove the abnormal jump data points from the initial classification results, recalculate the standard deviation of the three types of data points, and iterate through steps S53 to S55 until all abnormal jump data points are removed to obtain the target phase difference time series.

[0074] This embodiment categorizes the initial phase difference time series into three types: a first anomalous jump representing a positive 360-degree transition, no anomalous jumps, and a second anomalous jump representing a negative 360-degree transition, providing a foundation for subsequent identification of anomalous jump data points. Next, the standard deviation of each data type and the absolute value of the difference between each data point and the median are calculated to identify anomalous jump data points deviating from the normal fluctuation range. Anomalous jump data points are removed from the data set by specifying a multiple of the standard deviation, ensuring data accuracy. Finally, the data is further optimized by iteratively removing anomalous jump data points, ensuring a more stable and accurate phase difference time series. This method can improve measurement speed while maintaining high measurement accuracy, effectively balancing the speed and accuracy of phase difference measurement.

[0075] Figure 6 The flowchart for step S7 provided in the embodiments of this application may include the following steps: Step S71: In the target phase difference time series, obtain the target classification result with the most data points.

[0076] Specifically, the target classification result with the most data points is determined from the target phase difference time series. The target classification result with the most data points is more likely to represent the mainstream trend in the data, rather than a few outliers. Therefore, selecting this classification result as the target classification result ensures that the calculated target phase difference is highly representative.

[0077] Step S73: Average the data points in the target classification results to obtain the corresponding target mean.

[0078] Specifically, once the target classification result is determined, all data points in that result are averaged. This step reduces noise and fluctuations by averaging the data points, especially since even after removing outlier data points, the remaining data points may still exhibit some small fluctuations. Calculating the average of these data points effectively suppresses errors caused by these minor fluctuations, resulting in a more stable outcome.

[0079] Step S75: Determine the target mean as the target phase difference between the two sinusoidal signals.

[0080] Specifically, the obtained target mean is determined as the target phase difference between the two sinusoidal signals. This target mean represents the most reliable phase difference value after removing anomalous jumps and noise interference. In this way, the final determined target phase difference is more accurate and reflects the true phase difference relationship between the two sinusoidal signals.

[0081] This embodiment selects the most representative signal data by acquiring the target classification result with the largest number of data points, ensuring measurement accuracy and improving processing speed. Next, by averaging the data points in this classification, noise and short-term fluctuations are removed, further improving measurement accuracy while avoiding complex calculation steps, thus ensuring high processing speed. Finally, the target mean is determined as the final target phase difference, ensuring the stability and reliability of the results. The overall method effectively improves measurement speed while maintaining high measurement accuracy, achieving a good balance between the two.

[0082] The specific implementation of the present invention will now be described in conjunction with a specific implementation apparatus. See also... Figure 7 Assuming the frequencies of one sinusoidal signal a and another sinusoidal signal b are f0 = 10 MHz, the sampling frequencies of the first, second, third, and fourth analog-to-digital converters are f0. s =2 GHz, one sinusoidal signal a and another sinusoidal signal b have a phase difference randomly distributed between -180 degrees and +180 degrees. The amplitudes of both sinusoidal signals are normalized to 1, and they contain Gaussian white noise with the same variance and zero mean. The signal-to-noise ratio is defined as: Where s(t) is the simulated voltage value of the real signal, n(t) is the simulated voltage value of the noise, and var[ ] is used to calculate the variance.

[0083] A sinusoidal signal is processed by the first power divider to obtain the first branch sinusoidal signal U. a,1 (t) and the second branch sinusoidal signal U a,2 (t). First branch sinusoidal signal U a,1 (t) passes through the first 90-degree phase shifter and the first analog-to-digital converter in sequence to obtain the first branch digital signal U. a,3 [n]. Second branch sinusoidal signal U a,2 (t) After passing through the second analog-to-digital converter, the second branch digital signal U is obtained. a,4 [n]. The first branch digital signal and the second branch digital signal are processed by the first atan2 phase converter to obtain a sinusoidal signal with a matching phase value time sequence. .

[0084] Another sinusoidal signal is processed by a second power divider to obtain a third branch sinusoidal signal U. b,1 (t) and the fourth branch sinusoidal signal U b,2 (t). The third branch sinusoidal signal U b,1 (t) passes through the second 90-degree phase shifter and the third analog-to-digital converter in sequence to obtain the third branch digital signal U. b,3 [n]. Fourth branch sinusoidal signal Ub,2 (t) After passing through the fourth analog-to-digital converter, the second branch digital signal U is obtained. b,4 [n]. The first branch digital signal and the second branch digital signal are processed by the second atan2 phase converter to obtain a phase value time sequence that matches another sinusoidal signal. .

[0085] Next, the phase value time series matched by a sinusoidal signal. Phase value time series that matches another sinusoidal signal The initial phase difference time series is obtained after subtraction. Please see. Figure 8 The phase value time series of two sinusoidal signals and Time series of initial phase difference The phase value time series of a sinusoidal signal 'a' Because of ωT s As the n terms increase over time, the first atan2 phase converter will revert to -180 degrees when its output phase just exceeds 180 degrees, and then begin to increase again. The phase value time series of the other two sinusoidal signals b... Similarly. , Similarly, the actual phase difference between the two sinusoidal signals is 28.4 degrees, due to... Figure 8 It can be seen that as the sinusoidal signals a and b successively increase to 180 degrees and then fall back to -180 degrees, the measured phase difference between the two sinusoidal signals fluctuates between 28.4 degrees, 28.4 degrees - 360 degrees (-331.6 degrees), and 28.4 degrees + 360 degrees (388.4 degrees), and further fluctuates around these three values ​​due to the presence of noise. Therefore, considering the measurement noise, the initial phase difference time series of the two sinusoidal signals... There are three possible values: Where ξ[n] is the time series of measured noise values, Therefore, the phase difference measured multiple times exhibits anomaly jumps of ±360 degrees. These anomalies, mixed with noise fluctuations, are difficult to identify or eliminate, resulting in a large and unstable average error. To address this issue, the initial phase difference value time series... After passing through a cluster averaging unit, the data is divided into three clusters, outlier data points are removed, near-clustered data are merged, and the average is taken to obtain the final target phase difference.

[0086] Please see Figure 9This diagram illustrates the result of the three-stage clustering step in the cluster averaging tool. It shows that the majority of data with a mean of 28.4 degrees is classified into the first category, a very small portion of data with a mean of 28.4 degrees is classified into the second category, and data with means of 28.4 degrees - 360 degrees (-331.6 degrees) and 28.4 degrees + 360 degrees (388.4 degrees) are classified into the third category. This classification result is not entirely accurate, therefore further steps are needed to improve its accuracy.

[0087] Please see Figure 10 The diagram illustrates the result of the step of removing outlier data points by the cluster averager. It shows that data with a mean of 28.4 degrees + 360 degrees (388.4 degrees) are treated as outliers and removed from the third class.

[0088] Please see Figure 11 This diagram illustrates the result of the cluster averaging step, where the cluster averager merges near-near clusters. It shows that it merges the first and second classes with similar means into one class, meaning all data with a mean of 28.4 degrees are grouped together. After three steps—triplex clustering, removal of outlier data points, and merging near-near clusters—phase difference data containing ±360-degree outlier jumps are correctly classified with a very high probability. However, due to noise interference, the possibility of misclassification cannot be ruled out. The mean is taken from the largest class. From the data points in the last two or three classes, the mean of the class with the most points (i.e., the first class with a mean of 28.4 degrees) is selected as the phase difference value to remove outlier jumps and suppress noise through averaging. This further reduces the impact of misclassification on the mean calculation at the cost of approximately half the number of measurement data points, while ensuring the unbiasedness of the measurement.

[0089] For signal-to-noise ratios of 0dB, 6dB, 10dB, 20dB, 30dB, and 40dB, the relationship between the maximum phase measurement error and the average number of points for four algorithms was compared. Four methods—direct averaging, ±180-degree averaging, cluster averaging, and FFT phase averaging—were selected to measure the phase difference between sinusoidal signals a and b. Direct averaging, ±180-degree averaging, and cluster averaging all first used orthogonal demodulation to measure the phases of sinusoidal signals a and b respectively, then directly subtracted them to generate a phase difference time series. This corresponds to the functions implemented by the first power divider, the first 90-degree phase shifter, the first analog-to-digital converter, the second analog-to-digital converter, the first atan2 phase converter, the second power divider, the second 90-degree phase shifter, the third analog-to-digital converter, the fourth analog-to-digital converter, the second atan2 phase converter, and the subtractor in this embodiment.

[0090] The differences between the three methods—direct averaging, ±180-degree averaging, and cluster averaging—lies in that the direct averaging method takes the average of all data points in the phase difference time series; the ±180-degree averaging method takes the average of data points whose median value is within ±180 degrees of the time series; and the cluster averaging method obtains the average through the four steps of trichotomous clustering, removal of outlier data points, merging of nearest clusters, and averaging of the largest cluster. The FFT phase method first samples the time series U of the sinusoidal signal a. a,4 [n] is subjected to an FFT transform to obtain the spectrum X a,4 [m], then roughly estimate the spectral index m corresponding to the frequency f0 position of the sinusoidal signal according to the maximum amplitude method, and then calculate the frequency offset δ according to the three-point method: Among them, spectrum X a,4 [m] are all complex numbers, and || represents calculating the amplitude. A more accurate estimate of the sinusoidal signal frequency is then: in, To determine the spectral resolution of the FFT transform, if the sampling time sequence U of the sinusoidal signal a is... a,4 If the total number of data points for [n] is N, then The phase measurement value of the corrected sinusoidal signal a is: Here, angle() represents calculating the phase angle. The above correction steps can reduce the impact of FFT picket fence effect and spectral leakage on phase measurement. The phase measurement value of the sinusoidal signal b is calculated similarly, and then the phase difference is calculated by subtraction.

[0091] Please see Figures 12-17 The relationship between the maximum phase measurement error and the average number of points for four algorithms is shown when the signal-to-noise ratio is 0dB, 6dB, 10dB, 20dB, 30dB, and 40dB, respectively. The four methods—direct averaging, averaging within ±180 degrees, cluster averaging, and FFT phase averaging—are represented by solid lines in red, green, blue, and pink, respectively. The average number of points on the horizontal axis represents the total number of data points in the phase difference time series. The total number of data points is taken from 12 different values: 8, 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, and 16384. In the simulation, 40 points with a phase difference evenly spaced between -180 degrees and +180 degrees were selected. For each point, 15 different sets of random numbers were used to simulate noise and generate two sinusoidal signal time series. Then, the phase difference was measured using the four methods mentioned above, and the measurement error was statistically analyzed. The average value of the 15 sets of data was taken. The maximum phase measurement error on the vertical axis represents the maximum error obtained by the above method for measuring 40 phase difference values ​​at a certain phase difference value, in degrees. Figure 18 The relationship between phase measurement error and phase difference for four algorithms is shown.

[0092] according to Figures 12-17 It can be seen that, under different signal-to-noise ratio conditions, as the number of averaging points increases, the maximum phase measurement error of the direct averaging method remains close to 180 degrees. Figure 18 It can be seen that the maximum error of the direct averaging method occurs when the phase difference is close to ±180 degrees. This is because the phase difference measured by the quadrature demodulation method will randomly jump around ±180 degrees, thus making the total average value close to 0 degrees.

[0093] When the signal-to-noise ratio (SNR) is less than 20 dB, the maximum phase measurement error of the averaging method within ±180 degrees actually increases with the increase of the number of averaging points. This is because as the number of sampling points increases, the total duration of the sampling time series exceeds the period of the sinusoidal signal, leading to the introduction of more anomalous transitions. However, when the SNR exceeds 20 dB, the maximum phase measurement error of the averaging method within ±180 degrees gradually decreases with the increase of the number of averaging points, because a higher SNR can effectively filter out the influence of anomalous transitions. Figure 18 Further, it is shown that the maximum phase measurement error of the averaging method within ±180 degrees also occurs when the phase difference is close to ±180 degrees, for the same reason as the direct averaging method. Overall, the averaging method within ±180 degrees has limited ability to filter out abnormal jumps and is suitable for applications with a signal-to-noise ratio higher than 20dB.

[0094] When the signal-to-noise ratio (SNR) does not exceed 6 dB, the maximum phase measurement error of the cluster averaging method gradually decreases with the increase of the average number of points, and the error value never exceeds 10 degrees, demonstrating its significant advantage in screening and removing the influence of anomalous jumps. Especially when the average number of points does not exceed 256, the maximum phase measurement error of the cluster averaging method is almost always smaller than that of the FFT phase method, and this advantage in measurement accuracy becomes more pronounced as the average number of points decreases or the SNR increases.

[0095] Accordingly, please refer to Figure 19 A block diagram of a phase difference measurement device for a sinusoidal signal provided in an embodiment of this application, the device comprising: The quadrature demodulation processing unit 101 is used to perform quadrature demodulation processing on the two input sinusoidal signals to obtain the phase value time series of the two sinusoidal signals respectively. The subtraction processing unit 103 is used to subtract the phase value time series of two sinusoidal signals to obtain a preliminary phase difference time series. The abnormal jump processing unit 105 is used to identify and remove abnormal jump data points in the preliminary phase difference time series to obtain the target phase difference time series. The averaging processing unit 107 is used to average the target phase difference time series to obtain the target phase difference corresponding to the two sinusoidal signals.

[0096] In some optional implementations, the quadrature demodulation processing unit 101 includes: Power division processing is performed on either of the two sinusoidal signals to obtain the first branch sinusoidal signal and the second branch sinusoidal signal corresponding to the sinusoidal signal. The phase angle of the first branch sinusoidal signal is adjusted, and the phase angle-adjusted first branch sinusoidal signal is converted from analog to digital to obtain the first branch digital signal; The second branch sinusoidal signal is converted from analog to digital to obtain the second branch digital signal; Phase calculations are performed on the first branch digital signal and the second branch digital signal to obtain a time series of phase values ​​that match any sinusoidal signal.

[0097] In some optional implementations, phase calculations are performed based on the first branch digital signal and the second branch digital signal to obtain a time series of phase values ​​matching any sinusoidal signal, including: The initial phase value is obtained based on the ratio between the first branch digital signal and the second branch digital signal; Perform a modulo operation on the initial phase value to obtain the modulo-determined phase value; Based on a preset angle range, the phase value after taking the modulus is adjusted to obtain a phase value time series that matches any sinusoidal signal.

[0098] In some alternative implementations, the subtraction processing unit 103 includes: When the phase value of one sinusoidal signal minus the phase value of another sinusoidal signal, plus measurement noise, is greater than or equal to zero, the measurement result or the measurement result minus a preset angle threshold is determined as the value of the phase difference time series. When the phase value of one sine signal minus the phase value of another sine signal, plus measurement noise, results in a value less than zero, the measurement result or the measurement result plus a preset angle threshold is determined as the value of the phase difference time series.

[0099] In some optional implementations, the exception transition processing unit 105 includes: The initial phase difference time series is classified to obtain preliminary classification results; the preliminary classification results include the first anomalous jump for positive 360 ​​degrees, the absence of anomalous jumps, and the second anomalous jump for negative 360 ​​degrees. Determine the standard deviation corresponding to any preliminary classification result, and determine the absolute value of the difference between each data point and the median of its respective preliminary classification result; Data points whose absolute value is greater than a specified multiple of the standard deviation are identified as anomalous jump data points; The abnormal jump data points are removed from the initial classification results to obtain the target phase difference time series.

[0100] In some alternative embodiments, the apparatus further includes: Determine the absolute difference between the means of every two preliminary classification results; If the absolute difference is less than a preset distance threshold, the corresponding preliminary classification results are merged to obtain a new classification result.

[0101] In some alternative implementations, the averaging processing unit 107 includes: In the target phase difference time series, obtain the target classification result with the largest number of data points; The data points in the target classification results are averaged to obtain the corresponding target mean. The target mean is determined as the target phase difference between the two sinusoidal signals.

[0102] Further functional descriptions of the above modules and units are the same as those in the corresponding embodiments described above, and will not be repeated here.

[0103] In this embodiment, a phase difference measurement device for a sinusoidal signal is presented in the form of a functional unit. Here, a unit refers to an ASIC (Application Specific Integrated Circuit) circuit, a processor and memory that execute one or more software or fixed programs, and / or other devices that can provide the above-mentioned functions.

[0104] Please see Figure 20 , Figure 20 This application provides a schematic diagram of the structure of a computer device, as shown in the embodiment of the present application. Figure 20 As shown, the computer device includes one or more processors 10, memory 20, and interfaces for connecting the components, including high-speed interfaces and low-speed interfaces. The components communicate with each other via different buses and can be mounted on a common motherboard or otherwise installed as needed. The processors can process instructions executed within the computer device, including instructions stored in or on memory to display graphical information of a GUI on external input / output devices (such as display devices coupled to the interfaces). In some alternative implementations, multiple processors and / or multiple buses can be used with multiple memories and multiple memory modules, if desired. Similarly, multiple computer devices can be connected, each providing some of the necessary operations (e.g., as a server array, a group of blade servers, or a multiprocessor system). Figure 20 Take a processor 10 as an example.

[0105] Processor 10 may be a central processing unit, a network processor, or a combination thereof. Processor 10 may further include a hardware chip. The hardware chip may be an application-specific integrated circuit (ASIC), a programmable logic device (PLD), or a combination thereof. The programmable logic device may be a complex programmable logic device (CAMP), a field-programmable gate array (FPGA), a general-purpose array logic (GPA), or any combination thereof.

[0106] The memory 20 stores instructions executable by at least one processor 10 to cause the at least one processor 10 to perform the method shown in the above embodiments.

[0107] The memory 20 may include a program storage area and a data storage area. The program storage area may store the operating system and applications required for at least one function; the data storage area may store data created based on the use of the computer device. Furthermore, the memory 20 may include high-speed random access memory and may also include non-transitory memory, such as at least one disk storage device, flash memory device, or other non-transitory solid-state storage device. In some alternative embodiments, the memory 20 may optionally include memory remotely located relative to the processor 10, and these remote memories may be connected to the computer device via a network. Examples of such networks include, but are not limited to, the Internet, intranets, local area networks, mobile communication networks, and combinations thereof.

[0108] The memory 20 may include volatile memory, such as random access memory; the memory may also include non-volatile memory, such as flash memory, hard disk or solid-state drive; the memory 20 may also include a combination of the above types of memory.

[0109] The computer device also includes a communication interface 30 for communicating with other devices or communication networks.

[0110] This application also provides a computer-readable storage medium. The methods described in this application can be implemented in hardware or firmware, or implemented as recordable on a storage medium, or implemented as computer code downloaded over a network and originally stored on a remote storage medium or a non-transitory machine-readable storage medium and subsequently stored on a local storage medium. Thus, the methods described herein can be processed by software stored on a storage medium using a general-purpose computer, a dedicated processor, or programmable or dedicated hardware. The storage medium can be a magnetic disk, optical disk, read-only memory, random access memory, flash memory, hard disk, or solid-state drive, etc.; further, the storage medium can also include combinations of the above types of memory. It is understood that computers, processors, microprocessor controllers, or programmable hardware include storage components capable of storing or receiving software or computer code. When the software or computer code is accessed and executed by the computer, processor, or hardware, the methods shown in the above embodiments are implemented.

[0111] The apparatus and units described in the above embodiments can be implemented by a computer chip or physical entity, or by a product with a certain function. A typical implementation device is a computer. Specifically, a computer can be, for example, a personal computer, a laptop computer, a cellular phone, a camera phone, a smartphone, a personal digital assistant, a media player, a navigation device, an email device, a game console, a tablet computer, a wearable device, or any combination of these devices.

[0112] For ease of description, the above devices are described separately by function as various units. Of course, in implementing this application, the functions of each unit can be implemented in one or more software and / or hardware.

[0113] Those skilled in the art will understand that the embodiments of this application can be provided as methods or apparatus. Therefore, this application can take the form of a completely hardware embodiment, a completely software embodiment, or an embodiment combining software and hardware aspects. Furthermore, this application can take the form of a computer program product embodied on one or more computer-usable storage media (including but not limited to disk storage, CD-ROM, optical storage, etc.) containing computer-usable program code.

[0114] This application is described with reference to flowchart illustrations and / or block diagrams of methods, apparatuses, and devices according to embodiments of this application. It will be understood that each block of the flowchart illustrations and / or block diagrams, and combinations of blocks in the flowchart illustrations and / or block diagrams, can be implemented by computer program instructions. These computer program instructions can be provided to a processor of a general-purpose computer, special-purpose computer, embedded processor, or other programmable data processing apparatus to produce a machine, such that the instructions, which execute via the processor of the computer or other programmable data processing apparatus, generate instructions for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 A device that provides the functions specified in one or more boxes.

[0115] These computer program instructions may also be stored in a computer-readable storage medium that can direct a computer or other programmable data processing device to function in a particular manner, such that the instructions stored in the computer-readable storage medium produce an article of manufacture including instruction means, which are implemented in a process Figure 1 One or more processes and / or boxes Figure 1 The function specified in one or more boxes.

[0116] These computer program instructions may also be loaded onto a computer or other programmable data processing equipment to cause a series of operational steps to be performed on the computer or other programmable equipment to produce a computer-implemented process, thereby providing instructions that execute on the computer or other programmable equipment for implementing the process. Figure 1 One or more processes and / or boxes Figure 1 The steps of the function specified in one or more boxes.

[0117] It should also be noted that the terms "comprising," "including," or any other variations thereof are intended to cover non-exclusive inclusion, such that a process, method, article, or apparatus that comprises a list of elements includes not only those elements but also other elements not expressly listed, or elements inherent to such a process, method, article, or apparatus. Without further limitation, an element defined by the phrase "comprising one..." does not exclude the presence of other identical elements in the process, method, article, or apparatus that includes said element.

[0118] The various embodiments in this specification are described in a progressive manner. Similar or identical parts between embodiments can be referred to mutually. Each embodiment focuses on describing the differences from other embodiments. In particular, the apparatus embodiments are basically similar to the method embodiments, so the description is relatively simple; relevant parts can be referred to the descriptions of the method embodiments.

[0119] The above description is merely an embodiment of this application and is not intended to limit the scope of this application. Various modifications and variations can be made to this application by those skilled in the art. Any modifications, equivalent substitutions, improvements, etc., made within the spirit and principles of this application should be included within the scope of the claims of this application.

[0120] Although embodiments of this application have been described in conjunction with the accompanying drawings, those skilled in the art can make various modifications and variations without departing from the spirit and scope of this application, and such modifications and variations all fall within the scope defined by the appended claims.

Claims

1. A method for measuring the phase difference of a sinusoidal signal, characterized in that, The method includes: The two input sinusoidal signals are subjected to quadrature demodulation processing to obtain the phase value time series of the two sinusoidal signals respectively; Subtract the phase value time series of the two sinusoidal signals to obtain a preliminary phase difference time series; Identify and remove anomalous jump data points in the preliminary phase difference time series to obtain the target phase difference time series; The target phase difference is obtained by averaging the time series of the target phase difference values ​​and then averaging the two sinusoidal signals.

2. The method according to claim 1, characterized in that, The process of performing quadrature demodulation on the input sinusoidal signal to obtain the phase value time series of the two sinusoidal signals includes: Power division processing is performed on either of the two sinusoidal signals to obtain the first branch sinusoidal signal and the second branch sinusoidal signal corresponding to the respective sinusoidal signal. The phase angle of the first branch sinusoidal signal is adjusted, and the phase angle-adjusted first branch sinusoidal signal is converted from analog to digital to obtain the first branch digital signal; The second branch sinusoidal signal is converted from analog to digital to obtain the second branch digital signal; Phase calculations are performed based on the first branch digital signal and the second branch digital signal to obtain the phase value time series that matches any of the sinusoidal signals.

3. The method according to claim 2, characterized in that, The step of performing phase calculation based on the first branch digital signal and the second branch digital signal to obtain the phase value time series matching any sinusoidal signal includes: The initial phase value is obtained based on the ratio between the first branch digital signal and the second branch digital signal; Perform a modulo operation on the initial phase value to obtain the modulo-determined phase value; The phase value after taking the modulus is adjusted according to the preset angle range to obtain the phase value time sequence that matches any of the sinusoidal signals.

4. The method according to claim 1, characterized in that, The step of subtracting the phase value time series of the two sinusoidal signals to obtain a preliminary phase difference time series includes: When the measurement result of subtracting the phase value of another sinusoidal signal from the phase value of one sinusoidal signal and adding measurement noise is greater than or equal to zero, the measurement result or the measurement result minus a preset angle threshold is determined as the value of the phase difference time series. When the measurement result of subtracting the phase value of another sine signal from the phase value of one sine signal and adding measurement noise is less than zero, the measurement result or the measurement result plus the preset angle threshold is determined as the value of the phase difference time series.

5. The method according to claim 1, characterized in that, The process of identifying and removing anomalous jump data points from the preliminary phase difference time series to obtain the target phase difference time series includes: The preliminary phase difference time series is classified to obtain preliminary classification results; the preliminary classification results include a first anomalous jump for positive 360 ​​degrees, no anomalous jump, and a second anomalous jump for negative 360 ​​degrees; Determine the standard deviation corresponding to any preliminary classification result, and determine the absolute value of the difference between each data point and the median of its respective preliminary classification result; Data points whose absolute value is greater than a specified multiple of the standard deviation are identified as abnormal jump data points; The abnormal jump data points are deleted from the preliminary classification results to obtain the target phase difference time series.

6. The method according to claim 5, characterized in that, The method further includes: Determine the absolute difference between the means of every two preliminary classification results; If the absolute difference is less than a preset distance threshold, the corresponding preliminary classification results are merged to obtain a new classification result.

7. The method according to claim 1, characterized in that, The target phase difference is obtained by averaging the time series of the target phase difference values, including: In the target phase difference time series, obtain the target classification result with the largest number of data points; The data points in the target classification results are averaged to obtain the corresponding target mean. The target mean is determined as the target phase difference corresponding to the two sinusoidal signals.

8. A phase difference measuring device for a sinusoidal signal, characterized in that, The device includes: The quadrature demodulation processing unit is used to perform quadrature demodulation processing on the two input sinusoidal signals to obtain the phase value time series of the two sinusoidal signals respectively. The subtraction processing unit is used to subtract the phase value time series of the two sinusoidal signals to obtain a preliminary phase difference time series. An abnormal jump processing unit is used to identify and remove abnormal jump data points in the preliminary phase difference time series to obtain the target phase difference time series. An averaging unit is used to average the time series of the target phase difference value to obtain the target phase difference corresponding to the two sinusoidal signals.

9. A computer device, characterized in that, include: A memory and a processor are communicatively connected, the memory storing computer instructions, and the processor executing the computer instructions to perform the method for measuring the phase difference of a sinusoidal signal as described in any one of claims 1 to 7.

10. A computer-readable storage medium, characterized in that, The computer-readable storage medium stores computer instructions for causing the computer to perform the phase difference measurement method for a sinusoidal signal according to any one of claims 1 to 7.

Citation Information

Patent Citations

  • UQPSK coherent demodulation method and system

    CN115695124A

  • Phase difference detection circuit and its method, phase comparator having the phase difference detection circuit, phase locked loop circuit having the phase difference comparation circuit and optical disk drive servo device using the phase locked loop circuit

    JP2000076667A

  • Phase difference detecting circuit and inclined-angle measuring instrument

    JP2004205346A

  • Method for estimating phase noise

    WO2023006432A1