Calibration method and device, electronic equipment, chip and medium

By calibrating the amplitude and frequency of the phase-locked loop oscillator at one time, the problem of too long locking time caused by multiple iterations in the prior art is solved, and a faster calibration process and a more stable communication system are achieved.

CN120377901APending Publication Date: 2025-07-25BEIJING X RING TECHNOLOGY CO LTD
View PDF 0 Cites 0 Cited by

Patent Information

Application Number
CN202410386214.0
Authority / Receiving Office
CN · China
Patent Type
Applications(China)
Current Assignee / Owner
Filing Date
2024-03-29
Publication Date
2025-07-25

AI Technical Summary

Technical Problem

In the prior art, the amplitude and frequency calibration of the phase-locked loop oscillator requires multiple iterations, resulting in a long locking time and affecting the performance of the communication system.

Method used

By detecting the initial amplitude and frequency of the oscillator, one-time calibration is performed using the amplitude compensation coefficient and frequency control parameters to avoid multiple iterations and shorten the calibration time.

Benefits of technology

The locking time of the phase-locking loop is reduced, the waiting time and power consumption of the communication system are reduced, and the stability of the communication system is improved.

✦ Generated by Eureka AI based on patent content.

Smart Images

  • Figure CN120377901A_ABST
    Figure CN120377901A_ABST
Patent Text Reader

Abstract

The invention provides a calibration method and device, electronic equipment, a chip and a medium, and relates to the technical field of communication, and the method comprises the steps: determining an amplitude control parameter and a first amplitude under the amplitude control parameter if it is detected that the initial amplitude of an oscillator is greater than a reference amplitude; determining an amplitude compensation coefficient corresponding to the first amplitude by using the reference frequency of the oscillator, and adjusting the first amplitude into a second amplitude by using the amplitude compensation coefficient; and under the condition that the amplitude of the oscillator is the second amplitude, if it is detected that the number of square wave edges corresponding to the oscillator in the first time period is smaller than or larger than a preset frequency dividing ratio corresponding to the reference frequency, determining a frequency control parameter and a first frequency corresponding to the frequency control parameter, so that the amplitude and the frequency do not need to be iterated for multiple times, and the frequency dividing efficiency is improved. And the time consumed in the calibration process is reduced, so that the locking time of the phase-locked loop is reduced, and the overall performance of a communication system is prevented from being influenced.
Need to check novelty before this filing date? Find Prior Art

Description

Technical Field

[0001] The present disclosure relates to the field of communication technologies, and in particular, to a calibration method, apparatus, electronic device, chip, and medium. Background Art

[0002] With the emergence and wide application of 5G communication systems, the performance requirements for phase-locked loops (PLLs) in transceivers have reached an unprecedented level. To cope with the challenges of high-speed data transmission and low latency, 5G communication systems require PLLs to have an extremely low noise level, and the time jitter is strictly limited to less than 100 fs. In addition, as the communication frequency band continues to expand, the PLLs in 5G systems need to cover a wide frequency range of up to 3.6 to 14.25 GHz. The improvement of these performances poses higher requirements on the oscillator calibration technology in the PLL, not only requiring the accuracy of calibration but also the speed of calibration.

[0003] Currently, since the amplitude calibration and frequency calibration of the PLL oscillator affect each other, the calibration methods in related technologies usually require multiple iterations to achieve the required accuracy. This process consumes about 60 μs, accounting for more than 40% of the entire locking time. This not only increases the locking time of the PLL but also may affect the overall performance of the communication system. Summary of the Invention

[0004] The present disclosure provides a calibration method, apparatus, electronic device, chip, and medium to solve the problem of excessive time consumption during calibration in related technologies. After amplitude calibration, amplitude compensation is performed on the calibrated amplitude according to the reference frequency, and it is not necessary to perform multiple iterative adjustments on the amplitude and frequency, reducing the time consumed in the calibration process, thereby reducing the locking time of the PLL and avoiding affecting the overall performance of the communication system.

[0005] A first aspect embodiment of the present disclosure provides a calibration method, which includes: if it is detected that the initial amplitude of the oscillator is greater than the reference amplitude, determining an amplitude control parameter and a first amplitude under the amplitude control parameter; using the reference frequency of the oscillator to determine an amplitude compensation coefficient corresponding to the first amplitude, and adjusting the first amplitude to a second amplitude using the amplitude compensation coefficient; when the amplitude of the oscillator is the second amplitude, if it is detected that the number of square wave edges corresponding to the oscillator in the first period is less than or greater than a preset frequency division ratio corresponding to the reference frequency, determining a frequency control parameter and a first frequency corresponding to the frequency control parameter.

[0006] In some embodiments of the present disclosure, if it is detected that the initial amplitude of the oscillator is greater than the reference amplitude, determining the amplitude control parameter and the first amplitude under the amplitude control parameter includes: using an amplitude detector to determine the magnitude relationship between the initial amplitude of the oscillator and the reference amplitude; if the initial amplitude is greater than the reference amplitude, adjusting the initial amplitude control parameter according to a preset interval to obtain the amplitude control parameter; if the actual amplitude of the oscillator under the amplitude control parameter is less than or equal to the reference amplitude, taking the actual amplitude of the oscillator under the amplitude control parameter as the first amplitude.

[0007] In some embodiments of the present disclosure, using the reference frequency of the oscillator to determine the amplitude compensation coefficient corresponding to the first amplitude and adjusting the first amplitude to the second amplitude using the amplitude compensation coefficient includes: using a simulation algorithm and the reference frequency of the oscillator to determine the amplitude compensation coefficient corresponding to the first amplitude; using the amplitude compensation coefficient to adjust the amplitude control parameter to an amplitude compensation parameter, and taking the actual amplitude of the oscillator under the amplitude compensation parameter as the second amplitude.

[0008] In some embodiments of the present disclosure, using a simulation algorithm and the reference frequency of the oscillator to determine the amplitude compensation coefficient corresponding to the first amplitude includes: when the amplitude of the oscillator is the first amplitude, using a square wave counter to determine the number of square wave edges of the oscillator at the initial frequency; analyzing the number of square wave edges to determine the initial frequency; in the simulation algorithm, based on the difference between the initial frequency and the reference frequency, determining the amplitude compensation coefficient corresponding to the first amplitude.

[0009] In some embodiments of the present disclosure, when the amplitude of the oscillator is the second amplitude, if it is detected that the number of square wave edges corresponding to the oscillator in the first period is less than or greater than the preset frequency division ratio corresponding to the reference frequency, determining the frequency control parameter and the first frequency corresponding to the frequency control parameter includes: when the amplitude of the oscillator is the second amplitude, using a square wave counter to determine the number of square wave edges of the oscillator at the initial frequency; if the number of square wave edges in the first period is less than or greater than the preset frequency division ratio corresponding to the reference frequency, obtaining the frequency control parameter according to the number of bits of the initial frequency control parameter; if the actual frequency of the oscillator under the frequency control parameter is equal to the reference frequency, taking the actual frequency of the oscillator under the frequency control parameter as the first frequency.

