A system and method for testing phase difference of same-frequency periodic signals

By designing a phase difference test system for the same frequency period signal, using signal conditioning, synchronous sampling and differential processing, the problem of low accuracy of traditional phase testing methods is solved, high-precision phase difference measurement is achieved, and the quality of equipment in related fields is improved.

CN110988479BActive Publication Date: 2025-01-14ZHUHAI KEHUI ELECTRICAL APPLIANCE CO LTD
View PDF 3 Cites 0 Cited by

Patent Information

Application Number
CN201911374831.4
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2019-12-27
Publication Date
2025-01-14
Estimated Expiration
2039-12-27

AI Technical Summary

Technical Problem

Traditional phase testing methods such as zero crossing detection method and harmonic analysis method have problems such as low accuracy and easy interference, making it difficult to accurately measure phase differences.

Method used

A test system for phase difference of the same frequency period signal is designed, including signal conditioning module, sampling module, control module, D/A conversion module, differential signal module and synchronization signal generation module, through signal conditioning, synchronous sampling, differential processing and Calculate to achieve high-precision phase difference measurement.

Benefits of technology

The accuracy of phase difference measurement is improved, and the quality of instruments and equipment in the fields of power equipment status monitoring, signal acquisition and analysis, communication, automatic control, etc. based on phase difference technology is enhanced.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN110988479B_ABST
    Figure CN110988479B_ABST
Patent Text Reader

Abstract

The present invention discloses a testing system and method for phase difference of same-frequency periodic signals, the system comprises a signal conditioning module, a sampling module, a control module, a D / A conversion module, a differential signal module, and an input-output module, wherein the input end of the signal conditioning module is used to receive an input signal, the output end of the signal conditioning module is connected to the control module through the sampling module, the control module synchronously outputs the sampling value of the input signal to the D / A conversion module, the D / A conversion module synchronously outputs two-way analog signals to the differential signal module, the differential signal module outputs two-way differential signals to the sampling module, the control module reads the sampling values ​​of the two-way differential signals collected by the sampling module, and outputs the phase difference calculation result to the input-output module. The method is applied to the above-mentioned system. The present invention can simply and accurately obtain high-precision phase difference measurement results.
Need to check novelty before this filing date? Find Prior Art

Description

[Technical field]

[0001] The present invention relates to the technical field of signal analysis and processing, and in particular to a testing system for phase differences of same-frequency periodic signals and a testing method applied to the system. [Background technology]

[0002] Phase difference is a parameter that is often tested in the field of industrial measurement and control. It is widely used in signal analysis, circuit parameter debugging, industrial automation control, and power electronics technology. Traditional common phase test methods include zero-crossing test method and harmonic analysis method.

[0003] The zero-crossing detection method obtains the phase difference by detecting the time difference of the zero-crossing point. This method needs to lock the zero-crossing point, and has the problems of low accuracy and susceptibility to interference, resulting in inaccurate measurement.

[0004] The harmonic analysis method performs A / D sampling on the input signal and then performs FFT operation on the discrete sequence after sampling to obtain the values ​​of all harmonic component points. Each point calculated by FFT can be represented by a complex number a+bi, and the phase of this point is Then the phase difference can be obtained by phase subtraction. Similarly, the harmonic analysis method is affected by the quantization error of A / D and has the problem of low accuracy. [Summary of the invention]

[0005] The main purpose of the present invention is to provide a testing system for the phase difference of periodic signals of the same frequency which can simply and accurately measure the phase difference.

[0006] Another object of the present invention is to provide a method for testing the phase difference of periodic signals of the same frequency, which can improve the phase difference measurement accuracy.

