Frequency offset compensation and calibration method and apparatus, and storage medium
A method for compensating for and calibrating a frequency offset is performed by a terminal, and includes: compensating or precompensating a target frequency according to a downlink frequency offset; obtaining an uplink residual frequency offset sent by a network device, the uplink residual frequency offset corresponding to an uplink signal sent by the terminal; and calibrating a compensation frequency or a precompensation frequency for the target frequency according to the uplink residual frequency offset.
1 . A method for compensating for and calibrating a frequency offset, performed by a terminal and comprising:
compensating or precompensating a target frequency according to a downlink frequency offset, wherein the downlink frequency offset is determined by the terminal based on a phase difference of different downlink signals and a time difference of downlink signals received;
obtaining an uplink residual frequency offset sent by a network device, the uplink residual frequency offset corresponding to an uplink signal sent by the terminal, wherein the uplink residual frequency offset is determined by the network device after receiving the uplink signal transmitted by the terminal based on a precompensated uplink frequency; and
calibrating a compensation frequency or a precompensation frequency for the target frequency according to the uplink residual frequency offset.
2 . The method according to claim 1 , wherein the target frequency comprises at least one of an uplink frequency or a downlink frequency; and
wherein compensating or precompensating the target frequency according to the downlink frequency offset comprises at least one of:
determining a first factor according to the downlink frequency and the uplink frequency, and determining the precompensation frequency for precompensating the uplink frequency according to the first factor and the downlink frequency offset; or
determining the downlink frequency offset as the compensation frequency for compensating the downlink frequency.
3 . The method according to claim 2 , wherein calibrating the compensation frequency or the precompensation frequency for the target frequency according to the uplink residual frequency offset comprises at least one of:
determining the uplink residual frequency as a first correction value for calibrating the precompensation frequency for the uplink frequency; or
determining a second factor according to the downlink frequency and the uplink frequency, and determining a second correction value for calibrating the compensation frequency for the downlink frequency according to the second factor and the uplink residual frequency offset.
4 . The method according to claim 1 , further comprising at least one of: obtaining a target time period corresponding to the uplink residual frequency offset from the network device, or determining the target time period corresponding to the uplink residual frequency offset according to a predetermined setting;
wherein calibrating the compensation frequency or the precompensation frequency for the target frequency according to the uplink residual frequency offset comprises:
calibrating, within the target time period, the compensation frequency or the precompensation frequency for the target frequency according to the uplink residual frequency offset.
5 . The method according to claim 4 , further comprising:
compensating or precompensating, within the target time period, the target frequency with the compensation frequency calibrated or the precompensation frequency calibrated.
6 . The method according to claim 1 , further comprising:
communicating with the network device based on the target frequency compensated or precompensated in response to compensating or precompensating the target frequency every time.
7 . The method according to claim 4 , further comprising:
calibrating the compensation frequency or the precompensation frequency for the target frequency with the uplink residual frequency offset;
determining the frequency offset calibrated as a new frequency offset; and
repeating the compensating or precompensating the target frequency according to the downlink frequency offset.
8 . A method for compensating for and calibrating a frequency offset, performed by a network device and comprising:
determining an uplink residual frequency offset corresponding to an uplink signal in response to detecting the uplink signal sent by a terminal, wherein the uplink residual frequency offset is determined by the network device after receiving the uplink signal transmitted by the terminal based on a precompensated uplink frequency; and
sending the uplink residual frequency offset to the terminal, wherein the terminal calibrates a compensation frequency or a precompensation frequency for a target frequency according to the uplink residual frequency offset, wherein the terminal compensates or precompensates the target frequency according to a downlink frequency offset, and the downlink frequency offset is determined by the terminal based on a phase difference of different downlink signals and a time difference of the downlink signals received.
9 . The method according to claim 8 , further comprising:
sending a target time period corresponding to the uplink residual frequency offset to the terminal.
10 . A non-transitory computer-readable storage medium having stored therein computer programs that, when executed by a processor, cause the processor to perform the method according to claim 1 .
11 . A non-transitory computer-readable storage medium having stored therein computer programs that, when executed by a processor, cause the processor to perform the method according to claim 8 .
12 . A terminal, comprising:
a processor; and
a memory for storing instructions executable by the processor;
wherein the processor is configured to perform:
compensating or precompensating a target frequency according to a downlink frequency offset, wherein the downlink frequency offset is determined by the terminal based on a phase difference of different downlink signals and a time difference of downlink signals received;
obtaining an uplink residual frequency offset sent by a network device, the uplink residual frequency offset corresponding to an uplink signal sent by the terminal, wherein the uplink residual frequency offset is determined by the network device after receiving the uplink signal transmitted by the terminal based on a precompensated uplink frequency; and
calibrating a compensation frequency or a precompensation frequency for the target frequency according to the uplink residual frequency offset.
13 . A network device, comprising:
a processor; and
a memory for storing instructions executable by the processor;
wherein the processor is configured to perform the method of claim 8 .
14 . The terminal according to claim 12 , wherein the target frequency comprises at least one of an uplink frequency or a downlink frequency; and
wherein the processor is further configured to perform at least one of:
determining a first factor according to the downlink frequency and the uplink frequency, and determining the precompensation frequency for precompensating the uplink frequency according to the first factor and the downlink frequency offset; or
determining the downlink frequency offset as the compensation frequency for compensating the downlink frequency.
15 . The terminal according to claim 14 , wherein the processor is further configured to perform at least one of:
determining the uplink residual frequency as a first correction value for calibrating the precompensation frequency for the uplink frequency; or
determining a second factor according to the downlink frequency and the uplink frequency, and determining a second correction value for calibrating the compensation frequency for the downlink frequency according to the second factor and the uplink residual frequency offset.
16 . The terminal according to claim 12 , wherein the processor is further configured to perform:
at least one of obtaining a target time period corresponding to the uplink residual frequency offset from the network device, or determining the target time period corresponding to the uplink residual frequency offset according to a predetermined setting; and
calibrating, within the target time period, the compensation frequency or the precompensation frequency for the target frequency according to the uplink residual frequency offset.
17 . The terminal according to claim 16 , wherein the processor is further configured to perform:
compensating or precompensating, within the target time period, the target frequency with the compensation frequency calibrated or the precompensation frequency calibrated.
18 . The terminal according to claim 12 , wherein the processor is further configured to perform:
communicating with the network device based on the target frequency compensated or precompensated in response to compensating or precompensating the target frequency every time.
19 . The terminal according to claim 16 , wherein the processor is further configured to perform:
calibrating the compensation frequency or the precompensation frequency for the target frequency with the uplink residual frequency offset;
determining the frequency offset calibrated as a new frequency offset; and
repeating the compensating or precompensating the target frequency according to the downlink frequency offset.