[0010] In some embodiments of the present disclosure, if the number of square wave edges in the first period is less than or greater than the preset frequency division ratio corresponding to the reference frequency, obtaining the frequency control parameter according to the number of bits of the initial frequency control parameter includes: determining the number of bits of the initial frequency control parameter; according to the number of bits, adjusting the initial frequency control parameter in a binary adjustment manner in sequence to obtain the adjusted frequency control parameter.

[0011] A second aspect embodiment of the present disclosure provides a calibration device, the device includes:

[0012] An amplitude calibration unit, configured to determine an amplitude control parameter and a first amplitude under the amplitude control parameter if it is detected that an initial amplitude of an oscillator is greater than a reference amplitude;

[0013] An amplitude compensation unit, configured to determine an amplitude compensation coefficient corresponding to the first amplitude by using a reference frequency of the oscillator, and adjust the first amplitude to a second amplitude by using the amplitude compensation coefficient;

[0014] A frequency calibration unit, configured to determine a frequency control parameter and a first frequency corresponding to the frequency control parameter if it is detected that the number of square wave edges corresponding to the oscillator in a first period is less than or greater than a preset frequency division ratio corresponding to the reference frequency when the amplitude of the oscillator is the second amplitude.

[0015] In some embodiments of the present disclosure, the amplitude calibration unit is configured to: use an amplitude detector to determine the magnitude relationship between the initial amplitude of the oscillator and the reference amplitude; if the initial amplitude is greater than the reference amplitude, adjust the initial amplitude control parameter according to a preset interval to obtain the amplitude control parameter; if the actual amplitude of the oscillator under the amplitude control parameter is less than or equal to the reference amplitude, use the actual amplitude of the oscillator under the amplitude control parameter as the first amplitude.

[0016] In some embodiments of the present disclosure, the amplitude compensation unit is configured to: determine an amplitude compensation coefficient corresponding to the first amplitude by using a simulation algorithm and a reference frequency of the oscillator; use the amplitude compensation coefficient to adjust the amplitude control parameter to an amplitude compensation parameter, and use the actual amplitude of the oscillator under the amplitude compensation parameter as the second amplitude.

[0017] In some embodiments of the present disclosure, the amplitude compensation unit is configured to: when the amplitude of the oscillator is the first amplitude, use a square wave counter to determine the number of square wave edges of the oscillator at an initial frequency; analyze the number of square wave edges to determine the initial frequency; in the simulation algorithm, determine an amplitude compensation coefficient corresponding to the first amplitude based on the difference between the initial frequency and the reference frequency.

[0018] In some embodiments of the present disclosure, the frequency calibration unit is configured to: when the amplitude of the oscillator is the second amplitude, use a square wave counter to determine the number of square wave edges of the oscillator at an initial frequency; if the number of square wave edges in the first period is less than or greater than a preset frequency division ratio corresponding to the reference frequency, obtain a frequency control parameter according to the number of bits of the initial frequency control parameter; if the actual frequency of the oscillator under the frequency control parameter is equal to the reference frequency, use the actual frequency of the oscillator under the frequency control parameter as the first frequency.

[0019] In some embodiments of the present disclosure, the frequency calibration unit is configured to: determine the number of bits of an initial frequency control parameter; and adjust the initial frequency control parameter in a binary adjustment manner in sequence according to the number of bits to obtain an adjusted frequency control parameter.

[0020] A third aspect embodiment of the present disclosure provides an electronic device, including: at least one processor; and a memory communicatively connected to the at least one processor; wherein, the memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor to enable the at least one processor to execute the method described in the first aspect embodiment of the present disclosure.

[0021] A fourth aspect embodiment of the present disclosure provides a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause a computer to execute the method described in the first aspect embodiment of the present disclosure.

[0022] A fifth aspect embodiment of the present disclosure provides a chip, which includes one or more interface circuits and one or more processors; the interface circuits are used to receive signals and send signals to the processors, and the signals include computer instructions stored in a memory. When the processors execute the computer instructions, the chip executes the method described in the first aspect embodiment of the present disclosure.

[0023] In summary, according to the calibration method proposed by the present disclosure, if it is detected that the initial amplitude of the oscillator is greater than the reference amplitude, the amplitude control parameter and the first amplitude under the amplitude control parameter are determined; the amplitude compensation coefficient corresponding to the first amplitude is determined by using the reference frequency of the oscillator, and the first amplitude is adjusted to the second amplitude by using the amplitude compensation coefficient; when the amplitude of the oscillator is the second amplitude, if it is detected that the number of square wave edges corresponding to the oscillator in the first period is less than or greater than the preset frequency division ratio corresponding to the reference frequency, the frequency control parameter and the first frequency corresponding to the frequency control parameter are determined, so as to realize amplitude compensation for the calibrated amplitude according to the reference frequency after amplitude calibration, without the need for multiple iterative adjustments of the amplitude and frequency, reducing the time consumed in the calibration process, thereby reducing the locking time of the phase-locked loop and avoiding affecting the overall performance of the communication system.

[0024] It should be understood that the above general description and the following detailed description are only exemplary and explanatory, and cannot limit the present disclosure. BRIEF DESCRIPTION OF THE DRAWINGS

[0025] The accompanying drawings herein are incorporated into the specification and constitute a part of the specification, showing embodiments consistent with the present disclosure, and are used together with the specification to explain the principles of the present disclosure, and do not constitute an improper limitation to the present disclosure.

[0026] Figure 1 Schematic diagram of a calibration method in a related art provided by an embodiment of the present disclosure;

[0027] Figure 2 Frame diagram of a radio frequency transceiver in a communication system provided by an embodiment of the present disclosure;

[0028] Figure 3 Flow chart of a calibration method provided by an embodiment of the present disclosure;

[0029] Figure 4 Flow chart of a calibration method provided by an embodiment of the present disclosure;

[0030] Figure 5 Schematic diagram of a specific calibration method provided by an embodiment of the present disclosure;

[0031] Figure 6 Circuit diagram for calibrating the amplitude and frequency of an oscillator provided by an embodiment of the present disclosure;

[0032] Figure 7 Flow chart of a specific oscillator amplitude and frequency calibration provided by an embodiment of the present disclosure;

[0033] Figure 8 Schematic diagram of the structure of a calibration device provided by an embodiment of the present disclosure;

[0034] Figure 9 Schematic diagram of the structure of an electronic device provided by an embodiment of the present disclosure;

[0035] Figure 10 Schematic diagram of the structure of a chip provided by an embodiment of the present disclosure. Detailed implementation manners

[0036] The embodiments of the present disclosure will be described in detail below. The examples of the embodiments are shown in the accompanying drawings, where the same or similar reference numerals denote the same or similar elements or elements having the same or similar functions throughout. The implementations described below with reference to the accompanying drawings.

