A high-precision frequency measurement device and method based on phase-shift synchronization

Through high-precision frequency measurement devices and methods based on shift synchronization, the problem of uncontrollable gate time and noise influence when the group cycle is large is solved, and high-precision frequency measurement is realized, eliminating counting errors. Ensures the accuracy of frequency measurement.

CN111103457BActive Publication Date: 2024-11-26CHENGDU AERONAUTIC POLYTECHNIC
View PDF 0 Cites 1 Cited by

Patent Information

Application Number
CN202010053628.3
Authority / Receiving Office
CN · China
Patent Type
Patents(China)
Current Assignee / Owner
Filing Date
2020-01-17
Publication Date
2024-11-26
Estimated Expiration
2040-01-17

AI Technical Summary

Technical Problem

The existing phase detection broadband frequency measurement method is uncontrollable when the group cycle is large, and the group phase coincidence points are difficult to accurately capture, are susceptible to noise, and there are restrictions on the upper and lower frequency limit measurements.

Method used

Using high-precision frequency measurement devices and methods based on shifting and synchronization, the synchronization of actual gates and standard signals is achieved through the main chip, gate control module, standard frequency synthesis and phase shifting module, frequency counter to be measured and standard frequency counters, and the synchronization of actual gates and standard signals is eliminated. 1 cycle counting error to improve measurement accuracy.

Benefits of technology

High-precision frequency measurements throughout the test frequency band are realized, eliminating the ±1 cycle counting error of the signal to be measured and the standard signal, improving the frequency measurement accuracy, and ensuring the accuracy of frequency measurement.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN111103457B_ABST
    Figure CN111103457B_ABST
Patent Text Reader

Abstract

The present invention discloses a high-precision frequency measurement device and method based on phase-shift synchronization, the device comprises a main chip, and a gate control module, a standard frequency synthesis and phase-shift module, a frequency counter to be measured and a standard frequency counter which are electrically connected to the main chip respectively. The present invention adopts phase-shift synchronization multi-cycle frequency measurement, and by performing phase shift on the standard signal, combined with the change of the count value, the synchronization of the rising edge and the falling edge of the actual gate with the standard signal is achieved while ensuring the strict synchronization of the actual gate and the signal to be measured, and the counting error of ±1 cycle of the signal to be measured and the standard signal is effectively eliminated, the frequency measurement accuracy is greatly improved, and high-precision measurement is achieved in the entire test frequency band.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention belongs to the technical field of high-precision frequency measurement, and in particular relates to a high-precision frequency measurement device and method based on phase-shift synchronization. Background Art

[0002] Frequency measurement is a classic research topic in the field of measurement. Accurate frequency measurement is becoming more and more important. Frequency measurement technology plays a very important role in aerospace, satellite guidance, test and measurement, etc. The main methods of frequency testing are: direct frequency measurement method, frequency difference multiplication method, analog interpolation method, time amplitude conversion method, multi-cycle synchronization method, cursor method, etc. The above frequency measurement methods all have a certain degree of error, and some methods have more complex test systems.

[0003] The phase-detection broadband frequency measurement method developed in recent years uses a method based on group phase relationship to capture the group phase coincidence point, achieving high-resolution frequency measurement. However, when the group period is too large, the gate time is uncontrollable, and when the phase quantum is too small, the group phase coincidence point is difficult to capture accurately and is easily affected by noise. In addition, this method has certain limitations on the measurement of the upper and lower limits of the frequency. Summary of the invention

[0004] In view of the above-mentioned deficiencies in the prior art, the present invention provides a high-precision frequency measurement device and method based on phase-shift synchronization, which realizes the synchronization of the actual gate and the standard signal, eliminates the ±1 cycle error in the frequency signal counting, greatly improves the measurement accuracy, and has high accuracy in the entire test frequency band.

[0005] In order to achieve the above-mentioned object of the invention, the technical solution adopted by the present invention is:

[0006] A high-precision frequency measuring device based on phase shift synchronization includes a main chip, and a gate control module, a standard frequency synthesis and phase shift module, a frequency counter to be measured and a standard frequency counter electrically connected to the main chip respectively; the input ends of the gate control module and the frequency counter to be measured both input the signal to be measured, the main chip inputs a preset gate signal to the gate control module to generate an actual gate signal, and outputs it to the frequency counter to be measured and the standard frequency counter respectively, the main chip controls the standard frequency synthesis and phase shift module to generate a standard signal with phase shiftability, and outputs it to the standard frequency counter.

[0007] Furthermore, the main chip adopts a single-chip microcomputer, and the gate control module adopts a D trigger. Pins 1 and 4 of the D trigger are connected to the power supply, pin 2 of the D trigger is connected to pin 25 of the single-chip microcomputer, pin 3 of the D trigger is connected to the signal input socket to be tested, and the other end of the signal input socket to be tested is grounded.