[0007] In order to achieve the above-mentioned main purpose, a testing system for the phase difference of periodic signals of the same frequency provided by the present invention includes a signal conditioning module, a sampling module, a control module, a D / A conversion module, a differential signal module, and an input-output module. The input end of the signal conditioning module is used to receive input signals sig1 and sig2, and the output end of the signal conditioning module is connected to the control module through the sampling module. The control module synchronously outputs the sampling values ​​of the input signals sig1 and sig2 to the D / A conversion module, and the D / A conversion module synchronously outputs two analog signals to the differential signal module. The differential signal module outputs two differential signals to the sampling module. The control module reads the sampling values ​​of the two differential signals collected by the sampling module, and outputs the phase difference calculation results to the input-output module.

[0008] A further solution is that the test system also includes a synchronization signal generating module, the input end of the synchronization signal generating module is used to detect the frequency signals of the input signals sig1 and sig2, and generate a sampling synchronization signal output to drive the sampling module to synchronously sample the input signal.

[0009] A further solution is that the synchronization signal generating module includes a signal shaping circuit and a phase-locked loop circuit, the input end of the signal shaping circuit receives the frequency signal of the input signals sig1 and sig2, the output end of the signal shaping circuit is electrically connected to the input end of the phase-locked loop circuit, and the output end of the phase-locked loop circuit outputs the sampling synchronization signal.

[0010] A further solution is that the differential signal module includes a first automatic gain adjustment unit, a second automatic gain adjustment unit, a third automatic gain adjustment unit, and a fourth automatic gain adjustment unit, the positive input end of the first automatic gain adjustment unit is connected to the first output of the D / A conversion module, the positive input end of the second automatic gain adjustment unit is connected to the second output of the D / A conversion module, the positive input end of the third automatic gain adjustment unit is connected to the second output of the D / A conversion module, the output end of the first automatic gain adjustment unit is connected to the positive input end of the fourth automatic gain adjustment unit, the output end of the second automatic gain adjustment unit is connected to the negative input end of the fourth automatic gain adjustment unit, and the output end of the fourth automatic gain adjustment unit is connected to the signal acquisition end of the sampling module.

[0011] A further solution is that the automatic gain adjustment unit includes two signal clamping protection circuits and a programmable gain instrument amplifier, the input end of the first signal clamping protection circuit serves as the positive input end of the automatic gain adjustment unit, the input end of the second signal clamping protection circuit serves as the negative input end of the automatic gain adjustment unit, the output ends of the first signal clamping protection circuit and the second signal clamping protection circuit are both electrically connected to the input end of the programmable gain instrument amplifier, and the output end of the programmable gain instrument amplifier serves as the output end of the automatic gain adjustment unit.

[0012] A further solution is that the input-output module includes a key input module and a display module, and the key input module and the display module are electrically connected to the control module respectively.

[0013] It can be seen that the test system provided by the present invention performs signal processing such as amplification and noise filtering on the input signal through the signal conditioning module, the sampling module samples the input signal after signal processing at equal intervals, the control module reads the sampling value of each sampling point and synchronously outputs it to the D / A conversion module, the D / A module synchronously outputs two analog signals, the differential signal module performs differential processing on the differential signal output by the D / A module, the sampling module synchronously samples the differential signal, the control module reads the differential signal sampling value, processes and calculates the sampled data, and thus calculates the phase difference of the input signal.

[0014] In addition, the display module is used to display the phase difference, so that the tester can intuitively obtain the currently measured phase difference.

[0015] Therefore, the present invention can obtain high-precision phase difference measurement results, thereby improving the quality of instruments and equipment in the fields of power equipment status monitoring, signal acquisition and analysis, communication, automatic control, etc. based on phase difference technology.

[0016] In order to achieve the other purpose mentioned above, the present invention also provides a method for testing the phase difference of periodic signals of the same frequency, which is applied to the above-mentioned test system, and the method includes: S1, the sampling module performs discrete synchronous sampling of two input signals at equal intervals; S2, the control module reads the discrete sampling values ​​generated in the step S1, and synchronously converts the discrete sampling values ​​output by the control module into two analog signals through the D / A conversion module; S3, the differential signal module performs differential processing on the two analog signals generated in the step S2; S4, the sampling module performs synchronous discrete sampling on the differential signal generated in the step S3; S5, the control module calculates the discrete sampling sequence obtained in the step S4 to obtain the phase difference of the input signal.