[0037] With the emergence and wide application of 5G communication systems, the performance requirements for the phase-locked loop (PLL) in transceivers have reached an unprecedented level. To cope with the challenges of high-speed data transmission and low latency, 5G communication systems require the PLL to have an extremely low noise level, and the time jitter is strictly limited to less than 100 fs. In addition, with the continuous expansion of the frequency coverage range, the PLL of 5G systems needs to cover a frequency range up to 3.6 to 14.25 GHz. The improvement of these performances poses higher requirements on the oscillator calibration technology in the PLL, not only requiring the accuracy of calibration, but also the speed of calibration.

[0038] As Figure 1 shown is a schematic diagram of a calibration method in the related art. The conventional frequency and amplitude calibration process of a high-performance PLL is as Figure 1As shown, the oscillator of the phase-locked loop needs to perform amplitude calibration to ensure that the oscillator operates at the same target amplitude under different process corners, temperatures, and operating frequencies. After the oscillator performs amplitude calibration, the amplitude of the oscillator will be adjusted to the required target value. After performing a low-precision frequency calibration once, the oscillator frequency will be calibrated to the target value. However, since the amplitude and frequency affect each other, the amplitude will change again. Therefore, it is necessary to perform amplitude calibration again. After the amplitude calibration, the oscillator frequency changes again, and it is necessary to perform frequency calibration again. After repeating 4 times, the amplitude and frequency of the oscillator will both reach the required accuracy.

[0039] It can be seen that since the amplitude calibration and frequency calibration of the phase-locked loop oscillator affect each other, the calibration methods in the related art usually require multiple iterations of amplitude calibration and frequency calibration to achieve the required accuracy. This process consumes about 60 μs of time, accounting for more than 40% of the entire locking time. This will not only increase the locking time of the phase-locked loop. The increase in the locking time of the phase-locked loop will increase the waiting time of the communication system when switching frequencies, thereby increasing the risk that the communication system cannot meet the protocol. At the same time, it will also increase the power consumption of the communication system.

[0040] To solve the problems existing in the related art, the present disclosure proposes a calibration method by.

[0041] As Figure 2 shown is the framework diagram of the radio frequency transceiver in the communication system. The phase-locked loop provides the local clock signal for the radio frequency transceiver. Taking the radio frequency receiver as an example, after the radio frequency receiver receives the radio frequency signal from the antenna, after the radio frequency signal is amplified by the low-noise amplifier, the mixer will mix it with the local clock provided by the phase-locked loop. After mixing, the radio frequency signal will be down-converted to a low frequency. After filtering out the high-frequency components, it will be sent to the analog-to-digital converter to be converted into a digital signal for processing. When the phase-locked loop that generates the local clock signal starts or switches frequencies, it is necessary to perform calibration of the oscillator amplitude and frequency. The calibration method proposed by the present disclosure can be applied to the phase-locked loop in the radio frequency transceiver of the communication system. When the phase-locked loop starts, it is necessary to calibrate the frequency and oscillation amplitude of its core module, the voltage-controlled oscillator. The calibration method in the present disclosure can effectively shorten the time required for calibration, improve the calibration speed of the voltage-controlled oscillator, and thus improve the locking time of the phase-locked loop.

[0042] The following will introduce in detail the calibration method provided by the present application in conjunction with the accompanying drawings.

[0043] Figure 3 is the flowchart of a calibration method provided by an embodiment of the present disclosure. As Figure 3 shown, the calibration method includes steps 101-103.

[0044] Step 101: If it is detected that the initial amplitude of the oscillator is greater than the reference amplitude, determine the amplitude control parameter and the first amplitude under the amplitude control parameter.

[0045] In an embodiment of the present disclosure, the initial amplitude of the oscillator can be directly detected by an amplitude detector, where the initial amplitude refers to the amplitude of the output signal of the oscillator currently detected by the amplitude detector. The reference amplitude refers to the amplitude that meets the target output requirement in the oscillator, and its specific value is preset according to the actual application scenario and actual situation, and is not limited in the embodiments of the present disclosure.

[0046] The amplitude control parameter is a parameter used to adjust the amplitude. In the present disclosure, it is necessary to first adjust the amplitude control parameter, and then determine the first amplitude after amplitude calibration according to the amplitude control parameter.

[0047] The first amplitude refers to the amplitude of the oscillator after amplitude calibration.

[0048] Step 102: Use the reference frequency of the oscillator to determine the amplitude compensation coefficient corresponding to the first amplitude, and use the amplitude compensation coefficient to adjust the first amplitude to a second amplitude.

[0049] In an embodiment of the present disclosure, in order to reduce the time consumed in the overall calibration process, the present disclosure does not need to perform multiple iterations on amplitude calibration and frequency calibration, but uses the reference frequency to perform amplitude compensation on the first amplitude after amplitude calibration to obtain the second amplitude after the amplitude compensation.

[0050] The reference frequency refers to the frequency that meets the target output requirement in the oscillator, and its specific value is preset according to the actual application scenario and actual situation, and is not limited in the embodiments of the present disclosure.

[0051] Since there is an interaction between amplitude calibration and frequency calibration, the present disclosure introduces an amplitude compensation coefficient. The amplitude compensation coefficient is a parameter used to adjust or compensate for the change in amplitude with frequency. Its basic principle is that when the frequency changes, the amplitude will also change accordingly. In order to maintain the stability of the amplitude or achieve the expected amplitude, the amplitude compensation coefficient can be used to adjust the amplitude.

[0052] Step 103: When the amplitude of the oscillator is the second amplitude, if it is detected that the number of square wave edges corresponding to the oscillator in the first period is less than or greater than the preset frequency division ratio corresponding to the reference frequency, determine the frequency control parameter and the first frequency corresponding to the frequency control parameter.

[0053] In an embodiment of the present disclosure, since there is a direct relationship between the number of square wave edges and the frequency, after obtaining the second amplitude after amplitude compensation, the square wave signal generated by the oscillator can be detected at the second amplitude in the first period, and the number of square wave edges corresponding to the square wave signal can be determined.

[0054] A square wave signal is a periodic signal, and the transitions between the high level and the low level (i.e., the square wave edges) are part of the square wave period. The number of square wave edges is proportional to the frequency of the square wave signal. Frequency is defined as the number of occurrences of a periodic event per unit time. For a square wave signal, a complete period includes a high level, a low level, and the transitions between them (square wave edges). Therefore, the higher the frequency, the more square wave edges there are per unit time.

[0055] Compare the number of square wave edges with a preset frequency division ratio corresponding to a reference frequency. If the number of square wave edges is less than or greater than the preset frequency division ratio corresponding to the reference frequency, this means there is a deviation between the actual frequency of the oscillator and the desired reference frequency. So, it is necessary to determine the current frequency control parameter and determine the first frequency based on this frequency control parameter.