[0008] Further, the standard frequency synthesis and phase shift module adopts a DDS frequency synthesizer, pins 1, 2, 3, and 4 of the DDS frequency synthesizer are respectively connected to pins 43, 44, 45, and 46 of the single-chip microcomputer, pins 28, 27, 26, and 25 of the DDS frequency synthesizer are respectively connected to pins 47, 2, 3, and 4 of the single-chip microcomputer, pins 5, 10, 24, and 19 of the DDS frequency synthesizer are all grounded, pins 6, 11, 23, and 18 of the DDS frequency synthesizer are connected to a power supply, pin 7 of the DDS frequency synthesizer is connected to pin 28 of the single-chip microcomputer, pin 8 of the DDS frequency synthesizer is connected to pin 27 of the single-chip microcomputer, pin 9 of the DDS frequency synthesizer is connected to pin 3 of the crystal oscillator, pins 1 and 2 of the crystal oscillator are both grounded, pin 4 of the crystal oscillator is connected to the power supply, and through a ninth capacitor, a tenth capacitor, and an eleventh capacitor connected in parallel. Grounded, pin 12 of the DDS frequency synthesizer is grounded through the eighth resistor, pin 20 of the DDS frequency synthesizer is connected to the fifth resistor, pin 21 of the DDS frequency synthesizer is respectively connected to the first inductor and the sixth resistor, the other end of the first inductor is respectively connected to the second inductor and the seventh capacitor, the other end of the second inductor is respectively connected to the fourth capacitor and the eighth capacitor, the other ends of the fifth resistor, the sixth resistor, the seventh capacitor and the eighth capacitor are all grounded, the fifth capacitor and the sixth capacitor are respectively connected in parallel at both ends of the first inductor and the second inductor, the other end of the fourth capacitor is connected to pin 16 of the DDS frequency synthesizer, pin 15 of the DDS frequency synthesizer is respectively connected to the third resistor, the cathode of the regulator and the variable resistor, the other end of the third resistor is connected to the power supply, the other end of the variable resistor is respectively connected to the reference electrode of the regulator and the seventh resistor, and the anode of the regulator and the other end of the seventh resistor are both grounded.

[0009] Further, the frequency counter to be tested includes a first counter, a second counter, a third counter and a fourth counter, pins 1, 2, 3, 4, 5, 6, 7, and 8 of the four counters are respectively connected to pins 5, 6, 8, 9, 10, 11, 12, and 13 of the single-chip computer, pins 14, 9, 17, 16, and 18 of the four counters are connected to a power supply, pin 15 of the four counters is connected to pin 5 of the D flip-flop, pin 12 of the four counters is connected to pin 24 of the single-chip computer, pin 19 of the four counters is connected to pin 21 of the single-chip computer, pin 13 of the first counter is connected to the signal input socket to be tested, pin 11 of the first counter is connected to pin 13 of the second counter, pin 11 of the second counter is connected to pin 13 of the third counter, and pin 11 of the third counter is connected to pin 13 of the fourth counter.

[0010] Further, the standard frequency counter includes a fifth counter, a sixth counter, a seventh counter and an eighth counter, pins 1, 2, 3, 4, 5, 6, 7, and 8 of the four counters are respectively connected to pins 33, 34, 35, 36, 37, 38, 39, and 40 of the single-chip microcomputer, pins 14, 9, 17, 16, and 18 of the four counters are connected to a power supply, pin 15 of the four counters is connected to pin 5 of the D flip-flop, pin 12 of the four counters is connected to pin 24 of the single-chip microcomputer, pin 19 of the four counters is connected to pin 22 of the single-chip microcomputer, pin 13 of the fifth counter is connected to pin 14 of the DDS frequency synthesizer, pin 11 of the fifth counter is connected to pin 13 of the sixth counter, pin 11 of the sixth counter is connected to pin 13 of the seventh counter, and pin 11 of the seventh counter is connected to pin 13 of the eighth counter.

[0011] Based on the above high-precision frequency measurement device, the present invention also proposes a high-precision frequency measurement method based on phase shift synchronization, comprising the following steps:

[0012] S1. Using the above-mentioned frequency measuring device, input the signal to be measured to the gate control module and the frequency counter to be measured respectively, input the preset gate signal to the gate control module at the same time, and generate a standard signal in the standard frequency synthesis and phase shift module;

[0013] S2. Use the gate control module to generate an actual gate signal, and output it to the frequency counter to be tested and the standard frequency counter respectively;

[0014] S3, using the standard frequency synthesis and phase shift module to perform phase shift control on the standard signal, so that the standard signal is synchronized with the leading edge or trailing edge of the actual gate signal, and outputting the phase-shifted standard signal to the frequency counter to be measured;

[0015] S4, using the frequency counter to be measured and the standard frequency counter to count the signal to be measured and the standard signal respectively;

[0016] S5. Measure the frequency of the signal to be measured according to the count values ​​of the frequency counter to be measured and the standard frequency counter and the frequency of the standard signal.

[0017] Furthermore, the period of the actual gate signal is an integer multiple of the period of the measured signal.

[0018] Furthermore, when the standard frequency synthesis and phase shifting module is used to perform phase shifting control on the standard signal, the phase of the standard signal is advanced or delayed by 2π, and the count value of the standard signal does not change during the entire phase shifting process. The calculation formula for the frequency of the signal to be measured is:

[0019]

[0020] Among them, fX is the frequency of the signal to be measured, f S is the standard signal frequency, N X N is the count value obtained by the frequency counter to be measured by counting the signal to be measured, S It is the count value obtained by a standard frequency counter counting a standard signal.

[0021] Furthermore, when the standard frequency synthesis and phase shifting module is used to perform phase shifting control on the standard signal, the phase of the standard signal is advanced by θ1 or delayed by θ2, and the count value of the standard signal is reduced by 1, and the calculation formula for the frequency of the signal to be measured is obtained as follows:

[0022]

