Crystal oscillator calibration method and related device

By using terminal equipment to determine the crystal oscillator frequency offset using satellite signals and Doppler frequency offset, frequency offset compensation is performed. The calibration accuracy is updated by combining configuration files and historical data, which solves the problem of low crystal oscillator calibration accuracy in satellite communication and achieves efficient crystal oscillator calibration and improved communication performance.

CN121055949APending Publication Date: 2025-12-02HUAWEI TECH CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410695737.3
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-05-30
Publication Date
2025-12-02

AI Technical Summary

Technical Problem

Existing technologies make it difficult to improve crystal oscillator calibration accuracy at low cost, especially in satellite communication systems, where crystal oscillator frequency offset and Doppler frequency offset lead to carrier frequency offset and degrade communication performance.

Method used

By using satellite downlink signals and Doppler frequency offset through terminal equipment, the crystal oscillator frequency offset is determined and frequency offset compensation is performed. The calibration accuracy is updated by combining configuration files and historical data, thus achieving low-cost and high-precision calibration of the crystal oscillator.

Benefits of technology

It effectively reduces carrier frequency offset, improves satellite communication performance, saves equipment power consumption, and reduces the impact of crystal oscillator aging on frequency offset.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN121055949A_ABST
    Figure CN121055949A_ABST
Patent Text Reader

Abstract

The invention discloses a crystal oscillator calibration method and a related device, and the method comprises the steps: terminal equipment determines downlink frequency offset fest based on a downlink signal of a first satellite; the terminal device determines Doppler frequency offset fd'based on the ephemeris of the first satellite and the position of the terminal device; the terminal device determines a crystal oscillator frequency offset fxo'based on the downlink frequency offset fest and the Doppler frequency offset fd '; the terminal device performs frequency offset compensation on the uplink signal based on the crystal oscillator frequency offset fxo'and sends the uplink signal to the first satellite, and the uplink signal is used for uplink access to the first satellite; when the first condition is met, determining that the ppm corresponding to the crystal oscillator frequency offset fxo'is the first ppm of the calibrated crystal oscillator, and the first condition comprises that the terminal equipment normally accesses the first satellite in an uplink mode, so that crystal oscillator calibration can be carried out at low cost, and the calibration precision of the crystal oscillator is improved.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] This application relates to the field of electronic technology, and in particular to crystal oscillator calibration methods and related devices. Background Technology

[0002] Non-terrestrial networks (NTNs), such as satellite networks, have significant advantages such as global coverage, long-distance transmission, flexible networking, convenient deployment, and no geographical limitations. Therefore, they have been widely used in many fields such as maritime communication, positioning and navigation, disaster relief, scientific experiments, video broadcasting, and Earth observation.

[0003] Satellite communication systems use non-geostationary Earth orbit (NGEO) satellites. Based on the satellite's orbital altitude, satellite mobile communication systems can be specifically divided into geostationary orbit (GEO) systems, medium Earth orbit (MEO) satellite communication systems, and low Earth orbit (LEO) satellite communication systems.

[0004] Whether it's a terrestrial cellular mobile communication system or a satellite mobile communication system, carrier frequency offset will greatly degrade the performance of the communication system. For satellite communication systems, especially low-Earth orbit satellite mobile communication systems, the main sources of carrier frequency offset are: the Doppler frequency offset of the wireless channel of the satellite-to-ground link, and the frequency offset of the crystal oscillator (i.e., crystal oscillator) used in the terminal.

[0005] Currently, how to perform crystal oscillator calibration at low cost and improve the calibration accuracy of crystal oscillators still needs further research. Summary of the Invention

[0006] This application provides a crystal oscillator calibration method and related apparatus, which can perform crystal oscillator calibration at low cost and improve the calibration accuracy of the crystal oscillator (ppm).

[0007] In a first aspect, this application provides a crystal oscillator calibration method, the method comprising: a terminal device determining a downlink frequency offset *fest* based on a downlink signal from a first satellite; the terminal device determining a Doppler frequency offset *fd'* based on the ephemeris of the first satellite and the position of the terminal device; the terminal device determining a crystal oscillator frequency offset *fxo'* based on the downlink frequency offset *fest* and the Doppler frequency offset *fd'*; the terminal device performing frequency offset compensation on an uplink signal based on the crystal oscillator frequency offset *fxo'*, and transmitting an uplink signal to the first satellite, the uplink signal being used for uplink access to the first satellite; and, when a first condition is met, determining the precision (parts per million, ppm) corresponding to the crystal oscillator frequency offset *fxo'* as the first ppm of the calibrated crystal oscillator; the first condition including: the terminal device successfully uplinks to the first satellite. The first ppm can be referred to as ppm1.

[0008] In implementing the embodiments of this application, if the terminal device, after pre-calibrating the crystal oscillator frequency offset fxo' based on the downlink frequency offset and Doppler frequency offset, can successfully access the first satellite after frequency offset compensation of the uplink signal based on the crystal oscillator frequency offset fxo', then the ppm corresponding to fxo' is determined to be the ppm of the calibrated crystal oscillator. This allows for accurate calibration of the crystal oscillator's ppm at low cost. Frequency offset compensation based on the calibrated crystal oscillator's ppm can reduce carrier frequency offset and effectively improve the satellite communication performance of the terminal device.

[0009] In one implementation, the method further includes: a terminal device determining whether the crystal oscillator is aging; the terminal device determining the downlink frequency offset fest based on the downlink signal of the first satellite, including: if the crystal oscillator is determined to be aging, the terminal device determining the downlink frequency offset fest based on the downlink signal of the first satellite. Implementing the embodiments of this application, calibrating the crystal oscillator's ppm when the crystal oscillator is aging can effectively avoid crystal oscillator frequency offset caused by crystal aging; furthermore, compared to calibrating the crystal oscillator every time satellite communication occurs, calibrating the crystal oscillator's ppm only when crystal oscillator aging is determined can reduce the impact of crystal oscillator aging on crystal oscillator frequency offset while saving device power consumption.

[0010] In one implementation, determining crystal oscillator aging includes: determining crystal oscillator aging when the time difference between the current moment and the most recent calibration time of the crystal oscillator's ppm is greater than or equal to a first duration. The first duration can also be referred to as a preset duration of 1. Implementing the embodiments of this application, after calibrating the ppm, frequency offset compensation is performed based on the calibrated ppm recorded in the first configuration file during communication with the first satellite. This eliminates the need for crystal oscillator calibration during every satellite communication, saving device power consumption.

[0011] In one implementation, the method further includes: writing the ppm of the calibrated crystal oscillator into a first configuration file; and when the terminal device communicates with the first satellite, performing frequency offset compensation based on the ppm recorded in the first configuration file. The first configuration file can also be referred to as configuration file 1. Implementing this embodiment, after calibrating the ppm, frequency offset compensation is performed based on the calibrated ppm recorded in the first configuration file when communicating with the first satellite. This eliminates the need for crystal oscillator calibration during each satellite communication, saving device power consumption.

[0012] In one implementation, the first satellite is a low-Earth orbit (LEO) satellite, and the first configuration file is stored in the non-volatile memory of the LEO satellite chip. Implementing the embodiments of this application, when communicating with the LEO satellite, frequency offset compensation based on the ppm of the calibrated crystal oscillator can reduce the carrier frequency offset for the LEO satellite, effectively improving the satellite communication performance between the terminal device and the LEO satellite.

[0013] In one implementation, the method further includes: obtaining a second ppm from historical data recorded in a first configuration file; and updating the ppm of the calibrated crystal oscillator with the average of the first ppm and the second ppm. The second ppm can be referred to as ppm2. Implementing embodiments of this application, by combining historical ppm with the updated calibrated ppm, can improve the stability and accuracy of the calibrated ppm.

[0014] In one implementation, the first condition further includes: receiving a frequency offset correction signal transmitted by the first satellite within a second duration of uplink signal transmission; the method further includes: if a frequency offset correction signal transmitted by the first satellite is received within the second duration of uplink signal transmission, the terminal device performs frequency offset correction on the uplink signal based on the frequency offset correction signal and successfully accesses the first satellite via uplink. The second duration can be referred to as the preset duration 4. Implementing this embodiment, after transmitting the uplink signal, if a frequency offset correction signal is received from the satellite within the second duration, it indicates that the satellite has received the uplink signal, and the frequency offset error caused by fxo' is within the deviation range supported by the satellite. The terminal device can then set the ppm corresponding to fxo' to the calibrated pmm. This allows for accurate calibration of the crystal oscillator's ppm at low cost.

[0015] In one implementation, the method further includes: if no frequency offset correction signal is received from the first satellite within a second time period of uplink signal transmission, the frequency of the uplink signal is adjusted using a first value as an adjustment unit, and the uplink signal is transmitted again. The first value can be referred to as a preset offset deltaf. Implementing this embodiment, if no frequency offset correction signal is received from the satellite within a second time period after uplink signal transmission, it indicates that the satellite has not received the uplink signal, and the frequency offset error caused by fxo' exceeds the deviation range supported by the satellite; the terminal device can fine-tune the transmission frequency of the uplink signal until successful uplink access to the first satellite is achieved.

[0016] In one implementation, the frequency offset correction signal indicates the frequency offset correction value of the uplink signal; frequency offset compensation of the uplink signal is performed based on the crystal oscillator frequency offset fxo'; when transmitting the uplink signal to the first satellite, the transmission frequency of the uplink signal is a first frequency; when the terminal device successfully accesses the first satellite via uplink, the transmission frequency of the uplink signal is a second frequency; the second frequency minus the first frequency and the frequency offset correction value equals K times the first value, where K is a positive integer greater than zero; before determining that the ppm corresponding to the crystal oscillator frequency offset fxo' is the first ppm of the calibrated crystal oscillator, the method further includes: adjusting the crystal oscillator frequency offset fxo' to be equal to fxo' plus K times the first value. Implementing the embodiments of this application, the terminal device fine-tunes the transmission frequency of the uplink signal until successful uplink access to the first satellite, calculates the total fine-tuned frequency (i.e., K times the first value), and converts it to the crystal oscillator frequency offset fxo', thereby obtaining the calibrated ppm corresponding to fxo'. In this way, the ppm of the crystal oscillator is accurately calibrated at low cost.

[0017] In one implementation, the method further includes: if no frequency offset correction signal is received from the first satellite within a second time period of uplink signal transmission, adjusting the crystal oscillator frequency offset fxo' using a first value as an adjustment unit, wherein the crystal oscillator frequency offset fxo' is equal to fxo' plus the first value; and then performing frequency offset compensation on the uplink signal again based on the crystal oscillator frequency offset fxo', and transmitting the uplink signal to the first satellite. Implementing the embodiments of this application, the terminal device fine-tunes the crystal oscillator frequency offset fxo' until successful uplink access to the first satellite is achieved, thereby obtaining the calibrated ppm corresponding to fxo'. In this way, the ppm of the crystal oscillator is accurately calibrated at low cost.

[0018] Secondly, this application provides a crystal oscillator calibration method, the method comprising: a terminal device sending a time calibration request to an NTP server, the time calibration request being used for clock synchronization with the NTP server; the terminal device receiving a time calibration response sent by the NTP server; based on the time calibration response, the terminal device performing standard timing T2 using a clock synchronized with the NTP server, and performing timing T1 using the crystal oscillator's clock; and determining a first precision ppm of the calibrated crystal oscillator based on the time deviation between standard timing T2 and timing T1. The first ppm may be referred to as ppm1.

[0019] In this embodiment of the application, "timing T1" can refer to a timing operation with a timing duration of T1, or it can refer to the timing duration T1; similarly, "standard timing T2" can refer to a timing operation with a timing duration of T2, or it can refer to the timing duration T2.

[0020] In implementing the embodiments of this application, the terminal device starts standard timing T2 using a clock synchronized with the NTP server and starts timing T1 using the crystal oscillator's clock. Utilizing the time difference between standard timing T2 and timing T1, the crystal oscillator's ppm can be accurately calibrated at low cost. This improves the calibration accuracy of the crystal oscillator in practical applications, thereby enhancing the performance of the terminal device. For example, frequency offset compensation based on the calibrated crystal oscillator's ppm can reduce carrier frequency offset and effectively improve the satellite communication performance of the terminal device.

[0021] In one implementation, the method further includes: a terminal device determining whether the crystal oscillator is aging; the terminal device sending a time calibration request to the NTP server, including: if the crystal oscillator is determined to be aging, the terminal device sending a time calibration request to the NTP server. Implementing the embodiments of this application, calibrating the crystal oscillator's ppm when the crystal oscillator is aging can effectively avoid crystal oscillator frequency deviation caused by aging; compared to calibrating the crystal oscillator every time it is used, calibrating the crystal oscillator's ppm only when aging is determined can reduce the impact of crystal oscillator aging on device performance while saving device power consumption.

[0022] In one implementation, determining crystal oscillator aging includes: determining crystal oscillator aging when the time difference between the current moment and the most recent calibration time of the crystal oscillator's ppm is greater than or equal to a first duration. The first duration can also be referred to as a preset duration of 1. Implementing embodiments of this application, by default, the ppm error caused by crystal oscillator aging within the first duration (e.g., 10 days) is within a controllable range. The crystal oscillator's ppm is only calibrated after the first duration has elapsed since the most recent calibration time. This can reduce the impact of crystal oscillator aging on crystal oscillator frequency offset while saving device power consumption.

[0023] In one implementation, the method further includes: writing the calibrated crystal oscillator's ppm value into a first configuration file; and when the terminal device communicates with a first satellite, performing frequency offset compensation based on the ppm value recorded in the first configuration file. The first configuration file can also be referred to as configuration file 1. Implementing this embodiment, after calibrating the ppm value, frequency offset compensation is performed based on the calibrated ppm value recorded in the first configuration file when communicating with the first satellite. This eliminates the need for crystal oscillator calibration during every satellite communication, saving device power consumption.

[0024] In one implementation, the first satellite is a low-Earth orbit (LEO) satellite, and the first configuration file is stored in the non-volatile memory of the LEO satellite chip. Implementing the embodiments of this application, when communicating with the LEO satellite, frequency offset compensation based on the ppm of the calibrated crystal oscillator can reduce the carrier frequency offset for the LEO satellite, effectively improving the satellite communication performance between the terminal device and the LEO satellite.

