A time synchronization method based on K-nearest neighbor mutual information
By delayed the time signal of the time signal using the K-near-neighboring information algorithm in the distributed system, the traditional time synchronization method of the traditional time synchronization method is solved under non-linear distortion conditions, and the efficient and accurate time synchronization is achieved. The long training time and the complexity of the parameter tuning.
Patent Information
- Application Number
- CN202210410237.1
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2022-04-19
- Publication Date
- 2025-01-28
- Estimated Expiration
- 2042-04-19
AI Technical Summary
In distributed systems, traditional time synchronization methods have poor synchronization performance under nonlinear distortion conditions, and methods based on machine learning algorithms such as neural networks have problems such as long training time, complex parameter tuning and poor generalization capabilities.
The time synchronization method based on K-near-neighboring information is adopted to estimate the delay between time signals through the K-near-neighboring information algorithm to achieve time synchronization and improve synchronization efficiency and accuracy.
Effectively improve the efficiency and accuracy of time synchronization, especially in the communication scenario of nonlinear distortion and channel parameters, avoid long -term training and complex network parameter tuning.
Smart Images

Figure CN114844587B_ABST
Abstract
Description
Technical Field
[0001] The invention relates to the field of communications, in particular to the field of time synchronization, and specifically to a time synchronization method based on K-nearest neighbor mutual information. Background Art
[0002] Time synchronization is the process of providing a unified time scale for distributed systems by performing certain operations on local clocks. As the core technology in the entire wireless communication field, the accuracy of time synchronization directly determines the quality of communication. In a centralized system, since all processes or modules can obtain time from the system's unique global clock, any two events in the system have a clear order relationship. However, in a distributed system, due to physical dispersion, the system cannot provide a unified global clock for independent modules, and each process or module can only maintain its own local clock. However, due to the inconsistency of the timing rate and operating environment of these local clocks, even if all local clocks are calibrated at a certain moment, inconsistencies will still occur after a period of time. In order to make these local clocks reach the same time value again, time synchronization operations must be performed.
[0003] The traditional cross-correlation time synchronization method has average synchronization performance under nonlinear distortion conditions. With the development of computer and information technology in recent years, time synchronization methods based on machine learning algorithms such as neural networks have received extensive attention and research, and have achieved some results. Although this type of time synchronization method can improve the system time synchronization performance to a certain extent, it faces many problems such as long training time, complex network parameter tuning, and poor generalization ability.
[0004] Mutual information is a method developed from information theory to measure the degree of correlation between variables. It evaluates the amount of shared information between variables from the perspective of information theory and is not affected by whether the variables are linear. The K-nearest neighbor mutual information can avoid directly calculating the probability density and has the characteristics of simple algorithm and small amount of computation. Summary of the invention
[0005] In view of the defects of the prior art, the present invention provides a time synchronization method based on K-nearest neighbor mutual information, which adopts the K-nearest neighbor mutual information method to estimate the delay between time signals. It can estimate the delay between two columns of time signals according to the shared information amount, thereby realizing time synchronization and effectively improving the synchronization efficiency and accuracy.
[0006] In order to solve the technical problem, the technical solution adopted by the present invention is: a time synchronization method based on K-nearest neighbor mutual information, comprising the following steps: S01), before formal operation, obtaining the time signal sequence of the signal-emitting device and the signal-receiving device within the set time; S02), in the preparation stage, according to the time signal sequence obtained in step S01), using the K-nearest neighbor mutual information algorithm to calculate the time offset estimation value of the signal-receiving device relative to the signal-emitting device in the preparation stage, adjusting the time of the signal-receiving device according to the time offset estimation value in the preparation stage, and completing the initial time synchronization; S03), in the operation stage, during the operation of the device, regularly obtain the time signal sequence of the signal-emitting device and the signal-receiving device, and then use the K-nearest neighbor mutual information algorithm to analyze the time offset estimation value of the signal-receiving device relative to the signal-emitting device in the operation stage, compare the time offset estimation value of the operation stage with the set value, if the time offset estimation value of the operation stage meets the set value requirement, then no operation is performed, and the device still maintains normal operation, if the time offset estimation value of the operation stage exceeds the set value requirement, then adjust the time of the signal receiving device according to the time offset estimation value, thereby completing the time synchronization during the operation process.
[0007] Furthermore, the specific process of using the K-nearest neighbor mutual information algorithm to calculate the time offset estimate of the preparation stage is as follows: S21), set the initial delay of the preparation stage to 0, the delay update value to T, step S01), after obtaining the time signal sequences of the signal-emitting device and the signal-receiving device, use the K-nearest neighbor mutual information algorithm to calculate the mutual information value between the two time signal sequences; S22), the time signal sequence of the signal-emitting device remains unchanged, and the time signal sequence of the signal-receiving device moves forward by T time steps, and the K-nearest neighbor mutual information algorithm is used again to calculate the mutual information value between the time signal sequence of the signal-emitting device and the time signal sequence of the signal-receiving device after the movement; S23), repeat step S22 until the calculated mutual information value no longer increases. If this is the nth calculation, the time offset estimate at this time is (n-1)T.
[0008] Furthermore, after obtaining the estimated time offset value in the preparation phase, the estimated time offset value is added to the time of the signal receiving device, thereby completing the initial time synchronization.
[0009] Furthermore, the specific process of using the K-nearest neighbor mutual information algorithm to analyze the estimated time offset of the receiving signal device relative to the sending signal device during the operation phase is as follows: S31), setting the initial delay of the operation phase to (n-1)T, and the delay update value to T ’After obtaining the time sequence number sequence of the signal-emitting device and the signal-receiving device in the operation phase, the mutual information value between the time signal sequences of the two is calculated using the K-nearest neighbor mutual information algorithm, and the calculated mutual information value is compared with the set value. If the set value requirement is met, no operation is performed and the device still maintains normal operation. If the set value requirement is exceeded, the next step is performed; S32), the time signal sequence of the signal-emitting device remains unchanged, and the time signal sequence of the signal-receiving device moves forward by T ’ time step, and again use the K-nearest neighbor mutual information algorithm to calculate the mutual information value between the time signal sequence of the signal-emitting device and the time signal sequence of the signal-receiving device after the movement; S23), repeat step S22 until the calculated mutual information value no longer increases. If this is the mth calculation, the estimated time offset at this time is (n-1)T+(m-1)T ’ .
[0010] Furthermore, after obtaining the estimated value of the time offset in the operation phase, the estimated value of the time offset is added to the time of the signal receiving device, thereby completing the time synchronization in the operation phase.
[0011] Furthermore, the time signal sequence collected during the operation phase is consistent with the time signal sequence collected during the preparation phase.
[0012] Furthermore, the time signal sequence acquired in step S01) includes at least two complete time periods.
[0013] Beneficial effects of the present invention: The present invention adopts the K-nearest neighbor mutual information algorithm to realize signal sequence time synchronization. Compared with the traditional cross-correlation time synchronization method, it can effectively improve the time synchronization efficiency and accuracy, especially in communication scenarios with nonlinear distortion and channel parameter changes; compared with machine learning methods such as neural networks, it can avoid many problems such as long-term training, complex repeated tuning of network parameters, and poor model generalization ability. BRIEF DESCRIPTION OF THE DRAWINGS
[0014] Figure 1 It is the overall flow chart of the present invention;
[0015] Figure 2 A flowchart for the preparation phase;
[0016] Figure 3 This is a flowchart of the operation phase;
[0017] Figure 4 Flowchart for calculating time offset estimates based on the K-nearest neighbor mutual information algorithm. DETAILED DESCRIPTION
[0018] The present invention will be further described below in conjunction with the accompanying drawings and specific embodiments.
[0019] Example 1
[0020] During the signal propagation process, although the absolute timestamps of the two signals are not aligned, the change trend of the two signals at any time must be the same as that of the signal source, with the signal source time as the reference. Due to the delay problem in the propagation process, the oscillation recorded by the signal emitting device B is slightly earlier than that of the signal receiving device A. Intuitively speaking, if the signal emitted by the signal emitting device B is X and the signal received by the signal receiving device A Y is synchronous, then when X When reaching the peak value, Y It should also reach a peak. X When it reaches 0, Y It should also reach a value of 0. You can consider keeping X Don't move, signal Y Slide forward for a while, then X and Y The same trend of change will become larger, that is, X and Y The amount of common information between the two columns of signals will increase. X and Y When perfectly aligned, X and Y Synchronous changes. That is, when X and Y When the same change trend is the largest and the amount of shared information is the largest, the time of device A and device B is synchronized.
[0021] This embodiment discloses a time synchronization method based on K-nearest neighbor mutual information, such as Figure 1 As shown, the following steps are included:
[0022] S01) Before formal operation, obtain the time signal sequence of the signal sending device and the signal receiving device within the set time.
[0023] Assume that device A and device B are two devices that receive and send time signals respectively. X is the time signal sequence sent by device B, Y is the time signal sequence received by device A. The sampling time is set based on experience, and at least two complete time periods are required to obtain the time signal sequences of device A and device B within this period.
[0024] S02), preparation stage, such as Figure 2 As shown, according to the time signal sequence obtained in step S01), the K-nearest neighbor mutual information algorithm is used to calculate the time offset estimation value of the signal receiving device relative to the signal sending device in the preparation stage, and the time of the signal receiving device is adjusted according to the time offset estimation value in the preparation stage to complete the initial time synchronization, and the device starts to operate normally.
[0025] S03), operation phase, such as Figure 3 As shown, during the operation of the device, the time signal sequences of the signal-emitting device and the signal-receiving device are obtained regularly, and then the K-nearest neighbor mutual information algorithm is adopted to analyze the estimated time offset of the signal-receiving device relative to the signal-emitting device in the operation stage, and the estimated time offset in the operation stage is compared with the set value. If the estimated time offset in the operation stage meets the set value requirement, no operation is performed and the device still maintains normal operation. If the estimated time offset in the operation stage exceeds the set value requirement, the time of the signal receiving device is adjusted according to the estimated time offset, thereby completing the time synchronization in the operation process.
[0026] In this embodiment, Figure 4 As shown, the specific process of using the K-nearest neighbor mutual information algorithm to calculate the time offset estimate of the preparation phase is as follows: S21), set the initial delay of the preparation phase to 0, the delay update value to T, step S01), after obtaining the time signal sequences of the signal-emitting device and the signal-receiving device, use the K-nearest neighbor mutual information algorithm to calculate the mutual information value between the two time signal sequences; S22), the time signal sequence of the signal-emitting device remains unchanged, and the time signal sequence of the signal-receiving device moves forward by T time steps, and the K-nearest neighbor mutual information algorithm is used again to calculate the mutual information value between the time signal sequence of the signal-emitting device and the time signal sequence of the signal-receiving device after the movement; S23), repeat step S22 until the calculated mutual information value no longer increases. If this is the nth calculation, the time offset estimate at this time is (n-1)T.
[0027] After obtaining the estimated time offset value in the preparation phase, the estimated time offset value is added to the time of the signal receiving device to complete the initial time synchronization.
[0028] The specific process of using the K-nearest neighbor mutual information algorithm to analyze the estimated time offset of the receiving signal device relative to the sending signal device in the operation phase is as follows: S31), setting the initial delay of the operation phase to (n-1)T, and the delay update value to T ’ After obtaining the time sequence number sequence of the signal-emitting device and the signal-receiving device in the operation phase, the mutual information value between the time signal sequences of the two is calculated using the K-nearest neighbor mutual information algorithm, and the calculated mutual information value is compared with the set value. If the set value requirement is met, no operation is performed and the device still maintains normal operation. If the set value requirement is exceeded, the next step is performed; S32), the time signal sequence of the signal-emitting device remains unchanged, and the time signal sequence of the signal-receiving device moves forward by T ’time step, and again use the K-nearest neighbor mutual information algorithm to calculate the mutual information value between the time signal sequence of the signal-emitting device and the time signal sequence of the signal-receiving device after the movement; S23), repeat step S22 until the calculated mutual information value no longer increases. If this is the mth calculation, the estimated time offset at this time is (n-1)T+(m-1)T ’ .
[0029] In this embodiment, the calculated mutual information value is compared with the set value, that is, the mutual information value and the set value are compared. If the mutual information value is greater than the set value, it is considered that the set value requirement is met; if the mutual information value is less than the set value, it is considered that the set value requirement is not met.
[0030] After obtaining the estimated value of the time offset in the operation phase, the estimated value of the time offset is added to the time of the signal receiving device, thereby completing the time synchronization in the operation phase.
[0031] In this embodiment, the time signal sequence collected in the operation phase is consistent with the time signal sequence collected in the preparation phase.
[0032] It should be noted that the above content has been described in detail the principles and implementation methods of the present invention, and the content is only used to help understand the method of the present invention and its core idea, and the protection scope of the present invention is not limited to the above embodiments. A person of ordinary skill in the art can make various other improvements and modifications that do not deviate from the essence of the present invention based on the disclosure of the present invention, and these changes are still within the protection scope of the present invention.
Claims
1. A time synchronization method based on K-nearest neighbor mutual information, characterized in that: The following steps are involved: S01), before formal operation, obtain the time signal sequence of the signal-emitting device and the signal-receiving device within the set time; S02), in the preparation stage, according to the time signal sequence obtained in step S01), use the K-nearest neighbor mutual information algorithm to calculate the time offset estimate of the signal-receiving device relative to the signal-emitting device in the preparation stage, adjust the time of the signal-receiving device according to the time offset estimate in the preparation stage, and complete the initial time synchronization; S03), in the operation stage, during the operation of the device, regularly obtain the time signal sequence of the signal-emitting device and the signal-receiving device, and then use the K-nearest neighbor mutual information algorithm to analyze the time offset estimate of the signal-receiving device relative to the signal-emitting device in the operation stage, compare the time offset estimate in the operation stage with the set value, if the time offset estimate in the operation stage meets the set value requirement, then do not perform any operation, and the device still maintains normal operation, if the time offset estimate in the operation stage exceeds the set value requirement, then adjust the time of the signal receiving device according to the time offset estimate, thereby completing the time synchronization in the operation process; The specific process of using the K-nearest neighbor mutual information algorithm to calculate the time offset estimation value of the preparation stage is as follows: S21), set the initial delay of the preparation stage to 0, the delay update value to T, step S01), after obtaining the time signal sequence of the signal-emitting device and the signal-receiving device, use the K-nearest neighbor mutual information algorithm to calculate the mutual information value between the two time signal sequences; S22), the time signal sequence of the signal-emitting device remains unchanged, and the time signal sequence of the signal-receiving device moves forward by T time steps, and the K-nearest neighbor mutual information algorithm is used again to calculate the mutual information value between the time signal sequence of the signal-emitting device and the time signal sequence of the signal-receiving device after the movement; S23), repeat step S22 until the calculated mutual information value no longer increases. If this is the nth calculation, the time offset estimation value at this time is (n-1)T; The specific process of using the K-nearest neighbor mutual information algorithm to analyze the estimated time offset of the receiving signal device relative to the signal sending device in the operation stage is as follows: S31), set the initial delay of the operation stage to (n-1)T, the delay update value to T', obtain the time sequence number sequence of the signal sending device and the signal receiving device in the operation stage, use the K-nearest neighbor mutual information algorithm to calculate the mutual information value between the time signal sequences of the two, and compare the calculated mutual information value with the set value. If the set value requirement is met, no operation is performed and the device still maintains normal operation. If it exceeds the set value requirement, proceed to the next step; S32), the time signal sequence of the signal sending device remains unchanged, and the time signal sequence of the signal receiving device moves forward by T' time steps, and the K-nearest neighbor mutual information algorithm is used again to calculate the mutual information value between the time signal sequence of the signal sending device and the time signal sequence of the signal receiving device after the movement; S23), repeat step S22 until the calculated mutual information value no longer increases. If this is the mth calculation, the estimated time offset at this time is (n-1)T+(m-1)T'.
2. The time synchronization method based on K-nearest neighbor mutual information according to claim 1, characterized in that: After obtaining the estimated time offset value in the preparation phase, the estimated time offset value is added to the time of the signal receiving device to complete the initial time synchronization.
3. The time synchronization method based on K-nearest neighbor mutual information according to claim 1, characterized in that: After obtaining the estimated value of the time offset in the operation phase, the estimated value of the time offset is added to the time of the signal receiving device, thereby completing the time synchronization in the operation phase.
4. The time synchronization method based on K-nearest neighbor mutual information according to claim 1, characterized in that: The time signal sequence collected during the operation phase is consistent with the time signal sequence collected during the preparation phase.
5. The time synchronization method based on K-nearest neighbor mutual information according to claim 1, characterized in that: The time signal sequence acquired in step S01) contains at least two complete time periods.
Citation Information
Patent Citations
Method and device for estimating time bias in synchronous process of LTE system
CN101754352A
Time synchronization method and apparatus for wireless ad-hoc network
CN105357752A