[0023] Among them, f X is the frequency of the signal to be measured, f S is the standard signal frequency, N X N is the count value obtained by the frequency counter to be measured by counting the signal to be measured, S It is the count value obtained by a standard frequency counter counting a standard signal.

[0024] Furthermore, when the standard frequency synthesis and phase shifting module is used to perform phase shifting control on the standard signal, the phase of the standard signal is advanced by θ1 or delayed by θ2, and the count value of the standard signal is increased by 1, then the calculation formula for the frequency of the signal to be measured is obtained as follows:

[0025]

[0026] Among them, f X is the frequency of the signal to be measured, f S is the standard signal frequency, N X N is the count value obtained by the frequency counter to be measured by counting the signal to be measured, S It is the count value obtained by a standard frequency counter counting a standard signal.

[0027] The present invention has the following beneficial effects: the present invention adopts phase-shift synchronous multi-cycle frequency measurement, and by performing phase shift on the standard signal and combining the change of the count value, the synchronization of the rising edge and the falling edge of the actual gate with the standard signal is achieved while ensuring the strict synchronization of the actual gate and the signal to be measured, and the counting error of ±1 cycle of the signal to be measured and the standard signal is effectively eliminated, the frequency measurement accuracy is greatly improved, and high-precision measurement in the entire test frequency band is achieved. BRIEF DESCRIPTION OF THE DRAWINGS

[0028] Figure 1 It is a structural schematic diagram of a high-precision frequency measuring device based on phase-shift synchronization of the present invention;

[0029] Figure 2Schematic diagram of the circuit structure of the main chip in the embodiment of the present invention;

[0030] Figure 3 is a schematic diagram of the circuit structure of the gate control module in an embodiment of the present invention;

[0031] Figure 4 Schematic diagram of the circuit structure of the standard frequency synthesis and phase shift module in the embodiment of the present invention;

[0032] Figure 5 1 is a schematic diagram of the circuit structure of a frequency counter to be measured in an embodiment of the present invention;

[0033] Figure 6 is a schematic diagram of the circuit structure of a standard frequency counter in an embodiment of the present invention;

[0034] Figure 7 is a schematic diagram of the circuit structure of a power module in an embodiment of the present invention;

[0035] Figure 8 is a schematic diagram of the circuit structure of a display module in an embodiment of the present invention;

[0036] Fig. 9 is a schematic diagram of the circuit structure of the download interface module in an embodiment of the present invention;

[0037] Fig.10 2 is a schematic diagram of the principle of subtracting 1 from the count value during counting and phase shifting in an embodiment of the present invention;

[0038] Fig.11 It is a flow chart of a high-precision frequency measurement method based on phase-shift synchronization of the present invention;

[0039] Fig.12 2 is a schematic diagram showing the principle that the gate time is equal to an integer number of square wave cycles in an embodiment of the present invention;

[0040] Fig.13 2 is a schematic diagram of the principle of increasing the count value by 1 during counting and phase shifting in an embodiment of the present invention;

[0041] Fig.14 It is a schematic diagram of the principle of the high-precision frequency measurement method based on phase-shift synchronization of the present invention;

[0042] Fig.15 It is a waveform diagram of the high-precision frequency measurement method based on phase-shift synchronization of the present invention. DETAILED DESCRIPTION

[0043] In order to make the purpose, technical solution and advantages of the present 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 used to limit the present invention.

[0044] Example 1

[0045] like Figure 1 As shown, an embodiment of the present invention provides a high-precision frequency measuring device based on phase shift synchronization, including a main chip, and a gate control module, a standard frequency synthesis and phase shift module, a frequency counter to be measured and a standard frequency counter electrically connected to the main chip respectively; the input ends of the gate control module and the frequency counter to be measured both input the signal to be measured, the main chip inputs a preset gate signal to the gate control module to generate an actual gate signal, and outputs it to the frequency counter to be measured and the standard frequency counter respectively, the main chip controls the standard frequency synthesis and phase shift module to generate a standard signal with phase shiftability, and outputs it to the standard frequency counter.

[0046] In an optional embodiment of the present invention, the main chip uses a single-chip microcomputer U2 to control the execution of each module. This function can be implemented by using a STC15W4K60S4_LQFP48 single-chip microcomputer, which has 48 pins. Figure 2 As shown, pin 15 of the single chip computer U2 is connected to the power supply VCC and is grounded through a twelfth capacitor C12 and a polarity capacitor E4 connected in parallel.

[0047] In an optional embodiment of the present invention, the gate control module uses a D flip-flop U13 to generate an actual gate signal, where the period of the actual gate signal is an integer multiple of the period of the measured signal. This function can be implemented by using a 74LS74D flip-flop, such as Figure 3 As shown, pins 1 and 4 of the D flip-flop U13 are connected to the power supply VCC, pin 2 of the D flip-flop U13 is connected to pin 25 of the microcontroller U2, pin 3 of the D flip-flop U13 is connected to the test signal input socket P3, and the other end of the test signal input socket P3 is grounded.

