Frequency tracking method

By using programmable devices and counter threshold adjustment in the detection system, frequency and phase tracking locking of high-frequency signals without using high-end instruments is achieved, solving the high cost of high-frequency signals measurement and multi-clock source error accuracy problems , reduces costs and increases flexibility and scalability.

CN119093931APending Publication Date: 2024-12-06XI'AN PETROLEUM UNIVERSITY
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202411076622.2
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-08-02
Publication Date
2024-12-06

AI Technical Summary

Technical Problem

In engineering research and high-end equipment, frequency and phase measurements of high-frequency signals are needed, but the existing technology relies on high-end equipment, is costly and not suitable for all scenarios, especially in environments such as space, which cannot be measured using instruments and meters. At the same time, high-end equipment requires multiple sets of clock sources and high frequency and phase error accuracy.

Method used

A frequency tracking method is proposed. By detecting the system and programmable devices, the system working clock, reference clock and crystal clock to be adjusted, and by adjusting the system clock frequency and counter threshold, the voltage-controlled clock is realized without using high-end instruments. The frequency and phase tracking of the crystal is locked, and the historical adjustment algorithm is used to replace the reference clock in the era of reference clock loss.

Benefits of technology

It realizes tracking locking of high-frequency signals without using high-end instruments, reduces costs, improves flexibility and scalability, and is suitable for multi-clock backup systems and can replace the reference clock under certain accuracy and conditions.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure HSA0000299643280000011
    Figure HSA0000299643280000011
  • Figure HSA0000299643280000021
    Figure HSA0000299643280000021
  • Figure HSA0000299643280000031
    Figure HSA0000299643280000031
Patent Text Reader

Abstract

The invention provides a frequency tracking method, which comprises the following steps of: detecting a reference clock and a clock of a crystal to be adjusted, and adjusting a differential clock pin signal of the crystal to be adjusted, so as to obtain a clock signal of which the frequency and the phase are respectively consistent with those of the reference clock under a certain precision condition; in the process, a high-end instrument does not need to be adopted to detect the clock output state of the crystal to be adjusted in real time, so that the clock signal tracking cost is reduced, the detection efficiency is improved, and meanwhile, in the detection process, according to the precision requirement and the tracking speed requirement, the detection accuracy is improved. And the frequency of a system working clock and the threshold value of a tracking counter are reasonably selected, so that relatively high tracking precision and relatively high tracking speed are obtained.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The invention relates to the field of time and frequency, and in particular to a frequency tracking method. Background Art

[0002] In engineering research, it is often necessary to compare the output frequency and phase of a voltage-controlled clock crystal with a given reference frequency. In the comparison process, the frequency needs to be measured with the help of instruments such as frequency meters or oscilloscopes. For signals with relatively high frequencies, very high-end equipment is required to measure the frequency and phase, which brings very high costs. In addition, in some scenarios, it is impossible to use instruments for measurement. For example, after an artificial celestial body is launched into space, it is impossible to use instruments to measure the frequency and phase relationship between the voltage-controlled crystal and the clock reference signal on its circuit board.

[0003] On the other hand, in some high-end devices that need to use reliable clock sources, two or more sets of clock sources are often needed as reference sources. When a clock has a problem, it is necessary to quickly switch to another clock source. The clock signals that can be used as clock sources must meet certain error accuracy in frequency and phase, and it can be approximately considered that there is no difference between them. The common practice is to provide a set of accurate clock signals as references, and then provide a set of voltage-controlled high-stability crystals on the board. Through frequency tracking technology, the voltage parameters of the voltage-controlled high-stability crystals are adjusted to track and lock this set of accurate clock signals. In this way, even if the accurate signal is lost in some cases, the adjustment data can be calculated through algorithms based on the historical adjustment data of the voltage parameters of the voltage-controlled high-stability crystals in the past, so that the high-stability crystal outputs a reference frequency that is almost the same as the accurate clock to meet the use of the system. In this case, the voltage-controlled high-stability crystal plays the role of replacing the accurate clock reference signal. Here, the adjustment process of the voltage-controlled high-stability crystal involves the frequency tracking method. Summary of the invention