[0017] A further solution is that step S2 specifically includes: after determining that the control module enters the synchronous sampling interrupt service program, starting the D / A channel output update timer of the D / A conversion module, the control module reads the A / D sampling values ​​V1 and V2 of the two input signals, and the control module writes the A / D sampling value V1 into the output register of the D / A channel 1 of the D / A conversion module through DMA; after the A / D sampling value V1 is written into the output register of the first D / A channel, a DMA interrupt is triggered, and in the DMA interrupt service program, the control module starts DMA to write the A / D sampling value V2 into the output register of the D / A channel 2 of the D / A conversion module; when the timing value of the D / A channel output update timer of the D / A conversion module is reached, the timer interrupt is triggered, and the control module controls the D / A conversion module to simultaneously update the signal outputs of D / A channels 1 and 2, that is, to generate two synchronous analog signals.

[0018] A further solution is that before executing step S1, step S0 is also executed, and step S0 specifically includes: setting the input signal frequency to frequency f, setting the synchronization signal sampling frequency of the synchronization signal module to frequency fs, wherein the number of sampling points per cycle of the input signal is Ns=fs / f, and the collection interval is t=1 / fs.

[0019] A further solution is that, in step S1, the two input signals are further processed by the signal conditioning module, and the two input signals after the signal processing are output to the sampling module.

[0020] It can be seen that the test method provided by the present invention can obtain high-precision phase difference measurement results, thereby improving the quality of instruments and equipment in the fields of power equipment status monitoring, signal acquisition and analysis, communication, automatic control, etc. based on phase difference technology.

Brief Description of the Drawings

[0021] Figure 1 The present invention is a schematic diagram of a system for testing phase differences of periodic signals of the same frequency.

[0022] Figure 2 The present invention is a block diagram of the principle of a synchronous signal generating module in a system for testing phase differences of same-frequency periodic signals.

[0023] Figure 3 The invention discloses a principle block diagram of a gain automatic adjustment unit in an embodiment of a test method for a test system for phase differences of same-frequency periodic signals.

[0024] Figure 4 The present invention is a flowchart of a method for testing the phase difference of periodic signals with the same frequency. [Specific implementation method]

[0025] In order to make the purpose, technical solution and advantages of the invention more clearly understood, the present invention is further described in detail below in conjunction with the accompanying drawings and embodiments. It should be understood that the specific embodiments described herein are only used to explain the present invention and are not limited to the present invention.

[0026] An embodiment of a testing system for phase difference of same-frequency periodic signals:

[0027] See also Figure 1The test system of the present invention includes a signal conditioning module 10, a sampling module, a control module 40, a D / A conversion module 50, a differential signal module 60, and an input-output module 70, wherein the sampling module of the present embodiment may be two sampling modules, such as a first sampling module 20 and a second sampling module 30. The input end of the signal conditioning module 10 is used to receive input signals sig1 and sig2, and the output end of the signal conditioning module 10 is connected to the control module 40 through the first sampling module 20. The control module 40 synchronously outputs the sampling values ​​of the input signals sig1 and sig2 to the D / A conversion module 50, and the D / A conversion module 50 synchronously outputs two analog signals to the differential signal module 60. The differential signal module 60 outputs two differential signals to the second sampling module 30. The control module 40 reads the sampling values ​​of the two differential signals collected by the second sampling module 30, and outputs the phase difference calculation result to the input-output module 70.

[0028] Of course, the number of sampling modules in this embodiment is two, but the sampling modules in this embodiment are not limited to two, and can also be one (selecting an A / D converter that supports more sampling channels) or multiple sampling modules. Any non-substantial modifications made to the present invention using this concept also fall within the protection scope of the present invention.

[0029] Among them, the first sampling module 20 and the second sampling module 30 described in this embodiment both use A / D chips to synchronously sample input signals; the D / A conversion module 50 described in this embodiment generates analog signals using D / A chips; and the control module 40 described in this embodiment can be implemented by MCU / single-chip microcomputer / DSP / FPGA.