[0025] In one implementation, the method further includes: obtaining a second ppm from historical data recorded in a first configuration file; and updating the ppm of the calibrated crystal oscillator with the average of the first ppm and the second ppm. The second ppm can be referred to as ppm2. Implementing embodiments of this application, by combining historical ppm with the updated calibrated ppm, can improve the stability and accuracy of the calibrated ppm.

[0026] In one implementation, determining the first ppm of the calibrated crystal oscillator based on the time difference between standard timing T2 and timing T1 includes: determining that the first ppm of the calibrated crystal oscillator is equal to (T1-T2) / T2. By implementing the embodiments of this application, the ppm of the crystal oscillator can be accurately calibrated at low cost using the time difference between standard timing T2 and timing T1.

[0027] In one implementation, the method further includes: terminating standard timing T2 and timing T1 when the cumulative time T2 reaches a preset total calibration duration Tcal; determining the first ppm of the calibrated crystal oscillator based on the time deviation between standard timing T2 and timing T1 includes: determining that the first ppm of the calibrated crystal oscillator is equal to (T1-Tcal) / Tcal based on the time deviation between standard timing T2 and timing T1. By implementing the embodiments of this application and reasonably setting the total calibration duration Tcal, the ppm of the crystal oscillator can be accurately calibrated at low cost; to reduce the impact of the error of the NTP server synchronization clock and the deviation of timing T1, a larger total calibration duration Tcal can be set, for example, 30 hours.

[0028] In one implementation, the terminal device sending a time calibration request to the NTP server includes: when a second condition is met, the terminal device sends a time calibration request for the i-th stage to the NTP server; the terminal device receiving a time calibration response from the NTP server includes: the terminal device receiving a time calibration response for the i-th stage from the NTP server; the terminal device using a clock synchronized with the NTP server to perform standard timing T2 and using the crystal oscillator clock to perform timing T1 based on the time calibration response for the i-th stage includes: based on the time calibration response for the i-th stage, the terminal device using a clock synchronized with the NTP server to perform standard timing T2 for the i-th stage and using the crystal oscillator clock to perform timing T1 for the i-th stage; i is a positive integer less than or equal to n; the method further includes: when a third condition is met, stopping the standard timing T2 for the i-th stage and stopping the timing T1 for the i-th stage; the determination of the first ppm of the calibrated crystal oscillator based on the time deviation between the standard timing T2 and the timing T1 for the n stages includes: determining the first ppm of the calibrated crystal oscillator based on the time deviation between the cumulative standard timing T2 and the cumulative timing T1 for the n stages. By implementing the embodiments of this application, the total calibration time Tcal can be divided into multiple calibration stages. In each stage, clock synchronization is performed using an NTP server 400, and standard timing T2 and timing T1 are performed until the cumulative standard timing T2 of each stage reaches the total calibration time Tcal. In this way, through multi-stage crystal oscillator calibration, the error of the NTP server's clock synchronization can be reduced, and a higher calibration accuracy of ppm (i.e., a lower calibration error) can be obtained.

[0029] In one implementation, the second condition includes: the current time is within a preset idle time, and the third condition includes: the standard time T2 in the i-th stage increases by Tcal / n; or, the second condition includes: the terminal device is currently in an idle state, and the third condition includes: the terminal device switches to a non-idle state. Implementing the embodiments of this application allows crystal oscillator calibration at each stage to be performed while the terminal device is in an idle state, avoiding the impact of crystal oscillator calibration on the user's normal use of the terminal device.

[0030] In one implementation, the terminal device includes an application processor (AP) and an LEO satellite chip. The terminal device performs standard timing T2 using a clock synchronized with an NTP server and timing T1 using a crystal oscillator. This includes the AP performing standard timing T2 using a clock synchronized with the NTP server and instructing the LEO satellite chip to perform timing T1 using the crystal oscillator. Implementing this embodiment, the timing and ppm calculation are triggered by the AP, avoiding prolonged operation of the LEO satellite chip. When communicating with the LEO satellite, frequency offset compensation based on the ppm of the calibrated crystal oscillator can reduce carrier frequency offset and effectively improve satellite communication performance between the terminal device and the LEO satellite.

[0031] In one implementation, the terminal device includes an application processor (AP) and a LEO satellite chip; when the standard timing T2 accumulates to a preset total calibration time Tcal, the standard timing T2 and timing T1 are terminated, including: when the standard timing T2 accumulates to the preset total calibration time Tcal, the AP of the terminal device terminates the standard timing T2 and instructs the LEO satellite chip to terminate the clock timing T1 of the crystal oscillator.

[0032] Thirdly, this application provides a crystal oscillator calibration method applied to a terminal device. The method includes: after the terminal device synchronizes with a second satellite, it outputs a pulse per second (1pps) signal and starts timing T1 using the crystal oscillator's clock; when N consecutive 1pps signals are output, timing T1 is stopped; based on the time deviation between the aforementioned N consecutive 1pps signals and timing T1, the first precision (ppm) of the calibrated crystal oscillator is determined. The first ppm can be referred to as ppm1.

[0033] In implementing the embodiments of this application, when the terminal device outputs a 1pps signal, the crystal oscillator's clock starts timing T1. Utilizing the time difference between the continuous 1pps signals and timing T1, the crystal oscillator's ppm can be accurately calibrated at low cost. Thus, in practical applications of crystal oscillators, the calibration accuracy can be improved, thereby enhancing the performance of the terminal device. For example, frequency offset compensation based on the calibrated crystal oscillator's ppm can reduce carrier frequency offset, effectively improving the satellite communication performance of the terminal device.

[0034] In one implementation, the method further includes: the terminal device determining whether the crystal oscillator is aging; after synchronizing with the second satellite time, the terminal device outputs a 1pps signal and starts timing T1 using the crystal oscillator's clock, including: when the crystal oscillator is determined to be aging, the terminal device outputs a 1pps signal after synchronizing with the second satellite time and starts timing T1 using the crystal oscillator's clock. Implementing the embodiments of this application, calibrating the crystal oscillator's ppm when it is aging can effectively avoid crystal oscillator frequency deviation caused by aging; compared to calibrating the crystal oscillator every time it is used, calibrating the crystal oscillator's ppm only when aging is determined can reduce the impact of crystal oscillator aging on device performance while saving device power consumption.

[0035] In one implementation, determining crystal oscillator aging includes: determining crystal oscillator aging when the time difference between the current moment and the most recent calibration time of the crystal oscillator's ppm is greater than or equal to a first duration. The first duration can also be referred to as a preset duration of 1. Implementing embodiments of this application, by default, the ppm error caused by crystal oscillator aging within the first duration (e.g., 10 days) is within a controllable range. The crystal oscillator's ppm is only calibrated after the first duration has elapsed since the most recent calibration time. This can reduce the impact of crystal oscillator aging on crystal oscillator frequency offset while saving device power consumption.

[0036] In one implementation, the method further includes: writing the calibrated crystal oscillator's ppm value into a first configuration file; and when the terminal device communicates with a first satellite, performing frequency offset compensation based on the ppm value recorded in the first configuration file. The first configuration file can also be referred to as configuration file 1. Implementing this embodiment, after calibrating the ppm value, frequency offset compensation is performed based on the calibrated ppm value recorded in the first configuration file when communicating with the first satellite. This eliminates the need for crystal oscillator calibration during every satellite communication, saving device power consumption.

[0037] In one implementation, the first satellite is a low-Earth orbit (LEO) satellite, and the first configuration file is stored in the non-volatile memory of the LEO satellite chip. Implementing the embodiments of this application, when communicating with the LEO satellite, frequency offset compensation based on the ppm of the calibrated crystal oscillator can reduce the carrier frequency offset for the LEO satellite, effectively improving the satellite communication performance between the terminal device and the LEO satellite.

[0038] In one implementation, the method further includes: obtaining a second ppm from historical data recorded in a first configuration file; and updating the ppm of the calibrated crystal oscillator with the average of the first ppm and the second ppm. The second ppm can be referred to as ppm2. Implementing embodiments of this application, by combining historical ppm with the updated calibrated ppm, can improve the stability and accuracy of the calibrated ppm.

[0039] In one implementation, determining the first precision (ppm) of the calibrated crystal oscillator based on the time difference between N consecutive 1pps signals and timing T1 includes: the time difference between the N consecutive 1pps signals and timing T1 is T1-N, and the first ppm of the calibrated crystal oscillator is equal to (T1-N) / N. By implementing the embodiments of this application, the ppm of the crystal oscillator can be accurately calibrated at low cost using the time difference between consecutive 1pps signals and timing T1.

[0040] In one implementation, the first satellite is an LEO satellite, the second satellite is a GNSS satellite, and the terminal device includes a GNSS receiver and an LEO satellite chip. The method further includes: the GNSS receiver requesting GNSS positioning from the GNSS satellite; after the terminal device synchronizes with the second satellite, it outputs a 1pps (1 second pulse) signal and starts timing T1 using the crystal oscillator's clock, including: during GNSS positioning, after the GNSS receiver of the terminal device synchronizes with the second satellite, the GNSS receiver outputs a 1pps signal to the LEO satellite chip; when the LEO satellite chip receives the first 1pps signal output by the GNSS receiver, it obtains the first moment of the crystal oscillator's clock corresponding to the output moment of the first 1pps signal, and starts timing T1 from the first moment using the crystal oscillator's clock. By implementing the embodiments of this application, the LEO satellite chip can accurately calibrate the crystal oscillator's ppm at low cost using the continuous 1pps signals output by the GNSS receiver. Thus, when communicating with the LEO satellite, frequency offset compensation based on the calibrated crystal oscillator's ppm can reduce carrier frequency offset and effectively improve the satellite communication performance between the terminal device and the LEO satellite.

[0041] In one implementation, the method further includes: when the LEO satellite chip of the terminal device receives the Nth 1pps signal sent by the GNSS receiver, terminating the timing T1 of the crystal oscillator clock.

[0042] In one implementation, the method further includes: when GNSS positioning stops, the GNSS receiver stops outputting a 1pps signal; when the LEO satellite chip detects that the GNSS receiver has stopped outputting the 1pps signal, it terminates the crystal oscillator clock for timing T1, determining that the GNSS receiver has currently output N consecutive 1pps signals. Thus, during GNSS positioning, the LEO satellite chip can accurately calibrate the crystal oscillator's ppm using the 1pps signal output by the GNSS receiver at low cost.

[0043] Fourthly, embodiments of this application provide an electronic device, which includes a processor and a memory, the memory being coupled to the processor, the memory being used to store computer program code, the computer program code including computer instructions, and the processor reading the computer instructions from the memory to cause the electronic device to execute the crystal oscillator calibration method described in the second aspect.

[0044] Fifthly, embodiments of this application provide a server, the server comprising: a processor and a memory, the memory being coupled to the processor, the memory being used to store computer program code, the computer program code including computer instructions, wherein when the processor reads the computer instructions from the memory, the server causes the server to execute the crystal oscillator calibration method described in the third aspect.

[0045] Sixthly, embodiments of this application provide a computer storage medium including computer instructions that, when executed on an electronic device, cause a communication device to perform a crystal oscillator calibration method in any of the possible implementations of any of the above aspects.

[0046] In a seventh aspect, embodiments of this application provide a computer program product that, when run on a computer, causes the computer to execute the crystal oscillator calibration method in any of the possible implementations of any of the above aspects. Attached Figure Description

[0047] Figure 1A and Figure 1B A frequency offset schematic diagram provided for an embodiment of this application;

[0048] Figures 2A to 2C Schematic diagrams of several communication systems provided for embodiments of this application;

[0049] Figure 3A This is a schematic diagram of the structure of a terminal device provided in an embodiment of this application;

[0050] Figure 3B A schematic flowchart illustrating a crystal oscillator calibration method provided in this application embodiment;

[0051] Figure 4A This is a schematic diagram of the structure of another terminal device provided in an embodiment of this application;

[0052] Figure 4B A schematic flowchart illustrating another crystal oscillator calibration method provided in this application embodiment;

[0053] Figure 4C A schematic flowchart illustrating another crystal oscillator calibration method provided in this application embodiment;

[0054] Figure 5A This is a schematic diagram of the structure of another terminal device provided in an embodiment of this application;

[0055] Figure 5B A schematic flowchart illustrating another crystal oscillator calibration method provided in this application embodiment;

[0056] Figure 6 A schematic flowchart illustrating another crystal oscillator calibration method provided in this application embodiment;

[0057] Figure 7 This is a schematic diagram of the structure of a terminal device provided in an embodiment of this application;

[0058] Figure 8 This is a schematic diagram of the structure of a LEO satellite provided in an embodiment of this application;

[0059] Figure 9 This is a schematic diagram of the structure of an NTP server provided in an embodiment of this application. Detailed Implementation

[0060] The technical solutions in the embodiments of this application will be clearly and thoroughly described below with reference to the accompanying drawings. In the description of the embodiments of this application, unless otherwise stated, " / " means "or," for example, A / B can mean A or B; the word "and / or" in the text is merely a description of the relationship between related objects, indicating that three relationships can exist. For example, A and / or B can represent: A existing alone, A and B existing simultaneously, and B existing alone. Furthermore, in the description of the embodiments of this application, "multiple" refers to two or more than two.

[0061] Hereinafter, the terms "first" and "second" are used for descriptive purposes only and should not be construed as implying or suggesting relative importance or implicitly indicating the number of indicated technical features. Thus, a feature defined as "first" or "second" may explicitly or implicitly include one or more of that feature, and in the description of the embodiments of this application, unless otherwise stated, "multiple" means two or more.

[0062] The high-speed movement and long distance of satellites (such as LEO satellites) relative to the terminal cause time-varying Doppler frequency offsets in satellite communications. To reduce the impact of Doppler frequency offsets, terminal devices need to estimate and pre-compensate for Doppler frequency offsets when communicating with LEO satellites. Current 3GPP standards and traditional LEO satellite Doppler frequency offset compensation are estimated and performed by the terminal device. Furthermore, the carrier waves for both transmitting and receiving signals by the terminal device are generated by the crystal oscillator of the terminal's transceiver. Due to factors such as ambient temperature, voltage, noise, and aging, there will be a frequency deviation between the actual frequency of the carrier wave generated by the crystal oscillator and the preset nominal frequency; this frequency deviation is the terminal's crystal oscillator frequency offset. The crystal oscillator involved in the embodiments of this application can be a temperature-compensated crystal oscillator (TCXO), or other types of crystal oscillators, which are not specifically limited here.