[0048] In an optional embodiment of the present invention, the standard frequency synthesis and phase shift module uses a DDS frequency synthesizer U3 to generate a standard signal and perform phase shift control on the standard signal, that is, to control the phase advance or lag of the standard signal. This function can be implemented by using an AD9851 DDS frequency synthesizer, such as Figure 4As shown, pins 1, 2, 3, and 4 of the DDS frequency synthesizer U3 are connected to pins 43, 44, 45, and 46 of the single-chip microcomputer U2, respectively; pins 28, 27, 26, and 25 of the DDS frequency synthesizer U3 are connected to pins 47, 2, 3, and 4 of the single-chip microcomputer U2, respectively; pins 5, 10, 24, and 19 of the DDS frequency synthesizer U3 are all grounded; pins 6, 11, 23, and 18 of the DDS frequency synthesizer U3 are connected to the power supply VCC; the DDS frequency synthesizer Pin 7 of the DDS frequency synthesizer U3 is connected to pin 28 of the single-chip microcomputer U2, pin 8 of the DDS frequency synthesizer U3 is connected to pin 27 of the single-chip microcomputer U2, pin 9 of the DDS frequency synthesizer U3 is connected to pin 3 of the crystal oscillator Y1, pins 1 and 2 of the crystal oscillator Y1 are both grounded, pin 4 of the crystal oscillator Y1 is connected to the power supply VCC, and is grounded through the ninth capacitor C9, the tenth capacitor C10, and the eleventh capacitor C11 connected in parallel, and pin 12 of the DDS frequency synthesizer U3 is connected to the eighth resistor R8 grounded, a pin 20 of the DDS frequency synthesizer U3 is connected to the fifth resistor R5, a pin 21 of the DDS frequency synthesizer U3 is respectively connected to the first inductor L1 and the sixth resistor R6, the other end of the first inductor L1 is respectively connected to the second inductor L2 and the seventh capacitor C7, the other end of the second inductor L2 is respectively connected to the fourth capacitor C4 and the eighth capacitor C8, the other ends of the fifth resistor R5, the sixth resistor R6, the seventh capacitor C7 and the eighth capacitor C8 are all grounded, the fifth capacitor C5 and the sixth capacitor C6 are respectively connected in parallel at both ends of the first inductor L1 and the second inductor L2, the other end of the fourth capacitor C4 is connected to the pin 16 of the DDS frequency synthesizer U3, the pin 15 of the DDS frequency synthesizer U3 is respectively connected to the third resistor R3, the cathode of the voltage regulator U4 and the variable resistor R4, the other end of the third resistor R3 is connected to the power supply VCC, the other end of the variable resistor R4 is respectively connected to the reference electrode of the voltage regulator U4 and the seventh resistor R7, the anode of the voltage regulator U4 and the other end of the seventh resistor R7 are both grounded.

[0049] In an optional embodiment of the present invention, the frequency counter to be measured includes a first counter U5, a second counter U6, a third counter U7 and a fourth counter U8, which are used to count the rising edges of the signal to be measured. The function can be implemented by using a 74LS593 counter, such as Figure 5As shown, pins 1, 2, 3, 4, 5, 6, 7, and 8 of the above four counters U5, U6, U7, and U8 are respectively connected to pins 5, 6, 8, 9, 10, 11, 12, and 13 of the single-chip computer U2, pins 14, 9, 17, 16, and 18 of the four counters U5, U6, U7, and U8 are connected to the power supply VCC, and pin 15 of the four counters U5, U6, U7, and U8 is connected to pin 5 of the D flip-flop U13. Pin 12 of U8 is connected to pin 24 of the single-chip computer U2, pin 19 of the four counters U5, U6, U7 and U8 are connected to pin 21 of the single-chip computer U2, pin 13 of the first counter U5 is connected to the signal input socket P3 to be tested, pin 11 of the first counter U5 is connected to pin 13 of the second counter U6, pin 11 of the second counter U6 is connected to pin 13 of the third counter U7, and pin 11 of the third counter U7 is connected to pin 13 of the fourth counter U8.

[0050] In an optional embodiment of the present invention, the standard frequency counter includes a fifth counter U9, a sixth counter U10, a seventh counter U11 and an eighth counter U12, which are used to count the rising edges of the standard signal. The function can be implemented by using a 74LS593 counter, such as Figure 6 As shown, pins 1, 2, 3, 4, 5, 6, 7, and 8 of the above four counters U9, U10, U11, and U12 are respectively connected to pins 33, 34, 35, 36, 37, 38, 39, and 40 of the single-chip computer U2, pins 14, 9, 17, 16, and 18 of the four counters U9, U10, U11, and U12 are connected to the power supply VCC, and pin 15 of the four counters U9, U10, U11, and U12 is connected to pin 5 of the D flip-flop U13. Pin 12 of U12 is connected to pin 24 of the single-chip microcomputer U2, pin 19 of the four counters U9, U10, U11 and U12 are connected to pin 22 of the single-chip microcomputer U2, pin 13 of the fifth counter U9 is connected to pin 14 of the DDS frequency synthesizer U3, pin 11 of the fifth counter U9 is connected to pin 13 of the sixth counter U10, pin 11 of the sixth counter U10 is connected to pin 13 of the seventh counter U11, and pin 11 of the seventh counter U11 is connected to pin 13 of the eighth counter U12.

[0051] In addition, the present invention is also provided with a power supply module, a display module and a download interface module.