[0030] Since the sensor signal cannot be directly converted into digital data, because the sensor output is a relatively small voltage, current or change, it must be conditioned before being converted into digital data. The conditioning in the signal conditioning module 10 in this embodiment is to amplify, buffer or scale the analog signal to make it suitable for the input of the analog / digital converter (ADC). The ADC then digitizes the analog signal and sends the digital signal to a microcontroller or other digital device for data processing in the system.

[0031] In this embodiment, the test system also includes a synchronization signal generating module 80, the input end of the synchronization signal generating module 80 is used to detect the frequency signals of the input signals sig1 and sig2, and generate a sampling synchronization signal output to drive the first sampling module 20 and the second sampling module 30 to synchronously sample the input signals.

[0032] See also Figure 2The synchronization signal generating module 80 includes a signal shaping circuit 81 and a phase-locked loop circuit 82. The input end of the signal shaping circuit 81 receives the frequency signals of the input signals sig1 and sig2. The output end of the signal shaping circuit 81 is electrically connected to the input end of the phase-locked loop circuit 82. The output end of the phase-locked loop circuit 82 outputs a sampling synchronization signal. The signal shaping circuit 81 of this embodiment can be an RC circuit used in analog circuits and pulse digital circuits; the phase-locked loop circuit 82 means automatic control of phase synchronization. A closed-loop system that can complete the automatic control of the phase synchronization of two electrical signals is called a phase-locked loop, abbreviated as PLL, which is mainly composed of three parts: a phase comparator (PD), a voltage-controlled oscillator (VCO) and a low-pass filter.

[0033] In this embodiment, the differential signal module 60 includes multiple gain automatic adjustment units 61, such as a first gain automatic adjustment unit, a second gain automatic adjustment unit, a third gain automatic adjustment unit, and a fourth gain automatic adjustment unit. The positive input end of the first gain automatic adjustment unit is connected to the first output of the D / A conversion module 50, the positive input end of the second gain automatic adjustment unit is connected to the second output of the D / A conversion module 50, the positive input end of the third gain automatic adjustment unit is connected to the second output of the D / A conversion module 50, the output end of the first gain automatic adjustment unit is connected to the positive input end of the fourth gain automatic adjustment unit, the output end of the second gain automatic adjustment unit is connected to the negative input end of the fourth gain automatic adjustment unit, and the output end of the fourth gain automatic adjustment unit is connected to the signal acquisition end of the second sampling module 30.

[0034] Of course, the number of the automatic gain adjustment units 61 in this embodiment is four, but the automatic gain adjustment units in this embodiment are not limited to four, and can also be one (selecting a programmable gain instrument amplifier that supports more sampling channels) or more. Any non-substantial modifications made to the present invention using this concept also fall within the scope of protection of the present invention.

[0035] See also Figure 3 The automatic gain adjustment unit 61 includes two signal clamp protection circuits and a programmable gain instrument amplifier 613. The input end of the first signal clamp protection circuit 611 serves as the positive input end of the automatic gain adjustment unit 61, and the input end of the second signal clamp protection circuit 612 serves as the negative input end of the automatic gain adjustment unit 61. The output ends of the first signal clamp protection circuit 611 and the second signal clamp protection circuit 612 are both electrically connected to the input end of the programmable gain instrument amplifier 613, and the output end of the programmable gain instrument amplifier 613 serves as the output end of the automatic gain adjustment unit 61.

[0036] Preferably, the signal clamping protection circuit of this embodiment is a clamping circuit that can convert the input voltage into an output voltage whose peak value is clamped at a predetermined level without changing the signal. The clamping circuit can shift the level of the input signal up or down without changing the waveform of the input signal, and is mainly composed of a diode, a capacitor and a resistor.

