Method and apparatus for calibrating signal, communication device and storage medium
In a method for calibrating a signal, a calibration parameter corresponding to a signal having a preset bandwidth is obtained and a calibrated signal is obtained by calibrating, based on a frequency of a signal to be calibrated and the calibration parameter, the signal to be calibrated.
1 . A method for calibrating a signal, comprising:
obtaining a calibration parameter corresponding to a signal having a preset bandwidth;
determining a first frequency corresponding to the signal having the preset bandwidth, wherein the first frequency is used in performing a frequency conversion on the signal having the preset bandwidth;
determining a first sampling rate corresponding to the signal having the preset bandwidth, wherein the first sampling rate is used for sampling a frequency-converted signal obtained by performing the frequency conversion on the signal having the preset bandwidth; and
obtaining a calibrated signal by calibrating, using the calibration parameter, a frequency deviation between the first frequency and a frequency of a signal to be calibrated, the first sampling rate, and a second sampling rate, the signal to be calibrated, wherein the second sampling rate corresponds to the signal to be calibrated;
wherein obtaining a calibrated signal by calibrating, using the calibration parameter, a frequency deviation between the first frequency and a frequency of a signal to be calibrated, the first sampling rate, and a second sampling rate, the signal to be calibrate comprises:
obtaining an intermediate calibration parameter by adjusting, based on the frequency deviation and the first sampling rate, the calibration parameter;
obtaining a target calibration parameter by adjusting, using the frequency deviation and the second sampling rate, the intermediate calibration parameter; and
obtaining the calibrated signal by calibrating, using the target calibration parameter, the signal to be calibrated.
2 . The method of claim 1 , wherein the obtaining the calibration parameter corresponding to the signal having the preset bandwidth comprises:
determining a first signal by performing a frequency conversion on the signal having the preset bandwidth;
obtaining a first digital signal by sampling the first signal; and
determining the calibration parameter based on the first digital signal and the signal having the preset bandwidth.
3 . The method of claim 2 , wherein the determining the first signal by performing the frequency conversion on the signal having the preset bandwidth comprises:
obtaining a first sub-signal by performing the frequency conversion on the signal having the preset bandwidth; and
obtaining the first signal by performing a frequency mixing operation on the first sub-signal.
4 . The method of claim 2 , wherein the performing the frequency conversion on the signal having the preset bandwidth comprises one of:
performing, with the first frequency, an up conversion on the signal having the preset bandwidth, in response to the signal having the preset bandwidth being a transmitting signal; or
performing, with the first frequency, a down conversion on the signal having the preset bandwidth, in response to the signal having the preset bandwidth being a receiving signal.
5 . The method of claim 1 , further comprising:
obtaining a second signal, and obtaining a second sub-signal by performing a frequency conversion on the second signal;
obtaining a second processed signal by performing a frequency mixing operation on the second sub-signal; and
obtaining the signal to be calibrated by sampling the second processed signal at the second sampling rate, wherein the second signal has a bandwidth less than or equal to the preset bandwidth.
6 . The method of claim 5 , wherein the second signal satisfies a following condition:
f
0
-
BW
cal
/
2
≤
f
1
±
BW
/
2
≤
f
0
+
BW
cal
/
2
,
wherein f1 denotes a frequency of the frequency conversion performed on the second signal, BW denotes a bandwidth of the second signal, f0 denotes a frequency of the frequency conversion performed on the signal having the preset bandwidth, and BW cal denotes the preset bandwidth.
7 . The method of claim 1 , wherein the preset bandwidth satisfies one of:
the preset bandwidth comprising 400 Mhz;
the preset bandwidth comprising 200 Mhz;
the preset bandwidth being greater than or equal to 200 Mhz and less than or equal to 400 Mhz; or
the preset bandwidth occupying an entire used frequency band.
8 . An electronic device, comprising a processor and a memory having instructions stored thereon, wherein when the instructions are executed by the processor, the processor is configured to:
obtain a calibration parameter corresponding to a signal having a preset bandwidth;
determine a first frequency corresponding to the signal having the preset bandwidth, wherein the first frequency is used in performing a frequency conversion on the signal having the preset bandwidth;
determine a first sampling rate corresponding to the signal having the preset bandwidth, wherein the first sampling rate is used for sampling a frequency-converted signal obtained by performing the frequency conversion on the signal having the preset bandwidth; and
obtain a calibrated signal by calibrating, using the calibration parameter, a frequency deviation between the first frequency and a frequency of the signal to be calibrated, the first sampling rate, and a second sampling rate, the signal to be calibrated;
wherein the second sampling rate corresponds to the signal to be calibrated; and
obtain an intermediate calibration parameter by adjusting, based on the frequency deviation and the first sampling rate, the calibration parameter;
obtain a target calibration parameter by adjusting, using the frequency deviation and the second sampling rate, the intermediate calibration parameter; and
obtain the calibrated signal by calibrating, using the target calibration parameter, the signal to be calibrated.
9 . The electronic device of claim 8 , wherein the processor is configured to:
determine a first signal by performing a frequency conversion on the signal having the preset bandwidth;
obtain a first digital signal by sampling the first signal; and
determine the calibration parameter based on the first digital signal and the signal having the preset bandwidth.
10 . The electronic device of claim 9 , wherein the processor is configured to:
obtain a first sub-signal by performing the frequency conversion on the signal having the preset bandwidth; and
obtain the first signal by performing a frequency mixing operation on the first sub-signal.
11 . The electronic device of claim 9 , wherein the processor is configured to perform one of:
performing, with the first frequency, an up conversion on the signal having the preset bandwidth, in response to the signal having the preset bandwidth being a transmitting signal; or
performing, with the first frequency, a down conversion on the signal having the preset bandwidth, in response to the signal having the preset bandwidth being a receiving signal.
12 . The electronic device of claim 8 , wherein the processor is further configured to:
obtain a second signal, and obtain a second sub-signal by performing a frequency conversion on the second signal;
obtain a second processed signal by performing a frequency mixing operation on the second sub-signal; and
obtain the signal to be calibrated by sampling the second processed signal at the second sampling rate, wherein the second signal has a bandwidth less than or equal to the preset bandwidth.
13 . The electronic device of claim 12 , wherein the second signal satisfies a following condition:
f
0
-
BW
cal
/
2
≤
f
1
±
BW
/
2
≤
f
0
+
BW
cal
/
2
,
wherein f1 denotes a frequency of the frequency conversion performed on the second signal, BW denotes a bandwidth of the second signal, f0 denotes a frequency of the frequency conversion performed on the signal having the preset bandwidth, and BW cal denotes the preset bandwidth.
14 . A non-transitory computer-readable storage medium, having computer instructions stored thereon, wherein the computer instructions are configured to cause a computer to perform a method for calibrating a signal, wherein the method comprises:
obtaining a calibration parameter corresponding to a signal having a preset bandwidth; and
determining a first frequency corresponding to the signal having the preset bandwidth, wherein the first frequency is used in performing a frequency conversion on the signal having the preset bandwidth;
determining a first sampling rate corresponding to the signal having the preset bandwidth, wherein the first sampling rate is used for sampling a frequency-converted signal obtained by performing the frequency conversion on the signal having the preset bandwidth; and
obtaining a calibrated signal by calibrating, using the calibration parameter, a frequency deviation between the first frequency and a frequency of the signal to be calibrated, the first sampling rate, and a second sampling rate, the signal to be calibrated
wherein the second sampling rate corresponds to the signal to be calibrated;
wherein obtaining a calibrated signal by calibrating, using the calibration parameter, a frequency deviation between the first frequency and a frequency of the signal to be calibrated, the first sampling rate, and a second sampling rate, the signal to be calibrate comprises:
obtaining an intermediate calibration parameter by adjusting, based on the frequency deviation and the first sampling rate, the calibration parameter;
obtaining a target calibration parameter by adjusting, using the frequency deviation and the second sampling rate, the intermediate calibration parameter; and
obtaining the calibrated signal by calibrating, using the target calibration parameter, the signal to be calibrated.