Circuit calibration method, circuit calibration device, circuit, equipment and storage medium
阅读说明:本技术 电路校准方法、装置、电路、设备和存储介质 (Circuit calibration method, circuit calibration device, circuit, equipment and storage medium ) 是由 管璐璐 徐红如 于 2020-06-17 设计创作,主要内容包括:本申请提供一种电路校准方法、装置、电路、设备和存储介质,该方法包括:在待校准电路锁定预设的目标频率时,获取待校准电路的当前输入电压、当前调频参数以及预设的调频范围信息;判断当前输入电压是否在预设电压范围内;在当前输入电压在预设电压范围内时,根据当前调频参数,从调频范围信息中选定目标调频参数,目标调频参数使待校准电路输出目标频率;在当前输入电压不在预设电压范围内时,根据预设电压范围的端点值,从调频范围信息中选定目标调频参数。本申请实现了自动根据待校准电路的当前输入电压和预设的目标频率,从该待校准电路的调频范围信息中,为该待校准电路选定合适的目标调频参数,进而实现对待校准电路的自动校准。(The application provides a circuit calibration method, a device, a circuit, equipment and a storage medium, wherein the method comprises the following steps: when a circuit to be calibrated locks a preset target frequency, acquiring the current input voltage, the current frequency modulation parameter and preset frequency modulation range information of the circuit to be calibrated; judging whether the current input voltage is within a preset voltage range or not; when the current input voltage is within a preset voltage range, selecting a target frequency modulation parameter from frequency modulation range information according to the current frequency modulation parameter, wherein the target frequency modulation parameter enables the circuit to be calibrated to output a target frequency; and when the current input voltage is not in the preset voltage range, selecting a target frequency modulation parameter from the frequency modulation range information according to the endpoint value of the preset voltage range. According to the method and the device, the suitable target frequency modulation parameters are selected for the circuit to be calibrated from the frequency modulation range information of the circuit to be calibrated according to the current input voltage and the preset target frequency of the circuit to be calibrated automatically, and then the circuit to be calibrated is calibrated automatically.)
1. A method of circuit calibration, comprising:
when a circuit to be calibrated locks a preset target frequency, acquiring the current input voltage, the current frequency modulation parameter and preset frequency modulation range information of the circuit to be calibrated;
judging whether the current input voltage is within a preset voltage range or not;
when the current input voltage is within the preset voltage range, selecting a target frequency modulation parameter from the frequency modulation range information according to the current frequency modulation parameter, wherein the target frequency modulation parameter enables the circuit to be calibrated to output the target frequency;
and when the current input voltage is not in the preset voltage range, selecting a target frequency modulation parameter from the frequency modulation range information according to the endpoint value of the preset voltage range.
2. The method according to claim 1, wherein when the current input voltage is within the preset voltage range, selecting a target frequency modulation parameter from the frequency modulation range information according to the current frequency modulation parameter, wherein the target frequency modulation parameter enables the circuit to be calibrated to output the target frequency, comprises:
judging whether the current frequency modulation parameter is the endpoint value of the frequency modulation range information;
and when the current frequency modulation parameter is the endpoint value of the frequency modulation range information, determining the target frequency modulation parameter which enables the circuit to be calibrated to output the target frequency from the frequency modulation range information according to the endpoint value of the frequency modulation range information.
3. The method according to claim 2, wherein when the current frequency modulation parameter is an endpoint value of the frequency modulation range information, determining the target frequency modulation parameter for the circuit to be calibrated to output the target frequency from the frequency modulation range information according to the endpoint value of the frequency modulation range information comprises:
when the current frequency modulation parameter is the first endpoint value of the frequency modulation range information, determining that a first frequency modulation threshold value of the circuit to be calibrated is the current frequency modulation parameter, and under the same output frequency, the working voltage of the second endpoint value of the frequency modulation range information is smaller than the working voltage of the first endpoint value of the frequency modulation range information;
and selecting a second frequency modulation threshold value of the circuit to be calibrated from the frequency modulation range information, wherein when the circuit to be calibrated locks the same target frequency, the working voltage of the second frequency modulation threshold value is greater than that of the first frequency modulation threshold value through the first frequency modulation threshold value and the second frequency modulation threshold value.
4. The method according to claim 2, wherein when the current frequency modulation parameter is an endpoint value of the frequency modulation range information, determining the target frequency modulation parameter for the circuit to be calibrated to output the target frequency from the frequency modulation range information according to the endpoint value of the frequency modulation range information comprises:
when the current frequency modulation parameter is the second endpoint value of the frequency modulation range information, determining that a second frequency modulation threshold value of the circuit to be calibrated is the current frequency modulation parameter, and under the same output frequency, the working voltage of the second endpoint value of the frequency modulation range information is smaller than the working voltage of the first endpoint value of the frequency modulation range information;
and selecting a first frequency modulation threshold value of the circuit to be calibrated from the frequency modulation range information, wherein when the circuit to be calibrated locks the same target frequency, the working voltage of the second frequency modulation threshold value is greater than that of the first frequency modulation threshold value through the first frequency modulation threshold value and the second frequency modulation threshold value.
5. The method of claim 2, further comprising:
when the current frequency modulation parameter is not the endpoint value of the frequency modulation range information, judging whether a first frequency modulation threshold value or a second frequency modulation threshold value exists in the circuit to be calibrated, wherein when the same target frequency is locked by the circuit to be calibrated, the working voltage of the second frequency modulation threshold value is larger than that of the first frequency modulation threshold value through the first frequency modulation threshold value and the second frequency modulation threshold value;
when the first frequency modulation threshold value exists in the circuit to be calibrated, selecting a second frequency modulation threshold value of the circuit to be calibrated from the frequency modulation range information;
and when the second frequency modulation threshold value exists in the circuit to be calibrated, selecting a first frequency modulation threshold value of the circuit to be calibrated from the frequency modulation range information.
6. The method of claim 1, wherein the selecting a target frequency modulation parameter from the frequency modulation range information according to an endpoint value of the preset voltage range further comprises:
when the current input voltage is not within the preset voltage range, judging whether the current input voltage is larger than the upper end value of the preset voltage range or smaller than the lower end value of the preset voltage range, wherein the upper end value of the preset voltage range is larger than the lower end value of the preset voltage range;
when the current input voltage is larger than the upper end value of the preset voltage range, determining that a first frequency modulation threshold value of the circuit to be calibrated is a frequency modulation parameter of which the working voltage is smaller than the current input voltage;
and selecting a second frequency modulation threshold value of the circuit to be calibrated from the frequency modulation range information, wherein when the circuit to be calibrated locks the same target frequency, the working voltage of the second frequency modulation threshold value is greater than that of the first frequency modulation threshold value through the first frequency modulation threshold value and the second frequency modulation threshold value.
7. The method of claim 6, further comprising:
when the current input voltage is smaller than the lower end value of the preset voltage range, determining that a second frequency modulation threshold value of the circuit to be calibrated is a frequency modulation parameter of which the working voltage is larger than the current input voltage;
and selecting a first frequency modulation threshold value of the circuit to be calibrated from the frequency modulation range information.
8. The method according to claim 3, 5 or 6, wherein the selecting a second frequency modulation threshold of the circuit to be calibrated from the frequency modulation range information comprises:
when the first frequency modulation threshold value exists in the circuit to be calibrated, in the frequency modulation range information, after the current input voltage is decreased according to a preset step length, obtaining a first frequency modulation parameter to which the decreased working voltage belongs, and sending the first frequency modulation parameter to the circuit to be calibrated;
acquiring a first input voltage of the circuit to be calibrated when the target frequency is locked under the condition of the first frequency modulation parameter, and judging whether the first input voltage is within the preset voltage range;
and when the first input voltage is within the preset voltage range, circularly executing the step of selecting a target frequency modulation parameter from the frequency modulation range information according to the current frequency modulation parameter, wherein the target frequency modulation parameter enables the circuit to be calibrated to output the target frequency, and executing the step of selecting the target frequency modulation parameter from the frequency modulation range information according to the endpoint value of the preset voltage range until the first input voltage is not within the preset voltage range.
9. The method according to claim 4, 5 or 7, wherein the selecting a first frequency modulation threshold of the circuit to be calibrated from the frequency modulation range information comprises:
when the circuit to be calibrated already has the second frequency modulation threshold, in the frequency modulation range information, after the current input voltage is increased in a preset step length, obtaining a second frequency modulation parameter to which the increased working voltage belongs, and sending the second frequency modulation parameter to the circuit to be calibrated;
acquiring a second input voltage of the circuit to be calibrated when the target frequency is locked under the condition of the second frequency modulation parameter, and judging whether the second input voltage is within the preset voltage range;
and when the second input voltage is within the preset voltage range, circularly executing the step of selecting a target frequency modulation parameter from the frequency modulation range information according to the current frequency modulation parameter, wherein the target frequency modulation parameter enables the circuit to be calibrated to output the target frequency, and executing the step of selecting the target frequency modulation parameter from the frequency modulation range information according to the endpoint value of the preset voltage range until the second input voltage is not within the preset voltage range.
10. The method of any of claims 3 to 7, further comprising:
acquiring a frequency modulation factor of the circuit to be calibrated;
and selecting the target frequency modulation parameter from the frequency modulation range information according to the second frequency modulation threshold, the first frequency modulation threshold and the frequency modulation factor.
11. The method of claim 1, further comprising:
and sending the target frequency modulation parameter to the circuit to be calibrated.
12. A circuit calibration device, comprising:
the calibration device comprises an acquisition module, a calibration module and a control module, wherein the acquisition module is used for acquiring the current input voltage, the current frequency modulation parameter and preset frequency modulation range information of a circuit to be calibrated when the circuit to be calibrated locks a preset target frequency;
the judging module is used for judging whether the current input voltage is within a preset voltage range or not;
a selecting module, configured to select a target frequency modulation parameter from the frequency modulation range information according to the current frequency modulation parameter when the current input voltage is within the preset voltage range, where the target frequency modulation parameter enables the circuit to be calibrated to output the target frequency;
and the determining module is used for selecting a target frequency modulation parameter from the frequency modulation range information according to an endpoint value of the preset voltage range when the current input voltage is not in the preset voltage range.
13. The apparatus of claim 12, wherein the selected module comprises:
the first judgment unit is used for judging whether the current frequency modulation parameter is the endpoint value of the frequency modulation range information;
the first determining unit is used for determining the target frequency modulation parameter which enables the circuit to be calibrated to output the target frequency from the frequency modulation range information according to the endpoint value of the frequency modulation range information when the current frequency modulation parameter is the endpoint value of the frequency modulation range information.
14. The apparatus of claim 13, wherein the first determining unit is configured to:
when the current frequency modulation parameter is the first endpoint value of the frequency modulation range information, determining that a first frequency modulation threshold value of the circuit to be calibrated is the current frequency modulation parameter, and under the same output frequency, the working voltage of the second endpoint value of the frequency modulation range information is smaller than the working voltage of the first endpoint value of the frequency modulation range information;
and selecting a second frequency modulation threshold value of the circuit to be calibrated from the frequency modulation range information, wherein when the circuit to be calibrated locks the same target frequency, the working voltage of the second frequency modulation threshold value is greater than that of the first frequency modulation threshold value through the first frequency modulation threshold value and the second frequency modulation threshold value.
15. The apparatus of claim 13, wherein the first determining unit is configured to:
when the current frequency modulation parameter is the second endpoint value of the frequency modulation range information, determining that a second frequency modulation threshold value of the circuit to be calibrated is the current frequency modulation parameter, and under the same output frequency, the working voltage of the second endpoint value of the frequency modulation range information is smaller than the working voltage of the first endpoint value of the frequency modulation range information;
and selecting a first frequency modulation threshold value of the circuit to be calibrated from the frequency modulation range information, wherein when the circuit to be calibrated locks the same target frequency, the working voltage of the second frequency modulation threshold value is greater than that of the first frequency modulation threshold value through the first frequency modulation threshold value and the second frequency modulation threshold value.
16. The apparatus of claim 13, wherein the selected module further comprises:
a second determining unit, configured to determine whether the circuit to be calibrated already has a first frequency modulation threshold or a second frequency modulation threshold when the current frequency modulation parameter is not an endpoint value of the frequency modulation range information, where the first frequency modulation threshold and the second frequency modulation threshold enable a working voltage of the second frequency modulation threshold to be greater than a working voltage of the first frequency modulation threshold when the circuit to be calibrated locks the same target frequency;
the first selection unit is used for selecting a second frequency modulation threshold value of the circuit to be calibrated from the frequency modulation range information when the first frequency modulation threshold value exists in the circuit to be calibrated;
the first selecting unit is further configured to select the first frequency modulation threshold of the circuit to be calibrated from the frequency modulation range information when the second frequency modulation threshold exists in the circuit to be calibrated.
17. The apparatus of claim 12, wherein the determining module comprises:
a third judging unit, configured to judge whether the current input voltage is greater than an upper end value of the preset voltage range or smaller than a lower end value of the preset voltage range when the current input voltage is not within the preset voltage range, where the upper end value of the preset voltage range is greater than the lower end value of the preset voltage range;
the second determining unit is used for determining that the first frequency modulation threshold of the circuit to be calibrated is a frequency modulation parameter of which the working voltage is smaller than the current input voltage when the current input voltage is larger than the upper end point value of the preset voltage range;
and the second selection unit is used for selecting a second frequency modulation threshold value of the circuit to be calibrated from the frequency modulation range information, and when the same target frequency is locked by the circuit to be calibrated, the working voltage of the second frequency modulation threshold value is larger than that of the first frequency modulation threshold value through the first frequency modulation threshold value and the second frequency modulation threshold value.
18. The apparatus of claim 17, wherein the second determining unit is further configured to:
when the current input voltage is smaller than the lower end value of the preset voltage range, determining that a second frequency modulation threshold value of the circuit to be calibrated is a frequency modulation parameter of which the working voltage is larger than the current input voltage;
the second selecting unit is further configured to select a first frequency modulation threshold of the circuit to be calibrated from the frequency modulation range information.
19. The apparatus according to claim 14, 16 or 17, wherein said selecting a second frequency modulation threshold of the circuit to be calibrated from the frequency modulation range information comprises:
when the first frequency modulation threshold value exists in the circuit to be calibrated, in the frequency modulation range information, after the current input voltage is decreased according to a preset step length, obtaining a first frequency modulation parameter to which the decreased working voltage belongs, and sending the first frequency modulation parameter to the circuit to be calibrated;
acquiring a first input voltage of the circuit to be calibrated when the target frequency is locked under the condition of the first frequency modulation parameter, and judging whether the first input voltage is within the preset voltage range;
and when the first input voltage is within the preset voltage range, circularly executing the step of selecting a target frequency modulation parameter from the frequency modulation range information according to the current frequency modulation parameter, wherein the target frequency modulation parameter enables the circuit to be calibrated to output the target frequency, and executing the step of selecting the target frequency modulation parameter from the frequency modulation range information according to the endpoint value of the preset voltage range until the first input voltage is not within the preset voltage range.
20. The apparatus according to claim 15, 16 or 18, wherein said selecting a first frequency modulation threshold of the circuit to be calibrated from the frequency modulation range information comprises:
when the circuit to be calibrated already has the second frequency modulation threshold, in the frequency modulation range information, after the current input voltage is increased in a preset step length, obtaining a second frequency modulation parameter to which the increased working voltage belongs, and sending the second frequency modulation parameter to the circuit to be calibrated;
acquiring a second input voltage of the circuit to be calibrated when the target frequency is locked under the condition of the second frequency modulation parameter, and judging whether the second input voltage is within the preset voltage range;
and when the second input voltage is within the preset voltage range, circularly executing the step of selecting a target frequency modulation parameter from the frequency modulation range information according to the current frequency modulation parameter, wherein the target frequency modulation parameter enables the circuit to be calibrated to output the target frequency, and executing the step of selecting the target frequency modulation parameter from the frequency modulation range information according to the endpoint value of the preset voltage range until the second input voltage is not within the preset voltage range.
21. The apparatus of any one of claims 14 to 18,
the acquisition module is further used for acquiring the frequency modulation factor of the circuit to be calibrated;
the selecting module is further configured to select the target frequency modulation parameter from the frequency modulation range information according to the second frequency modulation threshold, the first frequency modulation threshold, and the frequency modulation factor.
22. The apparatus of claim 12, further comprising:
and the sending module is used for sending the target frequency modulation parameter to the circuit to be calibrated.
23. Radio frequency circuitry, comprising:
a voltage controlled oscillator;
the input end of the frequency divider is connected with the voltage-controlled oscillator and is used for generating a frequency division signal after frequency division processing is carried out on the output frequency of the voltage-controlled oscillator;
the phase frequency detector is connected with the output end of the frequency divider and used for comparing the reference frequency with the frequency division signal to generate a comparison signal;
the charge pump is connected with the phase frequency detector and used for generating voltage-controlled voltage according to the comparison signal;
the input end of the loop filter is connected with the charge pump, the output end of the loop filter is connected with the voltage-controlled oscillator, and the loop filter is used for generating the input voltage of the voltage-controlled oscillator after filtering the voltage-controlled voltage and transmitting the input voltage to the voltage-controlled oscillator;
calibration circuitry, connected to said loop filter and said voltage controlled oscillator, respectively, for calibrating said voltage controlled oscillator using a circuit calibration method as claimed in any one of claims 1 to 11.
24. An electronic device, comprising:
a memory to store a computer program;
a processor configured to perform the method of any one of claims 1 to 11 to calibrate the circuit to be calibrated.
25. A non-transitory electronic device readable storage medium, comprising: program which, when run by an electronic device, causes the electronic device to perform the method of any one of claims 1 to 11.
Technical Field
The present application relates to the field of communications technologies, and in particular, to a circuit calibration method, apparatus, circuit, device, and storage medium.
Background
A Phase Locked Loop (PLL) is a negative feedback control system that uses a voltage generated by phase synchronization to tune a voltage controlled oscillator to generate a target frequency.
Phase-locked loops are generally applied to receivers for wireless communication, and the operating principle of the phase-locked loops is as follows: the voltage-controlled oscillator provides a signal, one part is used as output, the other part is compared with a local oscillator signal generated by a PLL IC (phase-locked loop Integrated Circuit) through frequency division, in order to keep the frequency constant, the phase difference is required to be unchanged, if the phase difference is changed, the voltage of the voltage output end of the PLL IC is changed, and the voltage-controlled oscillator is controlled until the phase difference is recovered. The purpose of frequency locking is achieved. The frequency and phase of the voltage-controlled oscillator are kept in a definite relationship with the input signal.
With the development of wireless communication technology, the requirements on the operating performance of the phase-locked loop are higher and higher.
Disclosure of Invention
An object of the embodiments of the present application is to provide a circuit calibration method, apparatus, circuit, device, and storage medium, which are used to automatically select a suitable target frequency modulation parameter for a circuit to be calibrated from frequency modulation range information of the circuit to be calibrated according to a current input voltage and a preset target frequency of the circuit to be calibrated, and further, to achieve automatic calibration of the circuit to be calibrated.
A first aspect of an embodiment of the present application provides a circuit calibration method, including: when a circuit to be calibrated locks a preset target frequency, acquiring the current input voltage, the current frequency modulation parameter and preset frequency modulation range information of the circuit to be calibrated; judging whether the current input voltage is within a preset voltage range or not; when the current input voltage is within the preset voltage range, selecting a target frequency modulation parameter from the frequency modulation range information according to the current frequency modulation parameter, wherein the target frequency modulation parameter enables the circuit to be calibrated to output the target frequency; and when the current input voltage is not in the preset voltage range, selecting a target frequency modulation parameter from the frequency modulation range information according to the endpoint value of the preset voltage range.
In an embodiment, when the current input voltage is within the preset voltage range, selecting a target frequency modulation parameter from the frequency modulation range information according to the current frequency modulation parameter, where the target frequency modulation parameter enables the circuit to be calibrated to output the target frequency includes: judging whether the current frequency modulation parameter is the endpoint value of the frequency modulation range information; and when the current frequency modulation parameter is the endpoint value of the frequency modulation range information, determining the target frequency modulation parameter which enables the circuit to be calibrated to output the target frequency from the frequency modulation range information according to the endpoint value of the frequency modulation range information.
In an embodiment, when the current frequency modulation parameter is an endpoint value of the frequency modulation range information, determining the target frequency modulation parameter for the circuit to be calibrated to output the target frequency from the frequency modulation range information according to the endpoint value of the frequency modulation range information includes: when the current frequency modulation parameter is the first endpoint value of the frequency modulation range information, determining that a first frequency modulation threshold value of the circuit to be calibrated is the current frequency modulation parameter, and under the same output frequency, the working voltage of the second endpoint value of the frequency modulation range information is smaller than the working voltage of the first endpoint value of the frequency modulation range information; and selecting a second frequency modulation threshold value of the circuit to be calibrated from the frequency modulation range information, wherein when the circuit to be calibrated locks the same target frequency, the working voltage of the second frequency modulation threshold value is greater than that of the first frequency modulation threshold value through the first frequency modulation threshold value and the second frequency modulation threshold value.
In an embodiment, when the current frequency modulation parameter is an endpoint value of the frequency modulation range information, determining the target frequency modulation parameter for the circuit to be calibrated to output the target frequency from the frequency modulation range information according to the endpoint value of the frequency modulation range information includes: when the current frequency modulation parameter is the second endpoint value of the frequency modulation range information, determining that a second frequency modulation threshold value of the circuit to be calibrated is the current frequency modulation parameter, and under the same output frequency, the working voltage of the second endpoint value of the frequency modulation range information is smaller than the working voltage of the first endpoint value of the frequency modulation range information; and selecting a first frequency modulation threshold value of the circuit to be calibrated from the frequency modulation range information, wherein when the circuit to be calibrated locks the same target frequency, the working voltage of the second frequency modulation threshold value is greater than that of the first frequency modulation threshold value through the first frequency modulation threshold value and the second frequency modulation threshold value.
In one embodiment, the method further comprises: when the current frequency modulation parameter is not the endpoint value of the frequency modulation range information, judging whether a first frequency modulation threshold value or a second frequency modulation threshold value exists in the circuit to be calibrated, wherein when the same target frequency is locked by the circuit to be calibrated, the working voltage of the second frequency modulation threshold value is larger than that of the first frequency modulation threshold value through the first frequency modulation threshold value and the second frequency modulation threshold value; when the first frequency modulation threshold value exists in the circuit to be calibrated, selecting a second frequency modulation threshold value of the circuit to be calibrated from the frequency modulation range information; and when the second frequency modulation threshold value exists in the circuit to be calibrated, selecting a first frequency modulation threshold value of the circuit to be calibrated from the frequency modulation range information.
In an embodiment, the selecting the target frequency modulation parameter from the frequency modulation range information according to the endpoint value of the preset voltage range further includes: when the current input voltage is not within the preset voltage range, judging whether the current input voltage is larger than the upper end value of the preset voltage range or smaller than the lower end value of the preset voltage range, wherein the upper end value of the preset voltage range is larger than the lower end value of the preset voltage range; when the current input voltage is larger than the upper end value of the preset voltage range, determining that a first frequency modulation threshold value of the circuit to be calibrated is a frequency modulation parameter of which the working voltage is smaller than the current input voltage; and selecting a second frequency modulation threshold value of the circuit to be calibrated from the frequency modulation range information, wherein when the circuit to be calibrated locks the same target frequency, the working voltage of the second frequency modulation threshold value is greater than that of the first frequency modulation threshold value through the first frequency modulation threshold value and the second frequency modulation threshold value.
In one embodiment, the method further comprises: when the current input voltage is smaller than the lower end value of the preset voltage range, determining that a second frequency modulation threshold value of the circuit to be calibrated is a frequency modulation parameter of which the working voltage is larger than the current input voltage; and selecting a first frequency modulation threshold value of the circuit to be calibrated from the frequency modulation range information.
In an embodiment, the selecting the second frequency modulation threshold of the circuit to be calibrated from the frequency modulation range information includes: when the first frequency modulation threshold value exists in the circuit to be calibrated, in the frequency modulation range information, after the current input voltage is decreased according to a preset step length, obtaining a first frequency modulation parameter to which the decreased working voltage belongs, and sending the first frequency modulation parameter to the circuit to be calibrated; acquiring a first input voltage of the circuit to be calibrated when the target frequency is locked under the condition of the first frequency modulation parameter, and judging whether the first input voltage is within the preset voltage range; and when the first input voltage is within the preset voltage range, circularly executing the step of selecting a target frequency modulation parameter from the frequency modulation range information according to the current frequency modulation parameter, wherein the target frequency modulation parameter enables the circuit to be calibrated to output the target frequency, and executing the step of selecting the target frequency modulation parameter from the frequency modulation range information according to the endpoint value of the preset voltage range until the first input voltage is not within the preset voltage range.
In an embodiment, the selecting the first frequency modulation threshold of the circuit to be calibrated from the frequency modulation range information includes: when the circuit to be calibrated already has the second frequency modulation threshold, in the frequency modulation range information, after the current input voltage is increased in a preset step length, obtaining a second frequency modulation parameter to which the increased working voltage belongs, and sending the second frequency modulation parameter to the circuit to be calibrated; acquiring a second input voltage of the circuit to be calibrated when the target frequency is locked under the condition of the second frequency modulation parameter, and judging whether the second input voltage is within the preset voltage range; and when the second input voltage is within the preset voltage range, circularly executing the step of selecting a target frequency modulation parameter from the frequency modulation range information according to the current frequency modulation parameter, wherein the target frequency modulation parameter enables the circuit to be calibrated to output the target frequency, and executing the step of selecting the target frequency modulation parameter from the frequency modulation range information according to the endpoint value of the preset voltage range until the second input voltage is not within the preset voltage range.
In one embodiment, the method further comprises: acquiring a frequency modulation factor of the circuit to be calibrated; and selecting the target frequency modulation parameter from the frequency modulation range information according to the second frequency modulation threshold, the first frequency modulation threshold and the frequency modulation factor.
In one embodiment, the method further comprises: and sending the target frequency modulation parameter to the circuit to be calibrated.
A second aspect of the embodiments of the present application provides a circuit calibration apparatus, including: the calibration device comprises an acquisition module, a calibration module and a control module, wherein the acquisition module is used for acquiring the current input voltage, the current frequency modulation parameter and preset frequency modulation range information of a circuit to be calibrated when the circuit to be calibrated locks a preset target frequency; the judging module is used for judging whether the current input voltage is within a preset voltage range or not; a selecting module, configured to select a target frequency modulation parameter from the frequency modulation range information according to the current frequency modulation parameter when the current input voltage is within the preset voltage range, where the target frequency modulation parameter enables the circuit to be calibrated to output the target frequency; and the determining module is used for selecting a target frequency modulation parameter from the frequency modulation range information according to an endpoint value of the preset voltage range when the current input voltage is not in the preset voltage range.
In one embodiment, the selected module comprises: the first judgment unit is used for judging whether the current frequency modulation parameter is the endpoint value of the frequency modulation range information; the first determining unit is used for determining the target frequency modulation parameter which enables the circuit to be calibrated to output the target frequency from the frequency modulation range information according to the endpoint value of the frequency modulation range information when the current frequency modulation parameter is the endpoint value of the frequency modulation range information.
In one embodiment, the first determining unit is configured to: when the current frequency modulation parameter is the first endpoint value of the frequency modulation range information, determining that a first frequency modulation threshold value of the circuit to be calibrated is the current frequency modulation parameter, and under the same output frequency, the working voltage of the second endpoint value of the frequency modulation range information is smaller than the working voltage of the first endpoint value of the frequency modulation range information; and selecting a second frequency modulation threshold value of the circuit to be calibrated from the frequency modulation range information, wherein when the circuit to be calibrated locks the same target frequency, the working voltage of the second frequency modulation threshold value is greater than that of the first frequency modulation threshold value through the first frequency modulation threshold value and the second frequency modulation threshold value.
In one embodiment, the first determining unit is configured to: when the current frequency modulation parameter is the second endpoint value of the frequency modulation range information, determining that a second frequency modulation threshold value of the circuit to be calibrated is the current frequency modulation parameter, and under the same output frequency, the working voltage of the second endpoint value of the frequency modulation range information is smaller than the working voltage of the first endpoint value of the frequency modulation range information; and selecting a first frequency modulation threshold value of the circuit to be calibrated from the frequency modulation range information, wherein when the circuit to be calibrated locks the same target frequency, the working voltage of the second frequency modulation threshold value is greater than that of the first frequency modulation threshold value through the first frequency modulation threshold value and the second frequency modulation threshold value.
In one embodiment, the selecting module further comprises: a second determining unit, configured to determine whether the circuit to be calibrated already has a first frequency modulation threshold or a second frequency modulation threshold when the current frequency modulation parameter is not an endpoint value of the frequency modulation range information, where the first frequency modulation threshold and the second frequency modulation threshold enable a working voltage of the second frequency modulation threshold to be greater than a working voltage of the first frequency modulation threshold when the circuit to be calibrated locks the same target frequency; the first selection unit is used for selecting a second frequency modulation threshold value of the circuit to be calibrated from the frequency modulation range information when the first frequency modulation threshold value exists in the circuit to be calibrated; the first selecting unit is further configured to select the first frequency modulation threshold of the circuit to be calibrated from the frequency modulation range information when the second frequency modulation threshold exists in the circuit to be calibrated.
In one embodiment, the determining module includes: a third judging unit, configured to judge whether the current input voltage is greater than an upper end value of the preset voltage range or smaller than a lower end value of the preset voltage range when the current input voltage is not within the preset voltage range, where the upper end value of the preset voltage range is greater than the lower end value of the preset voltage range; the second determining unit is used for determining that the first frequency modulation threshold of the circuit to be calibrated is a frequency modulation parameter of which the working voltage is smaller than the current input voltage when the current input voltage is larger than the upper end point value of the preset voltage range; and the second selection unit is used for selecting a second frequency modulation threshold value of the circuit to be calibrated from the frequency modulation range information, and when the same target frequency is locked by the circuit to be calibrated, the working voltage of the second frequency modulation threshold value is larger than that of the first frequency modulation threshold value through the first frequency modulation threshold value and the second frequency modulation threshold value.
In an embodiment, the second determining unit is further configured to: when the current input voltage is smaller than the lower end value of the preset voltage range, determining that a second frequency modulation threshold value of the circuit to be calibrated is a frequency modulation parameter of which the working voltage is larger than the current input voltage; the second selecting unit is further configured to select a first frequency modulation threshold of the circuit to be calibrated from the frequency modulation range information.
In an embodiment, the selecting the second frequency modulation threshold of the circuit to be calibrated from the frequency modulation range information includes: when the first frequency modulation threshold value exists in the circuit to be calibrated, in the frequency modulation range information, after the current input voltage is decreased according to a preset step length, obtaining a first frequency modulation parameter to which the decreased working voltage belongs, and sending the first frequency modulation parameter to the circuit to be calibrated; acquiring a first input voltage of the circuit to be calibrated when the target frequency is locked under the condition of the first frequency modulation parameter, and judging whether the first input voltage is within the preset voltage range; and when the first input voltage is within the preset voltage range, circularly executing the step of selecting a target frequency modulation parameter from the frequency modulation range information according to the current frequency modulation parameter, wherein the target frequency modulation parameter enables the circuit to be calibrated to output the target frequency, and executing the step of selecting the target frequency modulation parameter from the frequency modulation range information according to the endpoint value of the preset voltage range until the first input voltage is not within the preset voltage range.
In an embodiment, the selecting the first frequency modulation threshold of the circuit to be calibrated from the frequency modulation range information includes: when the circuit to be calibrated already has the second frequency modulation threshold, in the frequency modulation range information, after the current input voltage is increased in a preset step length, obtaining a second frequency modulation parameter to which the increased working voltage belongs, and sending the second frequency modulation parameter to the circuit to be calibrated; acquiring a second input voltage of the circuit to be calibrated when the target frequency is locked under the condition of the second frequency modulation parameter, and judging whether the second input voltage is within the preset voltage range; and when the second input voltage is within the preset voltage range, circularly executing the step of selecting a target frequency modulation parameter from the frequency modulation range information according to the current frequency modulation parameter, wherein the target frequency modulation parameter enables the circuit to be calibrated to output the target frequency, and executing the step of selecting the target frequency modulation parameter from the frequency modulation range information according to the endpoint value of the preset voltage range until the second input voltage is not within the preset voltage range.
In an embodiment, the obtaining module is further configured to obtain a frequency modulation factor of the circuit to be calibrated; the selecting module is further configured to select the target frequency modulation parameter from the frequency modulation range information according to the second frequency modulation threshold, the first frequency modulation threshold, and the frequency modulation factor.
In one embodiment, the method further comprises: and the sending module is used for sending the target frequency modulation parameter to the circuit to be calibrated.
A third aspect of the embodiments of the present application provides a radio frequency circuit system, including: a voltage controlled oscillator; the input end of the frequency divider is connected with the voltage-controlled oscillator and is used for generating a frequency division signal after frequency division processing is carried out on the output frequency of the voltage-controlled oscillator; the phase frequency detector is connected with the output end of the frequency divider and used for comparing the reference frequency with the frequency division signal to generate a comparison signal; the charge pump is connected with the phase frequency detector and used for generating voltage-controlled voltage according to the comparison signal; the input end of the loop filter is connected with the charge pump, the output end of the loop filter is connected with the voltage-controlled oscillator, and the loop filter is used for generating the input voltage of the voltage-controlled oscillator after filtering the voltage-controlled voltage and transmitting the input voltage to the voltage-controlled oscillator; and a calibration circuit, respectively connected to the loop filter and the voltage-controlled oscillator, for calibrating the voltage-controlled oscillator by using the method according to the first aspect of the embodiments of the present application and any embodiment thereof.
A fourth aspect of the embodiments of the present application provides an electronic device, including: a memory to store a computer program; the processor is configured to execute the method of the first aspect and any embodiment thereof of the embodiments of the present application to identify flow information of document information.
A fifth aspect of embodiments of the present application provides a non-transitory electronic device-readable storage medium, including: a program which, when run by an electronic device, causes the electronic device to perform the method of the first aspect of an embodiment of the present application and any embodiment thereof.
According to the circuit calibration method, the circuit calibration device, the circuit calibration equipment and the storage medium, the current input voltage when the circuit to be calibrated locks the preset target frequency is compared with the preset voltage range, different modes are adopted according to the comparison result, and the target frequency modulation parameter is selected from the frequency modulation range information, so that the circuit to be calibrated outputs the target frequency under the condition of the target frequency modulation parameter, and the circuit to be calibrated is automatically calibrated.
Drawings
In order to more clearly illustrate the technical solutions of the embodiments of the present application, the drawings that are required to be used in the embodiments of the present application will be briefly described below, it should be understood that the following drawings only illustrate some embodiments of the present application and therefore should not be considered as limiting the scope, and that those skilled in the art can also obtain other related drawings based on the drawings without inventive efforts.
Fig. 1 is a schematic structural diagram of an electronic device according to an embodiment of the present application;
fig. 2A is a schematic structural diagram of a radio frequency circuit system according to an embodiment of the present application;
fig. 2B is a schematic diagram of a frequency characteristic of a voltage-controlled oscillator according to an embodiment of the present application;
fig. 2C is a circuit diagram of a voltage controlled oscillator according to an embodiment of the present application;
fig. 2D is a schematic diagram of a frequency characteristic of a voltage-controlled oscillator according to an embodiment of the present application;
FIG. 3A is a schematic flowchart of a circuit calibration method according to an embodiment of the present application;
fig. 3B is a schematic diagram of a frequency characteristic of a voltage-controlled oscillator according to an embodiment of the present application;
FIG. 4 is a flowchart illustrating a circuit calibration method according to an embodiment of the present application;
FIG. 5 is a flowchart illustrating a step 410 of a circuit calibration method according to an embodiment of the present application;
FIG. 6 is a flowchart illustrating a step 411 of a circuit calibration method according to an embodiment of the present application;
FIG. 7A is a flowchart illustrating a circuit calibration method according to an embodiment of the present application;
FIG. 7B is a signal waveform diagram of the RF circuitry according to an embodiment of the present application;
FIG. 8A is a schematic diagram of a circuit calibration device according to an embodiment of the present application;
fig. 8B is a schematic structural diagram of a circuit calibration device according to an embodiment of the present application.
Reference numerals:
1-electronics, 10-bus, 11-processor, 12-memory, 200-radio frequency circuitry, XTAL-crystal oscillator, PFD-phase frequency detector, CP-charge pump, LF-loop filter, VCO-voltage controlled oscillator, AC-calibration circuit, DIV-frequency divider.
Detailed Description
The technical solutions in the embodiments of the present application will be described below with reference to the drawings in the embodiments of the present application. In the description of the present application, the terms "first," "second," and the like are used solely to distinguish one from another and are not to be construed as indicating or implying relative importance.
As shown in fig. 1, the present embodiment provides an
In an embodiment, the
As shown in fig. 2A, the present embodiment provides a radio
And the calibration circuit AC is respectively connected with the loop filter LF and the voltage-controlled oscillator VCO, and at least comprises a comparator and a data controller. The calibration circuit AC may be implemented by the
In an embodiment, the input voltage Vc is also sent to the comparator of the calibration circuit AC while being sent to the VCO, and the comparator obtains fast and slow output signals, and the digital controller determines the operating frequency curve of the VCO according to the two output band selection signals (band _ sel). Usually, the frequency of the crystal oscillator XTAL may be tens of MHz to several hours MHz, and the output frequency of the voltage controlled oscillator VCO is between hundreds of MHz to several GHz, so the output frequency Fout of the voltage controlled oscillator VCO needs to be divided by the frequency divider DIV and then compared with the reference frequency Fref, and different frequency division ratios are set to obtain different operating frequencies of the voltage controlled oscillator VCO.
In one embodiment, in the
In one embodiment, as shown in fig. 2C, the VCO may include: the circuit comprises a differential amplification circuit consisting of a transistor M1, a transistor M2, a current source A1 and two resistors L, and an adjustable capacitor array C1 and/or a capacitor array C2 which can adjust the frequency. The input voltage Vc is connected to one end of the capacitor array C1 and/or the capacitor array C2, and the capacitor array C1 and/or the capacitor array C2 are configurable and can be selected by cap _ sel.
In an actual production process, as process deviation and operating environment change, the frequency characteristic curve of the VCO may shift and change, and thus the target frequency may not be generated in some environments. The frequency tuning range is too wide, and when the input voltage Vc is within a certain range, the gain of the voltage-controlled oscillator VCO is very high, which makes the voltage-controlled oscillator VCO very sensitive to interference on the control line. Therefore, in order to ensure that the voltage controlled oscillator VCO can meet the design requirements, a digital tuning technique can be added. Multiple frequency characteristics may be achieved by varying the size of capacitor array C1 and/or capacitor array C2 in the voltage controlled oscillator VCO. As shown in fig. 2D, the voltage controlled oscillator VCO has 3 frequency characteristic curves, i.e., from curve1 to curve3, in which the capacitance of the voltage controlled oscillator VCO gradually becomes smaller and the frequency becomes higher in order.
If the value of the capacitor array of the voltage-controlled oscillator VCO is not proper, a blind zone exists between two adjacent curves, so that the adjacent frequency characteristic curves in the design must be overlapped, the slope of the frequency characteristic curve cannot be too high, and the final result is that enough curves must be available to realize accurate frequency, and the enough frequency characteristic curves constitute the frequency modulation range information of the voltage-controlled oscillator VCO.
Please refer to fig. 3A, which is a circuit calibration method according to an embodiment of the present application, and the method can be executed by the
step 301: when the circuit to be calibrated locks a preset target frequency, the current input voltage, the current frequency modulation parameter and preset frequency modulation range information of the circuit to be calibrated are obtained.
In this step, the circuit to be calibrated may be a voltage controlled oscillator VCO as shown in fig. 2A to 2D, and the target frequency may be preset according to the needs of the actual scene. When the voltage-controlled oscillator VCO is calibrated, after a new capacitor array is configured each time, the voltage-controlled oscillator VCO can stably lock a target frequency within a certain time, and when the voltage-controlled oscillator VCO locks a preset target frequency, the current input voltage, the current frequency modulation parameters and preset frequency modulation range information of the voltage-controlled oscillator VCO are acquired in real time. Wherein the current frequency modulation parameter may be a current capacitor array parameter of the voltage controlled oscillator VCO.
In an embodiment, as shown in fig. 3B, it is a schematic diagram of a digital tuning frequency characteristic curve of a voltage-controlled oscillator VCO in practical application (a flat partial curve of Fout when Vc is small is ignored here), and a total of nine frequency characteristic curves cure 1 to curve cure 9 are designed in the system, and may be used as frequency modulation range information of the voltage-controlled oscillator VCO. In practical application, the number N of frequency characteristic curves in the frequency modulation range information can be selected to be different values according to the process and precision requirements.
Step 302: and judging whether the current input voltage is within a preset voltage range, if so, entering step 303, and otherwise, entering step 304.
In this step, the preset voltage range may be set based on the circuit performance of the voltage controlled oscillator VCO, for example, a voltage range corresponding to an ideal operating region of the voltage controlled oscillator VCO is used as the preset voltage range. As shown in fig. 3B, if the ideal operating region of the voltage-controlled oscillator VCO is determined by the threshold voltage Vth1 and the threshold voltage Vth2 (assuming that Vth2> Vth1), which can be used to determine whether the input voltage Vc is within a reasonable range, Vth1 and Vth2 preset two end points of the voltage range. The method comprises the steps of judging whether the current input voltage is within a preset voltage range or not, and then tuning and calibrating the VCO by adopting different tuning modes based on the judgment result.
Step 303: and selecting a target frequency modulation parameter from the frequency modulation range information according to the current frequency modulation parameter, wherein the target frequency modulation parameter enables the circuit to be calibrated to output a target frequency.
In this step, since the VCO is likely to enter the non-ideal operating region when the input voltage Vc is too small or too large, only when the input voltage Vc is between Vth1 and Vth2 (i.e., within a preset voltage range), the input voltage Vc is considered to be a reasonable operating region. When the current input voltage is within a preset voltage range, selecting a target frequency modulation parameter from frequency modulation range information according to the current frequency modulation parameter, wherein the target frequency modulation parameter enables the circuit to be calibrated to output a target frequency.
In one embodiment, as shown in FIG. 3B, assume that the target frequency is f0In FIG. 3B, there are 5 curves that can achieve this target frequency f0Curves cure 3 to curve cure 7, and the input voltage Vc of the voltage-controlled oscillator VCO corresponding to each curve is V1, V2, V3, V4, and V5, respectively. Only Vc is a suitable operating point between the two thresholds Vth1 and Vth2, so of the five points shown in fig. 3B, V1 through V5, only V2, V3, V4 are candidate suitable operating points, although V1 and V5 can also achieve f0But it is not within the preset voltage range and therefore should not be adopted. Then, according to the current frequency modulation parameters, the most suitable target frequency modulation parameters are selected from the points V2, V3 and V4.
Step 304: and selecting a target frequency modulation parameter from the frequency modulation range information according to the endpoint value of the preset voltage range.
In this step, when the current input voltage is not within the preset voltage range, in order to calibrate the VCO, a target frequency modulation parameter may be selected from the frequency modulation range information according to a magnitude relationship between the current input voltage and an endpoint value of the preset voltage range.
The frequency characteristic curve of VCO in the circuit calibration method hasMany, the first step in actual operation is to find all target frequencies f that can be locked0The second step is to select a curve operating in a reasonable operating region from the curves, and the last step is to select a most suitable curve from the selected curves to configure to the VCO. The working frequency of the circuit is efficiently and accurately adjusted.
Please refer to fig. 4, which is a circuit calibration method according to an embodiment of the present application, and the method can be executed by the
step 401: when the circuit to be calibrated locks a preset target frequency, the current input voltage, the current frequency modulation parameter and preset frequency modulation range information of the circuit to be calibrated are obtained. See the description of step 301 in the above embodiments for details.
Step 402: and judging whether the current input voltage is within a preset voltage range. See the description of step 302 in the above embodiments for details. If yes, go to step 403, otherwise, go to step 407.
Step 403: and when the current input voltage is within the preset voltage range, judging whether the current frequency modulation parameter is the endpoint value of the frequency modulation range information. If the lower end point is reached, step 404 is entered, if the upper end point is reached, step 405 is entered, and if the lower end point is not reached, step 406 is entered.
In this step, when the current frequency modulation parameter is an endpoint value of the frequency modulation range information, a target frequency modulation parameter for causing the circuit to be calibrated to output the target frequency is determined from the frequency modulation range information according to the endpoint value of the frequency modulation range information. If the current fm parameter is the first endpoint value of the fm range information, go to step 404, if the current fm parameter is the upper endpoint value, go to step 405, and if the current fm parameter is not the upper endpoint value, go to step 406.
Step 404: and determining that a first frequency modulation threshold of the circuit to be calibrated is the current frequency modulation parameter, and under the same output frequency, the working voltage of the second endpoint value of the frequency modulation range information is smaller than the working voltage of the first endpoint value of the frequency modulation range information. Step 410 is then entered.
In this step, since the operating voltage of the second endpoint value of the frequency modulation range information is lower than the operating voltage of the first endpoint value of the frequency modulation range information under the same output frequency of the circuit to be calibrated, when the current frequency modulation parameter is the first endpoint value of the frequency modulation range information, it indicates that the operating voltage cannot be further increased, for example, if the
Step 405: and determining a second frequency modulation threshold value of the circuit to be calibrated as the current frequency modulation parameter, wherein the second endpoint value of the frequency modulation range information is greater than the first endpoint value of the frequency modulation range information. Step 411 is then entered.
In this step, when the current frequency modulation parameter is the second endpoint value of the frequency modulation range information, it indicates that the operating voltage cannot be further adjusted smaller, for example, the curve cure 9 shown in fig. 3B is the curve of the second endpoint, and then the curve cure 9 is directly used as the second frequency modulation threshold of the voltage controlled oscillator VCO. And proceeds to step 411.
Step 406: when the current frequency modulation parameter is not the endpoint value of the frequency modulation range information, whether a first frequency modulation threshold or a second frequency modulation threshold exists in the circuit to be calibrated is judged, and when the same target frequency is locked by the circuit to be calibrated, the working voltage of the second frequency modulation threshold is larger than that of the first frequency modulation threshold through the first frequency modulation threshold and the second frequency modulation threshold. If the first frequency modulation threshold exists, go to step 410, and if the second frequency modulation threshold exists, go to step 411.
Step 407: and when the current input voltage is not in the preset voltage range, judging whether the current input voltage is larger than the upper end value of the preset voltage range or smaller than the lower end value of the preset voltage range, wherein the upper end value of the preset voltage range is larger than the lower end value of the preset voltage range. If the upper end value of the preset voltage range is larger than the upper end value of the preset voltage range, the step 408 is performed, and if the lower end value of the preset voltage range is smaller than the lower end value of the preset voltage range, the step 409 is performed.
Step 408: when the current input voltage is larger than the upper end value of the preset voltage range, determining that a first frequency modulation threshold of the circuit to be calibrated is a frequency modulation parameter of which the working voltage is smaller than the current input voltage. Step 410 is then entered.
In this step, the working voltage is the input voltage Vc when the circuit to be calibrated locks the target frequency, and when the current input voltage is greater than the upper end value of the preset voltage range, it indicates that the working voltage of the current frequency modulation parameter has exceeded the optimal working state, and the working voltage should be reduced, so the frequency modulation parameter whose working voltage is less than the current input voltage is selected from the frequency modulation range information as the first frequency modulation threshold of the circuit to be calibrated.
Step 409: and when the current input voltage is smaller than the lower end value of the preset voltage range, determining that a second frequency modulation threshold of the circuit to be calibrated is a frequency modulation parameter of which the working voltage is larger than the current input voltage. Step 411 is then entered.
In this step, the operating voltage is the input voltage when the circuit to be calibrated locks the target frequency, and when the current input voltage is less than the upper end value of the preset voltage range, it indicates that the operating voltage of the current frequency modulation parameter is already lower than the optimal operating state, and the operating voltage should be increased, so the frequency modulation parameter of which the operating voltage is greater than the current input voltage is selected from the frequency modulation range information as the second frequency modulation threshold of the circuit to be calibrated.
Step 410: from the fm range information, a second fm threshold of the circuit to be calibrated is selected, and then step 412 is performed.
Step 411: from the frequency modulation range information, a first frequency modulation threshold of the circuit to be calibrated is selected, and step 412 is entered.
Step 412: and acquiring the frequency modulation factor of the circuit to be calibrated.
In this step, the frequency modulation factor mainly functions to bias the final target frequency modulation parameter to a certain direction, and can be selected based on the working performance of the circuit system. For example, in the actual circuit working process, the ideal working state is closer to the upper end point of the preset voltage range, and the frequency modulation factor can be set to be biased to the upper end point of the preset voltage range, so as to ensure that a more appropriate target frequency modulation parameter is selected.
Step 413: and selecting a target frequency modulation parameter from the frequency modulation range information according to the second frequency modulation threshold, the first frequency modulation threshold and the frequency modulation factor.
Step 414: and sending the target frequency modulation parameter to a circuit to be calibrated.
In one embodiment, referring to fig. 5, step 410 may include the following sub-steps:
step S1: when the first frequency modulation threshold value exists in the circuit to be calibrated, in the frequency modulation range information, after the current input voltage is decreased according to the preset step length, the first frequency modulation parameter to which the decreased working voltage belongs is obtained, and the first frequency modulation parameter is sent to the circuit to be calibrated.
Step S2: the method comprises the steps of obtaining a first input voltage when a circuit to be calibrated locks a target frequency under the condition of a first frequency modulation parameter, and judging whether the first input voltage is within a preset voltage range.
Step S3: when the first input voltage is within the preset voltage range, the process returns to step 403, and the above process of finding the second frequency modulation threshold is executed in a loop until the first input voltage is not within the preset voltage range, and the process proceeds to step S4.
Step S4: step 410 is skipped and step 407 is returned to.
In one embodiment, please refer to fig. 6, step 411 may include the following sub-steps:
step L1: when the circuit to be calibrated has the second frequency modulation threshold, in the frequency modulation range information, after the current input voltage is increased in a preset step length, the second frequency modulation parameter to which the increased working voltage belongs is obtained, and the second frequency modulation parameter is sent to the circuit to be calibrated.
Step L2: and acquiring a second input voltage of the circuit to be calibrated when the circuit locks the target frequency under the condition of a second frequency modulation parameter, and judging whether the second input voltage is within a preset voltage range.
Step L3: when the second input voltage is within the preset voltage range, the process returns to step 403, and the above process of finding the first frequency modulation threshold is executed in a loop until the second input voltage is not within the preset voltage range, and the process proceeds to step L4.
Step L4: step 411 is skipped and the process returns to step 407.
Please refer to fig. 7A, which is a circuit calibration method according to an embodiment of the present application, and the method can be executed by the
step 701: waiting time T0.
In this step, in a common manner, by scanning each frequency characteristic curve one by one, that is, scanning from curve1 to curve9 in sequence, or setting from curve9 to curve1 in reverse one by one, it is detected whether each curve can achieve locking of the target frequency, and whether the input voltage is between two thresholds Vth1 and Vth2 at the time of frequency locking. The above method consumes more time when the number of curves is larger, that is, the power consumption is increased. In addition, during calibration, a circuit needs a certain time to be stable after a new capacitor array is configured each time, but the stability time changes according to factors such as external environment, and generally, in order to ensure that a system can be stable, a long time needs to be waited after new parameters are configured each time. In order to reduce the waiting time reasonably, the scanning judgment can be started once the stability is achieved. T0 is the time for waiting the system to stabilize each time, T0 may be tens of us to hundreds of us, depending on the time required for the system to stabilize,
step 702: and judging whether lock is 1, if so, entering
In this step, lock is a flag bit that the
N denotes the number of frequency characteristics of the voltage controlled oscillator VCO (N is 9 in this embodiment), up and dn are upper and lower limits of a suitable frequency characteristic (dn denotes a first chirp threshold, up denotes a second chirp threshold), up and dn are initially assigned with 0, cnt is a counter waiting for the
In one embodiment, the goal of the calibration sweep process is to find the upper and lower limits of the appropriate target frequency curve, i.e., the values of up and dn. In order to save the scanning process, the scanning can be started from the curve in the middle, and the scanning is started by selecting cap _ sel ═ INT (N/2) initially, where INT denotes the rounding function. This embodiment is equivalent to dividing the time for waiting for the system to stabilize into 4, determining whether to stabilize every time of waiting for one T0, jumping out of the waiting state when the lock is 1 at any time of T0, 2T0, 3T0, 4T0, and considering that the system locking fails if the lock is 0 after 4T0, at this time, the VCO output frequency must be too fast or too slow, that is, Vc > Vth2 or Vc <
Step 702: if lock is equal to 1, the relationship between the current input voltage Vc and Vth1 and Vth2 is judged. First, it is determined whether Vth1< Vc < Vth2 is satisfied, if so,
Step 704: if Vth1< Vc < Vth2 is satisfied, then determine whether cap _ sel (current frequency modulation parameter) of the current scan is 1, if yes, go to step 705, otherwise go to step 710.
Step 705: if the tuning frequency is 1, the lower limit of the frequency modulation of the voltage controlled oscillator VCO is the first curve, so that cap _ sel is assigned to dn, and the
Step 706: is it judged that up ≠ 0? If yes, it indicates that the upper limit has also been found, and step 720 is entered. Otherwise,
Step 707: if up is 0, it means that the upper limit has not been found, then it is determined whether the currently scanned value of cap _ sel is greater than INT (N/2), and if cap _ sel > INT (N/2), it means that the upper half of the curve is currently being scanned, then step 708 is entered. Otherwise,
Step 708: the cap _ sel +1 continues to be scanned up.
Step 709: if cap _ sel > INT (N/2), indicating that the scan of the lower half of the curve has just been completed, INT (N/2) +1 is assigned to cap _ sel, and the process returns to step 701 to continue scanning upward for the upper limit.
Step 710: if cap _ sel is not 1, then determine whether cap _ sel is N, if yes, go to step 711, otherwise go to step 714.
Step 711: if cap _ sel is N, it indicates that the upper limit of the frequency modulation of the voltage controlled oscillator VCO is the frequency modulation parameter corresponding to N (in this embodiment, N is 9), assigns N to up, and proceeds to step 712.
Step 712: then, determine whether the lower limit is found, i.e. determine dn ≠ 0? If yes, if dn ≠ 0, indicating that a lower bound has been found, proceed to step 720. Otherwise,
Step 713: if dn is 0 and the lower limit has not been found, then downward configuration continues and cap _ sel-1 continues scanning. And then returns to step 701.
Step 714: if cap _ sel is not N, then determine whether the lower limit has been found, i.e. determine dn ≠ 0? If dn is equal to 0, which means that the lower limit is not found, then go back to step 713, and look down for the lower limit for cap _ sel-1. Otherwise, if dn ≠ 0, return to step 708.
Step 715: if Vth1< Vc < Vth2 is not satisfied, then determine if Vc > Vth2, if Vc > Vth2 is satisfied, indicate that the lower limit is found, go to step 716, otherwise go to step 717.
Step 716: assign cap _ sel +1 to dn, indicating that one curve up is the lower bound that satisfies the condition. Then returning to step 706 to determine whether an upper limit is found, and the determination process is consistent with the above steps.
Step 717: if Vc > Vth2 is not satisfied, then judging whether Vc < Vth1 is satisfied, if so, finding the upper limit, entering
Step 718: and assigning cap _ sel-1 to the up as an upper limit, returning to the
Step 719: if Vc < Vth1 is not satisfied, ERROR is assigned 1, ending.
Step 720: when the upper limit and the lower limit are found, the final cap _ sel value corresponding to the target frequency modulation parameter can be calculated by combining the frequency modulation factor. Because Vth1 threshold is closer to the non-ideal operating state of the circuit in actual operation, we tend to take Vc closer to the Vth2 threshold. The fm factor can therefore be set to 1, and the target fm parameter cap _ sel ═ INT [ (up + dn +1)/2 ]. And then sending the target frequency modulation parameter to the voltage controlled oscillator VCO so that the voltage controlled oscillator VCO can stably work under the condition of the target frequency modulation parameter. And further, automatic calibration of the VCO is realized.
In an embodiment, in the above determining process, assuming that N is 9, the upper tuning limit of the VCO may be finally found to be up to 6, and the lower tuning limit dn is 4, so that cap _ sel ═ INT [ (up + dn +1)/2]5, as shown in fig. 3B, that is, at the lock target frequency f0Finally, it is determined that curve5 is the most suitable frequency characteristic curve, and V3 is the most ideal operating point.
The calibration scanning process is finished after the upper and lower boundaries are searched, so that useless scanning processes are reduced as much as possible, and the power consumption of the chip is reduced.
Please refer to fig. 8A, which is a
the obtaining
The determining
And the selecting
And the determining
In one embodiment, referring to fig. 8B, the selecting
In one embodiment, the first determining unit 832 is configured to: when the current frequency modulation parameter is the first endpoint value of the frequency modulation range information, the first frequency modulation threshold value of the circuit to be calibrated is determined as the current frequency modulation parameter, and under the same output frequency, the working voltage of the second endpoint value of the frequency modulation range information is smaller than the working voltage of the first endpoint value of the frequency modulation range information. And selecting a second frequency modulation threshold value of the circuit to be calibrated from the frequency modulation range information, wherein the first frequency modulation threshold value and the second frequency modulation threshold value enable the working voltage of the second frequency modulation threshold value to be larger than that of the first frequency modulation threshold value when the circuit to be calibrated locks the same target frequency. See the above embodiments for details of step 404, step 410 to step 413.
In one embodiment, the first determining unit 832 is configured to: and when the current frequency modulation parameter is the second endpoint value of the frequency modulation range information, determining that the second frequency modulation threshold value of the circuit to be calibrated is the current frequency modulation parameter, and under the same output frequency, the working voltage of the second endpoint value of the frequency modulation range information is smaller than the working voltage of the first endpoint value of the frequency modulation range information. And selecting a first frequency modulation threshold value of the circuit to be calibrated from the frequency modulation range information, wherein the first frequency modulation threshold value and the second frequency modulation threshold value enable the working voltage of the second frequency modulation threshold value to be larger than that of the first frequency modulation threshold value when the circuit to be calibrated locks the same target frequency. See the description of step 405, step 411 to step 413 in the above embodiments in detail.
In one embodiment, the selecting
In one embodiment, the determining
In an embodiment, the second determining unit 842 is further configured to: and when the current input voltage is smaller than the lower end value of the preset voltage range, determining that a second frequency modulation threshold of the circuit to be calibrated is a frequency modulation parameter of which the working voltage is larger than the current input voltage. The second selecting unit 843 is further configured to select a first frequency modulation threshold of the circuit to be calibrated from the frequency modulation range information. Refer to the description of step 407, step 409, and steps 411 to 413 in the above embodiments in detail.
In an embodiment, selecting the second fm threshold of the circuit to be calibrated from the fm range information includes: when the first frequency modulation threshold value exists in the circuit to be calibrated, in the frequency modulation range information, after the current input voltage is decreased according to the preset step length, the first frequency modulation parameter to which the decreased working voltage belongs is obtained, and the first frequency modulation parameter is sent to the circuit to be calibrated. The method comprises the steps of obtaining a first input voltage when a circuit to be calibrated locks a target frequency under the condition of a first frequency modulation parameter, and judging whether the first input voltage is within a preset voltage range. And when the first input voltage is within the preset voltage range, circularly executing the step of selecting a target frequency modulation parameter from the frequency modulation range information according to the current frequency modulation parameter, wherein the target frequency modulation parameter enables the circuit to be calibrated to output the target frequency, and executing the step of selecting the target frequency modulation parameter from the frequency modulation range information according to the endpoint value of the preset voltage range until the first input voltage is not within the preset voltage range. Refer to the description of step S1 to step S3 in detail in the above embodiments.
In an embodiment, selecting the first fm threshold of the circuit to be calibrated from the fm range information includes: when the circuit to be calibrated has the second frequency modulation threshold, in the frequency modulation range information, after the current input voltage is increased in a preset step length, the second frequency modulation parameter to which the increased working voltage belongs is obtained, and the second frequency modulation parameter is sent to the circuit to be calibrated. And acquiring a second input voltage of the circuit to be calibrated when the circuit locks the target frequency under the condition of a second frequency modulation parameter, and judging whether the second input voltage is within a preset voltage range. And when the second input voltage is within the preset voltage range, circularly executing the step of selecting a target frequency modulation parameter from the frequency modulation range information according to the current frequency modulation parameter, wherein the target frequency modulation parameter enables the circuit to be calibrated to output the target frequency, and executing the step of selecting the target frequency modulation parameter from the frequency modulation range information according to the endpoint value of the preset voltage range until the second input voltage is not within the preset voltage range. See the description of step L1 through step L3 in the above embodiments for details.
In an embodiment, the obtaining
In one embodiment, the method further comprises: and the sending module 85 is used for sending the target frequency modulation parameter to the circuit to be calibrated. See the description of step 414 in the above embodiments for details.
For a detailed description of the
An embodiment of the present invention further provides a non-transitory electronic device readable storage medium, including: a program that, when run on an electronic device, causes the electronic device to perform all or part of the procedures of the methods in the above-described embodiments. The storage medium may be a magnetic Disk, an optical Disk, a Read-Only Memory (ROM), a Random Access Memory (RAM), a Flash Memory (Flash Memory), a Hard Disk (Hard Disk Drive, abbreviated as HDD), a Solid State Drive (SSD), or the like. The storage medium may also comprise a combination of memories of the kind described above.
Although the embodiments of the present invention have been described in conjunction with the accompanying drawings, those skilled in the art may make various modifications and variations without departing from the spirit and scope of the invention, and such modifications and variations fall within the scope defined by the appended claims.
- 上一篇:一种医用注射器针头装配设备
- 下一篇:一种低杂散的模拟锁相环线性化电路