[0056] The first frequency is the frequency of the oscillator after frequency calibration. The frequency control parameter is a parameter used to adjust the frequency magnitude. In this disclosure, it is necessary to first adjust the frequency control parameter and then determine the first frequency after frequency calibration based on this frequency control parameter.

[0057] In summary, according to the calibration method proposed in this disclosure, by determining the amplitude control parameter and the first amplitude under the amplitude control parameter if it is detected that the initial amplitude of the oscillator is greater than the reference amplitude; using the reference frequency of the oscillator to determine the amplitude compensation coefficient corresponding to the first amplitude, and adjusting the first amplitude to the second amplitude using the amplitude compensation coefficient; when the amplitude of the oscillator is the second amplitude, if it is detected that the number of square wave edges corresponding to the oscillator in the first period is less than or greater than the preset frequency division ratio corresponding to the reference frequency, determining the frequency control parameter and the first frequency corresponding to the frequency control parameter, it is realized that after amplitude calibration, amplitude compensation is performed on the calibrated amplitude according to the reference frequency, without the need for multiple iterative adjustments of the amplitude and frequency, reducing the time consumed in the calibration process, thereby reducing the locking time of the phase-locked loop and avoiding affecting the overall performance of the communication system.

[0058] Based on Figure 3 the embodiments shown, Figure 4 the flowchart of a calibration method proposed in this disclosure is further shown. Figure 4 Based on Figure 3 the embodiments shown, steps 101, 102, and 103 are further defined. In Figure 4 the embodiments shown, step 101 includes steps 201, 202, and 203, step 102 includes steps 204 and 205, and step 103 includes steps 206, 207, and 208. As Figure 4 shown, the method includes the following steps:

[0059] Step 201: Use an amplitude detector to determine the magnitude relationship between the initial amplitude of the oscillator and the reference amplitude.

[0060] In an embodiment of the present disclosure, the amplitude detector is a device or circuit capable of measuring the amplitude of a signal, which can convert the amplitude (i.e., magnitude or intensity) of the signal into a readable numerical value or electrical signal.

[0061] In the present disclosure, an amplitude detector can be used to measure the initial amplitude of the oscillator and compare the measured initial amplitude with the reference amplitude. If the measured initial amplitude is greater than the reference amplitude, set pkd_out to 1, indicating that the current initial amplitude is too high. If the measured initial amplitude is less than or equal to the reference amplitude, set pkd_out to 0, indicating that the current initial amplitude is within an acceptable range.

[0062] Among them, in the present disclosure, a suitable amplitude detector can be selected according to the characteristics of the oscillator to ensure that the detector has a sufficient measurement range and accuracy to accurately capture the initial amplitude of the oscillator. The specific amplitude detector depends on the actual situation and is not limited in the embodiments of the present disclosure.

[0063] Step 202: If the initial amplitude is greater than the reference amplitude, adjust the initial amplitude control parameter according to a preset interval to obtain the amplitude control parameter.

[0064] In an embodiment of the present disclosure, if the detected initial amplitude is greater than the reference amplitude, the initial amplitude control parameter is adjusted according to a preset interval to obtain the amplitude control parameter. Among them, the initial amplitude control parameter is at the maximum value.

[0065] The present disclosure only makes adjustments when the initial amplitude is greater than the reference amplitude. If the initial amplitude is less than or equal to the reference amplitude, no adjustment is required.

[0066] In an alternative embodiment of the present disclosure, during the process of amplitude calibration after obtaining the initial amplitude, the initial frequency control parameter (amp_ctrl) starts at the maximum value. Detect the output pkd_out of the amplitude detector. When pkd_out = 1, it means that the initial amplitude is too high, that is, the initial amplitude is greater than the reference amplitude. At this time, the initial amplitude control parameter (amp_ctrl) can be gradually decreased by 1 to obtain the amplitude control parameter.

[0067] Step 203: If the actual amplitude of the oscillator under the amplitude control parameter is less than or equal to the reference amplitude, use the actual amplitude of the oscillator under the amplitude control parameter as the first amplitude.

[0068] In an alternative embodiment of the present disclosure, if the actual amplitude detected by the amplitude detector under the amplitude control parameter is less than or equal to the reference amplitude, that is, when pkd_out = 0, it is considered that the currently detected actual amplitude meets the requirements. At this time, the actual amplitude is used as the first amplitude, and the amplitude calibration ends.

[0069] Step 204: Determine the amplitude compensation coefficient corresponding to the first amplitude by using the simulation algorithm and the reference frequency of the oscillator.

[0070] In an embodiment of the present disclosure, when the amplitude of the oscillator is the first amplitude, use the square wave counter to determine the number of square wave edges of the oscillator at the initial frequency; analyze the number of square wave edges to determine the initial frequency; in the simulation algorithm, based on the difference between the initial frequency and the reference frequency, determine the amplitude compensation coefficient corresponding to the first amplitude.

[0071] Among them, since the amplitude compensation coefficient is continuously simulated by using the simulation algorithm for the difference between the reference frequency and the initial frequency. Table 1 shows the relationship between the compensation coefficient of the oscillator with a working frequency of 10–14 GHz and the reference frequency.

[0072] Target frequency Compensation coefficient k 10–10.5 GHz 3 10.5–11 GHz 2 11–11.5 GHz 1 11.5–12 GHz 0 12–12.5 GHz -1 12.5–13 GHz -2 13–13.5 GHz -3 13.5–14 GHz -4

[0073] Table 1

[0074] Step 205: Use the amplitude compensation coefficient to make the amplitude control parameter the amplitude compensation parameter, and use the actual amplitude of the oscillator under the amplitude compensation parameter as the second amplitude.

[0075] In an embodiment of the present disclosure, use the amplitude compensation coefficient to make the amplitude control parameter the amplitude compensation parameter for amplitude compensation, and use the actual amplitude under the amplitude compensation parameter as the second amplitude. The second amplitude is the amplitude of the oscillator after amplitude compensation.

[0076] In the present disclosure, the amplitude formula of the oscillator is where A is the oscillation amplitude, f is the oscillation frequency, L is the inductance value, Q is the quality factor of the resonant cavity, and I is the oscillator current. Among them, L and Q change with the process corner and temperature. I is controlled by the amplitude control parameter (amp_ctrl) and is used to compensate for the changes in L, Q, and f so that the amplitude A remains unchanged in all cases.

[0077] Among them, since the first amplitude is determined at the initial frequency, the changes of L and Q are calibrated and corrected at this time. Since the initial frequency can be determined by analyzing the number of square-wave edges, the difference between the reference frequency and the initial frequency can be determined. Therefore, by adding the amplitude compensation coefficient k to the amplitude control parameter amp_ctrl during the amplitude compensation process, the change of A with frequency can be compensated according to the value of the amplitude compensation coefficient k. At this time, the output amplitude A has been calibrated and compensated for all variables of L, Q, and f, and the output amplitude is also accurate when the frequency is calibrated again.