[0052] like Figure 7As shown, the power module is used to provide power supply to each module. This function can be realized by using a 7805 voltage regulator chip. The voltage regulator chip U1 is connected to the power input socket P1 through a single-pole double-throw switch S1. The connection end 2 of the single-pole double-throw switch S1 is connected to the power input socket P1. The connection end 1 of the single-pole double-throw switch S1 is connected to the input end of the voltage regulator chip U1. The other two ends of the power input socket P1 are grounded. The input end of the voltage regulator chip U1 is also grounded through the first polarity capacitor E1 and the first capacitor C1 respectively. The grounding end of the voltage regulator chip U1 is grounded. The output end of the voltage regulator chip U1 is connected to the power supply end VCC, and is grounded through the second polarity capacitor E2, the second capacitor C2, and the first resistor R1 and the indicator LED1 connected in series.

[0053] like Figure 8 As shown, the above display module is used to display the frequency of the signal to be tested, and the implementation of this function can adopt a 12864 dot matrix display screen. Pins 1 and 20 of the dot matrix display screen LCD1 are both grounded, pin 2 of the dot matrix display screen LCD1 is connected to the power supply VCC, and is grounded through the third polarity capacitor E3 and the third capacitor C3 connected in parallel, and is also connected to pin 3 and pin 18 respectively through the second resistor R2, pin 4 of the dot matrix display screen LCD1 is connected to pin 48 of the single-chip microcomputer U2, pin 5 of the dot matrix display screen LCD1 is connected to pin 1 of the single-chip microcomputer U2, pin 6 of the dot matrix display screen LCD1 is connected to pin 14 of the single-chip microcomputer U2, pins 7, 8, 9, 10, 11, 12, 13, and 14 of the dot matrix display screen LCD1 are respectively connected to pins 18, 29, 30, 31, 32, 41, and 42 of the single-chip microcomputer U2, pin 15 of the dot matrix display screen LCD1 is connected to pin 16 of the single-chip microcomputer U2, and pins 17 and 19 of the dot matrix display screen LCD1 are connected to the power supply VCC.

[0054] like Fig. 9 As shown, the download interface module is used to download the control program stored in the single-chip microcomputer. This function can be realized by using the download interface P2. Pin 4 of the download interface P2 is connected to the power supply VCC and is grounded through the fifth polarity capacitor E5 and the thirteenth capacitor C13 connected in parallel. Pins 3 and 2 of the download interface P2 are respectively connected to pins 19 and 20 of the single-chip microcomputer U2, and pin 1 of the download interface P2 is grounded.

[0055] The working principle of the frequency measuring device of the present invention is further described in detail below.

[0056] like Fig.10 As shown, assuming that the period of a square wave signal X is T, at the gate time T N The square wave signal is counted inside. Assuming that each rising edge is counted once, the actual value is N, that is, in the gate time T NThere are N rising edges in total, so there are N - 1 complete square wave cycles within the gate time.

[0057] Assume that the time of the rising edge of the gate and the first rising edge of the square wave signal X within the gate is t1, and the time of the falling edge of the gate and the last rising edge of the square wave signal X within the gate is t2, then we can get:

[0058] T N =(N - 1)T + t1 + t2

[0059] Assume that in Figure 7 , t1 < T - t2. Advance the phase of the X waveform by θ1 = 2πt1 / T to obtain the waveform X1. The rising edge of the gate and a rising edge of X1 just coincide. Here, it is called the synchronization of the rising edge of the gate and the rising edge of X1, simply referred to as the synchronization of X1 and the leading edge of the gate. When θ1 > 2πt1 / T, count the rising edges of the X1 waveform within the gate time T N The actual value is N1, and we have: N1 = N - 1; if the phase of the X waveform is lagged by θ2 = 2πt2 / T to obtain the waveform X2, the falling edge of the gate and a rising edge of X2 just coincide. Here, it is called the synchronization of the falling edge of the gate and the rising edge of X2, simply referred to as the synchronization of X2 and the trailing edge of the gate. When θ2 > 2πt2 / T, count the rising edges of the X2 waveform within the gate time T N The actual value is N2, and we have: N2 = N - 1.

[0060] It can be seen that when the X waveform is phase - shifted to a certain position, the count value will change, and t1 and t2 can be deduced from the phase shifted at this time.

[0061] The rough measurement of the gate time can be completed by measuring the count value N, and the fine measurement of the gate time can be completed by measuring t1 and t2. Based on this, high - precision frequency measurement can be finally realized.

[0062] Embodiment 2

[0063] As Fig.11 shown, the embodiment of the present invention also provides a high - precision frequency measurement method based on phase - shift synchronization, including the following steps S1 to S5:

[0064] S1. Using the above - mentioned frequency measurement device, input the signal to be measured into the gate control module and the counter of the frequency to be measured respectively, and at the same time input the preset gate signal into the gate control module, and generate a standard signal in the standard frequency synthesis and phase - shift module;

[0065] S2. Use the gate control module to generate an actual gate signal and output it to the counter of the frequency to be measured and the standard frequency counter respectively;

[0066] S3, using the standard frequency synthesis and phase shift module to perform phase shift control on the standard signal, so that the standard signal is synchronized with the leading edge or trailing edge of the actual gate signal, and outputting the phase-shifted standard signal to the frequency counter to be measured;

[0067] S4, using the frequency counter to be measured and the standard frequency counter to count the signal to be measured and the standard signal respectively;

[0068] S5. Measure the frequency of the signal to be measured according to the count values ​​of the frequency counter to be measured and the standard frequency counter and the frequency of the standard signal.

[0069] In order to clearly explain the phase-shift synchronous frequency measurement method adopted by the present invention, several theorems applied in the method are derived and explained below.