[0063] For example, when a terminal device accesses a LEO satellite, Figure 1A This illustrates the impact of crystal oscillator frequency offset on satellite communications. Figure 1B The effect of Doppler frequency offset on satellite communications is shown.

[0064] like Figure 1AAs shown, the equivalent modulation frequency point of the local oscillator (LO) for the downlink (DL) signal reception of the transceiver of the terminal device is f1; affected by the crystal oscillator frequency offset, the actual air interface frequency point for the downlink signal reception is f2, and (f2 - f1) is the crystal oscillator frequency offset fxo for the downlink. The equivalent modulation frequency point of the local LO for the uplink (UL) signal transmission of the transceiver of the terminal device is f3; affected by the crystal oscillator frequency offset, the actual air interface frequency point for the uplink signal transmission is f4, and (f4 - f3) is the crystal oscillator frequency offset fxo for the uplink. The above crystal oscillator frequency offset can be an uncalibrated crystal oscillator frequency offset or the residual frequency offset of the crystal oscillator after calibration according to the existing technology.

[0065] As Figure 1B shown, the frequency point position of the downlink signal after Doppler frequency offset compensation is f5; the actual air interface frequency point for the downlink signal reception of the terminal device is f2; (f2 - f5) is the residual Doppler frequency offset, that is, fd. The frequency point position of the uplink signal after Doppler frequency offset compensation is f6; the actual air interface frequency point for the uplink signal transmission of the terminal device is f4; (f4 - f6) is the residual Doppler frequency offset, that is, -fd.

[0066] It can be understood that as Figure 1A and Figure 1B shown, theoretically, considering the effects of the crystal oscillator frequency offset and the Doppler frequency offset comprehensively, the transmit frequency offset compensation value for the UL signal fulcomp = -fd + fxo, while the actually calculated frequency offset compensation value (-fest) based on the frequency offset estimation of the DL receiver = -(fd + fxo). Therefore, when the terminal device initially accesses the LEO satellite, if the above DL frequency offset compensation value (-fest) is directly used for pre-compensation, an uplink frequency deviation of 2 * fxo (i.e., fulcomp - (-fest)) will be introduced on the terminal side. The satellite communication system can support a maximum frequency offset error of Fd; if 2 * fxo < Fd, the LEO satellite can detect the relevant signals for the initial access sent by the terminal device, enabling the terminal device to complete the initial access; otherwise, the LEO satellite will most likely not detect the relevant signals for the initial access sent by the terminal device, and the terminal device cannot complete the initial access.

[0067] The crystal oscillator frequency offset mainly includes the following two parts: the frequency offset of the static part of the crystal oscillator and the dynamic frequency offset that changes with the ambient temperature. The frequency offset error of the static part is introduced by device aging; generally, through off-line calibration at the factory, the static part of the crystal oscillator can be calibrated to a relatively high-precision error; however, as the device ages, this error will increase, causing 2 * fxo to exceed Fd.

[0068] Currently, one implementation requires the satellite to have a high-precision real-time observation station, or the satellite receiver to have a wider detection capability, thereby reducing the impact of crystal oscillator frequency offset of the terminal equipment on satellite communication. The above solutions are costly.

[0069] In another implementation, the terminal device records a preset correspondence between ambient temperature and crystal oscillator frequency offset. The terminal can determine the crystal oscillator frequency offset based on this correspondence and then perform pre-compensation for the crystal oscillator frequency offset. However, this solution requires the terminal to be equipped with a precise temperature sensor; the correspondence between ambient temperature and crystal oscillator frequency offset recorded by the terminal device is limited, and if the current ambient temperature is not included in the correspondence, the corresponding crystal oscillator frequency offset cannot be determined; furthermore, this solution does not consider the crystal oscillator deviation caused by crystal aging.

[0070] The crystal oscillator calibration method provided in this application can address various factors that cause crystal oscillator frequency offset and accurately calibrate the crystal oscillator's ppm value at low cost. The terminal device can determine the compensation value for the crystal oscillator frequency offset based on the calibrated crystal oscillator's ppm value, thereby reducing carrier frequency offset and effectively improving the communication performance between the terminal device and the satellite.

[0071] The ppm (parts per million) rating of a crystal oscillator is an indicator used to describe its frequency stability. ppm stands for "parts per million," representing the frequency drift of the crystal, or the deviation between its actual and nominal frequencies. PPM is typically caused by factors such as temperature, voltage, and aging. A high ppm value indicates poor frequency stability, which can affect the normal operation of electronic devices. The aforementioned ppm can also be referred to as the crystal oscillator's error / deviation, but this is not specifically defined here.

[0072] When a crystal oscillator is used in a circuit to generate a clock signal, the generated clock signal will vary with the oscillation of the crystal due to the crystal's frequency offset. Therefore, in scenarios requiring clock synchronization, periodic clock synchronization is necessary to overcome the clock synchronization deviation caused by the crystal frequency offset. Crystal frequency offset is usually expressed in terms of the amount of time shifted per second, and can be measured in ppm; a crystal frequency offset of 1 ppm means an offset of 1 ppm per second.

[0073] The crystal oscillator calibration method provided in the embodiments of this application will be described in detail below.

[0074] First, the satellite communication system to which the crystal oscillator calibration method provided in the embodiments of this application is applied is introduced.

[0075] For example, Figures 2A to 2CSchematic diagrams of several satellite communication systems provided in embodiments of this application are shown. Each satellite communication system includes at least one terminal device (e.g., terminal device 100) and at least one first satellite (e.g., LEO satellite 200). Satellites communicate with each other via inter-satellite links, and satellites and terminal devices communicate via uplink / downlinks.

[0076] In some embodiments of this application, if the crystal oscillator of the terminal device 100 is detected to be aging, the crystal oscillator calibration process can be initiated before the terminal device 100 communicates with the LEO satellite 200 to calibrate the ppm of the crystal oscillator of the terminal device 100, thereby reducing the impact of the crystal oscillator frequency offset on satellite communication.

[0077] The aforementioned satellite equipment is characterized by high-speed Earth-level movement; it is not limited to LEO satellite 200, and the aforementioned first satellite can also be a geostationary Earth orbit (GEO) satellite, a non-geostationary Earth orbit (NGEO) medium Earth orbit (MEO) satellite, or a High Altitude Platform Station (HAPS), etc. This application does not limit the specific type of the aforementioned satellite equipment; subsequent embodiments will use LEO satellite 200 as an example for illustrative purposes.

[0078] The terminal device 100 in this application embodiment can refer to user equipment, access terminal, user unit, user station, mobile station, mobile station, remote station, remote terminal, mobile device, user terminal, wireless communication device, user agent, or user device. It can also refer to satellite phone, cellular phone, smartphone, wireless data card, wireless modem, machine-type communication device, cordless phone, session initiation protocol (SIP) phone, wireless local loop (WLL) station, personal digital assistant (PDA), handheld device with wireless communication function, computing device or other processing device connected to a wireless modem, in-vehicle device or wearable device, virtual reality (VR) terminal device, augmented reality (AR) terminal device, wireless terminal in industrial control, wireless terminal in self-driving, wireless terminal in remote medical care, wireless terminal in smart grid, wireless terminal in transportation safety, and wireless terminal in smart city applications. This application does not limit the specific form of the terminal device 100, including wireless terminals in cities, smart homes, 5G networks, or future communication networks, as well as terminal devices in Internet of Things (IoT) systems.

[0079] It should be understood that in the embodiments of this application, the terminal device 100 can be a device for implementing the functions of the terminal device, or it can be a device that supports the terminal device 100 in implementing the functions, such as a chip system, which can be installed in the terminal. In the embodiments of this application, the chip system can be composed of chips, or it can include chips and other discrete devices.

[0080] The crystal oscillator calibration scheme provided in this application embodiment is not limited to satellite communication with satellite equipment. It can also be applied to communication between terminal equipment 100 and other network equipment (such as base stations, routers, switches or other network equipment of NTN). This application embodiment does not specifically limit the above-mentioned network equipment.

[0081] In addition to communicating with other devices, the crystal oscillator calibration scheme provided in this application embodiment can also be used to implement other functions of the terminal device 100, such as CPU clock synchronization, power management, memory control, etc., to improve the accuracy of the crystal oscillator in the above-mentioned other functions. The above-mentioned other functions are not specifically limited here.

[0082] like Figure 2A As shown, the satellite communication system provided in this application embodiment may further include a GNSS satellite 300. The GNSS satellite 300 uses UTC (Coordinated Universal Time), mainly relying on the consistency of the second point with UTC time to ensure the stability of its time interval. UTC time is the main time standard for adjusting clocks and time worldwide.

[0083] In some embodiments, the terminal device 100 may request GNSS satellite 300 to perform GNSS positioning. During the GNSS positioning process, after the terminal device 100 synchronizes its clock with the GNSS satellite 300, it outputs 1pps and starts timing T1 using the crystal oscillator's clock. The terminal device 100 can calibrate the crystal oscillator's ppm using the time difference between N consecutive 1pps and timing T1, for example, ppm = (T1-N) / N. N is a positive integer greater than zero.

[0084] like Figure 2B As shown in the embodiments of this application, the satellite communication system may further include a Network Time Protocol (NTP) server 400, which provides high-precision time correction. The NTP server 400 receives precise UTC time from an authoritative clock source, and the terminal device 100 can request and receive the precise UTC time from the NTP server 400. For example, the authoritative clock source may be an atomic clock, GPS, an observatory, a satellite, the Internet, etc.

[0085] In some embodiments, the terminal device 100 may request the NTP server 400 to synchronize the clock, use the synchronized clock to perform standard timing T2, and start the crystal oscillator clock to perform timing T1; using the time difference between standard timing T2 and timing T1, the terminal device 100 may calibrate the ppm of the crystal oscillator, for example, ppm = (T1-T2) / T2.

[0086] It should be noted that, in the embodiments of this application, "starting / performing timing T1" refers to starting / performing timing operation using the crystal oscillator clock, and the duration of timing is denoted as T1; similarly, "starting / performing standard timing T2" refers to starting / performing timing operation using a clock synchronized with the NTP server 400 clock, and the duration of timing is denoted as T2.

[0087] like Figure 2C As shown, the satellite communication system provided in this application embodiment may further include a positioning satellite 500, which is used to obtain the positioning of the terminal device 100. This application embodiment does not specifically limit the type of positioning satellite 500. Subsequent embodiments will use a GNSS satellite as an example for illustrative purposes. GNSS satellites can be GPS satellites, BeiDou satellites, etc.

[0088] In some embodiments, during the initial linking process between the terminal device 100 and the LEO satellite 200, the terminal device 100 may connect to the positioning satellite 500 to obtain the location of the terminal device 100; the terminal device 100 estimates the downlink frequency offset based on the downlink signal of the LEO satellite 200, and estimates the downlink Doppler frequency offset of the LEO satellite 200 based on the ephemeris of the LEO satellite 200 and the location of the terminal device 100; based on the downlink frequency offset and the Doppler frequency offset, the crystal oscillator frequency offset of the terminal device 100 can be estimated; if the uplink access to the LEO satellite 200 can be completed normally using the crystal oscillator frequency offset, the ppm corresponding to the crystal oscillator frequency offset can be used as the calibrated ppm.

[0089] The ephemeris described above is information used to depict the time-varying trajectory of a satellite's planned orbit. It is used to accurately calculate, predict, depict, and track the satellite's or spacecraft's operational status, including time, position, and velocity. Ephemeris time is typically calculated in UTC time and is updated periodically. Ground control centers can schedule and adjust satellite ephemeris information and send it to the satellite, enabling it to operate based on the latest ephemeris.

[0090] This application provides a crystal oscillator calibration method, which is applied to... Figure 2A The communication system shown. In this method, the terminal device 100 uses 1pps in GNSS positioning to calibrate the crystal oscillator; thus, the crystal oscillator can be accurately calibrated at low cost to reduce the impact of crystal oscillator frequency offset on satellite communication.

[0091] For example, such as Figure 3A As shown, in the above crystal oscillator calibration method, the terminal device 100 includes a crystal oscillator (e.g., TCXO), an LEO satellite chip, and a GNSS receiver. The GNSS receiver can output a 1pps signal to the LEO satellite chip. Figure 3B As shown, the crystal oscillator calibration method may include some or all of steps S101 to S109.

[0092] S101, The LEO satellite chip of the terminal device 100 determines whether the crystal oscillator is aging; if so, the crystal oscillator calibration process is started, and S102 and S103 are executed.

[0093] In some embodiments, the terminal device 100 records the calibration time (ppm) of the most recent crystal oscillator calibration. When the current time is greater than or equal to one preset time interval from this calibration time, the LEO satellite chip determines that the crystal oscillator is aging and initiates the crystal oscillator calibration process, i.e., executing steps S102 to S108 of the subsequent method flow. In one implementation, the terminal device 100 performs a factory calibration on the crystal oscillator before leaving the factory, and the terminal device 100 records the calibration time of this calibration as the initial calibration time. In another implementation, when the terminal device 100 leaves the factory, the factory time of the terminal device 100 is set as the initial calibration time.

[0094] In some embodiments, before the LEO satellite chip of terminal device 100 communicates with LEO satellite 200 (e.g., uplink access to LEO satellite 200, establishing a communication connection with LEO satellite 200), S101 is executed first. In some embodiments, the LEO satellite chip of terminal device 100 periodically executes S101 to determine whether crystal oscillator calibration should be performed.

[0095] In some embodiments, since the LEO satellite chip is not continuously powered on, the terminal device 100 can use other modules to execute S101, and then the other modules can instruct the LEO satellite chip to start the crystal oscillator calibration process; the other modules are not specifically limited here, such as application processors (AP).

[0096] In some embodiments, when the time elapsed since the last ppm update reaches a preset duration of 1, the LEO satellite chip automatically triggers the crystal oscillator calibration process.

[0097] In some embodiments, the LEO satellite chip acquires the crystal oscillator's production time; based on the crystal oscillator's production time, if the crystal oscillator's lifespan exceeds a preset duration of 2, it is determined that the crystal oscillator is aging. The aforementioned production time can be the crystal oscillator's manufacturing date or the terminal device 100's manufacturing date.