[0078] Step 206: When the amplitude of the oscillator is the second amplitude, use the square-wave counter to determine the number of square-wave edges of the oscillator at the initial frequency.

[0079] In an optional embodiment of the present disclosure, when the adjustment of the oscillator amplitude obtains the second amplitude after amplitude calibration and amplitude compensation, the present disclosure can perform frequency calibration. The digital circuit turns on the square-wave counter in the first time period, and the square-wave counter outputs the number of square-wave edges (count_out).

[0080] Step 207: If the number of square-wave edges in the first time period is less than or greater than the preset frequency division ratio corresponding to the reference frequency, obtain the frequency control parameter according to the number of bits of the initial frequency control parameter.

[0081] In the embodiment of the present disclosure, determine the number of bits of the initial frequency control parameter; according to the number of bits, adjust the initial frequency control parameter in a binary adjustment manner in sequence to obtain the adjusted frequency control parameter.

[0082] In an optional embodiment of the present disclosure, the digital circuit can compare and judge the number of square-wave edges (count_out) with the preset frequency division ratio (N). If the number of square-wave edges (count_out) in the first time period is less than the preset frequency division ratio (N) corresponding to the reference frequency, it is considered that the current frequency is too low, and at this time, the initial frequency control parameter (freq_ctrl) increases. On the contrary, if the number of square-wave edges is greater than the preset frequency division ratio, it is considered that the current frequency is too high, and at this time, the initial frequency control parameter (freq_ctrl) decreases.

[0083] Among them, the initial frequency control parameter can be set to the middle value at the beginning, and the specific size can be set according to the actual situation, which is not limited in the embodiment of the present disclosure. When adjusting the initial frequency control parameter, it can be adjusted in binary form according to the number of bits of the initial frequency control parameter. After all bits are calibrated, finish will be marked as 1, and at this time, the frequency calibration ends.

[0084] For example, taking the initial frequency control parameter 1000 with 4 digits as an example, if the number of square wave edges in the first time period is greater than the preset frequency division ratio corresponding to the reference frequency, the initial frequency control parameter can be increased, and 1000 can be adjusted to 0100. At this time, it can be determined that 0100 is the adjusted frequency control parameter. At this time, it is necessary to determine again the magnitude relationship between the actual frequency and the reference frequency under the frequency control parameter. If the adjusted actual frequency is less than the reference frequency at this time, the frequency adjustment parameter can be decreased again according to the number of digits, that is, 0100 is adjusted to 0110. At the same time, it is still necessary to compare the actual frequency with the reference frequency under the adjusted frequency adjustment parameter until the actual frequency is the same as the reference frequency, then the frequency calibration can be determined to be completed.

[0085] Step 208, if the actual frequency of the oscillator under the frequency control parameter is equal to the reference frequency, use the actual frequency of the oscillator under the frequency control parameter as the first frequency.

[0086] In the embodiments of the present disclosure, if the actual frequency of the oscillator under the adjusted frequency control parameter is equal to the reference frequency, the current actual frequency can be determined as the first frequency after frequency calibration.

[0087] Among them, the situation where the actual frequency of the oscillator under the frequency control parameter is equal to the reference frequency can be the situation where the actual frequency is equal to the reference frequency within a certain allowable error range.

[0088] In summary, through the method provided by the present disclosure, the calibration time required for the calibration process can be shortened, thereby reducing the risk that the communication system does not meet the protocol when switching the phase-locked loop frequency. At the same time, the power consumption when the phase-locked loop is turned on and the frequency is switched can also be reduced.

[0089] Based on Figure 3 、 Figure 4 The embodiments shown, such as Figure 5 The schematic diagram of a specific calibration method shown.

[0090] In the embodiments of the present disclosure, the first step is to calibrate the amplitude of the phase-locked loop. The second step is amplitude compensation. The first amplitude after amplitude calibration is adjusted according to the reference frequency. The amplitude compensation coefficient can be calculated by a simulation algorithm. Then frequency calibration is performed. Since the result of amplitude calibration has been corrected based on the reference frequency, there is no need to perform amplitude calibration again, and the amplitude frequency calibration of the oscillator ends.

[0091] In summary, in the method of the present disclosure, through the additionally added amplitude compensation, since the influence of oscillator frequency calibration on amplitude is predictable. Therefore, when amplitude compensation is introduced, the influence of frequency calibration on amplitude is eliminated in advance, and amplitude calibration does not need to be continued after frequency calibration. Since amplitude compensation only changes the numerical value itself without a calibration process, it hardly consumes time. The overall calibration time is shortened to 15 μs.

[0092] Based on Figure 3 、 Figure 4 、 Figure 5 the embodiments shown, such as Figure 6 the circuit diagram of an oscillator amplitude and frequency calibration shown and such as Figure 7 the flowchart of a specific oscillator amplitude and frequency calibration shown.

[0093] In the embodiments of the present disclosure, referring to Figure 6 , the amplitude of the oscillator output signal is detected by an amplitude detector. When the amplitude is too large, the output pkd_out of the amplitude detector is 1, otherwise it is 0. A square wave counter is used to measure the frequency of the oscillator, and the counting result is the number of square wave edges (count_out). The digital circuit receives the results of the square wave counter and the amplitude detector, and after processing, adjusts the amplitude of the oscillator through the amplitude control parameter (amp_ctrl), and adjusts the oscillator frequency through the frequency control parameter (freq_ctrl).

[0094] In the embodiments of the present disclosure, referring to Figure 7 , after the calibration process starts, amplitude calibration will be performed first. At this time, the initial amplitude control parameter (amp_ctrl) starts at the maximum value. When the detection result pkd_out of the amplitude detector is 1, it means that the initial amplitude is greater than the reference amplitude. At this time, the initial amplitude is too high, so the initial control parameter (amp_ctrl) can be decreased by 1 and continue to detect. When pkd_out = 0, it is considered that the current first amplitude meets the requirements, and the amplitude calibration ends.

[0095] The amplitude compensation is determined according to the simulation software and the reference frequency. After amplitude calibration, the amplitude compensation coefficient k is added to the calibrated frequency control parameter to obtain the second amplitude after amplitude compensation.

[0096] After amplitude compensation, frequency calibration can be performed. The digital circuit can compare and judge the number of square wave edges (count_out) with the preset division ratio (N). If the number of square wave edges (count_out) is less than the preset division ratio (N) corresponding to the reference frequency within the first time period, it is considered that the current frequency is too low, and at this time the initial frequency control parameter (freq_ctrl) is increased. On the contrary, if the number of square wave edges is greater than the preset division ratio, it is considered that the current frequency is too high, and at this time the initial frequency control parameter (freq_ctrl) is decreased.

[0097] Among them, the initial frequency control parameter can be set to the intermediate value at the beginning, and the specific size can be set according to the actual situation, which is not limited in the embodiments of the present disclosure. When adjusting the initial frequency control parameter, it can be adjusted in binary form according to the number of digits of the initial frequency control parameter. After all digits are calibrated, finish will be marked as 1, and at this time, the frequency calibration ends.