[0004] (1) Purpose of the Invention

[0005] The purpose of the present invention is to firstly propose a frequency tracking method, which can realize that the frequency signal output by a voltage-controlled clock crystal can track the phase and frequency of the locked reference frequency without any instrument.

[0006] Secondly, using this method, different locking accuracies can be obtained by adjusting the frequency of the system clock and combining it with the setting of the counter threshold.

[0007] (2) Technical solution

[0008] In order to understand a frequency tracking method involved in the present invention, one of the tracking systems related thereto is introduced, which mainly includes a detection system and a crystal to be adjusted. The detection system is mainly composed of a programmable device. Its input mainly includes three clocks, a system working clock, a reference clock, and a crystal input clock to be adjusted. The system working clock is a clock that provides tracking work for the detection system, which is required to be stable and reliable. The higher its frequency, the higher the tracking accuracy. The reference clock, as the clock to be tracked, requires its frequency accuracy to meet certain accuracy requirements according to the actual working system requirements. The crystal input clock to be adjusted comes from the output of the crystal to be adjusted. The crystal can be composed of a voltage-controlled oscillator, and its purpose is to track the frequency and phase of the reference clock. When the reference clock is lost under certain conditions, it can use its historical adjustment algorithm accumulation, and write the differential pin positive and differential pin negative of the crystal to be adjusted through the differential output terminals P+ and P- of the detection system, respectively, so as to obtain a clock that is almost the same as the reference clock (the phase and frequency are the same, respectively), so as to replace the reference clock under certain time, certain conditions, and certain accuracy conditions.

[0009] The frequency tracking method mainly includes the following steps:

[0010] First, determine the frequency of the system working clock according to the accuracy requirements of system tracking and select the corresponding system working clock.

[0011] Secondly, the rising edges of the reference clock and the clock of the crystal input to be adjusted are detected respectively, and according to different detection results, high and low levels are set respectively and the detection results are stored in different variables.

[0012] The third step is to perform a logical AND operation on the two different variables obtained in the previous step. According to whether the results of the logical AND are high or low, the detection result is modified to low or the current detection result is kept unchanged.

[0013] The fourth step, based on step three, further perform a logical OR operation on two different variables. If the result of the OR operation is a low level, clear a counter and turn to the sixth step. If the result of the OR operation is a high level, continue to the fifth step.

[0014] The fifth step is to observe whether the counter count value reaches the set threshold. If it does not reach the threshold, the counter continues to accumulate counts under the drive of the system working clock until the threshold is reached, and the counter maintains the threshold unchanged.

[0015] The sixth step is to judge the tracking status according to the counter value. If the counter value is the set threshold, it means that the tracking of the reference clock has failed. If the counter value is 0, it means that the tracking of the reference clock has been successful, or the clock of the crystal input to be adjusted has locked the reference clock.

[0016] Step 7: Invert the variable of the reference source and write it to the positive end of the differential adjustment pin of the crystal clock to be adjusted, and write the variable of the crystal to be adjusted directly to the negative end of the differential adjustment pin of the crystal clock to be adjusted.

[0017] (3) Beneficial effects

[0018] A frequency tracking method proposed by the present invention has the following significant features:

[0019] 1) Theoretically, this method has no requirements for the operating frequency and reference. Therefore, it is possible to track the high-frequency reference clock without using high-end instruments, thereby reducing the cost of the implementation solution.

[0020] 2) By adjusting the system working clock frequency and the threshold of the counter to achieve different tracking accuracy requirements, the system undoubtedly has great flexibility.

[0021] 3) Although this method is explained using a set of reference clocks as an example, it can be easily extended to multiple reference clock systems by simply adding multiple storage variables and then allowing the clock of the crystal input to be adjusted to track and lock these reference sources separately. It is only necessary to remember to track the adjustment amounts of different reference sources separately. Therefore, this solution is also highly scalable and can be applied to multi-clock backup systems. BRIEF DESCRIPTION OF THE DRAWINGS

[0022] Figure 1 A block diagram of a frequency tracking system related to an embodiment of the present application;