[0098] In some embodiments, if the LEO satellite chip of terminal device 100 fails to connect to LEO satellite 200 via uplink, the LEO satellite chip determines that the crystal oscillator is at risk of aging and initiates the crystal oscillator calibration process. In some embodiments, if the LEO satellite chip of terminal device 100 fails to connect to LEO satellite 200 via uplink signal R times consecutively (e.g., 3 times), the LEO satellite chip determines that the crystal oscillator is at risk of aging and initiates the crystal oscillator calibration process. This application does not specifically limit the implementation method for determining whether the crystal oscillator is aging.

[0099] Step S101 is optional. In some embodiments, it is not necessary to determine whether the crystal oscillator is aging; the terminal device 100 can periodically initiate the crystal oscillator calibration process. In some embodiments, it is not necessary to determine whether the crystal oscillator is aging; the terminal device 100 can automatically initiate the crystal oscillator calibration process before each uplink access to a LEO satellite.

[0100] The S102 and LEO satellite chips send positioning commands to the GNSS receiver to instruct the GNSS receiver to perform GNSS positioning.

[0101] In some embodiments, after determining that the crystal oscillator is aging, before communicating with the LEO satellite 200, the crystal oscillator calibration process is initiated, and steps S102 to S108 are executed.

[0102] S103. Based on the above positioning command, the GNSS receiver synchronizes its time with the GNSS satellite 300; after the GNSS receiver synchronizes its time with the GNSS satellite 300, it sends 1pps to the LEO satellite chip.

[0103] In some embodiments, based on the aforementioned positioning instructions, the GNSS receiver synchronizes its time with the GNSS satellite before acquiring positioning information. After time synchronization, before the terminal device 100 stops GNSS positioning, the GNSS receiver outputs a 1pps signal precisely at every second interval according to its own calibrated clock (i.e., UTC time). This signal indicates the exact time interval and moment, typically indicated by the rising edge of a 1pps second pulse. The GNSS receiver continuously outputs this 1pps signal to the LEO satellite chip via hardware pins. The UTC second indicated by the rising edge of the 1pps signal has an accuracy down to the nanosecond level and no accumulated error. When the terminal device 100 stops GNSS positioning, the GNSS receiver stops outputting the 1pps signal.

[0104] S104. Based on the 1pps output from the GNSS receiver, the LEO satellite chip uses the crystal oscillator clock to start timing T1.

[0105] In some embodiments, when the LEO satellite chip receives the first 1pps signal sent by the GNSS receiver, it obtains the time 1 of the crystal oscillator clock corresponding to the output time of the 1pps signal, and uses the crystal oscillator clock to start timing T1 from time 1.

[0106] After the S105 GNSS receiver outputs N consecutive 1pps, the LEO satellite chip stops timing T1.

[0107] In some embodiments, N is a preset value of the terminal device 100, which can be set according to requirements and is not specifically limited here.

[0108] In some embodiments, when the terminal device 100 stops GNSS positioning, the GNSS receiver stops outputting 1pps signals; when the LEO satellite chip detects that the GNSS receiver has stopped outputting 1pps signals, it stops timing T1 and determines that the current GNSS receiver has output N consecutive 1pps signals to the LEO satellite chip.

[0109] S106 and LEO satellite chips determine the ppm1 of the calibrated crystal oscillator based on the above N consecutive 1pps and timing T1.

[0110] In some embodiments, after the LEO satellite chip starts timing T1, it stops timing T1 when it receives N consecutive 1pps from the GNSS output; in step S106, the LEO satellite chip calculates the time deviation between the standard duration indicated by the N 1pps and the timing T1 of the crystal oscillator as (T1-N), and determines that the ppm1 of the calibrated crystal oscillator is equal to (T1-N) / N.

[0111] In some embodiments, when the GNSS receiver outputs N consecutive 1pps signals, a second pulse interrupt is triggered. When the second pulse interrupt is triggered, a 1pps signal is output to the LEO satellite chip. After receiving the 1pps signal, the LEO executes S105.

[0112] In some embodiments, the GNSS receiver sends each 1pps signal to the LEO satellite chip. When the LEO satellite chip receives N consecutive 1pps signals, it triggers a second pulse interrupt and executes S105 when the second pulse interrupt is triggered.

[0113] The S107 and LEO satellite chips update the calibrated ppm based on the crystal oscillator's ppm1 and historical ppm.

[0114] In some embodiments, the LEO satellite chip updates the calibrated ppm based on ppm1 calculated in step S105 and one or more historically obtained ppm values. In one implementation, the historically obtained ppm is the currently recorded ppm2 in configuration file 1; the LEO satellite chip reads ppm2 from configuration file 1; and updates the average of ppm1 and ppm2 to the calibrated crystal oscillator's ppm value.

[0115] The S108 and LEO satellite chips update the ppm of the calibrated crystal oscillator to configuration file 1. Configuration file 1 is used to record the ppm of the crystal oscillator and is stored in non-volatile memory (NVM).

[0116] It is understandable that the LEO satellite chip uses the ppm of the calibrated crystal oscillator instead of the ppm recorded in profile 1.

[0117] In some embodiments, in step S108, the terminal device 100 also records the time when the ppm of the calibrated crystal oscillator is updated to the configuration file 1, which may be referred to as the calibration time.

[0118] In some embodiments, the LEO satellite chip queries the most recent calibration time of the ppm; the LEO satellite chip only executes S108 when the current time is greater than or equal to a preset time interval of 1. It can be understood that the ppm in configuration file 1 is only updated if it is determined that the ppm in configuration file 1 has not been updated within a short period; otherwise, it is assumed that the crystal oscillator has not yet aged and does not require calibration.

[0119] When the S109 LEO satellite chip communicates with the LEO satellite 200, it determines the crystal oscillator frequency offset according to the ppm recorded in configuration file 1, and then uses the crystal oscillator frequency offset to perform frequency offset compensation.

[0120] In some embodiments, the nominal frequency of the crystal oscillator is f_base, then the actual output frequency deviation is f_base*ppm, and the actual output frequency is (1+ppm)*f_base. The local LO equivalent modulation frequency point generated in the communication link using the crystal oscillator is (1+ppm)*f_base*alpha; where alpha represents the multiplication and division ratio in the phase-locked loop (PLL) circuit of the transceiver. It can be understood that the deviation of the local LO equivalent modulation frequency point caused by the above-mentioned output frequency deviation (i.e., the aforementioned crystal oscillator frequency deviation) is ppm*alpha*f_base; therefore, in step S109, based on the ppm recorded in configuration file 1 and the known alpha of the transceiver, the crystal oscillator frequency deviation can be determined, and then frequency deviation compensation can be performed on the crystal oscillator frequency deviation in the baseband signal.

[0121] For example, if the crystal oscillator's f_base = 26MHz and ppm = 1.5, then the crystal oscillator's output frequency is 26000039Hz, and the frequency deviation of the crystal oscillator's output is 39Hz. If the target local LO equivalent modulation frequency to be generated is 1551MHz, then an alpha of 59.6538 is required. Based on the crystal oscillator's output frequency deviation (i.e., 39Hz), it can be calculated that the local LO equivalent modulation frequency is equal to 1551002326.5Hz, which is 2326.5Hz more than the target frequency of 1551MHz. This part is the local oscillator deviation, which is the crystal oscillator frequency deviation involved in the aforementioned embodiment.

[0122] The embodiments of this application do not specifically limit the implementation of frequency offset compensation based on ppm.

[0123] It is understandable that when the LEO satellite chip communicates with the LEO satellite 200, the calibrated ppm recorded in configuration file 1 is used to determine the crystal oscillator frequency offset, and then frequency offset compensation is performed. This can reduce the carrier frequency offset during communication with the LEO satellite 200, thereby improving satellite communication performance. Furthermore, research has shown that the ppm error caused by crystal oscillator aging within a preset time period 1 (e.g., 10 days) is within a controllable range, and the resulting crystal oscillator frequency offset is within the supportable frequency offset error range. After this calibration, the ppm will not be calibrated again within the preset time period 1. The terminal device 100 will determine the crystal oscillator frequency offset based on the ppm recorded in configuration file 1 for frequency offset compensation. In this way, compared to calibrating the crystal oscillator frequency offset before each use (e.g., for satellite communication), power consumption can be saved without affecting the normal operation of the device (e.g., for satellite communication). The preset time period 1 was obtained by researchers based on research and testing and can be set according to actual needs; no specific limitation is made here.

[0124] Step S107 is optional. In some embodiments, S107 does not need to be performed; the LEO satellite chip can directly write the ppm1 of the calibrated crystal oscillator into configuration file 1.

[0125] Another crystal oscillator calibration method provided in this application embodiment is applied to... Figure 2B The communication system shown. In this method, the AP of the terminal device 100 connects to an NTP server when connected to the network, and synchronizes the clock of the NTP server for calibrating the ppm of the crystal oscillator; in this way, the ppm of the crystal oscillator can be accurately calibrated at low cost, thereby reducing the impact of crystal oscillator frequency offset on satellite communication.

[0126] For example, such as Figure 4A As shown, in the above crystal oscillator calibration method, the terminal device 100 includes a main system-on-chip (SoC), a LEO satellite chip, and a crystal oscillator (e.g., a TCXO). The main SoC includes an application processor (AP). Figure 4B As shown, the crystal oscillator calibration method may include some or all of steps S201 to S214.

[0127] S201, the AP of terminal device 100 determines whether the crystal oscillator is aging; if so, it starts the crystal oscillator calibration process and executes the subsequent process.

[0128] Specifically, step S201 can be referred to the relevant description of step S101, and will not be repeated here.

[0129] In some embodiments, the LEO satellite chip can also determine whether the crystal oscillator is aging; if so, it instructs the AP to start the crystal oscillator calibration process.

[0130] S202, the AP of terminal device 100 sends a command to the LEO satellite chip to instruct it to start.

[0131] In some embodiments, the LEO satellite chip is powered off when not in use. In step S202, the AP sends a command to the LEO satellite chip to instruct it to start (i.e., power on) and enter crystal oscillator calibration mode. In one implementation, after starting the LEO satellite chip, if it does not enter crystal oscillator calibration mode, the LEO satellite chip automatically performs uplink access to the LEO satellite to facilitate rapid establishment of a satellite communication connection with LEO.

[0132] S203, the AP of terminal device 100 sends a time calibration request to NTP server 400.

[0133] S204. Based on the above time calibration request, NTP server 400 sends a time calibration response to AP of terminal device 100.

[0134] The aforementioned time calibration request and time calibration response are used for clock synchronization between the AP of terminal device 100 and NTP server 400. In one implementation, the time calibration response carries the current NTP standard time of NTP server 400.

[0135] S205. Based on the above time calibration response, the AP of the terminal device 100 sends a command to the LEO satellite chip to instruct the LEO satellite chip to start timing T1.

[0136] S206, The LEO satellite chip of the terminal device 100 starts timing T1 using the crystal oscillator clock.

[0137] S207. Based on the above time calibration response, the AP of the terminal device 100 also uses the NTP clock synchronized with the NTP server 400 to start the standard timing T2.

[0138] For ease of description, in this embodiment of the application, the clock synchronized with the NTP server 400 can be simply referred to as the NTP clock.

[0139] S208. After the standard timing T2 reaches the preset total calibration time Tcal, the AP of the terminal device 100 stops the standard timing T2 and sends a command to the LEO satellite chip to instruct the LEO satellite chip to terminate timing T1.

[0140] S209, The LEO satellite chip of terminal device 100 terminates the clock timing T1 using the crystal oscillator.

[0141] S210, the LEO satellite chip of terminal equipment 100 reports timing T1 to AP.

[0142] S211, the AP of terminal equipment 100 determines the ppm1 of the calibrated crystal oscillator based on the duration deviation between the total calibration time Tcal and the timing T1.

[0143] In some embodiments, the AP determines the time deviation between the standard timing Tcal and the crystal oscillator clock timing T1 as T1-Tcal, and determines that the ppm1 of the calibrated crystal oscillator is equal to (T1-Tcal) / Tcal.

[0144] In some embodiments, some terminal devices have large errors when using the NTP server 400 to calibrate the clock, and the crystal oscillator clock has a certain timing deviation. In order to reduce the impact of the above-mentioned calibration clock error and timing deviation, a larger total calibration time Tcal can be set, such as 30 hours.

[0145] S212 and AP update the ppm of the calibrated crystal oscillator based on ppm1 and historical ppm.

[0146] In some embodiments, the AP updates the calibrated ppm based on ppm1 calculated in step S211 and one or more historically obtained ppm values. In one implementation, the historically obtained ppm is the currently recorded ppm2 in configuration file 1; the AP reads ppm2 from configuration file 1 from the LEO satellite chip; and updates the average of ppm1 and ppm2 to the calibrated crystal oscillator's ppm value.

[0147] S213, the AP of the terminal device 100 sends the calibrated crystal oscillator ppm to the LEO satellite chip to instruct the LEO satellite chip to write the calibrated crystal oscillator ppm into the configuration file 1.

[0148] Step S212 is optional. In some embodiments, S212 is not required, and the AP directly instructs the LEO satellite chip to write the ppm1 of the calibrated crystal oscillator into configuration file 1.

[0149] In other embodiments, after step S208, the AP may also send the total calibration duration Tcal to the LEO satellite chip, and then the LEO satellite chip performs the relevant operations from S211 to S213, namely, calculating the ppm of the calibrated crystal oscillator and writing it into configuration file 1.

[0150] In other embodiments, after timing T1 reaches the preset total calibration duration Tcal, the LEO satellite chip stops using the crystal oscillator clock to time T1 and sends a command to the AP to instruct the AP to terminate timing T2. The AP then performs the relevant operations from S211 to S213. In step S211, the ppm1 of the calibrated crystal oscillator is equal to (Tcal-T2) / T2.

[0151] In other embodiments, after timing T1 reaches the preset total calibration duration Tcal, the LEO satellite chip stops using the crystal oscillator clock to time T1 and sends a command to the AP to instruct the AP to terminate timing T2. After terminating timing T2, the AP sends the timing duration of timing T2 (i.e., the T2 value) to the LEO satellite chip, and then the LEO satellite chip executes the relevant operations from S211 to S213. In step S211, the ppm1 of the calibrated crystal oscillator is equal to (Tcal - T2) / T2.

[0152] In some embodiments, after step S201, the AP of the terminal device 100 performs a crystal oscillator calibration process using a preset idle time, that is, executes S202 to S213. For example, the preset idle time is from 0:00 to 6:00 at night, and Tcal equals 6 hours.

