Double-antenna clock synchronization time service method, system and device based on UWB technology and medium
By using the dual-antenna clock synchronization timing method using UWB technology in indoor base stations, clock synchronization is used by UWB communication chips, which solves the problem of weak GPS signals and large-scale wiring required for fiber transmission, and achieves high-precision and low-cost clock synchronization.
Patent Information
- Application Number
- CN202411013792.6
- Authority / Receiving Office
- CN · China
- Patent Type
- Applications(China)
- Current Assignee / Owner
- Filing Date
- 2024-07-26
- Publication Date
- 2024-11-22
- Estimated Expiration
- 2044-07-26
AI Technical Summary
The existing indoor base station timing technology has problems such as weak GPS signal and low accuracy in complex environments, and optical fiber transmission clock synchronization requires a large amount of physical wiring, which is large in engineering volume and high in cost.
Using the dual-antenna clock synchronization timing method based on UWB technology, the main base station receives the GPS second pulse signal and sends the UWB synchronization signal to the slave base station. The clock synchronization is performed through the dual UWB communication chip, the time stamp difference is calculated to determine the phase information, and the DAC converts to voltage information to frequency control the temperature compensation crystal oscillator and adjusts the phase of the UWB synchronization signal to achieve high-precision clock synchronization.
It improves the accuracy of indoor base station clock synchronization, reduces engineering volume and cost, enhances the system's anti-multipath interference capability, and realizes second-level clock synchronization.
Smart Images