[0023] Figure 2 A flowchart of a reference clock and a crystal clock to be adjusted detection related to an embodiment of the present application;

[0024] Figure 3 A flow chart of frequency adjustment related to an embodiment of the present application;

[0025] Figure 4 This is a simulation diagram of detecting a reference clock and a crystal clock to be adjusted in an embodiment of the present application;

[0026] Figure 5 This is a simulation diagram of a locked state in which the counter threshold is set to 3 in an embodiment of the present application; DETAILED DESCRIPTION

[0027] In order to enable a more detailed understanding of the features and contents of the embodiments of the present application, the implementation of the technical solution is further described in detail below in conjunction with the accompanying drawings.

[0028] like Figure 1A frequency tracking system related to the present invention is shown, which mainly includes a detection system and a crystal to be adjusted. The detection system is mainly composed of programmable devices. Its input mainly includes three clocks, system working clock, reference clock, and crystal input clock to be adjusted. The system working clock is a clock that provides tracking work for the detection system, which is required to be stable and reliable. The higher its frequency, the higher the tracking accuracy. For example, if we use a 200MHz system working clock, its theoretical detection accuracy is that its period is 5 nanoseconds. The reference clock, as the clock to be tracked, requires its frequency accuracy to meet certain accuracy requirements according to the actual working system requirements. The crystal input clock to be adjusted comes from the output of the crystal to be adjusted. The crystal can be composed of a voltage-controlled oscillator, and its purpose is to track the frequency and phase of the reference clock. When the reference clock is lost under certain conditions, it can be calculated by the algorithm based on its historical adjustment data accumulation, and the adjustment data is written into the differential pin positive end and the differential pin negative end of the crystal to be adjusted through the output terminals P+ and P- of the detection system, respectively, so as to obtain a clock that is almost the same as the reference clock (the phase and frequency are the same, respectively), thereby replacing the reference clock under certain time, certain conditions, and certain accuracy conditions.

[0029] A clock detection method for a frequency tracking system related to the present invention includes the following steps: Figure 2 shown.

[0030] First: Determine the frequency of the system working clock according to the accuracy requirements of system tracking, and select the corresponding system working clock. The working frequency directly determines the tracking accuracy.

[0031] Secondly, the rising edge of the reference clock and the clock input by the crystal to be adjusted are detected respectively, and the detection results are stored in different variables according to different detection results. Figure 2 A represents the variable for detecting the reference clock, and b represents the variable for detecting the crystal clock to be adjusted. When a clock edge is detected, the variable is set to a high level, and when no edge is detected, the variable is set to a low level. Variable a and variable b will have different values ​​according to the above detection results. Figure 4 The detection results of the reference clock and the crystal clock to be adjusted are shown in the figure. The figure details the different clock edge detection states, which lead to different values ​​of the two detection variables. It is worth noting that although the detection here is based on the rising edge as an example, the detection can also be performed on the falling edge, and the principles and steps are completely similar.

[0032] The third step is to perform a logical AND operation on the two different variables a and b obtained in the previous step. According to the results of the logical AND operation, which are high and low respectively, the variables a and b are set to low or the current detection results are kept unchanged.

[0033] In the fourth step, based on step three, two different variables a and b are further subjected to a logical OR operation. If the result of the OR operation is a low level, a counter is cleared and the logic is turned to step six. If the result of the OR operation is a high level, continue with step five.

[0034] The fifth step is to observe whether the counter count value reaches the set threshold. If it does not reach the threshold, the counter will continue to accumulate counts under the drive of the system working clock until the threshold is reached, and the counter will maintain the threshold unchanged. Here, the threshold is set according to the requirements. If the detection edge is lost once, it is set to 1, if it is lost twice, it is set to 2, and so on. If the value is set to a larger value, the crystal to be adjusted will track the reference clock more slowly. Reference Figure 5 When the threshold is set to 3, it is captured that when the input clock of the crystal to be adjusted is lost, the counter reaches the count value 3, and the tracking status output is high, which confirms that there is a problem with the input of the crystal to be adjusted and the reference clock is not locked. This situation is also called loss of lock.