[0098] In summary, through the above calibration method, during actual experiments, the calibration time is shortened from 60 μS to 15 μS, a reduction of 75%. The shortening of the calibration time can reduce the risk that the communication system does not meet the protocol when switching the PLL frequency, and at the same time can reduce the power consumption when the PLL is turned on and the frequency is switched.

[0099] Figure 8 FIG. 9 is a schematic structural diagram of a calibration device 800 provided by an embodiment of the present disclosure. As Figure 8 shown, the calibration device includes:

[0100] An amplitude calibration unit 810, configured to determine an amplitude control parameter and a first amplitude under the amplitude control parameter if it is detected that the initial amplitude of the oscillator is greater than the reference amplitude;

[0101] An amplitude compensation unit 820, configured to determine an amplitude compensation coefficient corresponding to the first amplitude by using the reference frequency of the oscillator, and adjust the first amplitude to a second amplitude by using the amplitude compensation coefficient;

[0102] A frequency calibration unit 830, configured to determine a frequency control parameter and a first frequency corresponding to the frequency control parameter if it is detected that the number of square wave edges corresponding to the oscillator in the first period is less than or greater than a preset frequency division ratio corresponding to the reference frequency when the amplitude of the oscillator is the second amplitude.

[0103] In some embodiments of the present disclosure, the amplitude calibration unit 810 is configured to: use an amplitude detector to determine the magnitude relationship between the initial amplitude of the oscillator and the reference amplitude; if the initial amplitude is greater than the reference amplitude, adjust the initial amplitude control parameter according to a preset interval to obtain the amplitude control parameter; if the actual amplitude of the oscillator under the amplitude control parameter is less than or equal to the reference amplitude, use the actual amplitude of the oscillator under the amplitude control parameter as the first amplitude.

[0104] In some embodiments of the present disclosure, the amplitude compensation unit 820 is configured to: determine an amplitude compensation coefficient corresponding to the first amplitude by using a simulation algorithm and the reference frequency of the oscillator; use the amplitude compensation coefficient to adjust the amplitude control parameter to an amplitude compensation parameter, and use the actual amplitude of the oscillator under the amplitude compensation parameter as the second amplitude.

[0105] In some embodiments of the present disclosure, the amplitude compensation unit 820 is configured to: when the amplitude of the oscillator is the first amplitude, use a square wave counter to determine the number of square wave edges of the oscillator at the initial frequency; analyze the number of square wave edges to determine the initial frequency; in the simulation algorithm, based on the difference between the initial frequency and the reference frequency, determine the amplitude compensation coefficient corresponding to the first amplitude.

[0106] In some embodiments of the present disclosure, the frequency calibration unit 830 is configured to: when the amplitude of the oscillator is the second amplitude, use a square wave counter to determine the number of square wave edges of the oscillator at the initial frequency; if the number of square wave edges in the first time period is less than or greater than the preset frequency division ratio corresponding to the reference frequency, obtain a frequency control parameter according to the number of bits of the initial frequency control parameter; if the actual frequency of the oscillator under the frequency control parameter is equal to the reference frequency, use the actual frequency of the oscillator under the frequency control parameter as the first frequency.

[0107] In some embodiments of the present disclosure, the frequency calibration unit 830 is configured to: determine the number of bits of the initial frequency control parameter; according to the number of bits, sequentially adjust the initial frequency control parameter in a binary adjustment manner to obtain the adjusted frequency control parameter.

[0108] In summary, through the calibration device, if it is detected that the initial amplitude of the oscillator is greater than the reference amplitude, the amplitude control parameter and the first amplitude under the amplitude control parameter are determined; using the reference frequency of the oscillator, the amplitude compensation coefficient corresponding to the first amplitude is determined, and the first amplitude is adjusted to the second amplitude using the amplitude compensation coefficient; when the amplitude of the oscillator is the second amplitude, if it is detected that the number of square wave edges corresponding to the oscillator in the first time period is less than or greater than the preset frequency division ratio corresponding to the reference frequency, the frequency control parameter and the first frequency corresponding to the frequency control parameter are determined, so as to realize amplitude compensation for the calibrated amplitude according to the reference frequency after amplitude calibration, without the need for multiple iterative adjustments of the amplitude and frequency, reducing the time consumed in the calibration process, thereby reducing the locking time of the phase-locked loop and avoiding affecting the overall performance of the communication system.

[0109] Corresponding to the methods provided in the above several embodiments, the present disclosure also provides a calibration device. Since the device provided in the embodiments of the present disclosure corresponds to the methods provided in the above several embodiments, the implementation manners of the methods are also applicable to the device provided in this embodiment and will not be described in detail in this embodiment.

[0110] In the embodiments provided by the present application above, the methods and devices provided by the embodiments of the present application are introduced. To implement the various functions in the methods provided by the embodiments of the present application above, the electronic device may include a hardware structure, software modules, and implement the above various functions in the form of a hardware structure, software modules, or a combination of a hardware structure and software modules. A certain function among the above various functions may be executed in the form of a hardware structure, software modules, or a combination of a hardware structure and software modules.

[0111] Figure 9 FIG. 4 is a block diagram of an electronic device 900 for implementing the above calibration method shown according to an exemplary embodiment. For example, the electronic device 900 may be a mobile phone, a computer, a messaging device, a game console, a tablet device, a medical device, a fitness device, a personal digital assistant, etc.

[0112] Referring to Figure 9 FIG. 4, the electronic device 900 may include one or more of the following components: a processing component 902, a memory 904, a power supply component 906, a multimedia component 908, an audio component 910, an input / output (I / O) interface 912, a sensor component 914, and a communication component 916.

[0113] The processing component 902 generally controls the overall operation of the electronic device 900, such as operations associated with display, telephone calls, data communication, camera operations, and recording operations. The processing component 902 may include one or more processors 920 to execute instructions to complete all or part of the steps of the above methods. In addition, the processing component 902 may include one or more modules to facilitate the interaction between the processing component 902 and other components. For example, the processing component 902 may include a multimedia module to facilitate the interaction between the multimedia component 908 and the processing component 902.

[0114] The memory 904 is configured to store various types of data to support the operation of the electronic device 900. Examples of these data include instructions for any application or method operating on the electronic device 900, contact data, phone book data, messages, pictures, videos, etc. The memory 904 may be implemented by any type of volatile or non-volatile storage device or a combination thereof, such as static random access memory (SRAM), electrically erasable programmable read-only memory (EEPROM), erasable programmable read-only memory (EPROM), programmable read-only memory (PROM), read-only memory (ROM), magnetic memory, flash memory, a magnetic disk, or an optical disk.

[0115] The power supply component 906 provides power to various components of the electronic device 900. The power supply component 906 may include a power management system, one or more power supplies, and other components associated with generating, managing, and distributing power for the electronic device 900.