[0153] When the S214 LEO satellite chip communicates with the LEO satellite 200, it determines the crystal oscillator frequency offset according to the ppm recorded in configuration file 1, and then uses the crystal oscillator frequency offset to perform frequency offset compensation.

[0154] For details on the implementation of step S214, please refer to the description of step S109, which will not be repeated here.

[0155] Figure 4B The provided crystal oscillator calibration method has the following problems: some terminal devices experience significant errors when calibrating the clock using the NTP server 400; prolonged continuous operation of the LEO satellite chip for timing T1 results in high power consumption and may affect satellite communication. To address these issues and achieve higher calibration accuracy (i.e., lower calibration error) in ppm, the total calibration time Tcal can be divided into multiple stages. In each stage, the NTP server 400 is used for clock synchronization, and the synchronized NTP clock is used for standard timing T2, as well as timing T1 using the crystal oscillator clock, until the accumulated standard timing T2 reaches the total calibration time Tcal. Then, the total calibration time Tcal and timing T1 are used to calibrate the crystal oscillator's ppm. This multi-stage crystal oscillator calibration reduces the error in calibrating the NTP clock, avoids prolonged operation of the LEO satellite chip, minimizes the impact on satellite communication, and improves the calibration accuracy in ppm.

[0156] For example, such as Figure 4C As shown, the crystal oscillator calibration method may include some or all of steps S301 to S317.

[0157] S301, the AP of the terminal device 100 determines whether the crystal oscillator is aging; if so, it starts the crystal oscillator calibration process and executes the subsequent procedures.

[0158] Specifically, step S301 can be referred to the relevant description of step S101, and will not be repeated here.

[0159] In some embodiments, the LEO satellite chip can also determine whether the crystal oscillator is aging; if so, it instructs the AP to start the crystal oscillator calibration process.

[0160] S302, The AP of terminal device 100 sends the i-th time calibration request to NTP server 400, where the initial value of i is 1.

[0161] S303. Based on the i-th time calibration request, the NTP server 400 sends the i-th time calibration response to the AP of the terminal device 100.

[0162] The aforementioned i-th time calibration request and i-th time calibration response are used for the terminal device 100's AP to perform the i-th clock synchronization with the NTP server 400. In one implementation, the i-th time calibration response carries the current standard time of the NTP server 400.

[0163] S304. After receiving the i-th time calibration response sent by the NTP server 400, the AP of the terminal device 100 sends an instruction to the LEO satellite chip to instruct the LEO satellite chip to start timing T1_i.

[0164] S305, the LEO satellite chip of the terminal device 100 uses the crystal oscillator clock to start timing T1_i.

[0165] S306. After receiving the i-th time calibration response sent by the NTP server 400, the AP of the terminal device 100 also uses the NTP clock synchronized with the NTP server 400 to perform standard timing T2.

[0166] In some embodiments, step S306 specifically includes: after receiving the first time calibration response, the AP starts standard timing T2 using the NTP clock synchronized with the NTP server 400; before receiving the j-th time calibration response, standard timing T2 is paused; after receiving the j-th time calibration response, the AP resumes standard timing T2 using the NTP clock synchronized with the NTP server 400, where j is greater than 1.

[0167] S307. During the standard timing T2 of the i-th stage, when condition 1 is met or the cumulative standard timing T2 reaches the preset total calibration time Tcal, the AP of the terminal device 100 executes S308.

[0168] S308, AP pause standard timer T2 of terminal equipment 100.

[0169] S309, the AP of the terminal device 100 sends a command to the LEO satellite chip to instruct the LEO satellite chip to terminate timing T1_i.

[0170] S310, the LEO satellite chip of the terminal device 100 stops using the crystal oscillator clock to time T1_i and records T1_i.

[0171] S311. If the standard time T2 accumulates to the total calibration time Tcal, the AP of the terminal device 100 executes S312 to S316, at which point i equals n; otherwise, let i = i + 1, and return to execute S302.

[0172] In this embodiment of the application, based on the total calibration time Tcal, the overall calibration process can be divided into n stages.

[0173] In some embodiments, the preset total calibration time Tcal is divided into n equal parts, i.e., Tcal / n, where condition 1 includes: the calibration time of this stage reaches Tcal / n, i.e., the standard time T2 increases by Tcal / n. In one implementation, the AP of the terminal device 100 sequentially performs the calibration process of each stage at one or more preset idle time points each day. For example, an example is given with Tcal equal to 16 hours, n equal to 8, and the calibration time of each stage being 2 hours.

[0174] For example, a calibration process is performed at a preset time each day, and the ppm calibration is completed in n days; in step S302, a time calibration request for the i-th stage is sent at 0:00 AM, and then the subsequent calibration process of the i-th stage is executed (i.e., S303 to S306 is executed). When the standard time T2 increases by 2 hours, the calibration process of this stage is stopped (i.e., S307 to S310 is executed).

[0175] For example, a calibration process consisting of y (e.g., 3) stages is executed sequentially at a preset time each day, through... Complete ppm calibration within one day, symbol Used for rounding up; in step S302, the calibration process of stage a is executed at 0:00 AM; after the subsequent calibration process of stage a is completed, the calibration process of stage a+1 is automatically executed; after the subsequent calibration process of stage a+1 is completed, the calibration process of stage a+2 is automatically executed. Wherein, a is less than or equal to n-2.

[0176] For example, the calibration process is executed sequentially at y (e.g., 3) preset time points each day, consisting of y stages. Complete ppm calibration within one day, symbol Used for rounding up; in step S302, time calibration requests are sent at 0:00, 2:05 and 4:10 respectively, and then the subsequent calibration processes of stage a, stage a+1 and stage a+2 are executed respectively, where a is less than or equal to n-2.

[0177] This application does not impose specific limitations on the values ​​of Tcal, n, and the preset idle time point mentioned above; developers and / or users can set them according to their actual needs.

[0178] In some embodiments, condition 1 includes: the terminal device 100 is in a non-idle state. In step S302, when the terminal device 100 is detected to be in an idle state, the AP of the terminal device 100 sends the i-th time calibration request to the NTP server 400 to perform NTP clock synchronization, and then performs standard timing T2 and timing T1_i. In step S307, when the terminal device 100 switches to a non-idle state, the AP ends the calibration process of the i-th stage, that is, it pauses standard timing T2 and stops timing T1_i. It can be understood that the calibration duration of each stage is determined based on the duration the terminal device 100 remains in an idle state, and the calibration duration of each stage may be unequal; the aforementioned value of n is not a fixed value.

[0179] Specifically, upon receiving the first time calibration response, the AP uses its clock, synchronized with the NTP server 400, to start standard timing T2 and instructs the LEO chip to perform the first stage of timing T1_1. When condition 1 is met, standard timing T2 is paused, and the LEO chip is instructed to stop the first stage of timing T1_1. Upon receiving the i-th time calibration response, the AP uses its clock, synchronized with the NTP server 400, to resume the standard timing T2 that was paused in the (i-1)-th stage and instructs the LEO chip to perform the i-th stage of timing T1_i. Here, i is incremented by 1 each time until the standard timing T2 reaches the preset total calibration duration Tcal.

[0180] In some embodiments, condition 1 includes: the calibration duration of this stage reaches Tcal / n, or the terminal device 100 is in a non-idle state. In step S302, during one or more preset idle time periods each day, if the terminal device 100 is detected to be in an idle state, the AP of the terminal device 100 sends the i-th time calibration request to the NTP server 400, and then sequentially performs the crystal oscillator calibration process of each stage; if the terminal device 100 is detected to switch to a non-idle state, or the calibration duration of this stage reaches Tcal / n, the AP of the terminal device 100 stops the calibration process of the current stage. For example, the preset idle time period can be a nighttime period, for example, from 0:00 to 6:00 AM. It is understood that the calibration duration of each stage in this embodiment may be unequal, and the above-mentioned n value is not a fixed value.

[0181] In some embodiments, if the AP of the terminal device 100 detects that the user has not used the terminal device 100 within a preset time period of 3, it determines that the terminal device 100 is in an idle state; otherwise, it determines that the terminal device 100 is in a non-idle state.

[0182] In some embodiments, if the AP of the terminal device 100 detects that the LEO chip has not started satellite communication service within a preset duration of 3, it determines that the terminal device 100 is in an idle state; otherwise, it determines that the terminal device 100 is in a non-idle state.

[0183] S312, the AP of the terminal device 100 sends a command to the LEO satellite chip to instruct the LEO satellite chip to report the timing.

[0184] S313, The LEO satellite chip of terminal device 100 reports timing T1_i to AP, where i ranges from 1 to n.

[0185] Steps S312 and S313 are optional. In some embodiments, the LEO satellite chip may also automatically feed back the timing T1_i of each calibration phase to the AP at the end of each calibration phase (i.e., when performing S311).

[0186] In some embodiments, the LEO satellite chip can also calculate the total timing duration T1 of the crystal oscillator's clock over n stages (i.e., ), and in step S103, report T1 to AP.

[0187] S314, the AP of the terminal device 100 determines the ppm1 of the calibrated crystal oscillator based on the time deviation of the total calibration time Tcal and the timing T1.

[0188] In some embodiments, the AP determines the time deviation between the total calibration duration Tcal of the NTP clock timing and the time deviation T1 of the crystal oscillator clock timing. After calibration, the ppm1 of the crystal oscillator is determined to be equal to

[0189] S315, the AP of terminal equipment 100 updates the ppm of the calibrated crystal oscillator based on ppm1 and historical ppm.

[0190] S316, AP sends the calibrated crystal oscillator ppm to the LEO satellite chip, instructing the LEO satellite chip to write the calibrated crystal oscillator ppm into configuration file 1.

[0191] The specific implementation of steps S315 and S316 can be found in the descriptions of steps S212 and S213, which will not be repeated here.

[0192] When the S317 and LEO satellite chips communicate with the LEO satellite 200, the crystal oscillator frequency offset is determined according to the ppm recorded in configuration file 1, and then the frequency offset is used for frequency offset compensation.

[0193] For details on the implementation of step S317, please refer to the description of step S109, which will not be repeated here.

[0194] Figure 4C In the illustrated process, during the n-stage calibration procedure, only one timer T2 is activated using the synchronized NTP clock. After the receive time calibration response in stage 1, timer T2 is started; when the pause condition (condition 1) is met, timer T2 is paused. In each subsequent stage, after the receive time calibration response, timer T2 is resumed; when the pause condition is met, timer T2 is paused again, until timer T2 reaches the total calibration duration Tcal.

[0195] In other embodiments, in each of the n-stage calibration process, a timer T2 is started using the synchronized NTP clock. After the receive time calibration response in the i-th stage, timer T2_i is started; timer T2_i is stopped when the pause condition is met. In step S311, the standard duration of the cumulative timing across the n stages (i.e., ...) When Tcal is reached, S312 is executed.

[0196] Figure 4C In the process shown, in each of the n-stage calibration process, a timer T1 is started using the crystal oscillator clock. That is, after the receiving time calibration response in the i-th stage, timer T2_i is started; timer T2_i is stopped when the pause condition is met.

[0197] In other embodiments, during the n-stage calibration process, only one timer T1 is activated using the crystal oscillator's clock. After the receive time calibration response in the first stage, timer T1 is started; when a pause condition is met, timer T1 is paused. In each subsequent stage, after the receive time calibration response, timer T1 resumes; when a pause condition is met, timer T1 is paused again. In step S315, the final value of T1 from the nth stage is used to calibrate the crystal oscillator's ppm, i.e., the calibrated crystal oscillator ppm1 is equal to (T1 - Tcal) / Tcal.

[0198] As mentioned above, the terminal device 100 can detect the downlink frequency offset based on the center frequency of the received satellite signal. This frequency offset includes the residual Doppler frequency offset fd after Doppler frequency offset compensation and the crystal oscillator frequency offset fxo caused by the crystal oscillator of the terminal device 100. The terminal device 100 cannot directly distinguish between the two components.

[0199] This application provides a crystal oscillator calibration method, which is applied to... Figure 2C The communication system shown is described. In this method, the Doppler frequency offset fd' can be estimated based on the position and ephemeris of the terminal device 100 obtained from another positioning satellite 500 (e.g., a GNSS satellite), and then the crystal oscillator frequency offset fxo' of the terminal device 100 can be estimated. Crystal oscillator calibration is then performed based on the crystal oscillator frequency offset fxo'. In this way, the ppm of the crystal oscillator can be accurately calibrated at low cost, thereby reducing the impact of crystal oscillator frequency offset on satellite communication.

[0200] For example, such as Figure 5A As shown, in the above crystal oscillator calibration method, the terminal device 100 includes a main system-on-chip (SoC), a LEO satellite chip, a GNSS receiver for a GNSS satellite, and a crystal oscillator (e.g., a TCXO). The main SoC includes an AP. Figure 5B As shown, the crystal oscillator calibration method may include some or all of steps S401 to S409.

[0201] S401, the AP of the terminal device 100 determines whether the crystal oscillator is aging; if so, the crystal oscillator calibration process is started, and subsequent steps S401 to S409 are executed.

[0202] Specifically, step S401 can be referred to the relevant description of step S101, and will not be repeated here.

[0203] S402, The AP of terminal device 100 instructs the GNSS receiver to send a GNSS positioning request, which is used to obtain the positioning information of terminal device 100.

[0204] S403, The GNSS receiver of the terminal device 100 sends positioning information to the AP. The positioning information is used to carry the position Loc of the terminal device 100 at time t.

[0205] Specifically, after step S402, the GNSS receiver sends a GNSS positioning request to the GNSS satellite; based on the GNSS positioning request, the GNSS satellite sends a GNSS positioning response to the GNSS receiver of the terminal device 100, the GNSS positioning response carrying the positioning information of the terminal device 100, such as the position Loc of the terminal device 100 at time t; the GNSS receiver sends the positioning information of the terminal device 100 to the AP.

[0206] In this embodiment of the application, the location Loc of the terminal device 100 can be obtained through GNSS satellites or through other means, and no specific limitation is made here.

[0207] S404, The LEO satellite chip of terminal device 100 sends the current ephemeris of LEO satellite 200 to AP.

[0208] In some embodiments, before step S404, the method further includes: the AP of the terminal device 100 sending an instruction to the LEO satellite chip to instruct the LEO satellite chip to obtain the current ephemeris of the LEO satellite 200; and the LEO satellite chip of the terminal device 100 sending a request to the LEO satellite 200 to obtain the current ephemeris of the LEO satellite 200.

