Key extraction time synchronization method and system based on atmospheric turbulence random channel
By using a clock drift compensation algorithm and a time-division duplex frame structure, combined with an adaptive quantization threshold, the accuracy and stability issues of time synchronization and key generation under atmospheric turbulence were resolved, achieving high-precision time synchronization and dynamic key generation.
Patent Information
- Application Number
- CN202511841433.4
- Authority / Receiving Office
- CN · China
- Patent Type
- Patents(China)
- Current Assignee / Owner
- Filing Date
- 2025-12-09
- Publication Date
- 2026-03-17
- Estimated Expiration
- 2045-12-09
AI Technical Summary
Traditional time synchronization methods suffer from insufficient stability and accuracy in atmospheric channels. In particular, they cannot effectively capture changes in signal characteristics when faced with environmental factors such as atmospheric turbulence, leading to a decline in the quality of key generation.
Clock synchronization is achieved by using a clock drift compensation algorithm. Combined with a time-division duplex frame structure and an adaptive quantization threshold, signal sampling is performed through a hardware timer, and the quantization threshold is dynamically adjusted to adapt to the random changes in the atmospheric channel.
It achieves high-precision time synchronization and dynamic key generation, improving synchronization accuracy and key generation rate, and is suitable for secure communication systems in complex atmospheric environments.
Smart Images