[0116] The multimedia component 908 includes a screen that provides an output interface between the electronic device 900 and the user. In some embodiments, the screen may include a liquid crystal display (LCD) and a touch panel (TP). If the screen includes a touch panel, the screen can be implemented as a touch screen to receive input signals from the user. The touch panel includes one or more touch sensors to sense touches, swipes, and gestures on the touch panel. The touch sensors can sense not only the boundaries of a touch or swipe action but also detect the duration and pressure associated with the touch or swipe operation. In some embodiments, the multimedia component 908 includes a front camera and / or a rear camera. When the electronic device 900 is in an operating mode, such as a shooting mode or a video mode, the front camera and / or the rear camera can receive external multimedia data. Each of the front camera and the rear camera can be a fixed optical lens system or have a focal length and optical zoom capabilities.

[0117] The audio component 910 is configured to output and / or input audio signals. For example, the audio component 910 includes a microphone (MIC) that is configured to receive external audio signals when the electronic device 900 is in an operating mode, such as a call mode, a recording mode, and a voice recognition mode. The received audio signals can be further stored in the memory 904 or transmitted via the communication component 916. In some embodiments, the audio component 910 further includes a speaker for outputting audio signals.

[0118] The I / O interface 912 provides an interface between the processing component 902 and a peripheral interface module, and the peripheral interface module can be a keyboard, a click wheel, buttons, etc. These buttons can include but are not limited to: a home button, a volume button, a power button, and a lock button.

[0119] The sensor component 914 includes one or more sensors for providing status assessments of various aspects of the electronic device 900. For example, the sensor component 914 can detect the on / off state of the electronic device 900, the relative positioning of components, such as the display and keypad of the electronic device 900. The sensor component 914 can also detect a change in the position of the electronic device 900 or a component of the electronic device 900, the presence or absence of user contact with the electronic device 900, the orientation or acceleration / deceleration of the electronic device 900, and a change in the temperature of the electronic device 900. The sensor component 914 can include a proximity sensor configured to detect the presence of nearby objects without any physical contact. The sensor component 914 can also include a light sensor, such as a CMOS or CCD image sensor, for use in imaging applications. In some embodiments, the sensor component 914 can further include an acceleration sensor, a gyroscope sensor, a magnetic sensor, a pressure sensor, or a temperature sensor.

[0120] The communication component 916 is configured to facilitate communication between the electronic device 900 and other devices in a wired or wireless manner. The electronic device 900 can access a communication standard-based wireless network, such as WiFi, 2G or 3G, 4G LTE, 5G NR (New Radio), or a combination thereof. In an exemplary embodiment, the communication component 916 receives a broadcast signal or broadcast-related information from an external broadcast management system via a broadcast channel. In an exemplary embodiment, the communication component 916 further includes a Near Field Communication (NFC) module to facilitate short-range communication. For example, the NFC module can be implemented based on Radio Frequency Identification (RFID) technology, Infrared Data Association (IrDA) technology, Ultra Wideband (UWB) technology, Bluetooth (BT) technology, and other technologies.

[0121] In an exemplary embodiment, the electronic device 900 can be implemented by one or more Application Specific Integrated Circuits (ASICs), Digital Signal Processors (DSPs), Digital Signal Processing Devices (DSPDs), Programmable Logic Devices (PLDs), Field Programmable Gate Arrays (FPGAs), controllers, microcontrollers, microprocessors, or other electronic components for performing the above-described method.

[0122] In an exemplary embodiment, a non-transitory computer-readable storage medium including instructions is also provided, such as a memory 904 including instructions, and the above instructions can be executed by a processor 920 of the electronic device 900 to complete the above method. For example, the non-transitory computer-readable storage medium can be a ROM, Random Access Memory (RAM), CD-ROM, magnetic tape, floppy disk, and optical data storage device, etc.

[0123] Embodiments of the present disclosure also propose a non-transitory computer-readable storage medium storing computer instructions, wherein the computer instructions are used to cause a computer to execute the calibration method described in the above embodiments of the present disclosure.

[0124] Embodiments of the present disclosure also propose a computer program product including a computer program, and the computer program executes the calibration method described in the above embodiments of the present disclosure when being executed by a processor.

[0125] Embodiments of the present disclosure also propose a chip, as Figure 10 shown, the chip includes one or more interface circuits 1001 and one or more processors 1002; the interface circuit is configured to receive a signal and send the signal to the processor, and the signal includes computer instructions stored in a memory. When the processor executes the computer instructions, the chip executes the calibration method described in the above embodiments of the present disclosure.

[0126] It should be noted that the terms "first", "second", etc. in the description of the present disclosure, the claims and the above-mentioned drawings are used to distinguish similar objects, and do not necessarily have to be used to describe a specific order or sequence. It should be understood that the data used in this way can be interchanged under appropriate circumstances, so that the embodiments of the present disclosure described herein can be implemented in an order other than those illustrated or described herein. The embodiments described in the following exemplary embodiments do not represent all embodiments consistent with the present disclosure. On the contrary, they are merely examples of devices and methods consistent with some aspects of the present disclosure as detailed in the appended claims.

[0127] In the description of this specification, the description with reference to the terms "one embodiment", "some embodiments", "illustrative embodiments", "examples", "specific examples" or "some examples", etc. means that the specific features, structures, materials or characteristics described in connection with the embodiment or example are included in at least one embodiment or example of the present invention. In this specification, the schematic representations of the above terms do not necessarily refer to the same embodiment or example. Moreover, the specific features, structures, materials or characteristics described can be combined in any one or more embodiments or examples in a suitable manner.

[0128] Any process or method description in the flowchart or described in other ways herein can be understood as representing a module, segment or portion of code including one or more executable instructions for implementing a specific logical function or process. The scope of the preferred embodiments of the present invention includes additional implementations, where the functions can be executed in a manner substantially simultaneous with or in the reverse order according to the functions involved, rather than in the order shown or discussed, which should be understood by those skilled in the technical field to which the embodiments of the present invention pertain.

[0129] The logic and / or steps represented in the flowchart or otherwise described herein, for example, can be considered as a definable sequence list of executable instructions for implementing logical functions, and can be specifically implemented in any computer-readable medium for use by an instruction execution system, apparatus, or device (such as a computer-based system, a system including a processing module, or other systems that can fetch instructions from the instruction execution system, apparatus, or device and execute the instructions), or used in combination with these instruction execution systems, apparatuses, or devices. For the purposes of this specification, a "computer-readable medium" can be any device that can contain, store, communicate, propagate, or transport a program for use by or in connection with an instruction execution system, apparatus, or device. More specific examples (non-exhaustive list) of computer-readable media include the following: electrical connection parts with one or more wirings (control methods), portable computer disk cartridges (magnetic devices), random access memory (RAM), read-only memory (ROM), erasable programmable read-only memory (EPROM or flash memory), optical fiber devices, and portable compact disc read-only memory (CDROM). Additionally, a computer-readable medium can even be paper or other suitable media on which a program can be printed, because the program can be obtained electronically, for example, by optically scanning the paper or other media, followed by editing, interpretation, or other appropriate processing when necessary, and then storing it in a computer memory.

