Synchronization method, vehicle-to-everything terminal, and storage medium
The present application discloses a synchronization method, a vehicle-to-everything terminal, and a storage medium. The method is applied to the vehicle-to-everything terminal and includes: detecting a synchronization signal; when at least one SLSS synchronization signal is detected, obtaining a GNSS synchronization signal; respectively performing synchronization error detection on the at least one SLSS synchronization signal and the GNSS synchronization signal to determine an optimal synchronization signal; and performing synchronization according to the optimal synchronization signal.
1 . A synchronization method applied to a vehicle-to-everything terminal, comprising:
detecting a synchronization signal;
when at least one SLSS synchronization signal is detected, obtaining a Global Navigation Satellite System (GNSS) synchronization signal;
respectively performing synchronization error detection on the at least one Sidelink Synchronization Signal (SLSS) synchronization signal and the GNSS synchronization signal to determine an optimal synchronization signal; and
performing synchronization according to the optimal synchronization signal;
wherein respectively performing synchronization error detection on the at least one SLSS synchronization signal and the GNSS synchronization signal to determine the optimal synchronization signal further comprises:
selecting an optimal SLSS synchronization signal from the at least one SLSS synchronization signal; and
respectively performing synchronization error detection on the optimal SLSS synchronization signal and the GNSS synchronization signal to determine the optimal synchronization signal;
wherein respectively performing synchronization error detection on the optimal SLSS synchronization signal and the GNSS synchronization signal to determine the optimal synchronization signal further comprises:
respectively calculating synchronization errors between the optimal SLSS synchronization signal, the GNSS synchronization signal, and a synchronization clock of the vehicle-to-everything terminal to obtain two synchronization errors; and
detecting time domain positions of the two synchronization errors to determine the optimal synchronization signal according to a detection result;
wherein detecting the time domain positions of the two synchronization errors to determine the optimal synchronization signal according to the detection result further comprises:
detecting whether a time domain position of a minimum synchronization error between the two synchronization errors is located in an interference-free area of a cyclic prefix of a signal sent by the vehicle-to-everything terminal:
if yes, determining that the synchronization signal corresponding to the minimum synchronization error is the optimal synchronization signal;
if not, detecting whether a time domain position of a maximum synchronization error between the two synchronization errors is located in the interference-free area of the cyclic prefix of the signal sent by the vehicle-to-everything terminal; and
if yes, determining that the synchronization signal corresponding to the maximum synchronization error is the optimal synchronization signal.
2 . The synchronization method of claim 1 , further comprising:
calibrating a crystal oscillator of the vehicle-to-everything terminal according to the optimal synchronization signal.
3 . The synchronization method of claim 1 , further comprising:
when a Primary synchronization signal (PSS)/Secondary synchronization signal (SSS) synchronization signal is detected, performing synchronization according to the PSS/SSS synchronization signal; and
calibrating the crystal oscillator of the vehicle-to-everything terminal according to the PSS/SSS synchronization signal.
4 . The synchronization method of claim 1 , further comprising:
when the synchronization signal is not detected, the crystal oscillator of the vehicle-to-everything terminal is used as a synchronization source to perform synchronization.
5 . The synchronization method of claim 1 , wherein selecting the optimal SLSS synchronization signal from the at least one SLSS synchronization signal further comprises:
selecting SLSS synchronization signals with a highest priority from the at least one SLSS synchronization signal; and
selecting an SLSS synchronization signal with a highest signal strength from the SLSS synchronization signals with the highest priority as the optimal SLSS synchronization signal.
6 . A non-transitory computer-readable storage medium, wherein a plurality of instructions are stored in the computer-readable storage medium, and the instructions are configured to be loaded by a processor to perform the following steps:
detecting a synchronization signal;
when at least one SLSS synchronization signal is detected, obtaining a Global Navigation Satellite System (GNSS) synchronization signal;
respectively performing synchronization error detection on the at least one Sidelink Synchronization Signal (SLSS) synchronization signal and the GNSS synchronization signal to determine an optimal synchronization signal; and
performing synchronization according to the optimal synchronization signal;
wherein the processor respectively performing synchronization error detection on the at least one SLSS synchronization signal and the GNSS synchronization signal to determine the optimal synchronization signal further comprises the following steps:
selecting an optimal SLSS synchronization signal from the at least one SLSS synchronization signal; and
respectively performing synchronization error detection on the optimal SLSS synchronization signal and the GNSS synchronization signal to determine the optimal synchronization signal;
wherein the processor respectively performing synchronization error detection on the optimal SLSS synchronization signal and the GNSS synchronization signal to determine the optimal synchronization signal further comprises the following steps:
respectively calculating synchronization errors between the optimal SLSS synchronization signal, the GNSS synchronization signal, and a synchronization clock of the vehicle-to-everything terminal to obtain two synchronization errors; and
detecting time domain positions of the two synchronization errors to determine the optimal synchronization signal according to a detection result;
wherein the processor detecting the time domain positions of the two synchronization errors to determine the optimal synchronization signal according to the detection result further comprises the following steps:
detecting whether a time domain position of a minimum synchronization error between the two synchronization errors is located in an interference-free area of a cyclic prefix of a signal sent by the vehicle-to-everything terminal;
if yes, determining that the synchronization signal corresponding to the minimum synchronization error is the optimal synchronization signal;
if not, detecting whether a time domain position of a maximum synchronization error between the two synchronization errors is located in the interference-free area of the cyclic prefix of the signal sent by the vehicle-to-everything terminal; and
if yes, determining that the synchronization signal corresponding to the maximum synchronization error is the optimal synchronization signal.
7 . The non-transitory computer-readable storage medium of claim 6 , wherein the processor further performs the following steps:
calibrating a crystal oscillator of the vehicle-to-everything terminal according to the optimal synchronization signal.
8 . The non-transitory computer-readable storage medium of claim 6 , wherein the processor further performs the following steps:
when a Primary synchronization signal (PSS)/Secondary synchronization signal (SSS) synchronization signal is detected, performing synchronization according to the PSS/SSS synchronization signal; and
calibrating the crystal oscillator of the vehicle-to-everything terminal according to the PSS/SSS synchronization signal.
9 . The non-transitory computer-readable storage medium of claim 6 , wherein the processor further performs the following steps:
when the synchronization signal is not detected, the crystal oscillator of the vehicle-to-everything terminal is used as a synchronization source to perform synchronization.
10 . The non-transitory computer-readable storage medium of claim 6 , wherein the processor selecting the optimal SLSS synchronization signal from the at least one SLSS synchronization signal further comprises the following steps:
selecting SLSS synchronization signals with a highest priority from the at least one SLSS synchronization signal; and
selecting an SLSS synchronization signal with a highest signal strength from the SLSS synchronization signals with the highest priority as the optimal SLSS synchronization signal.
11 . A vehicle-to-everything terminal comprising: a processor and a memory, wherein the processor is electrically connected to the memory, the memory is used to store instructions and data, and the processor is used to perform the following steps:
detecting a synchronization signal;
when at least one Sidelink Synchronization Signal (SLSS) synchronization signal is detected, obtaining a Global Navigation Satellite System (GNSS) synchronization signal;
respectively performing synchronization error detection on the at least one SLSS synchronization signal and the GNSS synchronization signal to determine an optimal synchronization signal; and
performing synchronization according to the optimal synchronization signal;
wherein the processor respectively performing synchronization error detection on the at least one SLSS synchronization signal and the GNSS synchronization signal to determine the optimal synchronization signal further comprises the following steps:
selecting an optimal SLSS synchronization signal from the at least one SLSS synchronization signal; and
respectively performing synchronization error detection on the optimal SLSS synchronization signal and the GNSS synchronization signal to determine the optimal synchronization signal;
wherein the processor respectively performing synchronization error detection on the optimal SLSS synchronization signal and the GNSS synchronization signal to determine the optimal synchronization signal further comprises the following steps:
respectively calculating synchronization errors between the optimal SLSS synchronization signal, the GNSS synchronization signal, and a synchronization clock of the vehicle-to-everything terminal to obtain two synchronization errors; and
detecting time domain positions of the two synchronization errors to determine the optimal synchronization signal according to a detection result;
wherein the processor detecting the time domain positions of the two synchronization errors to determine the optimal synchronization signal according to the detection result further comprises the following steps:
detecting whether a time domain position of a minimum synchronization error between the two synchronization errors is located in an interference-free area of a cyclic prefix of a signal sent by the vehicle-to-everything terminal;
if yes, determining that the synchronization signal corresponding to the minimum synchronization error is the optimal synchronization signal;
if not, detecting whether a time domain position of a maximum synchronization error between the two synchronization errors is located in the interference-free area of the cyclic prefix of the signal sent by the vehicle-to-everything terminal; and
if yes, determining that the synchronization signal corresponding to the maximum synchronization error is the optimal synchronization signal.