Figure CN119012333A_ABST
Abstract
Description
Technical Field
[0001] The present invention relates to the field of wireless clock synchronization technology, and in particular to a dual-antenna clock synchronization timing method, system, equipment and medium based on UWB technology. Background Art
[0002] With the rapid development of 5G and Internet of Things (IoT) technologies, indoor base stations are increasingly being used. These base stations are widely deployed in indoor environments such as shopping malls, office buildings, subway stations, and airports to provide high-quality wireless communication services. In order to ensure the coordination between multiple base stations, the accuracy of data transmission, and the reliability of real-time applications, accurate timing of each base station is particularly important.
[0003] In complex indoor environments, the coordinated work between multiple base stations requires accurate timing between base stations. The timing solution must be highly stable and reliable and able to work normally under a variety of interference conditions. Real-time positioning, synchronous transmission, and high-quality services require the timing accuracy between base stations to reach microseconds or even sub-microseconds to reduce data delays and errors. The ideal timing solution should also be able to adapt to various indoor environments, including high-rise buildings, underground facilities, etc., and can be flexibly configured according to specific application scenarios.
[0004] The existing indoor base station timing technology mainly adopts global positioning system (GPS) timing, fiber transmission timing, shortwave timing, longwave timing and low-frequency time code timing. GPS timing is to synchronize the clock of ground equipment by receiving time signals from GPS satellites. The time signal provided by GPS is highly accurate and can reach nanosecond level. However, in indoor environment, GPS signal is blocked by buildings, signal strength is significantly reduced, or even completely lost, so that the reliability and accuracy of timing cannot be guaranteed. Therefore, GPS timing is limited in indoor application. Fiber transmission timing utilizes the low latency characteristics of fiber medium to transmit high-precision time signals through fiber to achieve timing between base stations. This method can provide high-precision timing and is usually used in high-end applications that require strict synchronization. However, fiber transmission timing requires a lot of physical wiring, large engineering workload, high cost, and wiring and maintenance are difficult in complex indoor environments. In addition, the laying and maintenance of optical fiber will increase the complexity of the system. Shortwave timing uses shortwave radio with a wavelength of 100 meters to 10 meters (frequency: 3MHz~30MHz) for timing. In China, the shortwave radio station of the National Time Service Center (call sign BPM) uses 2.5MHz, 5MHz, 10MHz, and 15MHz frequencies to continuously broadcast China's shortwave radio time throughout the day. The disadvantage is that shortwave signals are easily interfered by the ionosphere and environmental noise, and the accuracy and stability are reduced in complex environments. Long-wave time service uses long-wave radio with a wavelength of 10 kilometers to 1 kilometer (frequency: 30KHz~300KHz) for time service. The long-wave radio station of the National Time Service Center (call sign BPL) has a transmission frequency of 100KHz. The ground wave action range of the time service signal is 1000-2000 kilometers, and the sky wave signal covers 3000 kilometers, basically covering China's inland and offshore waters, and the time service accuracy is in the microsecond level. The disadvantage is that the long-wave signal has poor penetration, is greatly affected by geography and buildings, and has limited indoor coverage. Low-frequency time code time service is a special long-wave time service, which is suitable for regional standard time and frequency transmission. The National Time Service Center uses a continuous wave time code timing system technology with a carrier frequency of 68.5KHz. The accuracy can reach an error of no more than 1 second in 300,000 years. However, the transmission distance of low-frequency time code signals is limited. The signal strength is weak in areas far away from the transmitter and is easily affected by environmental interference. The digital phase-locked loop often used in traditional local clock timekeeping design solutions often has problems such as low accuracy and complex structure. Therefore, it is difficult for existing traditional solutions to take into account the portability and reliability of the implementation of the timing solution.
[0005] Therefore, the following problems exist:
[0006] (1) In indoor environments, GPS signals are weak and have low accuracy, making it impossible to directly use GPS for timing;
[0007] (2) Fiber optic transmission clock synchronization requires a lot of physical wiring, which is labor intensive and costly. Summary of the invention
[0008] The purpose of the present invention is to provide a dual-antenna clock synchronization timing method, system, device and medium based on UWB technology, which can use UWB base station to complete the wireless transmission of second pulse time reference and improve the synchronization accuracy of transmitting and receiving clocks.
[0009] To achieve the above object, the present invention provides the following solutions:
[0010] A dual-antenna clock synchronization timing method based on UWB technology, comprising:
[0011] The master base station receives the GPS pulse-per-second signal and sends the UWB synchronization signal to the slave base station.
[0012] The dual UWB communication chips in the slave base station are used for clock synchronization, which not only receives the UWB synchronization signal sent by the master base station, but also forwards the UWB synchronization signal to the indoor terminal device, and uses the UWB communication chip to obtain the timestamp of the moment of sending and receiving the UWB synchronization signal, and calculates the difference between the timestamps to obtain the time difference;
[0013] Based on the time difference, the phase information of the delay or lag of the UWB synchronization signal forwarded from the base station is determined, and the phase information is converted into voltage information through a DAC, and the temperature compensated crystal oscillator is frequency-controlled. The phase of the sent UWB synchronization signal is adjusted through frequency conversion, thereby forming feedback and controlling the phase difference between the forwarded and received UWB synchronization signals to be within the error setting range.
[0014] Optionally, the method of receiving the GPS pulse-per-second signal by the master base station and sending the UWB synchronization signal to the slave base station specifically includes:
[0015] The main control chip of the main base station is used to receive the GPS second pulse signal. After the main control chip detects the rising edge of the GPS second pulse signal, the DW1000 chip is controlled to start the UWB sending function and send a UWB synchronization signal with a period of 1 second for reception from the slave base station; the DW1000 chip configures the delayed sending and receiving register value and sets the delayed sending value to the timestamp value of each sending plus 1 second, thereby achieving the function of sending a pulse signal once per second.
[0016] Optionally, the time difference is obtained by:
[0017] Reset the slave base station, and after the reset, actively receive the UWB synchronization signal sent by the master base station through the DW1000-A chip; every time the DW1000-A chip receives the UWB synchronization signal, it immediately obtains the current time, so that the DW1000-B chip sends the forwarded UWB synchronization signal every 1 second, records the current timestamp and generates an interrupt as a local clock synchronization pulse; the DW1000-B chip actively sends the forwarded UWB synchronization signal with a period of 1 second, and its delayed sending configuration method is the same as the DW1000 chip configuration method of the master base station; the time difference is obtained by subtracting the latest timestamps obtained by the two DW1000 chips through the main control chip.
[0018] Optionally, the frequency control includes system feedback coarse adjustment and system feedback fine adjustment;
[0019] The process of system feedback coarse adjustment is as follows:
[0020] When the difference in timestamps is greater than or equal to 1 millisecond, the count value of the delayed transceiver register inside the DW1000 chip of the slave base station is compensated. The formula for compensating the counter value is as follows:
[0021] ΔC=f(t)·Δt-C
[0022] The process of system feedback fine-tuning is as follows:
[0023] When the timestamp difference is less than 1 millisecond, the external crystal frequency is adjusted. The adjustment calculation formula is as follows:
[0024] Δt_a=C·Δf(t)
[0025] Among them, f(t) is the current operating frequency of the DW1000 chip, Δt is the time difference, C is the count value of the original counter, and Δt_a is the time difference between receiving the UWB synchronization signal and forwarding the UWB synchronization signal.
[0026] Optionally, the feedback control adopts PID feedback control, and the output of the PID feedback control is expressed as:
[0027]
[0028] Where u(t) is the control signal, e(t) is the system error, which is used to represent the difference between the set value and the actual value, and K p , K i , K d are the proportional, integral and differential coefficients respectively, and t is the time.
[0029] The present invention also provides a dual-antenna clock synchronization timing system based on UWB technology, comprising:
[0030] A signal synchronization module is used to receive the GPS pulse-per-second signal using the master base station and send a UWB synchronization signal to the slave base station;
[0031] The time difference acquisition module is used to use the dual UWB communication chips in the slave base station for clock synchronization, to receive the UWB synchronization signal sent by the master base station, to forward the UWB synchronization signal to the indoor terminal device, and to use the UWB communication chip to obtain the timestamp of the moment of sending and receiving the UWB synchronization signal, and to calculate the difference between the timestamps to obtain the time difference;
[0032] The system control module is used to determine the phase information of the delay or lag of the UWB synchronization signal forwarded from the base station based on the time difference, and convert the phase information into voltage information through a DAC, perform frequency control on the temperature compensated crystal oscillator, and adjust the phase of the sent UWB synchronization signal through frequency conversion, thereby forming feedback and controlling the phase difference between the forwarded and received UWB synchronization signals to be within the error setting range.
[0033] The present invention also provides an electronic device, including a memory and a processor, wherein the memory is used to store a computer program, and the processor runs the computer program to enable the electronic device to execute the dual-antenna clock synchronization timing method based on the UWB technology.
[0034] The present invention also provides a computer-readable storage medium storing a computer program, wherein the computer program, when executed by a processor, implements the dual-antenna clock synchronization timing method based on UWB technology as described above.
[0035] According to the specific embodiments provided by the present invention, the present invention discloses the following technical effects:
[0036] The present invention discloses a dual-antenna clock synchronization timing method, system, device and medium based on UWB technology, the method includes using a main base station to receive a GPS second pulse signal, and sending a UWB synchronization signal to a slave base station, and using a dual UWB communication chip for clock synchronization, both receiving the UWB synchronization signal sent by the main base station and forwarding the UWB synchronization signal to an indoor terminal device, and using the UWB communication chip to obtain the timestamp of the moment of sending and receiving the UWB synchronization signal, and calculating the difference between the two timestamps; based on the time difference, determine the phase difference of the UWB synchronization signal forwarded by the slave base station, and convert the phase difference into voltage information through a DAC, and perform frequency control on a temperature compensated crystal oscillator, and then adjust the phase of the UWB synchronization signal sent. The present invention can use a UWB base station to complete the wireless transmission of the second pulse time reference, and improve the synchronization accuracy of the receiving and sending clocks. BRIEF DESCRIPTION OF THE DRAWINGS
[0037] In order to more clearly illustrate the embodiments of the present invention or the technical solutions in the prior art, the drawings required for use in the embodiments will be briefly introduced below. Obviously, the drawings described below are only some embodiments of the present invention. For ordinary technicians in this field, other drawings can be obtained based on these drawings without paying creative labor.
[0038] Figure 1 This is a schematic diagram of the dual-antenna clock synchronization timing logic based on UWB technology of the present invention;
[0039] Figure 2 Schematic diagram of the difference between the timestamps of two timing signals in this embodiment. DETAILED DESCRIPTION
[0040] The following will be combined with the drawings in the embodiments of the present invention to clearly and completely describe the technical solutions in the embodiments of the present invention. Obviously, the described embodiments are only part of the embodiments of the present invention, not all of the embodiments. Based on the embodiments of the present invention, all other embodiments obtained by ordinary technicians in this field without creative work are within the scope of protection of the present invention.
[0041] The purpose of the present invention is to provide a dual-antenna clock synchronization timing method, system, device and medium based on UWB technology, which can use UWB base station to complete the wireless transmission of second pulse time reference and improve the synchronization accuracy of transmitting and receiving clocks.
[0042] In order to make the above-mentioned objects, features and advantages of the present invention more obvious and easy to understand, the present invention is further described in detail below with reference to the accompanying drawings and specific embodiments.
[0043] like Figure 1 As shown, the present invention provides a dual-antenna clock synchronization timing method based on UWB technology, comprising:
[0044] Step 100: Receive the GPS pulse-per-second signal using the master base station and send a UWB synchronization signal to the slave base station;
[0045] Step 200: using the dual UWB communication chip in the slave base station to perform clock synchronization, receiving the UWB synchronization signal sent by the master base station, forwarding the UWB synchronization signal to the indoor terminal device, and using the UWB communication chip to obtain the timestamp of the moment of sending and receiving the UWB synchronization signal, and calculating the difference between the timestamps to obtain the time difference;
[0046] Step 300: Based on the time difference, determine the phase information of the delay or lag of the UWB synchronization signal forwarded from the base station, convert the phase information into voltage information through DAC, perform frequency control on the temperature compensated crystal oscillator, and adjust the phase of the transmitted UWB synchronization signal through frequency conversion, thereby forming feedback and controlling the phase difference between the forwarded and received UWB synchronization signals to be within the error setting range.
[0047] Based on the above technical solution, the following embodiments are provided.
[0048] In this embodiment, firstly, the UWB base station is used to complete the wireless transmission of the second pulse time reference by utilizing the characteristics of UWB technology, such as low power consumption, strong indoor anti-multipath interference capability, and high time measurement resolution; secondly, the traditional local clock timekeeping design scheme requires a phase detector, a DAC, and a voltage-controlled oscillator to form a phase-locked loop, wherein the phase detector can use TDC, and a digital phase-locked loop mode is adopted. In this design scheme, a 38.4M voltage-controlled constant temperature crystal oscillator drives DW1000 to generate local second pulses. DW1000 itself has the high-precision time measurement function of TDC, and the measurement resolution reaches 15.65ps, which is better than the current mainstream TDC chip. In this design scheme, the DW1000 signal transceiver time measurement function is used to realize digital phase detection, and a low-cost digital phase-locked loop is formed with DAC and a temperature-compensated crystal oscillator, which can make the synchronization accuracy of the transceiver clock reach within 50 nanoseconds.
[0049] The specific contents include: the main base station receives the GPS second pulse signal and simultaneously sends the UWB synchronization signal with a time interval of 1 second. The slave base station uses dual UWB communication chips for clock synchronization, which not only receives the UWB synchronization signal sent by the main base station, but also forwards the synchronization signal to the indoor terminal equipment, and uses the UWB communication chip to obtain the timestamp of the moment of sending and receiving the UWB signal. The difference between the two timestamps is the time difference, which can be reflected as the phase difference in the square wave. The timestamp information is sent to the main control chip (STM32H750) for comparison, and the delay or lag phase information of the forwarded synchronization signal from the slave base station is converted into voltage information through DAC. The voltage can regulate the frequency of the temperature compensated crystal oscillator. Through the frequency conversion, the phase of the transmitted signal can be adjusted, thereby forming feedback, so that the phase difference between the forwarded synchronization signal and the received synchronization signal gradually approaches and converges to the allowable error range.
[0050] Based on the previous research on UWB technology, this dual-antenna clock synchronization timing solution based on UWB technology was designed and developed. The solution mainly consists of two parts: the main base station and the slave base station. The main base station is mainly used for receiving satellite standard signals and sending timing synchronization signals. The slave base station hardware is a UWB wireless transceiver base station. The two UWB communication chips of the slave base station use the same voltage-controlled crystal oscillator as the frequency source, and can receive the wireless timing synchronization signal sent by the main base station. The slave base station receives the synchronization signal and transmits the forwarding synchronization signal at the same time. The slave base station regulates the forwarded synchronization signal according to the timestamp information of the received and forwarded synchronization signal, so that the forwarded synchronization signal and the received synchronization signal are in phase, achieving clock synchronization and synchronization signal forwarding effects. While sending the forwarding synchronization signal, the slave base station outputs a local synchronized second pulse. The main components of the base station hardware are as follows:
[0051] (1) Main control chip;
[0052] (2) UWB communication chip;
[0053] (3) 38.4MHz temperature compensated crystal oscillator;
[0054] (4) Digital-to-analog converter (DAC);
[0055] The main control chips of the master base station and the slave base station are both STM32H750 chips. STM32H750 is a high-performance microcontroller (MCU) produced by STMicroelectronics (ST), belonging to the STM32H7 series, using a 32-bit ARM Cortex-M7 core, and operating at a frequency of up to 480MHz. The chip's processing power and operating frequency can meet the requirements of a nanosecond-level clock synchronization working environment.
[0056] The main base station uses a UWB communication chip to send UWB synchronization signals. The slave base station uses a UWB communication chip to receive the UWB synchronization signal sent by the main base station, and then uses another identical UWB communication chip to send a forwarded UWB synchronization signal for synchronizing other terminal devices. The UWB communication chips in this solution all use DW1000 chips. DW1000 is a UWB wireless transceiver chip launched by Decawave, which is widely used in high-precision positioning and other fields. The clock generated by the 38.4MHz crystal oscillator of the slave base station is multiplied to 124.8MHz through an internal phase-locked loop to be used as the DW1000 working clock, and its internal timestamp accuracy can reach up to 15.65ps. The main control chip communicates with the UWB communication chip through the SPI communication protocol, thereby controlling it to realize the wireless signal transmission and reception and timestamp acquisition functions.
[0057] The working principle is:
[0058] After receiving the rising edge of the GPS pulse-per-second signal, namely GPS_1PPS, the main base station immediately starts the UWB transmission function and sends the UWB synchronization signal.
[0059] After the slave base station is reset and started, the DW1000 timestamp information is the count value of the reset system clock counter register (Register file: 0x06-System Time Counter). The maximum count time is about 17 seconds and the count is reset to zero. Therefore, the same external clock crystal is used to drive the two DW1000s and the SYNC function of the two DW1000s is used to reset their clocks at the same time, so that the two DW1000 system clock counter registers count synchronously. For the two DW1000 chips of the slave base station, DW1000-A is responsible for receiving the UWB synchronization signal of the master base station, and DW1000-B is responsible for forwarding the UWB synchronization signal at 1 second intervals.
[0060] After being reset, DW1000-B actively sends a forwarded UWB synchronization signal with a period of 1 second. Each time a UWB signal is sent, the timestamp of the sending is recorded. DW1000-A receives the synchronization signal sent by the main base station and records the timestamp of the reception. The two pulse periods of receiving UWB synchronization signal and forwarding UWB synchronization signal are both 1 second. The difference between the two latest timestamps is the time difference between receiving UWB synchronization signal and forwarding UWB synchronization signal. While DW1000-B forwards UWB synchronization signal and records the timestamp, it can also generate an interrupt event. The content of the event is to pull up and then lower the level, so that the overall function of the interrupt is to generate a standard local second pulse. The generation of the interrupt event occurs simultaneously with the sending of the forwarded UWB synchronization signal.
[0061] The main control chip obtains the timestamp information of DW1000-A and DW1000-B and gets the difference. The main control chip gives feedback based on the time difference between the two signals. The feedback signal is transmitted to the DAC and converted into an analog voltage value. The 38.4MHz temperature compensated crystal oscillator is regulated by voltage. The change of the external applied voltage will change the output frequency of the crystal oscillator. The two DW1000s receive the crystal oscillator pulse as the clock source. The change of the crystal oscillator frequency affects the UWB forwarding synchronization signal generated by DW1000-B and the local second pulse period generated, which ultimately affects the signal output, forming a closed-loop feedback and achieving the result of frequency modulation and phase modulation.
[0062] The logic of this solution is that the slave base station takes the UWB synchronization signal sent by the main base station as the benchmark. The solution will eventually make the forwarded UWB synchronization signal and the local second pulse achieve phase and frequency synchronization with the UWB synchronization signal sent by the main base station after multiple adjustments and feedback. The forwarded UWB synchronization signal generated by the slave base station in this solution can synchronize other terminal IoT devices indoors. When this solution is used as an IoT terminal solution from the slave base station, the second pulse generated locally can be used as a standard timing signal for synchronizing local terminals.
[0063] As a specific implementation method, the specific workflow of each part is as follows:
[0064] (1) The master base station sends a synchronization signal
[0065] The main control chip of the main base station receives the GPS second pulse signal. After the main control chip detects the rising edge of the GPS second pulse signal, it controls the DW1000 chip to start the UWB transmission function and send a UWB synchronization signal with a period of 1 second for the slave base station to receive. The DW1000 chip configures the delayed send and receive register (Register file: 0x0A-Delayed Send or Receive Time) value and sets the delayed send value to the timestamp value of each send plus 1 second, so as to achieve the function of sending a pulse signal once per second.
[0066] (2) Reset from base station system
[0067] The base station main control chip sends a reset signal to the SYNC pins of the two DW1000 chips at the same time, so that the two DW1000 chips are reset at the same time. The two DW1000s are reset at the same time, using the same clock source, and the system clock count register counts at the same time, and the clock cycle is 1 second, so that the subsequent timestamp difference can be the phase difference of the two signals.
[0068] (3) Time difference acquisition
[0069] After the base station is reset, DW1000-A actively receives the UWB synchronization signal sent by the main base station. Every time DW1000-A receives a UWB synchronization signal, it immediately obtains the current timestamp. DW1000-B sends a forwarded UWB synchronization signal every 1 second, records the current timestamp, and generates an interrupt as a local clock synchronization pulse. DW1000-B actively sends a forwarded UWB synchronization signal with a period of 1 second, and its delayed sending configuration is the same as the configuration of the main base station DW1000 chip. The main control chip performs a difference process on the latest timestamps obtained by the two DW1000s, and the obtained time difference is the phase difference difference information.
[0070] like Figure 2 As shown in the figure, Δt1 and Δt2 are the time differences obtained by the main control chip based on the difference between the timestamps of the two timing signals.
[0071] Δt_a=Δt2-Δt1
[0072] Δt_a is the difference between two adjacent time difference interpolation values. After the main control chip obtains its value, it pre-processes it and first judges and removes abnormal values from the information.
[0073] First, the time differences acquired by the main control chip are grouped according to the acquisition time. In each group, the outliers are identified and eliminated according to the Rhineda (3s) criterion. The criterion is based on the following algorithm rules:
[0074] There are n groups of Δt_a measurement values in each group, namely Δt_1, Δt_2, ... Δt_n. If the residual error of a measured value is considered to be greater than three times the standard deviation, the abnormal value is identified and eliminated. For example:
[0075]
[0076]
[0077] like: Then the bth data is an outlier and needs to be removed.
[0078] After using the Rhineda criterion to remove outliers, the data is further filtered using the sliding average filter algorithm. The filter window used in this solution is 8, that is, the first data output by the filter is after 8 sampling cycles, that is, the 8 input data are first averaged to calculate the average value. After 8 cycles, data sliding input can be achieved.
[0079] After the 8th sampling value, the cth time difference Δt_c is:
[0080]
[0081] Where d = c – k.
[0082] The filtered time difference information can be used for subsequent feedback control.
[0083] (4) System feedback coarse adjustment
[0084] Because the signal clock cycles involved are all 1 second, when the timestamp difference is less than 1 second, when the timestamp difference is greater than or equal to 1 millisecond, the timing synchronization signal is sent for coarse adjustment.
[0085] The principle of coarse adjustment is to compensate the count value by adjusting the internal delayed transmit and receive register of DW1000 according to the phase difference, that is, the difference, so as to change the count time and then change the phase of the synchronous timing pulse. The compensation value is calculated according to the following formula:
[0086]
[0087] It can be rewritten according to the formula: ΔC = f(t)·Δt-C.
[0088] Because the timing signals involved are all pulse signals with a period of 1 second, the time difference Δt at the rising edge is the phase difference Δθ. C is the original counter count value, ΔC is the compensated counter value, and f(t) is the current DW1000 operating frequency.
[0089] (5) System feedback fine-tuning
[0090] When the timestamp difference is less than 1 millisecond, fine-tune the timing synchronization signal, that is, adjust the external crystal frequency. If the standard clock phase is faster than the local timing clock, it is necessary to speed up the timing pulse generation time, that is, speed up the counting frequency under the same count value. The same goes for the opposite. The specific formula is as follows:
[0091] Δt_a=C·Δf(t)
[0092] Among them, Δt_a is the phase difference between receiving UWB synchronization signal and forwarding UWB synchronization signal, Δf(t) is the required change of system main frequency, and C is the count value of delayed receiving and transmitting register.
[0093] (6) PID feedback control
[0094] In the process of fine-tuning the system, the phase difference is converted into the voltage value required to change the crystal pulse frequency, which is achieved through the PID feedback control process. PID control is a regulation method widely used in automatic control systems. By setting appropriate proportional (P), integral (I) and differential (D) parameters, the output can be accurately controlled to make the system reach a stable state.
[0095] Proportional control directly outputs a control signal by multiplying the current error by a proportional coefficient. The role of proportional control is to respond to errors quickly, but it is easy to cause steady-state errors in the system. Integral control outputs a control signal by accumulating past errors and multiplying them by an integral coefficient. The role of integral control is to eliminate steady-state errors, but it may introduce system oscillations. Differential control outputs a control signal by calculating the rate of change of the error and multiplying it by a differential coefficient. The role of differential control is to predict the error trend and improve the system response speed, but it is sensitive to noise.
[0096] The output of PID control can be expressed as:
[0097]
[0098] Among them, u(t) is the control signal, and e(t) is the system error, that is, the difference between the set value and the actual value. p , K i , Kd are the proportional, integral and differential coefficients respectively.
[0099] In this embodiment, PID control is used to adjust the frequency of the external crystal oscillator, and the frequency of the crystal oscillator is controlled by adjusting the voltage, thereby achieving precise synchronization of the system. Specifically, the phase difference information obtained by the main control chip is converted into a control voltage through the PID controller, and the external applied voltage of the 38.4MHz temperature compensated crystal oscillator is adjusted to change the crystal oscillator frequency accordingly, thereby adjusting the system clock frequency and achieving synchronization of the pulse signal.
[0100] Therefore, it has the following beneficial effects:
[0101] The present invention proposes a dual-antenna clock synchronization timing scheme based on UWB technology; designs a UWB communication chip based on UWB communication principles and high performance. Compared with the traditional synchronization timing scheme, a new indoor timing scheme is designed by utilizing the characteristics of UWB technology such as strong indoor anti-multipath interference ability and high time resolution. The system clock is adjusted using PID closed-loop feedback, and the errors that may be encountered in practice are eliminated and filtered using algorithms, and finally a high-resolution, multi-path interference-resistant synchronization timing signal is generated. This scheme can not only enable the terminal Internet of Things device to quickly synchronize with the received timing signal, but also stably send standard external GPS or Beidou satellite signals to each indoor terminal Internet of Things device.
[0102] The various embodiments in this specification are described in a progressive manner, and each embodiment focuses on the differences from other embodiments. The same or similar parts between the various embodiments can be referenced to each other.
[0103] This article uses specific examples to illustrate the principles and implementation methods of the present invention. The above examples are only used to help understand the core idea of the present invention. At the same time, for those skilled in the art, according to the idea of the present invention, there will be changes in the specific implementation methods and application scope. In summary, the content of this specification should not be understood as limiting the present invention.
Claims
1. A dual-antenna clock synchronization timing method based on UWB technology, characterized in that: include: The master base station receives the GPS pulse-per-second signal and sends the UWB synchronization signal to the slave base station. The dual UWB communication chips in the slave base station are used for clock synchronization, which not only receives the UWB synchronization signal sent by the master base station, but also forwards the UWB synchronization signal to the indoor terminal device, and uses the UWB communication chip to obtain the timestamp of the moment of sending and receiving the UWB synchronization signal, and calculates the difference between the timestamps to obtain the time difference; Based on the time difference, the phase information of the delay or lag of the UWB synchronization signal forwarded from the base station is determined, and the phase information is converted into voltage information through a DAC, and the temperature compensated crystal oscillator is frequency-controlled. The phase of the sent UWB synchronization signal is adjusted through frequency conversion, thereby forming feedback and controlling the phase difference between the forwarded and received UWB synchronization signals to be within the error setting range.
2. The dual-antenna clock synchronization timing method based on UWB technology according to claim 1, characterized in that: The method of receiving the GPS pulse-per-second signal by the master base station and sending the UWB synchronization signal to the slave base station specifically includes: The main control chip of the main base station is used to receive the GPS second pulse signal. After the main control chip detects the rising edge of the GPS second pulse signal, the DW1000 chip is controlled to start the UWB sending function and send a UWB synchronization signal with a period of 1 second for reception from the slave base station; the DW1000 chip configures the delayed sending and receiving register value and sets the delayed sending value to the timestamp value of each sending plus 1 second, thereby achieving the function of sending a pulse signal once per second.
3. The dual-antenna clock synchronization timing method based on UWB technology according to claim 1, characterized in that: The method for obtaining the time difference is: Reset the slave base station, and after the reset, actively receive the UWB synchronization signal sent by the master base station through the DW1000-A chip; every time the DW1000-A chip receives the UWB synchronization signal, it immediately obtains the current time, so that the DW1000-B chip sends the forwarded UWB synchronization signal every 1 second, records the current timestamp and generates an interrupt as a local clock synchronization pulse; the DW1000-B chip actively sends the forwarded UWB synchronization signal with a period of 1 second, and its delayed sending configuration method is the same as the DW1000 chip configuration method of the master base station; the time difference is obtained by subtracting the latest timestamps obtained by the two DW1000 chips through the main control chip.
4. The dual-antenna clock synchronization timing method based on UWB technology according to claim 1, characterized in that: The frequency control includes system feedback coarse adjustment and system feedback fine adjustment; The process of system feedback coarse adjustment is as follows: When the difference in timestamps is greater than or equal to 1 millisecond, the count value of the delayed transceiver register inside the DW1000 chip of the slave base station is compensated. The formula for compensating the counter value is as follows: ΔC=f(t)·Δt-C The process of system feedback fine-tuning is as follows: When the timestamp difference is less than 1 millisecond, the external crystal frequency is adjusted. The adjustment calculation formula is as follows: Δt_a=C·Δf(t) Among them, f(t) is the current operating frequency of the DW1000 chip, Δt is the time difference, C is the count value of the original counter, and Δt_a is the time difference between receiving the UWB synchronization signal and forwarding the UWB synchronization signal.
5. The dual-antenna clock synchronization timing method based on UWB technology according to claim 1, characterized in that: The feedback control adopts PID feedback control, and the output of PID feedback control is expressed as: Where u(t) is the control signal, e(t) is the system error, which is used to represent the difference between the set value and the actual value, and K p , K i , K d are the proportional, integral and differential coefficients respectively, and t is the time.
6. A dual-antenna clock synchronization timing system based on UWB technology, characterized in that: include: A signal synchronization module is used to receive the GPS pulse-per-second signal using the master base station and send a UWB synchronization signal to the slave base station; The time difference acquisition module is used to use the dual UWB communication chips in the slave base station for clock synchronization, to receive the UWB synchronization signal sent by the master base station, to forward the UWB synchronization signal to the indoor terminal device, and to use the UWB communication chip to obtain the timestamp of the moment of sending and receiving the UWB synchronization signal, and to calculate the difference between the timestamps to obtain the time difference; The system control module is used to determine the phase information of the delay or lag of the UWB synchronization signal forwarded from the base station based on the time difference, and convert the phase information into voltage information through a DAC, perform frequency control on the temperature compensated crystal oscillator, and adjust the phase of the sent UWB synchronization signal through frequency conversion, thereby forming feedback and controlling the phase difference between the forwarded and received UWB synchronization signals to be within the error setting range.
7. An electronic device, characterized in that: It comprises a memory and a processor, the memory is used to store a computer program, and the processor runs the computer program to enable the electronic device to execute the dual-antenna clock synchronization timing method based on UWB technology according to any one of claims 1-5.
8. A computer-readable storage medium, characterized in that: The device stores a computer program, which, when executed by a processor, implements a dual-antenna clock synchronization timing method based on UWB technology as described in any one of claims 1 to 5.
Citation Information
Patent Citations
UWB-based wireless measurement system
CN111132201A
High-precision timing system and method based on PCIE (Peripheral Component Interface Express) board card
CN117908630A
Relative positioning method and device based on UWB
CN118091533A
Indoor multi-base-station clock synchronization device
CN221409135U
Time transfer utilizing ultra wideband signals
US20060291537A1
Cited By
System and method for verifying time precision of TB timestamp recording equipment
CN116482964A
A system for verifying the time precision of a tb timestamp recording device and a method thereof
CN116482964B
Ultra-wideband digital phase-locked loop synchronizing signal adjusting method
CN119402004A
UWB time synchronization system, method and device based on one-way broadcast mode
CN120034213A
UWB Time Synchronization System, Method and Device Based on Unidirectional Broadcast Mode
CN120034213B