Figure CN121283555B_ABST
Abstract
Description
Technical Field
[0001] This invention belongs to the field of laser communication and information security technology, and in particular relates to a key extraction time synchronization method and system based on atmospheric turbulence random channels. Background Technology
[0002] In the fields of laser communication and information security, time synchronization and key extraction technologies in atmospheric channels have long faced numerous technical challenges. Traditional time synchronization methods mainly rely on software-level protocol implementations, which have significant shortcomings in terms of stability and accuracy. Due to the complexity and variability of the atmospheric environment, delay fluctuations generated during signal propagation make traditional unidirectional measurement techniques insufficient for meeting the requirements of high-precision synchronization. More critically, the frequency drift characteristics of ordinary clock sources under temperature variations inevitably lead to the accumulation of time deviations during system operation.
[0003] In key extraction technology, existing solutions often employ a fixed-parameter design approach. This design exhibits significant limitations in adaptability to signal strength fluctuations caused by environmental factors such as atmospheric turbulence. When channel characteristics change randomly due to atmospheric turbulence, a fixed quantization threshold struggles to effectively capture the changing patterns of signal characteristics, leading to a decline in key generation quality. Furthermore, the lack of a dynamic adjustment mechanism in the frame structure design makes it impossible to adapt to the natural fluctuations in atmospheric channel coherence time, which complicates the precise alignment of sampling times.
[0004] From the perspective of technological development, early time synchronization schemes primarily focused on software-level optimization, gradually shifting towards hardware-assisted implementation. However, these technological advancements still present many unresolved problems when dealing with the unique propagation characteristics of atmospheric channels. Phenomena such as signal flicker caused by atmospheric turbulence and delay spread due to multipath propagation place higher demands on time synchronization accuracy. Therefore, a new method is urgently needed to address these issues. Summary of the Invention
[0005] To address the aforementioned problems, this invention provides a key extraction time synchronization method and system based on an atmospheric turbulence random channel, employing the following technical solution: The key extraction time synchronization method based on an atmospheric turbulence random channel includes the following steps:
[0006] Step S1: Use a clock drift compensation algorithm to achieve clock synchronization;
[0007] By analyzing the interaction between the clocks of the transmitting and receiving ends, the clock offset is derived, the total link delay measurement between the transmitting and receiving ends is calculated, the correction value is sent, and clock synchronization is completed.
[0008] Step S2: Time-division duplex frame structure eliminates signal transmission interference;
[0009] Based on the clock synchronization in step S1, corresponding transmission time slots are set at the transmitting and receiving ends respectively. With launch time slot Data transmission is performed only during the respective transmission intervals at both the transmitting and receiving ends, and the receiving circuit at the transmitting end is disconnected simultaneously during transmission; a guard interval is added. Setting the timer reset operation and Or associated with a specific pre-defined frame synchronization event;
[0010] Step S3: Channel sampling synchronization;
[0011] Based on the signal interference-free period established in step S2, the synchronous analog-to-digital converter (ADC) is triggered to sample at a preset frequency using a hardware timer, and the optical intensity data is stored using direct memory access (DMA). The deviation of the sampling time must satisfy the sampling time deviation formula. The time difference between the signals collected by the transmitting end and the receiving end is calculated by the formula to complete the channel sampling synchronization.
[0012] Step S4: Adaptive quantization threshold;
[0013] The mean value of the light intensity sampling value for each frame sampling period is calculated using the light intensity sampling value given in step S3. and standard deviation And then according to and Relationship Determination of Dynamic Adjustment Factors The turbulence intensity coefficient in the classical turbulence evaluation model is used. By combining a set threshold, turbulence is divided into strong turbulence and weak turbulence. When <0.2, it is weak turbulence; when A value greater than 0.5 indicates strong turbulence. The dual-threshold quantization threshold is dynamically adjusted based on the channel state. The expression for the dual-threshold quantization threshold is: .
[0014] Furthermore, the specific steps of the clock drift compensation algorithm in step S1 are as follows: First, the transmitting end sends a synchronization frame at time t1, which carries the local transmission timestamp t1 of the transmitting end; then, the receiving end records the time at which it receives the above synchronization frame as t2; then, at time t3, it replies with a response frame, which carries time information [t2, t3], where t2 is the receiving time of the receiving end and t3 is the transmission time of the receiving end; after that, the transmitting end records the time at which it receives the above response frame as t4; finally, the transmitting end derives the clock offset as: And calculate the obtained total link delay measurement value: The correction value is determined and sent to adjust the clock difference between the sender and receiver, thus achieving clock synchronization.
[0015] Furthermore, the sampling time deviation formula for channel sampling synchronization in step S3 is: In the formula, It is the frequency offset of the temperature-compensated crystal oscillator, which indicates the deviation of the clock source output frequency caused by temperature drift; The nominal frequency of the temperature-compensated crystal oscillator is used as the reference frequency for the system's main clock. The time-division duplex frame period represents the system's operating period and determines the sampling time length. Jitter is triggered by a timer; It is the total sampling time deviation, which represents the actual deviation between the sampling time of the ADC at the transmitting end and the receiving end.
[0016] Furthermore, in step S3, the sources of synchronization error are the long-term deviation of the crystal oscillator frequency temperature drift and the short-term jitter of the timer circuit.
[0017] Furthermore, the formula for calculating the channel statistics for each frame sampling period of the adaptive quantization threshold in step S4 is as follows: , In the formula, For the first k Each light intensity sample value k The value of is 1 to N, where N is the number of light intensity sampling values;
[0018] Threshold dynamic adjustment factor It is possible and The relationship is given as shown in the following formula: Based on a given threshold, when > At that time, the light intensity sample is quantized to bit 1. < At that time, the light intensity sample is quantized to bit 0.
[0019] Furthermore, the turbulence intensity coefficient The calculation formula is: .
[0020] Furthermore, in step S3, the hardware timer is an STM32 advanced timer with a trigger frequency of 1kHz.
[0021] A key extraction time synchronization system based on an atmospheric turbulence random channel includes: a transmitter, a receiver, a clock reference device, and a time compensation device;
[0022] The transmitting end is configured to transmit a first time signal, which is an optical signal, based on the time reference signal provided by the temperature-compensated crystal oscillator; at the same time, it receives a second time signal returned from the receiving end, generates an adjusted third time signal, and stores it in the microcontroller.
[0023] The receiving end is configured to receive and record a first time signal, generate a second time signal based on the first time signal, and return the second time signal to the sending end.
[0024] The clock reference device is configured as a GPS receiver combined with a temperature-compensated crystal oscillator, capable of providing a time reference signal to the system;
[0025] The time compensation device is configured to directly control ADC sampling by outputting a trigger signal from an STM32 advanced timer. Based on the reciprocity of atmospheric channel transmission delay, a clock offset formula is derived. Absolute delay is offset by a symmetrical propagation path. The relative clock offset between the transceiver and receiver is calculated, and the offset calculation result is fed back to the clock control loop to complete the time compensation adjustment.
[0026] Furthermore, the transmitting end includes a first clock source, a first STM32 core board, a first optoelectronic modulation module, and a first transceiver module;
[0027] The first clock source is configured to generate a global time reference signal;
[0028] The first STM32 core board is configured to receive and transmit a time base signal and store a second time signal from the receiving end.
[0029] The first optoelectronic modulation module is configured to receive a time reference signal and a corrected time signal output from the core board, perform electro-optical conversion on the time reference signal and the corrected time signal to obtain two sets of optical signals, and use these two sets of optical signals as the first time signal and the third time signal, respectively; at the same time, it receives a second time signal from the receiving end, performs optoelectronic conversion on the second time signal to obtain an electrical signal, and sends the electrical signal to the first STM32 core board;
[0030] The first transceiver module is configured to receive a first time signal and a third time signal output by the electro-optic modulation module, and send the signal to the receiving end; at the same time, it receives a second time signal returned by the receiving end.
[0031] Furthermore, the receiving end includes a second clock source, a second STM32 core board, a second transceiver module, and a second optoelectronic modulation module;
[0032] The second clock source is configured to generate a time signal;
[0033] The second STM32 core board is configured to store time signals from the transmitting end, and simultaneously receive and transmit time signals;
[0034] The second optoelectronic modulation module is configured to receive a first time signal and a third time signal from the transmitter, perform optoelectronic conversion on the first time signal and the third time signal to obtain two sets of electrical signals, and send these electrical signals to the second STM32 core board; at the same time, it receives a time reference signal output from the core board, performs electro-optical conversion on the time reference signal to obtain an optical signal, and uses this optical signal as the second time signal;
[0035] The second transceiver module is configured to receive a first time signal and a third time signal sent by the transmitting end, and send these signals to the second optoelectronic modulation module; at the same time, it receives a second time signal sent by the second optoelectronic modulation module and sends this signal to the transmitting end.
[0036] Through the above design scheme, the present invention can bring the following beneficial effects:
[0037] This invention proposes a key extraction time synchronization method and system based on atmospheric turbulent random channels. By calculating bidirectional link delay, combining temperature-compensated crystal oscillator compensation and a global time reference, and employing a time-division duplex frame structure and an adaptive quantization threshold algorithm, it achieves high-precision time synchronization and dynamic key generation. This effectively solves the problems of random changes in channel characteristics and clock drift caused by atmospheric turbulence, and can improve synchronization accuracy and key generation rate. It is suitable for secure communication systems in complex atmospheric environments. Attached Figure Description
[0038] The present invention will be further described below with reference to the accompanying drawings and specific embodiments:
[0039] Figure 1 This is a flowchart illustrating a method for time synchronization of shared optical key extraction in an atmospheric channel according to an embodiment of the present invention.
[0040] Figure 2 This is a schematic diagram of a method for time synchronization of shared optical key extraction in an atmospheric channel according to an embodiment of the present invention;
[0041] Figure 3 This is a time-division duplex frame periodic structure diagram of atmospheric channel shared optical key extraction time synchronization according to an embodiment of the present invention;
[0042] Figure 4 This is a system architecture diagram of atmospheric channel shared optical key extraction time synchronization according to an embodiment of the present invention. Detailed Implementation
[0043] Embodiments of the present invention will now be described with reference to the accompanying drawings. However, it should be understood that these descriptions are exemplary only and are not intended to limit the scope of the invention. In the following detailed description, numerous specific details are set forth to provide a thorough understanding of the embodiments of the invention for ease of explanation. However, it will be apparent that one or more embodiments may be practiced without these specific details. Furthermore, descriptions of well-known structures and techniques are omitted in the following description to avoid unnecessarily obscuring the concept of the invention.
[0044] The terminology used herein is for the purpose of describing particular embodiments only and is not intended to limit the invention. The terms “comprising”, “including”, etc., as used herein indicate the presence of the stated features, steps, operations, and / or components, but do not exclude the presence or addition of one or more other features, steps, operations, or components.
[0045] All terms used herein (including technical and scientific terms) have the meanings commonly understood by those skilled in the art, unless otherwise defined. It should be noted that the terms used herein are to be interpreted in a manner consistent with the context of this specification, and not in an idealized or overly rigid way.
[0046] The key extraction time synchronization method based on atmospheric turbulence random channels includes the following steps:
[0047] Step S1: Use a clock drift compensation algorithm to achieve clock synchronization;
[0048] By analyzing the interaction between the clock of the sending end (Alice) and the clock of the receiving end (Bob), the clock offset is derived, the total link delay measurement between Alice and Bob is calculated, the correction value is sent, and clock synchronization is completed.
[0049] Clock drift compensation is one of the core functions of the NTP network time synchronization protocol and is an existing technology.
[0050] Step S2: Time-division duplex frame structure eliminates signal transmission interference;
[0051] Based on the clock synchronization in step S1, corresponding transmit time slots are set at the Alice and Bob ends respectively. With launch time slot Data transmission is performed only during the corresponding transmission intervals at both the Alice and Bob ends, and the receiving circuit of the transmitting end is disconnected during transmission; a guard interval is added. Setting the timer reset operation and Or associated with a specific pre-defined frame synchronization event;
[0052] The timer reset operation is usually related to the boundary events of the protection interval. When the transmission time slot ends and the system enters the protection interval, the timer can be reset based on the start or end time of the protection interval. If an abnormality is detected in the protection interval, the timer can also be reset in advance and the time slot length can be adjusted to avoid subsequent time slot misalignment.
[0053] In addition, the timer reset operation can also be triggered by these synchronization events: when Bob detects the synchronization header or synchronization flag from Alice, the local timer is reset and the frame start time is calibrated with that of Alice.
[0054] As part of the frame structure, the guard interval not only isolates interference from different time slots, but also provides the necessary "buffer environment" for the parsing of specific frames (especially synchronization frames). Together, they ensure the system's anti-interference capability and synchronization stability.
[0055] For example, when a transmission time slot is allocated to Alice or Bob, the relevant equipment activates its laser drive signal (e.g., laser drive signal A or laser drive signal B) to transmit data. At the same time, the receiving circuit of the local end (i.e., the Alice or Bob end that is currently transmitting) must be turned off to avoid self-interference or crosstalk of the transmitted signal to the local receiver and to ensure the purity of the receiving link.
[0056] In addition, the protection interval Its primary function is to eliminate the residual effects of multipath propagation, such as inter-symbol interference (ISI). It provides a buffer period for the delay spread caused by the signal propagating along different paths, ensuring that the receiver can correctly sample and process the signal. The timer's reset operation is usually associated with a guard interval or a specific frame synchronization event to ensure continuous and accurate synchronization of the clocks at both ends.
[0057] Step S3: Channel sampling synchronization;
[0058] Based on the signal interference-free period established in step S2, the synchronous analog-to-digital converter (ADC) is triggered to sample at a preset frequency using a hardware timer, and the optical intensity data is stored using direct memory access (DMA). The deviation of the sampling time must satisfy the sampling time deviation formula. The time difference between the signals collected by Alice and Bob is calculated using the formula to complete the synchronization of channel sampling.
[0059] ADC stands for Analog-to-Digital Converter, and DMA stands for Direct Memory Access. The STM32 microcontroller includes both ADC and DMA functions, and they can work together.
[0060] Step S4: Adaptive quantization threshold;
[0061] The mean value of the light intensity sampling value for each frame sampling period is calculated using the light intensity sampling value given in step S3. and standard deviation And then according to and Relationship Determination of Dynamic Adjustment Factors The turbulence intensity coefficient in the classical turbulence evaluation model is used. By combining a set threshold, turbulence is divided into strong turbulence and weak turbulence. When <0.2, it is weak turbulence; when A value greater than 0.5 indicates strong turbulence. The dual-threshold quantization threshold is dynamically adjusted based on the channel state. The expression for the dual-threshold quantization threshold is: .
[0062] The turbulence intensity coefficient The calculation formula is: .
[0063] Furthermore, the specific steps of the clock drift compensation algorithm in step S1 are as follows: First, Alice sends a synchronization frame at time t1, which carries Alice's local transmission timestamp t1; then, Bob records the time of receiving the synchronization frame as t2; next, Bob replies with a response frame at time t3, which carries time information [t2, t3], where t2 is Bob's reception time and t3 is Bob's transmission time; then, Alice records the time of receiving the response frame as t4; finally, Alice derives the clock offset: Based on the calculated total link delay measurement: The correction value is determined and sent to adjust the clock difference between Alice and Bob, thus completing clock synchronization.
[0064] Furthermore, the sampling time deviation formula for channel sampling synchronization in step S3 is: In the formula, It is the frequency offset of the temperature-compensated crystal oscillator, which indicates the deviation of the clock source output frequency caused by temperature drift; The nominal frequency of the temperature-compensated crystal oscillator is used as the reference frequency for the system's main clock. The time-division duplex frame period represents the system's operating period and determines the sampling time length. Jitter is triggered by a timer; It is the total sampling time deviation, which represents the actual deviation between the sampling times of the ADC at the Alice end and the Bob end.
[0065] This formula reveals the physical source of synchronization error: long-term drift. This is caused by the temperature drift of the crystal oscillator frequency, which accumulates with the frame period (e.g., when...). =0.5ppm, =10ms, drift = 5ns); short-term jitter This is caused by timer circuit noise, which is usually in the nanosecond range (typical value of STM32 advanced timer <10ns).
[0066] Furthermore, the formula for calculating the channel statistics for each frame sampling period of the adaptive quantization threshold in step S4 is as follows: , In the formula, Let N = 1000 be the k-th light intensity sample value. and These are the mean and standard deviation of the light intensity sample values, respectively;
[0067] Threshold dynamic adjustment factor It is possible and The relationship is given as shown in the following formula: Based on a given threshold, when > At that time, the light intensity sample is quantized to bit 1. < At that time, the light intensity sample is quantized to bit 0;
[0068] The dual-threshold quantization threshold is dynamically adjusted based on the channel state: In the formula, It is the mean of the optical channel measurement samples, which represents the reference light intensity level of the current channel state and reflects the average signal energy caused by turbulence; It is the standard deviation of the optical channel measurement samples, quantifying the intensity of signal fluctuations caused by atmospheric turbulence. The larger the value, the stronger the channel randomness; As a dynamic adjustment factor, the threshold range is adjusted according to the turbulence intensity. During strong turbulence, the threshold range is increased to capture more effective samples, while during weak turbulence, the threshold range is decreased to improve key randomness.
[0069] This formula addresses the failure of fixed thresholds in time-varying turbulence by dynamically adjusting the two thresholds: when When the flow increases (strong turbulence), the flow expands. Intervals are used to capture more samples; when When decreasing (weak turbulence), shrink The interval is used to improve bit randomness.
[0070] Furthermore, in step S3, the hardware timer is an STM32 advanced timer with a trigger frequency of 1kHz.
[0071] A key extraction time synchronization system based on an atmospheric turbulence random channel is disclosed. The system is used to implement a key extraction time synchronization method based on an atmospheric turbulence random channel, and includes: a transmitter (Alice end), a receiver (Bob end), a clock reference device, and a time compensation device.
[0072] The Alice terminal is configured to send a first time signal, which is an optical signal, based on the time reference signal provided by the temperature-compensated crystal oscillator; at the same time, it receives a second time signal returned from the receiving terminal, generates an adjusted third time signal, and stores it in the microcontroller.
[0073] The Bob end is configured to receive and record a first time signal, generate a second time signal based on the first time signal, and return the second time signal to the sending end.
[0074] The clock reference device is configured as a GPS receiver combined with a temperature-compensated crystal oscillator, capable of providing a time reference signal to the system;
[0075] Among them, GPS receivers that incorporate temperature-compensated crystal oscillators (TCXO) can provide the system with high-precision time reference signals, which is one of the core technologies of current satellite navigation and positioning systems.
[0076] The signal provision process: The TCXO first serves as the receiver's local high-precision clock reference, outputting a low-drift, high-stability frequency signal to provide a basic time-frequency reference for satellite signal acquisition, carrier tracking, and pseudocode synchronization. After acquiring signals from multiple satellites, the receiver obtains GPS system time and satellite clock difference information through delay correction and navigation analysis. Then, it uses phase-locked loop (PLL) technology to phase-lock the TCXO's local clock with the GPS time reference, dynamically calibrating clock drift caused by temperature fluctuations, device aging, etc. When the satellite signal is valid, the TCXO maintains a high degree of consistency with GPS time through the above synchronization process. If the satellite signal is briefly interrupted, the TCXO, with its stability and low phase noise characteristics, can still provide a continuous and reliable time reference for the system based on its own accuracy, ensuring uninterrupted time synchronization.
[0077] The time compensation device is configured to directly control ADC sampling by outputting a trigger signal from an STM32 advanced timer. Based on the reciprocity of atmospheric channel transmission delay, a clock offset formula is derived. Absolute delay is offset by a symmetrical propagation path. The relative clock offset between the transceiver and receiver is calculated, and the offset calculation result is fed back to the clock control loop to complete the time compensation adjustment.
[0078] Furthermore, the Alice terminal includes a first clock source, a first STM32 core board, a first optoelectronic modulation module, and a first transceiver module;
[0079] The first clock source is configured to generate a global time reference signal;
[0080] The first STM32 core board is configured to receive and transmit a time base signal and store a second time signal from the receiving end.
[0081] The first optoelectronic modulation module is configured to receive a time reference signal and a corrected time signal output from the core board, perform electro-optical conversion on the time reference signal and the corrected time signal to obtain two sets of optical signals, and use these two sets of optical signals as the first time signal and the third time signal, respectively; at the same time, it receives a second time signal from the receiving end, performs optoelectronic conversion on the second time signal to obtain an electrical signal, and sends the electrical signal to the first STM32 core board;
[0082] The first transceiver module is configured to receive a first time signal and a third time signal output by the electro-optic modulation module, and send the signal to Bob's end; at the same time, it receives a second time signal returned by Bob's end.
[0083] Furthermore, the Bob terminal includes a second clock source, a second STM32 core board, a second transceiver module, and a second optoelectronic modulation module;
[0084] The second clock source is configured to generate a time signal;
[0085] The second STM32 core board is configured to store time signals from the transmitting end, and simultaneously receive and transmit time signals;
[0086] The second optoelectronic modulation module is configured to receive a first time signal and a third time signal from Alice, perform optoelectronic conversion on the first time signal and the third time signal to obtain two sets of electrical signals, and send these electrical signals to the second STM32 core board; at the same time, it receives a time reference signal output from the core board, performs electro-optical conversion on the time reference signal to obtain an optical signal, and uses this optical signal as the second time signal;
[0087] The second transceiver module is configured to receive a first time signal and a third time signal sent by the Alice terminal, and send these signals to the second optoelectronic modulation module; at the same time, it receives a second time signal sent by the second optoelectronic modulation module, and sends this signal to the Alice terminal.
[0088] Example:
[0089] Upon system power-on initialization, all hardware units, including the STM32 core board, temperature-compensated crystal clock source, optoelectronic modulation module, and optical transceiver module, are started on both the Alice and Bob sides to ensure that each module is in a ready state.
[0090] The clock reference device starts working, providing a precise and unified global time reference signal for the entire system through a combination of a GPS receiver and a high-stability temperature-compensated crystal oscillator.
[0091] Configure the STM32 advanced timer on Alice's side and Bob's side respectively, set the ADC sampling rate to 1kHz, and enable the DMA controller to achieve non-blocking cyclic storage of light intensity data.
[0092] Alice generates a synchronization frame electrical signal with embedded timestamp t1 at its local clock time t1 and sends it to the local optoelectronic modulation module.
[0093] The photoelectric modulation module at the Alice end converts the received synchronization frame electrical signal into an optical signal, and then transmits the optical signal into the atmospheric channel through its optical transceiver module.
[0094] The optical transceiver module at the Bob end receives the synchronization frame optical signal from the atmospheric channel and transmits it to the local optoelectronic modulation module for optoelectronic conversion to restore the electrical signal.
[0095] After receiving the electrical signal, the STM32 core board at the Bob end immediately records the current time t2 of the local clock as the time when the synchronization frame is received.
[0096] At local clock time t3, the Bob end generates a response frame signal, which encapsulates the previously recorded reception time t2 and the current transmission time t3.
[0097] The optoelectronic modulation module at the Bob end converts the response frame electrical signal back into an optical signal and sends it back to the Alice end through its optical transceiver module.
[0098] Alice's optoelectronic modulation module receives the response frame optical signal returned by Bob's end, converts it into an electrical signal, and Alice's STM32 core board records the local time t4 at this moment.
[0099] The STM32 core board on the Alice side uses the collected timestamps t1, t2, t3, and t4 to calculate the clock offset and total link delay.
[0100] Based on the calculated clock offset, Alice generates a corresponding clock correction signal (third time signal) and converts it into an optical signal through its photoelectric modulation module, which is then sent to Bob.
[0101] After receiving the correction optical signal, Alice and Bob respectively fine-tune their local clocks according to the correction amount contained therein, thus achieving time synchronization between the two ends.
[0102] Once the system enters a stable communication phase, it adopts a preset time-division duplex frame structure. Alice and Bob activate their lasers to transmit within their respective allocated transmission time slots, while simultaneously shutting down their local receiving circuits to prevent self-interference.
[0103] A guard interval of a preset duration is inserted between the end of each transmission time slot and the beginning of the next transmission time slot to effectively eliminate inter-symbol interference caused by multipath propagation.
[0104] During communication, the hardware timer periodically triggers the ADC to sample the optical channel intensity, and the collected data is automatically transferred to the specified circular buffer via DMA.
[0105] After each complete frame sampling period, Alice and Bob independently read light intensity data from their buffers and calculate the statistical characteristics of the data set: mean. and standard deviation .
[0106] Based on the calculated standard deviation, an adjustment factor is dynamically calculated using predefined rules, and then a dynamic dual-threshold quantization threshold is set. .
[0107] Each light intensity sample value acquired within the current frame is compared and quantized with a dynamic threshold: when > At that time, the light intensity sample is quantized to bit 1. < At that time, the light intensity sample is quantized to bit 0. Samples between the two thresholds are considered invalid and discarded.
[0108] During operation, the system continuously monitors changes in channel status (mainly reflected by the standard deviation σ) and dynamically adjusts the parameters in the quantization threshold calculation accordingly to adapt to different atmospheric turbulence intensities.
[0109] The system periodically (e.g., every 100 frame cycles) repeats the bidirectional timestamp exchange and clock synchronization process starting from Alice's local clock time t1 to continuously compensate for long-term clock deviations caused by factors such as crystal oscillator temperature drift and maintain high-precision synchronization of the system.
[0110] According to an embodiment of the present invention, the transmitting end Alice sends a first time signal to the receiving end Bob based on a global time reference provided by a clock reference device. Bob generates a second time signal based on the first time signal and a second clock source and sends it to Alice. After receiving the second time signal, the first STM32 core board at Alice calculates the bidirectional link delay and generates a corrected time signal (i.e., a third time signal) before sending it to Bob. Thus, the two communicating ends can use this corrected time signal to correct and compensate for the time at both ends, thereby achieving time synchronization for atmospheric channel shared optical key extraction.
Claims
1. A method for time synchronization based on key extraction in atmospheric turbulence stochastic channel, characterized in that, The method comprises the following steps: Step S1: clock synchronization is achieved by using a clock drift compensation algorithm; Through the interaction between the clock of the sending end and the clock of the receiving end, the clock offset is derived, the total link delay measurement value between the sending end and the receiving end is calculated, the correction value is sent, and the clock synchronization is completed; Step S2: TDD frame structure eliminates signal transmission interference; Based on the clock synchronization of step S1, by setting corresponding transmitting time slots at the transmitting end and the receiving end respectively and the transmitting time slots , the transmitting end and the receiving end only perform data transmission during the respective corresponding transmitting time slot periods, and the transmitting end simultaneously disconnects the receiving circuit of the transmitting end; a protection interval is additionally set , the reset operation of the timer is associated with or a preset specific frame synchronization event; the specific frame is the synchronization header or synchronization mark detected by the receiving end at the transmitting end Step S3: channel sampling synchronization; According to the signal interference-free period constructed in step S2, a hardware timer triggers a synchronous analog-to-digital converter (ADC) to sample at a preset frequency, and direct memory access (DMA) is used to store the light intensity data; The deviation of the sampling time must satisfy the sampling time deviation formula, and the time difference between the sending end and the receiving end for collecting signals is calculated according to the formula, and the channel sampling synchronization is completed; The sampling time deviation formula of the channel sampling synchronization is: , wherein, is a temperature compensated crystal frequency offset, and represents a clock source output frequency deviation caused by temperature drift; is a temperature compensated crystal nominal frequency, serving as a system master clock reference frequency; represents a time division duplex frame period, that is, a system working period, and determines a sampling time length; is a timer trigger jitter; is a total sampling time deviation, representing an actual deviation of the sampling time of the sending end and the receiving end ADC. Step S4: adaptive quantization threshold; The mean value of the light intensity sampling values in each frame sampling period is calculated through the light intensity sampling values given by step S3 and the standard deviation , and the calculation formula is: , , wherein, is the kth light intensity sampling value, k is 1~N, and N is the number of light intensity sampling values. Reintroducing the turbulence intensity coefficient in the classic turbulence evaluation model , according to the relationship between and to determine the threshold dynamic adjustment factor , combined with setting the threshold value to divide the turbulence into strong turbulence and weak turbulence, when <0.2, it is weak turbulence, when >0.5, it is strong turbulence, based on this classification, The value rule is ; According to the channel state, the double-threshold quantization threshold is dynamically adjusted, and the expression of the double-threshold quantization threshold is The light intensity sample is quantized based on the threshold, when the light intensity sample is quantized as bit 1, and when < the light intensity sample is quantized as bit 0. 2. The atmospheric-turbulence channel based key extraction time synchronization method of claim 1, wherein, The specific steps of the clock drift compensation algorithm of the step S1 are as follows: firstly, the sending end sends a synchronization frame at time t1, which carries a local sending timestamp t1 of the sending end; then, the receiving end records a time t2 when the synchronization frame is received; then, a response frame is sent back at time t3, which carries time information [t2, t3], wherein t2 is a receiving time of the receiving end, and t3 is a sending time of the receiving end; after that, the sending end records a time t4 when the response frame is received; finally, the sending end derives a clock offset as follows: and calculates a total link delay measurement value as follows: and sends a correction value to adjust the clock difference between the sending end and the receiving end and complete the clock synchronization.
3. The atmospheric-turbulence channel based key extraction time synchronization method of claim 1, wherein: In step S3, the source of the synchronization error is the long-term deviation of the crystal oscillator frequency temperature drift and the short-term jitter of the timer circuit.
4. The atmospheric-turbulence channel based key extraction time synchronization method of claim 1, wherein, The formula for calculating the turbulence intensity coefficient is: .
5. The atmospheric-turbulence channel based key extraction time synchronization method of claim 1, wherein: In step S3, the hardware timer is an STM32 advanced timer, and the triggering frequency is 1 kHz.
6. A key extraction time synchronization system based on atmospheric turbulence random channel, characterized in that, The system is used to implement the method of any one of claims 1-5, comprising: a sending end, a receiving end, a clock reference device, and a time compensation device; The sending end is configured to send a first time signal carried by a time reference signal provided by a temperature-compensated crystal oscillator, the signal being an optical signal; simultaneously receive a second time signal carried by the receiving end, generate an adjusted third time signal, and store it in a single-chip microcomputer; The receiving end is configured to receive and record the first time signal, generate a second time signal carried by the first time signal, and return the second time signal to the sending end; The clock reference device is configured to combine a GPS receiver of the temperature-compensated crystal oscillator to provide a time reference signal for the system; The time compensation device is configured to output a trigger signal directly control ADC sampling through an STM32 advanced timer, construct a clock offset derivation formula based on the atmospheric channel transmission delay reciprocity characteristic, offset the absolute time delay through the symmetric propagation path, solve the relative clock offset between the sending end and the receiving end, and feed back the offset calculation result to the clock control loop to complete the time compensation adjustment.
7. The atmospheric-turbulence- random-channel-based key extraction time synchronization system according to claim 6, wherein: The sending end comprises a first clock source, a first STM32 core board, a first optoelectronic modulation module, and a first transceiver module; The first clock source is configured to generate a global time reference signal; The first STM32 core board is configured to receive and send the global time reference signal and store the second time signal from the receiving end; The first optoelectronic modulation module is configured to receive the time reference signal and the corrected time signal output by the core board, perform electro-optical conversion on the time reference signal and the corrected time signal, obtain two groups of optical signals, and send the two groups of optical signals as the first time signal and the third time signal, respectively; simultaneously receive the second time signal from the receiving end, perform optoelectronic conversion on the second time signal, obtain an electrical signal, and send the electrical signal to the first STM32 core board; The first transceiving module is configured to receive the first time signal and the third time signal output by the photoelectric modulation module, and send the signal to the receiving end; and simultaneously receive the second time signal returned by the receiving end.
8. The atmospheric-turbulence- random-channel-based key extraction time synchronization system according to claim 6, wherein: The receiving end comprises a second clock source, a second STM32 core board, a second transceiving module and a second photoelectric modulation module. The second clock source is configured to generate a time signal. The second STM32 core board is configured to store the time signal from the sending end, and simultaneously receive and send the time signal. The second photoelectric modulation module is configured to receive the first time signal and the third time signal from the sending end, photoelectrically convert the first time signal and the third time signal to obtain two groups of electrical signals, and send the electrical signals to the second STM32 core board; and simultaneously receive the time reference signal output by the core board, electro-optically convert the time reference signal to obtain an optical signal, and send the optical signal as the second time signal. The second transceiving module is configured to receive the first time signal and the third time signal sent by the sending end, and send the signal to the second photoelectric modulation module; and simultaneously receive the second time signal sent by the second photoelectric modulation module, and send the signal to the sending end.
Citation Information
Patent Citations
Super-orthogonal electric-optical chaos secret communication system and communication method
CN114944875A
Signal synchronization method and system based on free space quantum key distribution system
CN119602902A