[0037] Preferably, the programmable gain instrument amplifier (PGIA) of this embodiment is a highly versatile amplifier, whose amplification factor can be controlled by a program as needed. With this amplifier, the amplification factor can be adjusted by a program to make the full-scale signal of the A / D converter (such as the second sampling module 30) uniform, thereby greatly improving the measurement accuracy.

[0038] In this embodiment, the input-output module 70 includes a key input module 9 and a display module 8, and the key input module 9 and the display module 8 are respectively electrically connected to the control module 40. The key input module 9 includes input devices such as keys and touch screens, and the display module 8 includes a liquid crystal display.

[0039] Specifically, the signal conditioning module 10 performs signal processing such as automatic gain adjustment and noise filtering on the input signals sig1 and sig2, and then transmits them to the first sampling module 20. At the same time, the synchronization signal module automatically locks the input signal frequency, and generates a synchronization signal with an integer multiple of the sampling frequency of the input signal and outputs it to the A / D acquisition module, such as the first sampling module 20 and the second sampling module 30, to drive the A / D acquisition module to synchronously sample the input signal.

[0040] Next, the MCU reads the sampling values ​​of the input signals sig1 and sig2 of the first sampling module 20, and synchronously outputs them to the D / A conversion module 50, and the D / A conversion module 50 synchronously generates two analog signals sig3 and sig4 and outputs them to the differential signal module 60. The differential signal module 60 performs differential and amplification processing on the two analog signals sig3 and sig4, and performs differential and amplification processing on the other analog signal sig4 to ground, and then sends them to the second sampling module 30.

[0041] Then, the MCU reads the sampling data of the two differential signals from the second sampling module 30, and processes and operates the sampling data to calculate the phase difference of the input signal. The display module 8 is used to display the phase difference, so that the tester can intuitively obtain the current measured phase difference.

[0042] It can be seen that the test system provided by the present invention performs signal processing such as amplifying and noise filtering on the input signal through the signal conditioning module 10, the first sampling module 20 samples the input signal after signal processing at equal intervals, the control module 40 reads the sampling value of each sampling point and synchronously outputs it to the D / A conversion module 50, the D / A module synchronously outputs two analog signals, the differential signal module performs differential processing on the differential signal output by the D / A module, the second sampling module 30 synchronously samples the differential signal, the control module 40 reads the differential signal sampling value, processes and calculates the sampling data, and thus calculates the phase difference of the input signal.

[0043] Therefore, the present invention can obtain high-precision phase difference measurement results, thereby improving the quality of instruments and equipment in the fields of power equipment status monitoring, signal acquisition and analysis, communication, automatic control, etc. based on phase difference technology.

[0044] An embodiment of a method for testing phase difference of periodic signals of the same frequency:

[0045] A method for testing a system for testing phase differences of periodic signals of the same frequency is applied to the above-mentioned testing system. Figure 4 As shown, when the method measures the phase difference of the same-frequency periodic signal, first, step S1 is executed, and the sampling module performs equally spaced discrete synchronous sampling on two input signals.

[0046] Then, step S2 is executed, the control module 40 reads the discrete sampling values ​​generated in step S1 , and synchronously converts the discrete sampling values ​​output by the control module 40 into two analog signals through the D / A conversion module 50 . The above step S2 specifically includes: after determining that the control module 40 enters the synchronous sampling interrupt service program, the D / A channel output update timer of the D / A conversion module 50 is started, the control module 40 reads the A / D sampling values ​​V1 and V2 of the two input signals, and the control module 40 writes the A / D sampling value V1 into the output register of the D / A channel 1 of the D / A conversion module 50 through DMA; after the A / D sampling value V1 is written into the output register of the first D / A channel, a DMA interrupt is triggered, and in the DMA interrupt service program, the control module 40 starts DMA to write the A / D sampling value V2 into the output register of the D / A channel 2 of the D / A conversion module 50; when the timing value of the D / A channel output update timer of the D / A conversion module 50 is reached, the timer interrupt is triggered, and the control module 40 controls the D / A conversion module 50 to simultaneously update the signal outputs of the D / A channels 1 and 2, that is, to generate two synchronous analog signals. Among them, the above timer is used to control the update of the D / A channel output.