[0035] The sixth step is to judge the tracking status according to the counter value. If the counter value is the set threshold, it means that the tracking of the reference clock has failed. If the counter value is 0, it means that the tracking of the reference clock has been successful, or the clock of the crystal input to be adjusted has locked the reference clock.

[0036] In the seventh step, the variable that tracks the reference source is inverted and written to the positive end of the clock differential adjustment pin of the crystal to be adjusted, and the variable that tracks the crystal to be adjusted is directly written to the negative end of the clock differential adjustment pin of the crystal to be adjusted. Through this writing, the crystal to be adjusted can output a clock signal whose frequency and phase are completely consistent with the reference clock within a certain accuracy range.

[0037] A frequency tracking method proposed by the present invention adjusts the differential clock input pin signal of the crystal to be adjusted by detecting the reference clock and the crystal clock to be adjusted, thereby obtaining a clock signal whose frequency and phase are respectively consistent with the reference clock under certain precision conditions. In this process, there is no need to use high-end instruments to detect the clock signal output by the crystal to be adjusted in real time, thereby reducing the cost of testing both the reference clock and the clock signal output by the crystal through instruments, and improving the detection efficiency. At the same time, in the detection process, the frequency of the system working clock and the threshold of the tracking counter can be reasonably selected according to the accuracy requirements and the tracking speed requirements to obtain higher tracking (locking) accuracy and faster tracking speed. Although the scheme uses a reference source as an example to illustrate the tracking process, it is easy to extend to the tracking of a multi-reference source system under the background of knowledge in this field. It only needs to store and distinguish different reference sources with different variables, and remember the adjustment amount of the differential pins of each different crystal input, so as to realize the tracking system of multiple reference sources. In addition, although the scheme implementation is illustrated by taking the rising edge of the detection signal as an example, the scheme can also be successfully implemented by taking the falling edge of the detection signal. Therefore, this solution has the characteristics of low implementation cost, flexible tracking accuracy and scalable tracking system, and can be especially used in systems that require multiple clock backups such as aviation and aerospace. Therefore, combined with the technical knowledge in this field, any modification and expansion of this solution falls within the scope of protection of this solution.

Claims

1. A frequency tracking method, characterized in that: The input includes three types of clocks. First, the frequency of the system working clock is determined and the corresponding system working clock is selected. Secondly, the rising edges of the reference clock and the clock of the crystal to be adjusted are detected. According to the detection results, the high and low levels are set respectively and the detection results are stored in different variables. Then, the two different variables are logically ANDed and modified according to the result of the logic AND. The two different variables are further logically ORed and the next operation is performed according to the result of the logic OR. Finally, the crystal to be adjusted can output a clock signal with a frequency and phase that are completely consistent with the reference clock within a certain accuracy range.

2. The method according to claim 1, characterized in that: The three clocks include a system operating clock, a reference clock and a crystal clock to be adjusted.

3. The method according to claim 1, characterized in that: The frequency of the system working clock is determined based on the accuracy requirements of system tracking.

4. The method of detecting the rising edge of the reference clock and the clock input by the crystal to be adjusted according to claim 1, characterized in that: Falling edges can also be detected.

5. The method according to claim 1, characterized in that: According to the result of the logic AND being high or low respectively, the detection result is modified to low or the current detection result is kept unchanged.

6. The method according to claim 1, characterized in that: If the logical or result is a high level, observe whether the counter value reaches the set threshold. When the value does not reach the threshold, the counter continues to accumulate technology until the threshold is reached, and the counter maintains the threshold unchanged.

7. The method according to claim 1, characterized in that: If the logical OR result is a low level, a counter is cleared and the tracking status is judged according to the counter value. When the counter value is the set threshold, it means that the tracking of the reference clock fails. When the counter value is 0, it means that the tracking of the reference clock is successful.

8. The method according to claim 1, characterized in that: Finally, the variable tracking the reference source should be inverted and written into the positive section of the differential adjustment pin of the crystal clock to be adjusted, and the variable tracking the crystal to be adjusted should be directly written into the negative end of the differential adjustment pin of the crystal clock to be adjusted.