[0070] Theorem 1: For any square wave with a period of T, at the gate time T N The rising edge of the square wave is counted, and the count value is N. If the square wave phase is advanced or delayed by 2π, the count value does not change. Set the gate time to T N , then there must be:

[0071] T N =N*T

[0072] The derivation process is as follows:

[0073] like Fig.12 As shown, when the square wave phase is advanced or delayed by 2π, there must be a rising edge of the square wave moving out of or into the gate. The count value does not change, which means that when a rising edge of the square wave moves out of or into the gate, there must be another rising edge of the square wave moving in or out of the gate at the same time, that is, when the square wave and the leading edge of the gate are synchronized, the square wave and the trailing edge of the gate must be synchronized; when the square wave and the trailing edge of the gate are synchronized, the square wave and the leading edge of the gate must be synchronized. Assuming that the time from the rising edge of the gate to the first rising edge of the square wave signal in the gate is t1, and the time from the falling edge of the gate to the last rising edge of the square wave signal in the gate is t2, then the time from the falling edge of the gate to the first rising edge of the square wave signal after the gate is T-t2, and t1 must be T-t2, then: T N =(N-1)T+t1+t2=N*T.

[0074] This situation indicates that the gate time is exactly equal to an integer number of square wave cycles.

[0075] Theorem 2: For any square wave with a period of T, at the gate time T N The rising edge of the square wave is counted internally, and the design value is N. If the square wave phase is advanced by θ1 (θ1<2π), the count value is reduced by 1, and there must be θ2 (θ2<2π). When the square wave phase is delayed by θ2, the count value changes, and the count value must be reduced by 1, and there is:

[0076]

[0077] The derivation process is as follows:

[0078] As Fig.10 shown, for any square wave X with a period of T, when counting the rising edges of the square wave X within the gate time T N and designing the value to be N, assuming that the time from the rising edge of the gate to the first rising edge of the square wave signal X within the gate is t1, and the time from the falling edge of the gate to the last rising edge of the square wave signal X within the gate is t2. If the phase of the square wave X is advanced by θ1 (θ1 < 2π) to obtain the square wave X1 and the count value decreases by 1, it indicates that if the phase of the square wave is advanced by θ1, the number of rising edges of the square wave within the gate will decrease by 1. At this time, the rising edge of the square wave X1 just passes through the rising edge of the gate (i.e., just moves out of the gate), and there must be no rising edge of X1 moving into the gate. Then there must be: θ1 = 2πt1 / T (θ1 < 2π), t1 < T - t2, so: t2 < T - t1. Then when the phase of the square wave X lags by θ2 = 2πt2 / T, the square wave X2 is obtained. At this time, the rising edge of the square wave X2 just passes through the falling edge of the gate (i.e., just moves out of the gate), and there must be no rising edge of X2 moving into the gate, and the count value must decrease by 1. The gate time T N is the sum of t1, t2 and the remaining N - 1 square wave periods, so there is:

[0079]

[0080] It can be concluded that when the phase of the square wave X is advanced or lagged by a phase angle less than 2π, if the count value decreases by 1 when X is synchronized with the leading edge of the gate, then the count value must also decrease by 1 when X is synchronized with the trailing edge of the gate; vice versa: if the count value decreases by 1 when X is synchronized with the trailing edge of the gate, then the count value must also decrease by 1 when X is synchronized with the leading edge of the gate.

[0081] Theorem 3: For any square wave with a period of T, when counting the rising edges of the square wave within the gate time T N and designing the value to be N, if the phase of the square wave is advanced by θ1 (θ1 < 2π) and the count value increases by 1, then there must be θ2 (θ2 < 2π). When the phase of the square wave is lagged by θ2, the count value changes, and the count value must increase by 1, and there is:

[0082]

[0083] The derivation process is as follows:

[0084] As Fig.13 shown, for any square wave X with a period of T, when counting the rising edges of the square wave X within the gate time T NCount the rising edge of the internal square wave X, and the designed value is N. Assume that the time from the rising edge of the gate to the first rising edge of the square wave signal X within the gate is t1, and the time from the falling edge of the gate to the last rising edge of the square wave signal X within the gate is t2. If the phase of the square wave X is advanced by θ1 (θ1 < 2π) to obtain the square wave X1 and the count value increases by 1, it means that when the phase of the square wave is advanced by θ1, the number of rising edges of the square wave within the gate increases by 1. At this time, a rising edge of the square wave X1 just passes through the falling edge of the gate (i.e., just moves into the gate), and there must be no rising edge of X1 moving out of the gate. Then there must be: θ1 = 2π(T - t2) / T (θ1 < 2π), T - t2 < t1, then: T - t1 < t2. Then when the phase of the square wave X lags by θ2 = 2π(T - t1) / T, the square wave X2 is obtained. At this time, the rising edge of the square wave X2 just passes through the rising edge of the gate (i.e., just moves into the gate), and there must be no rising edge of X2 moving out of the gate, and the count value must increase by 1. The gate time T N is the sum of t1, t2 and the remaining N - 1 square wave periods, and there is:

[0085]

[0086] It can be concluded that when the phase of the square wave X is advanced or lagged by a phase angle less than 2π, if X is synchronized with the leading edge of the gate and the count value increases by 1, then when X is synchronized with the trailing edge of the gate, the count value must also increase by 1; vice versa: if the count value increases by 1 when X is synchronized with the trailing edge of the gate, then when X is synchronized with the leading edge of the gate, the count value must also increase by 1.