[0047] Then, step S3 is executed, and the differential signal module 60 performs differential processing on the two analog signals generated in the above step S2.

[0048] Then, step S4 is executed, and the sampling module performs synchronous discrete sampling on the differential signal generated in the above step S3.

[0049] Then, step S5 is executed, and the control module 40 calculates the discrete sampling sequence obtained in the above step S4 to obtain the phase difference of the input signal.

[0050] Before executing step S1, step S0 is also executed, and step S0 specifically includes: setting the input signal frequency to frequency f, setting the synchronization signal sampling frequency of the synchronization signal module to frequency fs, wherein the number of sampling points per cycle of the input signal is Ns=fs / f, and the collection interval is t=1 / fs.

[0051] In step S1 , the signal conditioning module 10 also performs signal processing on the two input signals, and outputs the processed two input signals to the sampling module.

[0052] In practical applications, the input signal is synchronously discretely sampled using A / D, and then the sampled value is D / A converted to produce two analog signals synchronously, which specifically includes the following steps:

[0053] First, after the control module 40 enters the synchronous sampling interrupt service program, it starts the D / A channel output update timer, reads the A / D sampling values ​​V1 and V2 of the input signal, and then writes the A / D sampling value V1 into the output register of D / A channel 1 through DMA.

[0054] Then, the A / D sampling value V1 is written into the register of D / A channel 1 to trigger a DMA interrupt. In the DMA interrupt service program, DMA is started to write the A / D sampling value V2 into the output register of D / A output channel 2.

[0055] Then, when the timing value of the D / A channel output update timer is reached, the timer interrupt is triggered, and the control module 40 controls the D / A conversion module 50 to simultaneously update the signal outputs of D / A channels 1 and 2, that is, two synchronous analog signals are generated.

[0056] Next, the two analog signals generated by the D / A conversion module 50 are differentially processed and output to the A / D sampling module for synchronous sampling. The control module 40 reads the sampling value of the differential signal collected by the A / D sampling module.

[0057] Then, the control module 40 calculates a periodic sampling sequence acquired in the above steps to obtain a phase difference.

[0058] It can be seen that the test method provided by the present invention can obtain high-precision phase difference measurement results, thereby improving the quality of instruments and equipment in the fields of power equipment status monitoring, signal acquisition and analysis, communication, automatic control, etc. based on phase difference technology.

[0059] It should be noted that the above are only preferred embodiments of the present invention, but the design concept of the invention is not limited thereto, and any non-substantial modifications made to the present invention using this concept also fall within the protection scope of the present invention.

Claims

1. A system for testing phase difference of periodic signals with the same frequency, characterized in that: include: A signal conditioning module, a sampling module, a control module, a D / A conversion module, a differential signal module, and an input-output module. The input end of the signal conditioning module is used to receive input signals sig1 and sig2. The output end of the signal conditioning module is connected to the control module through the sampling module. The control module synchronously outputs the sampling values ​​of the input signals sig1 and sig2 to the D / A conversion module. The D / A conversion module synchronously outputs two analog signals to the differential signal module. The differential signal module outputs two differential signals to the sampling module. The control module reads the sampling values ​​of the two differential signals collected by the sampling module, and outputs the phase difference calculation result to the input-output module. The differential signal module performs differential and amplification processing on the two analog signals sig3 and sig4, and performs differential and amplification processing on the other sig4 to ground, and then sends it to the sampling module; Wherein, the differential signal module includes a first automatic gain adjustment unit, a second automatic gain adjustment unit, a third automatic gain adjustment unit, and a fourth automatic gain adjustment unit, the positive input end of the first automatic gain adjustment unit is connected to the first output of the D / A conversion module, the positive input end of the second automatic gain adjustment unit is connected to the second output of the D / A conversion module, the positive input end of the third automatic gain adjustment unit is connected to the second output of the D / A conversion module, the output end of the first automatic gain adjustment unit is connected to the positive input end of the fourth automatic gain adjustment unit, the output end of the second automatic gain adjustment unit is connected to the negative input end of the fourth automatic gain adjustment unit, and the output end of the fourth automatic gain adjustment unit is connected to the signal acquisition end of the sampling module.