[0209] Step S404 is optional. The current ephemeris of the LEO satellite 200 can also be obtained through other means, such as from the ground satellite station of the LEO satellite. This application embodiment does not specifically limit the method of obtaining the ephemeris of the LEO satellite 200.

[0210] S405, the AP of terminal device 100 determines the Doppler frequency offset fd' of time t based on the location Loc of terminal device 100 and the ephemeris of LEO satellite 200.

[0211] In some embodiments, based on the ephemeris of LEO satellite 200, the AP of terminal device 100 estimates the satellite observations (e.g., position vector, velocity vector) of LEO satellite 200 at time t: based on the above satellite observations and position Loc, the AP of terminal device 100 can determine the current Doppler frequency offset fd' of the downlink broadcast channel of LEO satellite 200.

[0212] In this embodiment, the terminal device 100 obtains the current ephemeris of the LEO satellite 200 before step S405. The specific time for obtaining the ephemeris is not limited here; for example, it can be obtained before step S401. In other embodiments, the AP of the terminal device 100 can also send the location (Loc) of the terminal device 100 to the LEO satellite chip, which then determines the Doppler frequency offset (fd') based on the location (Loc) and the ephemeris.

[0213] S406, the AP of the terminal device 100 sends time synchronization information to the LEO satellite chip to synchronize the clock of the crystal oscillator and the clock of the AP.

[0214] S407, the AP of terminal equipment 100 sends Doppler frequency offset fd' to the LEO satellite chip.

[0215] S408: The LEO satellite chip of terminal device 100 determines the downlink frequency offset fest of the downlink broadcast channel at time t based on the downlink signal of LEO satellite 200. In some embodiments, during the initial linking process with LEO satellite 200, terminal device 100 monitors the downlink signal broadcast by LEO satellite 200 and uses a frequency offset estimation algorithm to determine the downlink frequency offset fest of the downlink broadcast channel at time t based on the downlink signal. This application embodiment does not specifically limit the frequency offset estimation algorithm described above; for example, the frequency offset estimation algorithm can be the VV algorithm, MM algorithm, LR algorithm, Fitz algorithm, or FFT frequency offset estimation algorithm. In some embodiments, before step S408, the method of access point (AP) of terminal device 100 sends a command to the LEO satellite chip to instruct the LEO satellite chip to perform crystal oscillator calibration; based on the command, the LEO satellite chip executes steps S408 to S415.

[0216] S409, The LEO satellite chip of terminal device 100 determines the crystal oscillator frequency offset fxo' of terminal device 100 based on the downlink frequency offset fest and Doppler frequency offset fd', where fxo' = fest - fd'.

[0217] In some embodiments, the AP of the terminal device 100 may calculate one or more of the downlink frequency offset fd' and the crystal oscillator frequency offset fxo', without specific limitations here.

[0218] It is understandable that synchronizing the crystal oscillator clock and the AP clock in step S406 is beneficial for calculating the downlink frequency offset fest and Doppler frequency offset fd' at the same time t, and thus beneficial for obtaining the crystal oscillator frequency offset fxo' at the same time t.

[0219] The LEO satellite chip of S410 and terminal equipment 100 performs frequency offset compensation on the uplink signal based on the crystal oscillator frequency offset fxo' and sends the uplink signal to LEO satellite 200; the transmission frequency of the uplink signal after frequency offset compensation is the first frequency.

[0220] In some embodiments, the initial frequency of the uplink signal is f0, and frequency offset compensation is performed on the uplink signal based on the crystal oscillator frequency offset fxo'. After frequency offset compensation, the actual air interface frequency of the uplink signal is the first frequency, which is equal to f0-fest+2*fxo'.

[0221] It should be noted that the downlink frequency offset estimated by the LEO satellite chip is fest = fd + fxo, where fd is introduced by the Doppler frequency offset of the LEO satellite 200, and fxo is introduced by the crystal oscillator frequency offset. After estimating fd' based on the position and ephemeris of terminal device 100, fest - fd' can be used as an estimate of the crystal oscillator frequency offset (i.e., fxo'), and Δfxo = fxo' - fxo can be used as the estimation error of the crystal oscillator frequency offset. Considering the possible estimation error Δfxo of the crystal oscillator frequency offset, the uplink transmission frequency offset compensation value is set to -fest + 2 * fxo', -fest + 2 * fxo' = -(fd + fxo) + 2 * (Δfxo + fxo) = -fd + fxo + 2 * Δfxo. Therefore, it can be seen that the frequency deviation of the uplink signal transmission will introduce the estimation error Δfxo of the crystal oscillator frequency offset.

[0222] Due to the estimation error Δfxo, the terminal device 100 performs frequency offset compensation on the uplink signal based on the crystal oscillator frequency offset fxo' and transmits the uplink signal to the LEO satellite 200. The following two scenarios exist:

[0223] Scenario 1: If the frequency offset of the uplink signal is within the detectable range of LEO satellite 200, execute S411-S413.

[0224] It is understandable that if the estimation error Δfxo is small, then the above situation one will occur during the uplink access process. In this case, the terminal device 100 can normally access the LEO satellite 200. At this time, the ppm corresponding to fxo' can be used as the calibrated ppm.

[0225] S411, LEO satellite 200 sends a frequency offset correction signal to the LEO satellite chip of terminal device 100 to instruct the LEO satellite chip of terminal device 100 to perform frequency offset correction on the uplink signal; the frequency offset correction signal is determined based on the uplink signal sent by terminal device 100.

[0226] In some embodiments, the LEO satellite 200 determines the actual frequency offset fs of the uplink signal based on the actually received uplink signal; the LEO satellite 200 sends a frequency offset correction signal to the terminal device 100 to instruct the terminal device 100 to perform frequency offset correction on the first frequency of the uplink signal again according to the actual frequency offset fs.

[0227] S412. If, within a preset time period 4 after sending the uplink signal, the LEO satellite chip of the terminal device 100 receives the frequency offset correction signal fed back by the LEO satellite 200, then based on the aforementioned frequency offset correction signal, the first frequency of the uplink signal is corrected for frequency offset, and the device successfully accesses the LEO satellite 200 via the uplink signal.

[0228] S413, The LEO satellite chip of the terminal device 100 uses the ppm corresponding to the crystal oscillator frequency offset fxo' as the calibrated ppm1.

[0229] Scenario 2: The frequency offset of the uplink signal is not within the detectable range of LEO satellite 200, and terminal equipment 100 executes S414-S418.

[0230] It is understandable that if the estimation error Δfxo is large, the above situation two will occur during the uplink access process. In this case, the terminal device 100 cannot access the LEO satellite 200 normally. At this time, the ppm corresponding to fxo' cannot be used as the calibrated ppm. The terminal device 100 uses deltaf as the adjustment unit to adjust the transmission frequency of the uplink signal until it successfully accesses the LEO satellite 200.

[0231] S414. If the LEO satellite chip of the terminal device 100 does not receive the frequency offset correction signal fed back by the LEO satellite 200 within a preset time period 4 after the uplink signal is sent, the transmission frequency of the uplink signal is adjusted to the original frequency (i.e., frequency 1) plus the preset offset deltaf.

[0232] S415, the LEO satellite chip of terminal equipment 100 sends an uplink signal to LEO satellite 200 again.

[0233] S416, LEO satellite 200 sends a frequency offset correction signal to the LEO satellite chip of terminal device 100 to instruct the LEO satellite chip of terminal device 100 to perform frequency offset correction on the uplink signal; the frequency offset correction signal is determined based on the uplink signal sent by terminal device 100.

[0234] S417. If, within a preset time period of 4 after sending the uplink signal, the LEO satellite chip of the terminal device 100 receives the frequency offset correction signal fed back by the LEO satellite 200, then, based on the aforementioned frequency offset correction signal, the uplink signal is corrected for frequency offset, and the uplink access to the LEO satellite 200 is successfully achieved via the uplink signal; otherwise, return to execute S414.

[0235] S418. Based on the crystal oscillator frequency offset fxo' and the total offset K times deltaf adjusted by the LEO satellite chip, the LEO satellite chip determines the ppm1 corresponding to the calibrated crystal oscillator frequency offset; the calibrated crystal oscillator frequency offset is the crystal oscillator frequency offset fxo' plus K times deltaf.

[0236] When successfully uplinking to LEO satellite 200 via uplink signal, the uplink signal transmission frequency is the second frequency; the second frequency is equal to the first frequency, the total offset adjusted by the LEO satellite chip K times deltaf, and the actual frequency offset fs fed back by LEO, that is, K times deltaf = second frequency - first frequency - fs.

[0237] It is understandable that if no frequency offset correction signal is received from LEO satellite 200 within the preset time period of 4, the terminal device 100 adjusts the frequency offset of deltaf based on the original transmission frequency of the uplink signal (e.g., the first frequency) and retransmits the uplink signal at the newly corrected frequency. This process is repeated K times under S414 until a frequency offset correction signal is received from LEO satellite 200, and the device successfully accesses LEO satellite 200 based on this signal, where K is a positive integer greater than zero. Then, based on the second frequency, the first frequency, and fs, the total adjusted frequency offset (i.e., K times deltaf) is obtained and converted to the crystal oscillator frequency offset value. The converted crystal oscillator frequency offset fxo' = fxo' + K * deltaf. Finally, the ppm1 corresponding to fxo' is determined.

[0238] In some embodiments, in step S414, if the terminal device 100 does not receive the frequency offset correction signal from the LEO satellite 200 within a preset time period 4 after sending the uplink signal, the crystal oscillator frequency offset fxo' = fxo' + deltaf of the uplink signal is adjusted. In step S415, after frequency offset compensation of the uplink signal based on the adjusted crystal oscillator frequency offset fxo', the uplink signal is sent to the LEO satellite 200. In step S418, the ppm corresponding to the crystal oscillator frequency offset fxo' is used as the calibrated ppm1. It can be understood that after sending the uplink signal, if the frequency offset correction signal is not received from the LEO satellite 200, the crystal oscillator frequency offset fxo' is adjusted using deltaf as the adjustment unit, and the uplink signal is sent again; until the frequency offset correction signal is received from the LEO satellite 200 and the connection to the LEO satellite 200 is successfully established.

[0239] In some embodiments, in step S414, if the LEO satellite chip of terminal device 100 does not receive the frequency offset correction signal fed back by LEO satellite 200 within a preset time period 4 after the uplink signal is sent, terminal device 100 determines whether the adjusted offset (e.g., j*deltaf) exceeds the adjustment upper limit; if it does not exceed the adjustment upper limit, the transmission frequency of the uplink signal is adjusted to the original frequency point (i.e., frequency point 1) plus the preset offset deltaf; if it exceeds the adjustment upper limit, the process returns to step S402 to re-execute the crystal oscillator calibration process, including recalculating the downlink frequency offset fest, Doppler frequency offset fd', and crystal oscillator frequency offset fxo'.

[0240] The S419 and LEO satellite chips update the calibrated ppm based on the crystal oscillator's ppm1 and historical ppm.

[0241] The S420 and LEO satellite chips write the calibrated ppm values ​​into configuration file 1.

[0242] When the S421 LEO satellite chip communicates with the LEO satellite 200, it determines the crystal oscillator frequency offset according to the ppm recorded in configuration file 1, and then uses the crystal oscillator frequency offset to perform frequency offset compensation.

[0243] For the specific implementation of steps S419 to S421, please refer to the relevant descriptions of steps S107 to S109, which will not be repeated here.

[0244] This application also provides a crystal oscillator calibration method, such as Figure 6 As shown, the method includes steps S1 to S5. For specific implementation details of steps S1-S5, please refer to... Figure 5B Related descriptions.

[0245] S1. The terminal equipment determines the downlink frequency offset (FES) based on the downlink signal from the first satellite.

[0246] S2. The terminal equipment determines the Doppler frequency offset fd' based on the ephemeris of the first satellite and the position of the terminal equipment.

[0247] S3. The terminal equipment determines the crystal oscillator frequency offset fxo' based on the downlink frequency offset fest and the Doppler frequency offset fd'.

[0248] S4. The terminal device performs frequency offset compensation on the uplink signal based on the crystal oscillator frequency offset fxo' and sends the uplink signal to the first satellite. This uplink signal is used for uplink access to the first satellite.

[0249] S5. When the first condition is met, determine the ppm corresponding to the crystal oscillator frequency offset fxo' as the first ppm of the calibrated crystal oscillator; the first condition includes: the terminal equipment normally accesses the first satellite via uplink. The first ppm can be referred to as ppm1.

[0250] In one implementation, the method further includes: the terminal device determining whether the crystal oscillator is aging; the terminal device determining the downlink frequency offset fest based on the downlink signal of the first satellite, including: if the crystal oscillator is determined to be aging, the terminal device determining the downlink frequency offset fest based on the downlink signal of the first satellite.

[0251] In one implementation, determining crystal oscillator aging includes: determining crystal oscillator aging if the time difference between the current moment and the most recent calibration time of the crystal oscillator's ppm is greater than or equal to a first duration. The first duration can also be referred to as a preset duration of 1.

[0252] In one implementation, the method further includes: writing the ppm of the calibrated crystal oscillator into a first configuration file; and when the terminal device communicates with the first satellite, performing frequency offset compensation based on the ppm recorded in the first configuration file. The first configuration file can also be referred to as configuration file 1.

[0253] In one implementation, the first satellite is a low-Earth orbit (LEO) satellite, and the first configuration file is stored in the non-volatile memory of the LEO satellite chip.

[0254] In one implementation, the method further includes: obtaining a second ppm from the history recorded in the first configuration file; and updating the average of the first ppm and the second ppm to the ppm of the calibrated crystal oscillator. The second ppm may be referred to as ppm2.

[0255] In one implementation, the first condition further includes: receiving a frequency offset correction signal transmitted by the first satellite within a second duration of uplink signal transmission; the method further includes: if a frequency offset correction signal transmitted by the first satellite is received within the second duration of uplink signal transmission, the terminal device performs frequency offset correction on the uplink signal based on the frequency offset correction signal and successfully accesses the first satellite via uplink. The second duration can be referred to as the preset duration 4.

[0256] In one implementation, the method further includes: if no frequency offset correction signal is received from the first satellite within a second time period of uplink signal transmission, adjusting the frequency of the uplink signal using a first value as an adjustment unit, and then retransmitting the uplink signal. The first value can be referred to as a preset offset deltaf.

[0257] In one implementation, the frequency offset correction signal indicates the frequency offset correction value of the uplink signal; frequency offset compensation of the uplink signal is performed based on the crystal oscillator frequency offset fxo'; when the uplink signal is sent to the first satellite, the transmission frequency of the uplink signal is the first frequency; when the terminal device successfully accesses the first satellite via uplink, the transmission frequency of the uplink signal is the second frequency; the second frequency minus the first frequency and the frequency offset correction value equals K times the first value, where K is a positive integer greater than zero; before determining that the ppm corresponding to the crystal oscillator frequency offset fxo' is the first ppm of the calibrated crystal oscillator, the method further includes: adjusting the crystal oscillator frequency offset fxo' to be equal to fxo' plus K times the first value.

[0258] In one implementation, the method further includes: if no frequency offset correction signal is received from the first satellite during the second time period of uplink signal transmission, the crystal oscillator frequency offset fxo' is adjusted using a first value as the adjustment unit, where the crystal oscillator frequency offset fxo' is equal to fxo' plus the first value; and the uplink signal is again frequency offset compensated based on the crystal oscillator frequency offset fxo', and the uplink signal is transmitted to the first satellite.

[0259] This application also provides a crystal oscillator calibration method, which includes steps A1 to A4. Specific implementations of steps A1-A4 can be found in [reference needed]. Figure 4C Related descriptions.

[0260] A1. The terminal device sends a time calibration request to the NTP server. The time calibration request is used to synchronize the clock with the NTP server.

[0261] A2. The terminal device receives the time calibration response sent by the NTP server.

[0262] A3. Based on the time calibration response, the terminal device uses the clock synchronized with the NTP server to perform standard timing T2, and uses the crystal oscillator clock to perform timing T1.

[0263] A4. Based on the time deviation between standard timing T2 and timing T1, determine the first ppm of the calibrated crystal oscillator. This first ppm can be referred to as ppm1.

[0264] In one implementation, the method further includes: the terminal device determining whether the crystal oscillator is aging; the terminal device sending a time calibration request to the NTP server, including: if it is determined that the crystal oscillator is aging, the terminal device sending a time calibration request to the NTP server.

[0265] In one implementation, determining crystal oscillator aging includes: determining crystal oscillator aging if the time difference between the current moment and the most recent calibration time of the crystal oscillator's ppm is greater than or equal to a first duration. The first duration can also be referred to as a preset duration of 1.

[0266] In one implementation, the method further includes: writing the ppm of the calibrated crystal oscillator into a first configuration file; and when the terminal device communicates with the first satellite, performing frequency offset compensation based on the ppm recorded in the first configuration file. The first configuration file can also be referred to as configuration file 1.

[0267] In one implementation, the first satellite is a low-Earth orbit (LEO) satellite, and the first configuration file is stored in the non-volatile memory of the LEO satellite chip.

[0268] In one implementation, the method further includes: obtaining a second ppm from the history recorded in the first configuration file; and updating the average of the first ppm and the second ppm to the ppm of the calibrated crystal oscillator. The second ppm may be referred to as ppm2.

[0269] In one implementation, determining the first ppm of the calibrated crystal oscillator based on the time deviation between standard timing T2 and timing T1 includes: determining that the first ppm of the calibrated crystal oscillator is equal to (T1-T2) / T2.

[0270] In one implementation, the method further includes: terminating standard timing T2 and timing T1 when the cumulative standard timing T2 reaches a preset total calibration time Tcal; the above-mentioned determination of the first ppm of the calibrated crystal oscillator based on the time deviation between standard timing T2 and timing T1 includes: determining that the first ppm of the calibrated crystal oscillator is equal to (T1-Tcal) / Tcal based on the time deviation between standard timing T2 and timing T1.

[0271] In one implementation, the terminal device sending a time calibration request to the NTP server includes: when a second condition is met, the terminal device sends a time calibration request for the i-th stage to the NTP server; the terminal device receiving a time calibration response from the NTP server includes: the terminal device receiving a time calibration response for the i-th stage from the NTP server; the terminal device using a clock synchronized with the NTP server to perform standard timing T2 and using the crystal oscillator clock to perform timing T1 based on the time calibration response for the i-th stage includes: based on the time calibration response for the i-th stage, the terminal device using a clock synchronized with the NTP server to perform standard timing T2 for the i-th stage and using the crystal oscillator clock to perform timing T1 for the i-th stage; i is a positive integer less than or equal to n; the method further includes: when a third condition is met, stopping the standard timing T2 for the i-th stage and stopping the timing T1 for the i-th stage; the determination of the first ppm of the calibrated crystal oscillator based on the time deviation between the standard timing T2 and the timing T1 for the n stages includes: determining the first ppm of the calibrated crystal oscillator based on the time deviation between the cumulative standard timing T2 and the cumulative timing T1 for the n stages.

[0272] In one implementation, the second condition includes: the current time is within a preset idle time, and the third condition includes: the standard time T2 in the i-th stage increases by Tcal / n; or, the second condition includes: the terminal device is currently in an idle state, and the third condition includes: the terminal device switches to a non-idle state.

[0273] In one implementation, the terminal device includes an application processor (AP) and a LEO satellite chip; the terminal device performs standard timing T2 using a clock synchronized with the NTP server and performs timing T1 using a crystal oscillator clock, including: the AP of the terminal device performs standard timing T2 using a clock synchronized with the NTP server and instructs the LEO satellite chip to perform timing T1 using a crystal oscillator clock.

[0274] In one implementation, the terminal device includes an application processor (AP) and a LEO satellite chip; when the standard timing T2 accumulates to a preset total calibration time Tcal, the standard timing T2 and timing T1 are terminated, including: when the standard timing T2 accumulates to the preset total calibration time Tcal, the AP of the terminal device terminates the standard timing T2 and instructs the LEO satellite chip to terminate the clock timing T1 of the crystal oscillator.

[0275] This application also provides a crystal oscillator calibration method, the method comprising steps B1 to B4. Specific implementations of steps B1 to B4 can be found in [reference needed]. Figure 3B Related descriptions.

[0276] B1. After the terminal equipment synchronizes with the second satellite time, it outputs a pulse per second (1pps) signal and uses the crystal oscillator clock to start timing T1.

[0277] B2. When N consecutive 1pps signals are output, stop timing T1.

[0278] B3. Based on the above N consecutive 1pps signals and the time deviation of timing T1, determine the first accuracy ppm of the calibrated crystal oscillator. This first ppm can be referred to as ppm1.

[0279] In one implementation, the method further includes: the terminal device determining whether the crystal oscillator is aging; after the terminal device synchronizes with the second satellite time, it outputs a 1pps signal and starts timing T1 using the crystal oscillator clock, including: when it is determined that the crystal oscillator is aging, after the terminal device synchronizes with the second satellite time, it outputs a 1pps signal and starts timing T1 using the crystal oscillator clock.

[0280] In one implementation, determining crystal oscillator aging includes: determining crystal oscillator aging if the time difference between the current moment and the most recent calibration time of the crystal oscillator's ppm is greater than or equal to a first duration. The first duration can also be referred to as a preset duration of 1.

[0281] In one implementation, the method further includes: writing the ppm of the calibrated crystal oscillator into a first configuration file; and when the terminal device communicates with the first satellite, performing frequency offset compensation based on the ppm recorded in the first configuration file. The first configuration file can also be referred to as configuration file 1.

[0282] In one implementation, the first satellite is a low-Earth orbit (LEO) satellite, and the first configuration file is stored in the non-volatile memory of the LEO satellite chip.

[0283] In one implementation, the method further includes: obtaining a second ppm from the history recorded in the first configuration file; and updating the average of the first ppm and the second ppm to the ppm of the calibrated crystal oscillator. The second ppm may be referred to as ppm2.

[0284] In one implementation, determining the first precision ppm of the calibrated crystal oscillator based on the time deviation of N consecutive 1pps signals and timing T1 includes: the time deviation of the aforementioned N consecutive 1pps signals and timing T1 is T1-N, and the first ppm of the calibrated crystal oscillator is equal to (T1-N) / N.

[0285] In one implementation, the first satellite is an LEO satellite, the second satellite is a GNSS satellite, and the terminal device includes a GNSS receiver and an LEO satellite chip. The method further includes: the GNSS receiver requesting the GNSS satellite to perform GNSS positioning; after the terminal device synchronizes with the second satellite, it outputs a 1pps second pulse signal and starts timing T1 using the crystal oscillator clock, including: during the GNSS positioning process, after the GNSS receiver of the terminal device synchronizes with the second satellite, the GNSS receiver outputs a 1pps signal to the LEO satellite chip; when the LEO satellite chip receives the first 1pps signal output by the GNSS receiver, it obtains the first moment of the crystal oscillator clock corresponding to the output moment of the first 1pps signal, and starts timing T1 from the first moment using the crystal oscillator clock.

[0286] In one implementation, the method further includes: when the LEO satellite chip of the terminal device receives the Nth 1pps signal sent by the GNSS receiver, terminating the timing T1 of the crystal oscillator clock.

[0287] In one implementation, the method further includes: when GNSS positioning is stopped, the GNSS receiver stops outputting 1pps signals; when the LEO satellite chip detects that the GNSS receiver has stopped outputting 1pps signals, it terminates the clock of the crystal oscillator for timing T1, and determines that the GNSS receiver has currently output N consecutive 1pps signals.

[0288] The structure of a terminal device 100 provided in the embodiments of this application is described below. Figure 7 An exemplary structural schematic diagram of terminal device 100 is shown.

[0289] like Figure 7 As shown, the terminal device 100 may include: one or more processors 101 (e.g., CPU), memory 102, communication interface 103, receiver 105, transmitter 106, coupler 107, antenna 108, and device interface 109. These components can be connected via bus 104 or other means. Figure 7 Taking a bus connection as an example:

[0290] The communication interface 103 can be used by the terminal device 100 to communicate with other communication devices, such as satellite equipment. Specifically, the communication interface 103 can be a 5G communication interface or a future new air interface. Not limited to wireless communication interfaces, the terminal device 100 can also be configured with a wired communication interface 103, such as a local access network (LAN) interface. The transmitter 106 can be used to process the signals output by the processor 101. The receiver 105 can be used to process the mobile communication signals received by the antenna 108.

[0291] In some embodiments of this application, the transmitter 106 and receiver 105 can be considered as a wireless modem. In the terminal device 100, the number of transmitters 106 and receivers 105 can be one or more. The antenna 108 can be used to convert electromagnetic energy in a transmission line into electromagnetic waves in free space, or to convert electromagnetic waves in free space into electromagnetic energy in a transmission line. The coupler 107 is used to split the mobile communication signal received by the antenna 108 into multiple paths and distribute them to multiple receivers 105.

[0292] Apart from Figure 7 The transmitter 106 and receiver 105 shown may be accompanied by other communication components in the terminal device 100, such as a GPS module, a Bluetooth module, or a Wi-Fi module. Not limited to wireless communication, the terminal device 100 may also be configured with a wired network interface (such as a LAN interface) to support wired communication.

[0293] The terminal device 100 may also include an input / output module. The input / output module is used to enable interaction between the terminal device 100 and other devices / external environments, and may primarily include an audio input / output module, a button input module, and a display. Specifically, the input / output module may also include a camera, a touchscreen, and sensors, etc. All input / output modules communicate with the terminal device processor 101 through the device interface 109.

[0294] Memory 102 is coupled to processor 101 and is used to store various software programs and / or sets of instructions. Specifically, memory 102 may include high-speed random access memory and may also include non-volatile memory, such as one or more disk storage devices, flash memory devices, or other non-volatile solid-state storage devices. Memory 102 may store an operating system (hereinafter referred to as the system), such as an embedded operating system like Android, iOS, Windows, or Linux. Memory 102 may also store network communication programs that can be used to communicate with one or more additional devices, one or more terminal devices, or one or more network devices.

[0295] In some embodiments of this application, the memory 102 may be used to store the implementation program of the uplink synchronization method provided in one or more embodiments of this application on the terminal device 100 side. For the implementation of the uplink synchronization method provided in one or more embodiments of this application, please refer to the above embodiments.

[0296] The processor 101 can be used to read and execute computer-readable instructions. Specifically, the processor 101 can be used to call a program stored in the memory 102, such as the implementation program of the uplink synchronization method provided in one or more embodiments of this application on the terminal device 100 side, and execute the instructions contained in the program.

[0297] It should be noted that, Figure 7 The terminal device 100 shown is merely one implementation of the embodiments of this application. In actual applications, the terminal device 100 may include more or fewer components, which is not limited here.

[0298] The following describes the structure of a LEO satellite 200 provided in an embodiment of this application. Figure 8 The illustration shows the structure of a LEO satellite 200 provided in an embodiment of this application. The structures of other satellites can be referred to the relevant description of LEO satellite 200, and will not be repeated hereafter.

[0299] like Figure 8 As shown, the LEO satellite 200 may include: one or more processors 1001, a memory 1002, a communication interface 1003, a transmitter 1005, a receiver 1006, a coupler 1007, and an antenna 1008. These components can be connected via a bus 1004 or other means. Figure 8 Taking a bus connection as an example:

[0300] The communication interface 1003 can be used by the LEO satellite 200 to communicate with other communication devices, such as terminal device 100. Specifically, the communication interface 1003 can be a 3G communication interface, a 4G communication interface, a 5G communication interface, or a future New Radio (NR) communication interface. Not limited to wireless communication interfaces, the LEO satellite 200 can also be configured with a wired communication interface 1003, such as a local access network (LAN) interface. The transmitter 1005 can be used to process the signals output by the processor 1001. The receiver 1006 can be used to process the mobile communication signals received by the antenna 1008.

[0301] In some embodiments of this application, transmitter 1005 and receiver 1006 can be considered as a wireless modem. In the LEO satellite 200, the number of transmitters 1005 and receivers 1006 can be one or more. Antenna 1008 can be used to convert electromagnetic energy in a transmission line into electromagnetic waves in free space, or to convert electromagnetic waves in free space into electromagnetic energy in a transmission line. Coupler 1007 is used to split the mobile communication signal received by antenna 1008 into multiple paths and distribute them to multiple receivers 1006.

[0302] Memory 1002 is coupled to processor 1001 and is used to store various software programs and / or sets of instructions. Specifically, memory 1002 may include high-speed random access memory and may also include non-volatile memory, such as one or more disk storage devices, flash memory devices, or other non-volatile solid-state storage devices. Memory 1002 may store network communication programs that can be used to communicate with one or more auxiliary devices, one or more terminal devices, or one or more network devices.

[0303] In some embodiments of this application, the memory 1002 may be used to store the implementation program of the application distribution method provided in one or more embodiments of this application on the LEO satellite 200 side. For the implementation of the application distribution method provided in one or more embodiments of this application, please refer to the above embodiments.

[0304] The processor 1001 can be used to read and execute computer-readable instructions. Specifically, the processor 1001 can be used to invoke a program stored in the memory 1002, such as the implementation program of the application distribution method provided in one or more embodiments of this application on the LEO satellite 200 side, and execute the instructions contained in the program.

[0305] It should be noted that, Figure 8 The LEO satellite 200 shown is merely one implementation of the embodiments of this application. In actual applications, the LEO satellite 200 may include more or fewer components, which is not limited here.

[0306] For more details on the functions and working principles of the LEO satellite 200, please refer to the relevant content in the above embodiments, which will not be repeated here.

[0307] The following describes the structure of an NTP server 400 provided in an embodiment of this application. Figure 9 The illustration shows the structure of an NTP server 400 provided in an embodiment of this application. The structures of other satellites can be referred to the relevant description of the NTP server 400, and will not be repeated hereafter.

[0308] like Figure 9 As shown, the NTP server 400 may include: one or more processors 2001, memory 2002, communication interface 2003, transmitter 2005, receiver 2006, coupler 2007, and antenna 2008. These components can be connected via bus 2004 or other means. Figure 9 Taking a bus connection as an example:

[0309] The communication interface 2003 can be used by the NTP server 400 to communicate with other communication devices, such as terminal device 100. Specifically, the communication interface 2003 can be a 3G communication interface, a 4G communication interface, a 5G communication interface, or a future New Radio (NR) communication interface. Not limited to wireless communication interfaces, the NTP server 400 can also be configured with a wired communication interface 2003, such as a local access network (LAN) interface. The transmitter 2005 can be used to process the signals output by the processor 2001. The receiver 2006 can be used to process the mobile communication signals received by the antenna 2008.

[0310] In some embodiments of this application, the transmitter 2005 and receiver 2006 can be considered as a wireless modem. In the NTP server 400, the number of transmitters 2005 and receivers 2006 can be one or more. The antenna 2008 can be used to convert electromagnetic energy in a transmission line into electromagnetic waves in free space, or to convert electromagnetic waves in free space into electromagnetic energy in a transmission line. The coupler 2007 is used to split the mobile communication signal received by the antenna 2008 into multiple paths and distribute them to multiple receivers 2006.

[0311] Memory 2002 is coupled to processor 2001 and is used to store various software programs and / or sets of instructions. Specifically, memory 2002 may include high-speed random access memory and may also include non-volatile memory, such as one or more disk storage devices, flash memory devices, or other non-volatile solid-state storage devices. Memory 2002 may store network communication programs that can be used to communicate with one or more auxiliary devices, one or more terminal devices, or one or more network devices.

[0312] In some embodiments of this application, the memory 2002 may be used to store the implementation program of the application distribution method provided in one or more embodiments of this application on the NTP server 400 side. For the implementation of the application distribution method provided in one or more embodiments of this application, please refer to the above embodiments.

[0313] The processor 2001 can be used to read and execute computer-readable instructions. Specifically, the processor 2001 can be used to invoke a program stored in the memory 2002, such as the implementation program of the application distribution method provided in one or more embodiments of this application on the NTP server 400 side, and execute the instructions contained in the program.

[0314] It should be noted that, Figure 9 The NTP server 400 shown is merely one implementation of the embodiment of this application. In actual applications, the NTP server 400 may include more or fewer components, which is not limited here.

[0315] For more details on the functions and working principles of the NTP server 400, please refer to the relevant content in the above embodiments, which will not be repeated here.

[0316] The various embodiments of this application can be combined arbitrarily to achieve different technical effects. In the above embodiments, they can be implemented entirely or partially by software, hardware, firmware, or any combination thereof. When implemented using software, they can be implemented entirely or partially in the form of a computer program product. The computer program product includes one or more computer instructions. When the computer program instructions are loaded and executed on a computer, all or part of the processes or functions described in this application are generated. The computer can be a general-purpose computer, a special-purpose computer, a computer network, or other programmable device. The computer instructions can be stored in a computer-readable storage medium or transmitted from one computer-readable storage medium to another. For example, the computer instructions can be transmitted from one website, computer, server, or data center to another website, computer, server, or data center via wired (e.g., coaxial cable, fiber optic, digital subscriber line) or wireless (e.g., infrared, wireless, microwave, etc.) means. The computer-readable storage medium can be any available medium that a computer can access or a data storage device such as a server or data center that integrates one or more available media. The available media may be magnetic media (e.g., floppy disks, hard disks, magnetic tapes), optical media (e.g., DVDs), or semiconductor media (e.g., solid-state disks, SSDs), etc.

[0317] Those skilled in the art will understand that all or part of the processes in the methods of the above embodiments can be implemented by a computer program instructing related hardware. This program can be stored in a computer-readable storage medium, and when executed, it can include the processes described in the above method embodiments. The aforementioned storage medium includes various media capable of storing program code, such as ROM or random access memory (RAM), magnetic disks, or optical disks.

[0318] In summary, the above description is merely an embodiment of the technical solution of this application and is not intended to limit the scope of protection of this application. Any modifications, equivalent substitutions, improvements, etc., made based on the disclosure of this application should be included within the scope of protection of this application.

Claims

1. A crystal oscillator calibration method, characterized in that, The method includes: The terminal equipment determines the downlink frequency offset (FES) based on the downlink signal from the first satellite. The terminal device determines the Doppler frequency offset fd' based on the ephemeris of the first satellite and the position of the terminal device. The terminal device determines the crystal oscillator frequency offset fxo' based on the downlink frequency offset fest and the Doppler frequency offset fd'; The terminal device performs frequency offset compensation on the uplink signal based on the crystal oscillator frequency offset fxo' and sends the uplink signal to the first satellite. When the first condition is met, the accuracy ppm corresponding to the crystal oscillator frequency offset fxo' is determined to be the first ppm of the calibrated crystal oscillator; The first condition includes: the terminal device normally accessing the first satellite via uplink.

2. The method according to claim 1, characterized in that, The method further includes: The terminal device determines whether the crystal oscillator is aging; The terminal device determines the downlink frequency offset FES based on the downlink signal from the first satellite, including: If the crystal oscillator is determined to be aging, the terminal device determines the downlink frequency offset fest based on the downlink signal from the first satellite.

3. The method according to claim 2, characterized in that, The determination of the crystal oscillator aging includes: If the time difference between the current moment and the most recent calibration time of the crystal oscillator's ppm is greater than or equal to a first duration, the crystal oscillator is determined to be aged.

4. The method according to claim 1, characterized in that, The method further includes: Write the ppm value of the calibrated crystal oscillator into the first configuration file; When the terminal device communicates with the first satellite, it performs frequency offset compensation based on the ppm recorded in the first configuration file.

5. The method according to claim 4, characterized in that, The first satellite is a low-Earth orbit (LEO) satellite, and the first configuration file is stored in the non-volatile memory of the LEO satellite chip.

6. The method according to claim 4, characterized in that, The method further includes: Retrieve the second ppm of the history recorded in the first configuration file; The average of the first ppm and the second ppm is updated to the ppm of the calibrated crystal oscillator.

7. The method according to claim 1, characterized in that, The first condition further includes: receiving a frequency offset correction signal transmitted by the first satellite within the second duration of transmitting the uplink signal; The method further includes: If a frequency offset correction signal is received from the first satellite within the second duration of uplink signal transmission, the terminal device performs frequency offset correction on the uplink signal based on the frequency offset correction signal and successfully accesses the first satellite via uplink.

8. The method according to any one of claims 1 to 7, characterized in that, The method further includes: If the frequency offset correction signal sent by the first satellite is not received within the second time period of uplink signal transmission, the frequency of the uplink signal is adjusted using the first value as the adjustment unit, and the uplink signal is transmitted again.

9. The method according to claim 8, characterized in that, The frequency offset correction signal indicates the frequency offset correction value of the uplink signal; when the uplink signal is compensated for based on the crystal oscillator frequency offset fxo' and sent to the first satellite, the transmission frequency of the uplink signal is the first frequency; When the terminal device successfully accesses the first satellite via uplink, the transmission frequency of the uplink signal is the second frequency, and the second frequency minus the first frequency and the frequency offset correction value equals K times the first value, where K is a positive integer greater than zero. Before determining that the ppm corresponding to the crystal oscillator frequency offset fxo' is the first ppm of the calibrated crystal oscillator, the method further includes: adjusting the crystal oscillator frequency offset fxo' to be equal to fxo' plus the first value of K times.

10. The method according to any one of claims 1 to 7, characterized in that, The method further includes: If the frequency offset correction signal sent by the first satellite is not received within the second time period of sending the uplink signal, the frequency offset fxo' of the crystal oscillator is adjusted by the first value as the adjustment unit, and the frequency offset fxo' of the crystal oscillator is equal to fxo' plus the first value; Then, based on the crystal oscillator frequency offset fxo', the uplink signal is compensated for frequency offset again, and the uplink signal is sent to the first satellite.

11. A crystal oscillator calibration method, characterized in that, The method includes: The terminal device sends a time calibration request to the NTP server, the time calibration request being used to synchronize the clock with the NTP server; The terminal device receives a time calibration response sent by the NTP server. Based on the time calibration response, the terminal device uses a clock synchronized with the NTP server to perform standard timing T2, and uses the crystal oscillator clock to perform timing T1; Based on the time deviation between the standard timing T2 and the timing T1, the first accuracy (ppm) of the calibrated crystal oscillator is determined.

12. The method according to claim 11, characterized in that, The method further includes: The terminal device determines whether the crystal oscillator is aging; The terminal device sends a time calibration request to the NTP server, including: If the crystal oscillator is determined to be aging, the terminal device sends the time calibration request to the NTP server.

13. The method according to claim 12, characterized in that, The determination of the crystal oscillator aging includes: If the time difference between the current moment and the most recent calibration time of the crystal oscillator's ppm is greater than or equal to a first duration, the crystal oscillator is determined to be aged.

14. The method according to claim 11, characterized in that, The method further includes: Write the ppm value of the calibrated crystal oscillator into the first configuration file; When the terminal device communicates with the first satellite, it performs frequency offset compensation based on the ppm recorded in the first configuration file.

15. The method according to claim 4, characterized in that, The first satellite is a low-Earth orbit (LEO) satellite, and the first configuration file is stored in the non-volatile memory of the LEO satellite chip.

16. The method according to claim 14 or 15, characterized in that, The method further includes: Obtain the second ppm of the history recorded in the first configuration file; The average of the first ppm and the second ppm is updated to the ppm of the calibrated crystal oscillator.

17. The method according to claim 11, characterized in that, The step of determining the first ppm of the calibrated crystal oscillator based on the time deviation between the standard timing T2 and timing T1 includes: determining that the first ppm of the calibrated crystal oscillator is equal to (T1-T2) / T2.

18. The method according to claim 17, characterized in that, The method further includes: When the cumulative standard time T2 reaches the preset total calibration time Tcal, the standard time T2 and the time T1 are terminated. Determining the first ppm of the calibrated crystal oscillator based on the time deviation between the standard timing T2 and the timing T1 includes: Based on the time deviation between the standard timing T2 and the timing T1, the first ppm of the calibrated crystal oscillator is determined to be equal to (T1-Tcal) / Tcal.

19. The method according to any one of claims 11 to 18, characterized in that, The terminal device sending a time calibration request to the NTP server includes: when the second condition is met, the terminal device sending a time calibration request for the i-th stage to the NTP server; The terminal device receiving the time calibration response sent by the NTP server includes: the terminal device receiving the time calibration response of the i-th stage sent by the NTP server; Based on the time calibration response, the terminal device uses a clock synchronized with the NTP server to perform standard timing T2, and uses a crystal oscillator to perform timing T1, including: Based on the time calibration response of the i-th stage, the terminal device uses the clock synchronized with the NTP server to perform standard timing T2 for the i-th stage, and uses the crystal oscillator clock to perform timing T1 for the i-th stage; i is a positive integer less than or equal to n. The method further includes: stopping the standard timing T2 of the i-th stage and stopping the timing T1 of the i-th stage when the third condition is met; Determining the first ppm of the calibrated crystal oscillator based on the time deviation between the standard timing T2 and the timing T1 includes: Based on the time deviation of the standard timing T2 accumulated over n stages and the timing T1 accumulated over n stages, the first ppm of the calibrated crystal oscillator is determined.

20. The method according to claim 19, characterized in that, The second condition includes: the current time is within a preset idle time; the third condition includes: the standard time T2 in the i-th stage increases by Tcal / n. Alternatively, the second condition includes: the terminal device is currently in an idle state, and the third condition includes: the terminal device switches to a non-idle state.

21. The method according to any one of claims 11 to 18, characterized in that, The terminal device includes an application processor (AP) and a LEO satellite chip; The terminal device uses a clock synchronized with the NTP server for standard timing T2, and uses a crystal oscillator for timing T1, including: The AP of the terminal device uses a clock synchronized with the NTP server to perform standard timing T2, and instructs the LEO satellite chip to use the clock of the crystal oscillator to perform timing T1.

22. The method according to any one of claims 11 to 21, characterized in that, The terminal device includes an application processor (AP) and a LEO satellite chip; When the cumulative standard timing T2 reaches the preset total calibration time Tcal, standard timing T2 and timing T1 are terminated, including: When the standard timing T2 accumulates to the preset total calibration time Tcal, the AP of the terminal device terminates the standard timing T2 and instructs the LEO satellite chip to terminate the clock timing T1 of the crystal oscillator.

23. A terminal device, characterized in that, include: A processor and a memory, the memory being coupled to the processor, the memory being used to store computer program code, the computer program code including computer instructions, which, when the processor reads from the memory, cause the terminal device to perform the crystal oscillator calibration method as described in claims 1-10 or 11-22.

24. A computer-readable storage medium, characterized in that, Includes computer instructions that, when executed on a terminal device, cause the terminal device to perform the crystal oscillator calibration method as described in claims 1-10 or 11-22.