[0087] As Fig.14 shown, it is a schematic diagram of the principle of the frequency measurement method of the present invention. The preset gate signal is applied to the D input terminal of the D flip-flop, the signal to be measured is applied to the CLK input terminal of the D flip-flop, and the output of the D flip-flop is the actual gate signal. Two counters CNT1 and CNT2 respectively count the signal to be measured and the standard signal.

[0088] First, if the preset gate is started, a high level is output. When a rising edge of the signal to be measured comes, the D flip-flop outputs a high level; if the preset gate is closed, a low level is output. When a rising edge of the signal to be measured comes, the D flip-flop outputs a low level; the Q output terminal of the D flip-flop is the actual gate signal, and the actual gate time is an integer multiple of the period of the signal to be measured. Within the actual gate time, the counters CNT1 and CNT2 respectively count the signal to be measured and the standard signal. By controlling the phase shift of the standard signal, the phase advance change amount when the standard signal is synchronized with the leading edge of the actual gate and the phase lag change amount when synchronized with the trailing edge can be obtained, and finally the frequency of the signal to be measured can be obtained.

[0089] As Fig.15 shown, it is a waveform diagram of the frequency measurement method of the present invention. Let the frequency of the signal to be measured be fX and the frequency of the standard signal be fS. Within the actual gate time T AThe count value of the signal to be measured is N X , the count value of the standard signal is N S .

[0090] The actual gate time is an integer multiple of the measured signal fx period, that is, the actual gate time is synchronized with the measured signal, and there is no counting error of ±1 period caused by counting the measured signal.

[0091]

[0092] However, the actual gate signal is not synchronized with the standard signal, that is, there is a counting error of ±1 cycle caused by counting the standard signal. In order to eliminate this error, the standard signal is phase-shifted by no more than 2π.

[0093] There are three situations:

[0094] (1) The phase of the standard signal is advanced or delayed by 2π. During the entire phase shift process, the count value of the standard signal does not change. Then:

[0095]

[0096] The calculation formula for the frequency of the signal to be measured is obtained as follows:

[0097]

[0098] (2) The phase of the standard signal is advanced by θ1 or delayed by θ2, and the count value of the standard signal is reduced by 1, then:

[0099]

[0100] The calculation formula for the frequency of the signal to be measured is obtained as follows:

[0101]

[0102] (3) The phase of the standard signal is advanced by θ1 or delayed by θ2, and the count value of the standard signal increases by 1, then:

[0103]

[0104] The calculation formula for the frequency of the signal to be measured is obtained as follows:

[0105]

[0106] In the counting frequency measurement method, since the actual gate time is not synchronized with the standard signal, there is an error of ±1 cycle in counting the standard signal. Therefore, the present invention adopts a phase-shift synchronous frequency measurement method to shift the phase and count the standard signal, thereby successfully eliminating the ±1 cycle error in counting the standard signal and greatly improving the frequency measurement accuracy.

[0107] The present invention adopts the phase-shift synchronous frequency measurement method to have extremely high measurement accuracy in the entire test frequency band. The frequency measurement accuracy is independent of the measured signal and mainly depends on the standard signal frequency, gate time and phase shift accuracy. The phase-shift synchronous frequency measurement technology brings a new idea and method for frequency testing. The method is fast and reliable, accurate in frequency measurement, easy to implement, and has important theoretical value and broad application prospects.

[0108] Those skilled in the art will appreciate that the embodiments described herein are intended to help readers understand the principles of the present invention, and should be understood that the protection scope of the present invention is not limited to such specific statements and embodiments. Those skilled in the art can make various other specific variations and combinations that do not deviate from the essence of the present invention based on the technical revelations disclosed by the present invention, and these variations and combinations are still within the protection scope of the present invention.

Claims