2. The test system according to claim 1, characterized in that: The test system further comprises a synchronization signal generating module, the input end of which is used to detect the frequency signals of the input signals sig1 and sig2, and to generate a sampling synchronization signal output to drive the sampling module to synchronously sample the input signals.

3. The test system according to claim 2, characterized in that: The synchronization signal generating module includes a signal shaping circuit and a phase-locked loop circuit. The input end of the signal shaping circuit receives the frequency signal of the input signals sig1 and sig2. The output end of the signal shaping circuit is electrically connected to the input end of the phase-locked loop circuit. The output end of the phase-locked loop circuit outputs the sampling synchronization signal.

4. The test system according to claim 1, characterized in that: The automatic gain adjustment unit includes two signal clamping protection circuits and a programmable gain instrument amplifier. The input end of the first signal clamping protection circuit serves as the positive input end of the automatic gain adjustment unit, and the input end of the second signal clamping protection circuit serves as the negative input end of the automatic gain adjustment unit. The output ends of the first signal clamping protection circuit and the second signal clamping protection circuit are both electrically connected to the input end of the programmable gain instrument amplifier, and the output end of the programmable gain instrument amplifier serves as the output end of the automatic gain adjustment unit.

5. The test system according to claim 1 or 2, characterized in that: The input-output module includes a key input module and a display module, and the key input module and the display module are electrically connected to the control module respectively.

6. A method for testing the phase difference of periodic signals with the same frequency, applied to a system for testing the phase difference of periodic signals with the same frequency as claimed in any one of claims 1 to 5, characterized in that: The method includes: S1, the sampling module performs equally spaced discrete synchronous sampling on the two input signals; S2, the control module reads the discrete sampling values ​​generated in step S1, and synchronously converts the discrete sampling values ​​output by the control module into two analog signals through the D / A conversion module; S3, the differential signal module performs differential processing on the two analog signals generated in step S2; S4, the sampling module performs synchronous discrete sampling on the differential signal generated in step S3; S5, the control module calculates the discrete sampling sequence obtained in step S4 to obtain the phase difference of the input signal.

7. The testing method according to claim 6, characterized in that: The step S2 specifically includes: after determining that the control module enters the synchronous sampling interrupt service program, starting the D / A channel output update timer of the D / A conversion module, the control module reads the A / D sampling values ​​V1 and V2 of the two input signals, and the control module writes the A / D sampling value V1 into the output register of the D / A channel 1 of the D / A conversion module through DMA; After the A / D sampling value V1 is written into the output register of the first D / A channel, a DMA interrupt is triggered. In the DMA interrupt service routine, the control module starts DMA to write the A / D sampling value V2 into the output register of the D / A channel 2 of the D / A conversion module. When the timing value of the D / A channel output update timer of the D / A conversion module is reached, the timer interrupt is triggered, and the control module controls the D / A conversion module to simultaneously update the signal outputs of D / A channels 1 and 2, that is, to generate two synchronous analog signals.

8. The testing method according to claim 6 or 7, characterized in that: Before executing step S1, step S0 is also executed, and step S0 specifically includes: setting the input signal frequency to frequency f, setting the synchronization signal sampling frequency of the synchronization signal module to frequency fs, wherein the number of sampling points per cycle of the input signal is Ns=fs / f, and the collection interval is t=1 / fs.

9. The testing method according to claim 6 or 7, characterized in that: In step S1, the two input signals are processed by the signal conditioning module, and the processed two input signals are output to the sampling module.

Citation Information

Patent Citations

  • Power signal synchronous sampling system and method

    CN109120267A

  • System for testing phase difference of same-frequency periodic signals

    CN211741411U

  • Phase difference measuring apparatus for measuring phase difference between input signals

    US5844408A