[0130] It should be understood that various parts of the embodiments of the present invention can be implemented using hardware, software, firmware, or combinations thereof. In the above embodiments, multiple steps or methods can be implemented using software or firmware stored in a memory and executed by a suitable instruction execution system. For example, if implemented using hardware, as in another embodiment, any one or a combination of the following techniques well known in the art can be used: discrete logic circuits with logic gate circuits for implementing logical functions on data signals, application-specific integrated circuits with appropriate combinational logic gate circuits, programmable gate arrays (PGA), field programmable gate arrays (FPGA), etc.

[0131] Those of ordinary skill in the art of this technology can understand that all or part of the steps carried by the methods of the above embodiments can be completed by instructing relevant hardware through a program, and the program can be stored in a computer-readable storage medium. When the program is executed, it includes one or a combination of the steps of the method embodiments.

[0132] In addition, each functional unit in various embodiments of the present invention may be integrated into one processing module, or each unit may exist physically alone, or two or more units may be integrated into one module. The above-mentioned integrated module may be implemented in the form of hardware or in the form of a software functional module. When the integrated module is implemented in the form of a software functional module and sold or used as an independent product, it may also be stored in a computer-readable storage medium. The above-mentioned storage medium may be a read-only memory, a magnetic disk, an optical disk, or the like.

[0133] Although the embodiments of the present invention have been shown and described above, it can be understood that the above embodiments are exemplary and should not be construed as limiting the present invention. Those of ordinary skill in the art can make changes, modifications, substitutions, and variations to the above embodiments within the scope of the present invention.

Claims

1. A calibration method, characterized in that, The method includes: If it is detected that the initial amplitude of the oscillator is greater than the reference amplitude, determine the amplitude control parameter and the first amplitude under the amplitude control parameter; Using the reference frequency of the oscillator, determine the amplitude compensation coefficient corresponding to the first amplitude, and use the amplitude compensation coefficient to adjust the first amplitude to a second amplitude; When the amplitude of the oscillator is the second amplitude, if it is detected that the number of square wave edges corresponding to the oscillator in the first period is less than or greater than the preset frequency division ratio corresponding to the reference frequency, determine the frequency control parameter and the first frequency corresponding to the frequency control parameter.

2. The method according to claim 1, wherein The step of "if it is detected that the initial amplitude of the oscillator is greater than the reference amplitude, determine the amplitude control parameter and the first amplitude under the amplitude control parameter" includes: Use an amplitude detector to judge the magnitude relationship between the initial amplitude of the oscillator and the reference amplitude; If the initial amplitude is greater than the reference amplitude, adjust the initial amplitude control parameter according to a preset interval to obtain the amplitude control parameter; If the actual amplitude of the oscillator under the amplitude control parameter is less than or equal to the reference amplitude, use the actual amplitude of the oscillator under the amplitude control parameter as the first amplitude.

3. The method according to claim 2, characterized in that, The step of "using the reference frequency of the oscillator, determine the amplitude compensation coefficient corresponding to the first amplitude, and use the amplitude compensation coefficient to adjust the first amplitude to a second amplitude" includes: Use a simulation algorithm and the reference frequency of the oscillator to determine the amplitude compensation coefficient corresponding to the first amplitude; Use the amplitude compensation coefficient to adjust the amplitude control parameter to an amplitude compensation parameter, and use the actual amplitude of the oscillator under the amplitude compensation parameter as the second amplitude.

4. The method according to claim 3, characterized in that, The step of "using a simulation algorithm and the reference frequency of the oscillator to determine the amplitude compensation coefficient corresponding to the first amplitude" includes: When the amplitude of the oscillator is the first amplitude, use a square wave counter to determine the number of square wave edges of the oscillator at the initial frequency; Analyze the number of square wave edges to determine the initial frequency; In the simulation algorithm, based on the difference between the initial frequency and the reference frequency, determine the amplitude compensation coefficient corresponding to the first amplitude.

5. The method according to claim 3, wherein The step of "when the amplitude of the oscillator is the second amplitude, if it is detected that the number of square wave edges corresponding to the oscillator in the first period is less than or greater than the preset frequency division ratio corresponding to the reference frequency, determine the frequency control parameter and the first frequency corresponding to the frequency control parameter" includes: When the amplitude of the oscillator is the second amplitude, use a square wave counter to determine the number of square wave edges of the oscillator at the initial frequency; If the number of square wave edges is less than or greater than the preset frequency division ratio corresponding to the reference frequency in the first period, obtain the frequency control parameter according to the number of bits of the initial frequency control parameter; If the actual frequency of the oscillator under the frequency control parameter is equal to the reference frequency, use the actual frequency of the oscillator under the frequency control parameter as the first frequency.

6. The method according to claim 5, wherein If the number of square wave edges of the oscillator within the first time period is less than or greater than a preset frequency division ratio corresponding to a reference frequency, obtaining the frequency control parameter according to the number of bits of the initial frequency control parameter includes: Determining the number of bits of the initial frequency control parameter; According to the number of bits, sequentially adjusting the initial frequency control parameter in a binary adjustment manner to obtain an adjusted frequency control parameter.

7. A calibration device, characterized in that, The device includes: An amplitude calibration unit configured to determine an amplitude control parameter and a first amplitude under the amplitude control parameter if it is detected that an initial amplitude of the oscillator is greater than a reference amplitude; An amplitude compensation unit configured to determine an amplitude compensation coefficient corresponding to the first amplitude by using a reference frequency of the oscillator, and adjust the first amplitude to a second amplitude by using the amplitude compensation coefficient; A frequency calibration unit configured to determine a frequency control parameter and a first frequency corresponding to the frequency control parameter if it is detected that the number of square wave edges corresponding to the oscillator within a first time period is less than or greater than a preset frequency division ratio corresponding to a reference frequency when the amplitude of the oscillator is the second amplitude.

8. An electronic device, characterized in that, Comprising: At least one processor; And A memory communicatively connected to the at least one processor; wherein, The memory stores instructions executable by the at least one processor, and the instructions are executed by the at least one processor so that the at least one processor can execute the method according to any one of claims 1-6.

9. A non-transitory computer-readable storage medium storing computer instructions, characterized in that, The computer instructions are used to cause the computer to execute the method according to any one of claims 1-6.

10. A chip, characterized in that, Comprising one or more interface circuits and one or more processors; the interface circuit is configured to receive a signal from a memory of an electronic device and send the signal to the processor, the signal includes computer instructions stored in the memory, and when the processor executes the computer instructions, the electronic device executes the method according to any one of claims 1-6.