1. A high-precision frequency measurement device based on phase-shift synchronization, It is characterized in that It includes a main chip, and a gate control module, a standard frequency synthesis and phase shift module, a frequency counter to be tested and a standard frequency counter which are electrically connected to the main chip respectively; The main chip adopts a single-chip microcomputer, and the gate control module adopts a D flip-flop. Pins 1 and 4 of the D flip-flop are connected to the power supply, pin 2 of the D flip-flop is connected to pin 25 of the single-chip microcomputer, and pin 3 of the D flip-flop is connected to the input socket of the signal to be tested, and the other end of the input socket of the signal to be tested is grounded; The standard frequency synthesis and phase shift module adopts a DDS frequency synthesizer, wherein pins 1, 2, 3, and 4 of the DDS frequency synthesizer are respectively connected to pins 43, 44, 45, and 46 of the single-chip microcomputer, pins 28, 27, 26, and 25 of the DDS frequency synthesizer are respectively connected to pins 47, 2, 3, and 4 of the single-chip microcomputer, pins 5, 10, 24, and 19 of the DDS frequency synthesizer are all grounded, pins 6, 11, 23, and 18 of the DDS frequency synthesizer are connected to a power supply, pin 7 of the DDS frequency synthesizer is connected to pin 28 of the single-chip microcomputer, pin 8 of the DDS frequency synthesizer is connected to pin 27 of the single-chip microcomputer, pin 9 of the DDS frequency synthesizer is connected to pin 3 of the crystal oscillator, pins 1 and 2 of the crystal oscillator are both grounded, pin 4 of the crystal oscillator is connected to the power supply, and is grounded through a ninth capacitor, a tenth capacitor, and an eleventh capacitor connected in parallel. , pin 12 of the DDS frequency synthesizer is grounded through an eighth resistor, pin 20 of the DDS frequency synthesizer is connected to the fifth resistor, pin 21 of the DDS frequency synthesizer is respectively connected to the first inductor and the sixth resistor, the other end of the first inductor is respectively connected to the second inductor and the seventh capacitor, the other end of the second inductor is respectively connected to the fourth capacitor and the eighth capacitor, the other ends of the fifth resistor, the sixth resistor, the seventh capacitor and the eighth capacitor are all grounded, the fifth capacitor and the sixth capacitor are respectively connected in parallel at both ends of the first inductor and the second inductor, the other end of the fourth capacitor is connected to pin 16 of the DDS frequency synthesizer, pin 15 of the DDS frequency synthesizer is respectively connected to the third resistor, the cathode of the voltage regulator and the variable resistor, the other end of the third resistor is connected to the power supply, the other end of the variable resistor is respectively connected to the reference electrode of the voltage regulator and the seventh resistor, and the anode of the voltage regulator and the other end of the seventh resistor are both grounded; The input ends of the gate control module and the frequency counter to be tested are both input with the signal to be tested. The main chip inputs the preset gate signal to the gate control module to generate an actual gate signal, and outputs it to the frequency counter to be tested and the standard frequency counter respectively. The period of the actual gate signal is an integer multiple of the period of the signal to be tested. The main chip controls the standard frequency synthesis and phase shifting module to generate a standard signal with phase shifting, and performs phase shifting control on the standard signal so that the standard signal is synchronized with the leading edge or delay of the actual gate signal, and outputs the standard signal after phase shifting to the standard frequency counter. The frequency counter to be tested and the standard frequency counter count the signal to be tested and the standard signal respectively, and measure the frequency of the signal to be tested according to the count value and the frequency of the standard signal. When the standard frequency synthesis and phase shifting module is used to perform phase shift control on the standard signal, the phase of the standard signal is advanced or delayed by 2π. During the entire phase shifting process, the count value of the standard signal does not change. The calculation formula for the frequency of the signal to be measured is: in, is the frequency of the signal to be measured, is the standard signal frequency, is the count value obtained by the frequency counter to be measured by counting the signal to be measured, The count value obtained by a standard frequency counter counting a standard signal; When the standard frequency synthesis and phase shift module are used to control the phase shift of the standard signal, the phase of the standard signal is advanced. θ 1 or hysteresis θ 2 , the count value of the standard signal is reduced by 1, and the calculation formula for the frequency of the signal to be measured is: in, is the frequency of the signal to be measured, is the standard signal frequency, is the count value obtained by the frequency counter to be measured by counting the signal to be measured, The count value obtained by counting the standard signal for the standard frequency counter When the standard frequency synthesis and phase shift module are used to control the phase shift of the standard signal, the phase of the standard signal is advanced. θ 1 or hysteresis θ 2 , the count value of the standard signal increases by 1, and the calculation formula for the frequency of the signal to be measured is: in, is the frequency of the signal to be measured, is the standard signal frequency, is the count value obtained by the frequency counter to be measured by counting the signal to be measured, It is the count value obtained by a standard frequency counter counting a standard signal.

2. The high-precision frequency measurement device based on phase-shift synchronization as claimed in claim 1, It is characterized in that The frequency counter to be tested includes a first counter, a second counter, a third counter and a fourth counter. Pins 1, 2, 3, 4, 5, 6, 7 and 8 of the four counters are respectively connected to pins 5, 6, 8, 9, 10, 11, 12 and 13 of the single-chip computer, pins 14, 9, 17, 16 and 18 of the four counters are connected to a power supply, pin 15 of the four counters is connected to pin 5 of the D flip-flop, pin 12 of the four counters is connected to pin 24 of the single-chip computer, pin 19 of the four counters is connected to pin 21 of the single-chip computer, pin 13 of the first counter is connected to a signal input socket to be tested, pin 11 of the first counter is connected to pin 13 of the second counter, pin 11 of the second counter is connected to pin 13 of the third counter, and pin 11 of the third counter is connected to pin 13 of the fourth counter.

3. The high-precision frequency measurement device based on phase-shift synchronization as claimed in claim 2, It is characterized in that The standard frequency counter includes a fifth counter, a sixth counter, a seventh counter and an eighth counter, pins 1, 2, 3, 4, 5, 6, 7, and 8 of the four counters are respectively connected to pins 33, 34, 35, 36, 37, 38, 39, and 40 of the single-chip computer, pins 14, 9, 17, 16, and 18 of the four counters are connected to a power supply, pin 15 of the four counters is connected to pin 5 of the D flip-flop, pin 12 of the four counters is connected to pin 24 of the single-chip computer, pin 19 of the four counters is connected to pin 22 of the single-chip computer, pin 13 of the fifth counter is connected to pin 14 of the DDS frequency synthesizer, pin 11 of the fifth counter is connected to pin 13 of the sixth counter, pin 11 of the sixth counter is connected to pin 13 of the seventh counter, and pin 11 of the seventh counter is connected to pin 13 of the eighth counter.

Citation Information

Cited By

  • Multi-channel frequency acquisition circuit with low power consumption and high precision

    CN116095533A