Frequency adjustment method and device for crystal oscillator, storage medium and electronic equipment

文档序号:1689386 发布日期:2020-01-03 浏览:23次 中文

阅读说明:本技术 用于晶振的频率调整方法、装置、存储介质及电子设备 (Frequency adjustment method and device for crystal oscillator, storage medium and electronic equipment ) 是由 邓祝明 许百成 于 2018-06-27 设计创作,主要内容包括:本公开涉及一种用于晶振的频率调整方法、装置、存储介质及电子设备。该方法包括:获取当前频偏估计;对所述当前频偏估计进行平滑处理,得到平滑后的频偏估计;对所述当前频偏估计的方差进行平滑处理,得到平滑后的频偏估计方差;根据所述平滑后的频偏估计和所述平滑后的频偏估计方差,确定频偏调整量。由此,在不同的频偏估计条件下,均能够稳健、有效地将晶振的频率偏差控制在较小的范围内,提高了系统吞吐率和性能。(The disclosure relates to a frequency adjustment method and device for a crystal oscillator, a storage medium and an electronic device. The method comprises the following steps: obtaining current frequency offset estimation; smoothing the current frequency offset estimation to obtain a smoothed frequency offset estimation; smoothing the variance of the current frequency offset estimation to obtain a smoothed frequency offset estimation variance; and determining a frequency offset adjustment amount according to the smoothed frequency offset estimation and the smoothed frequency offset estimation variance. Therefore, under different frequency offset estimation conditions, the frequency deviation of the crystal oscillator can be stably and effectively controlled within a small range, and the throughput rate and the performance of the system are improved.)

1. A frequency adjustment method for a crystal oscillator, comprising:

obtaining current frequency offset estimation;

smoothing the current frequency offset estimation to obtain a smoothed frequency offset estimation;

smoothing the variance of the current frequency offset estimation to obtain a smoothed frequency offset estimation variance;

and determining a frequency offset adjustment amount according to the smoothed frequency offset estimation and the smoothed frequency offset estimation variance.

2. The method of claim 1, wherein the current frequency offset estimate is smoothed by the following equation to obtain a smoothed frequency offset estimate:

Figure FDA0001710900820000011

wherein the content of the first and second substances,

Figure FDA0001710900820000012

3. The method of claim 1, wherein the current frequency offset estimate is smoothed by the following equation to obtain a smoothed frequency offset estimate:

Figure FDA0001710900820000015

wherein the content of the first and second substances,

Figure FDA0001710900820000016

4. The method of claim 1, wherein the variance of the current frequency offset estimate is smoothed by the following equation to obtain a smoothed frequency offset estimate variance:

Figure FDA0001710900820000021

wherein the content of the first and second substances,

Figure FDA0001710900820000022

5. The method of claim 1, wherein the variance of the current frequency offset estimate is smoothed by the following equation to obtain a smoothed frequency offset estimate variance:

Figure FDA0001710900820000027

wherein the content of the first and second substances,estimating a variance for the smoothed frequency offset;

Figure FDA0001710900820000029

6. The method of any of claims 1-5, wherein the frequency offset adjustment is determined from the smoothed frequency offset estimate and the smoothed frequency offset estimate variance by the following equation:

Figure FDA00017109008200000212

Figure FDA0001710900820000031

wherein f isadjAdjusting the amount of the frequency offset;

Figure FDA0001710900820000032

7. The method according to any one of claims 1-5, further comprising:

and carrying out frequency offset adjustment on the crystal oscillator according to the frequency offset adjustment quantity.

8. A frequency adjustment device for a crystal oscillator, comprising:

an obtaining module, configured to obtain a current frequency offset estimate;

a first smoothing module, configured to perform smoothing processing on the current frequency offset estimate obtained by the obtaining module to obtain a smoothed frequency offset estimate;

a second smoothing module, configured to smooth the variance of the current frequency offset estimation obtained by the obtaining module to obtain a smoothed frequency offset estimation variance;

and the determining module is used for determining the frequency offset adjustment amount according to the smoothed frequency offset estimation obtained by the first smoothing module and the smoothed frequency offset estimation variance obtained by the second smoothing module.

9. The apparatus according to claim 8, wherein the first smoothing module is configured to smooth the current frequency offset estimate obtained by the obtaining module by using the following formula to obtain a smoothed frequency offset estimate:

Figure FDA0001710900820000041

wherein the content of the first and second substances,

Figure FDA0001710900820000042

10. The apparatus according to claim 8, wherein the first smoothing module is configured to smooth the current frequency offset estimate obtained by the obtaining module by using the following formula to obtain a smoothed frequency offset estimate:

Figure FDA0001710900820000045

wherein the content of the first and second substances,estimating the smoothed frequency offset;

Figure FDA0001710900820000047

11. The apparatus according to claim 8, wherein the second smoothing module is configured to smooth the variance of the current frequency offset estimate obtained by the obtaining module by using the following formula to obtain a smoothed frequency offset estimate variance:

Figure FDA0001710900820000048

wherein the content of the first and second substances,

Figure FDA0001710900820000049

12. The apparatus according to claim 8, wherein the second smoothing module is configured to smooth the variance of the current frequency offset estimate obtained by the obtaining module by using the following formula to obtain a smoothed frequency offset estimate variance:

Figure FDA0001710900820000051

wherein the content of the first and second substances,estimating a variance for the smoothed frequency offset;the variance of the ith frequency offset estimation obtained from the preset historical moment to the current moment;

Figure FDA0001710900820000054

13. The apparatus according to any of claims 8-12, wherein the determining module is configured to determine the frequency offset adjustment according to the smoothed frequency offset estimate obtained by the first smoothing module and the smoothed frequency offset estimate variance obtained by the second smoothing module by the following formula:

Figure FDA0001710900820000056

Figure FDA0001710900820000057

wherein f isadjAdjusting the amount of the frequency offset;

Figure FDA0001710900820000058

14. The apparatus according to any one of claims 8-12, further comprising:

and the adjusting module is used for adjusting the frequency offset of the crystal oscillator according to the frequency offset adjusting quantity determined by the determining module.

15. A computer-readable storage medium, on which a computer program is stored which, when being executed by a processor, carries out the steps of the method according to any one of claims 1 to 7.

16. An electronic device, comprising:

a memory having a computer program stored thereon;

a processor for executing the computer program in the memory to carry out the steps of the method of any one of claims 1 to 7.

Technical Field

The present disclosure relates to the field of communications, and in particular, to a method and an apparatus for adjusting a frequency of a crystal oscillator, a storage medium, and an electronic device.

Background

In a wireless terminal, a crystal oscillator is generally used to generate an operation clock of a system, but the output frequency of the crystal oscillator has a certain frequency deviation due to the influence of environmental changes, thereby affecting the receiving performance of the system. For example, Frequency deviation may introduce Inter-Carrier Interference (ICI) in an Orthogonal Frequency Division (OFDM) system, which may increase an error rate and reduce a throughput of the system, and thus may seriously affect the performance of the system. Therefore, the clock Frequency accuracy of the crystal oscillator output needs to be controlled within a certain range, and in general, all wireless terminals use an Automatic Frequency Control (AFC) technology to realize accurate Control of the crystal oscillator Frequency. In particular, the AFC technique precisely controls the output frequency of the crystal oscillator by mainly adjusting the bias voltage of the crystal oscillator. Because there are many factors that affect the accuracy of frequency offset estimation, such as the determination method of frequency offset estimation, the channel conditions (signal-to-noise ratio, multipath, and moving speed), how to adopt an appropriate AFC strategy under various frequency offset estimation conditions to achieve the optimal balance between the adjustment speed and the adjustment stability is a key problem faced by the wireless terminal.

Disclosure of Invention

In order to overcome the problems in the prior art, the present disclosure provides a frequency adjustment method and apparatus for a crystal oscillator, a storage medium, and an electronic device.

In order to achieve the above object, the present disclosure provides a frequency adjustment method for a crystal oscillator, including:

obtaining current frequency offset estimation;

smoothing the current frequency offset estimation to obtain a smoothed frequency offset estimation;

smoothing the variance of the current frequency offset estimation to obtain a smoothed frequency offset estimation variance;

and determining a frequency offset adjustment amount according to the smoothed frequency offset estimation and the smoothed frequency offset estimation variance.

Optionally, the current frequency offset estimate is smoothed by the following formula to obtain a smoothed frequency offset estimate:

Figure BDA0001710900830000021

wherein the content of the first and second substances,

Figure BDA0001710900830000022

estimating the smoothed frequency offset;

Figure BDA0001710900830000023

estimating the current frequency offset;

Figure BDA0001710900830000024

estimating the frequency deviation after the last smoothing; k is the number of frequency offset estimates obtained from the preset historical moment to the current moment; alpha is a smoothing factor.

Optionally, the current frequency offset estimate is smoothed by the following formula to obtain a smoothed frequency offset estimate:

Figure BDA0001710900830000025

wherein the content of the first and second substances,

Figure BDA0001710900830000026

estimating the smoothed frequency offset;

Figure BDA0001710900830000027

estimating the ith frequency offset acquired from the preset historical moment to the current moment; and k is the number of frequency offset estimates obtained from the preset historical moment to the current moment.

Optionally, the variance of the current frequency offset estimation is smoothed by the following formula to obtain a smoothed frequency offset estimation variance:

wherein the content of the first and second substances,

Figure BDA0001710900830000029

estimating a variance for the smoothed frequency offset;

Figure BDA00017109008300000210

a variance of the current frequency offset estimate;

Figure BDA00017109008300000211

estimating a variance for the most recently smoothed frequency offset;

Figure BDA00017109008300000212

estimating the current frequency offset;

Figure BDA00017109008300000213

estimating the smoothed frequency offset; k is the number of frequency offset estimates obtained from the preset historical moment to the current moment; alpha is a smoothing factor.

Optionally, the variance of the current frequency offset estimation is smoothed by the following formula to obtain a smoothed frequency offset estimation variance:

Figure BDA0001710900830000031

wherein the content of the first and second substances,

Figure BDA0001710900830000032

estimating a variance for the smoothed frequency offset;

Figure BDA0001710900830000033

the variance of the ith frequency offset estimation obtained from the preset historical moment to the current moment;estimating the ith frequency offset obtained from the preset historical moment to the current moment;

Figure BDA0001710900830000035

estimating the ith smoothed frequency offset acquired from the preset historical moment to the current moment; k is the number of frequency offset estimates obtained from the preset historical moment to the current moment; alpha is a smoothing factor.

Optionally, the determining, according to the smoothed frequency offset estimation and the smoothed frequency offset estimation variance, a frequency offset adjustment amount by the following formula:

wherein f isadjAdjusting the amount of the frequency offset;

Figure BDA0001710900830000038

estimating the smoothed frequency offset; condA, condB, condC are conditions that affect the value of the frequency offset adjustment;

Figure BDA0001710900830000039

estimating a variance for the smoothed frequency offset; gamma is a preset ratio threshold; k is the number of frequency offset estimates obtained from the preset historical moment to the current moment; Δ t is a time interval between the preset historical time and the current time; epsilon is a preset time interval threshold; η is a predetermined number threshold.

Optionally, the method further comprises:

and carrying out frequency offset adjustment on the crystal oscillator according to the frequency offset adjustment quantity.

The present disclosure also provides a frequency adjustment apparatus for a crystal oscillator, including:

an obtaining module, configured to obtain a current frequency offset estimate;

a first smoothing module, configured to perform smoothing processing on the current frequency offset estimate obtained by the obtaining module to obtain a smoothed frequency offset estimate;

a second smoothing module, configured to smooth the variance of the current frequency offset estimation obtained by the obtaining module to obtain a smoothed frequency offset estimation variance;

and the determining module is used for determining the frequency offset adjustment amount according to the smoothed frequency offset estimation obtained by the first smoothing module and the smoothed frequency offset estimation variance obtained by the second smoothing module.

Optionally, the first smoothing module is configured to smooth the current frequency offset estimate obtained by the obtaining module by using the following formula, so as to obtain a smoothed frequency offset estimate:

Figure BDA0001710900830000041

wherein the content of the first and second substances,

Figure BDA0001710900830000042

estimating the smoothed frequency offset;

Figure BDA0001710900830000043

estimating the current frequency offset;

Figure BDA0001710900830000044

estimating the frequency deviation after the last smoothing; k is the number of frequency offset estimates obtained from the preset historical moment to the current moment; alpha is a smoothing factor.

Optionally, the first smoothing module is configured to smooth the current frequency offset estimate obtained by the obtaining module by using the following formula, so as to obtain a smoothed frequency offset estimate:

Figure BDA0001710900830000045

wherein the content of the first and second substances,

Figure BDA0001710900830000046

estimating the smoothed frequency offset;

Figure BDA0001710900830000047

estimating the ith frequency offset acquired from the preset historical moment to the current moment; and k is the number of frequency offset estimates obtained from the preset historical moment to the current moment.

Optionally, the second smoothing module is configured to smooth the variance of the current frequency offset estimation obtained by the obtaining module by using the following formula, so as to obtain a smoothed frequency offset estimation variance:

wherein the content of the first and second substances,

Figure BDA0001710900830000052

estimating a variance for the smoothed frequency offset;

Figure BDA0001710900830000053

a variance of the current frequency offset estimate;

Figure BDA0001710900830000054

estimating a variance for the most recently smoothed frequency offset;

Figure BDA0001710900830000055

estimating the current frequency offset;

Figure BDA0001710900830000056

estimating the smoothed frequency offset; k is the number of frequency offset estimates obtained from the preset historical moment to the current moment; alpha is a smoothing factor.

Optionally, the second smoothing module is configured to smooth the variance of the current frequency offset estimation obtained by the obtaining module by using the following formula, so as to obtain a smoothed frequency offset estimation variance:

wherein the content of the first and second substances,

Figure BDA0001710900830000058

estimating a variance for the smoothed frequency offset;the variance of the ith frequency offset estimation obtained from the preset historical moment to the current moment;

Figure BDA00017109008300000510

estimating the ith frequency offset obtained from the preset historical moment to the current moment;

Figure BDA00017109008300000511

estimating the ith smoothed frequency offset acquired from the preset historical moment to the current moment; k is the number of frequency offset estimates obtained from the preset historical moment to the current moment; alpha is a smoothing factor.

Optionally, the determining module is configured to determine a frequency offset adjustment amount according to the smoothed frequency offset estimation obtained by the first smoothing module and the smoothed frequency offset estimation variance obtained by the second smoothing module by using the following formula:

Figure BDA00017109008300000512

Figure BDA0001710900830000061

wherein f isadjAdjusting the amount of the frequency offset;estimating the smoothed frequency offset; condA, condB, condC are conditions that affect the value of the frequency offset adjustment;

Figure BDA0001710900830000063

estimating a variance for the smoothed frequency offset; gamma is a preset ratio threshold; k is the number of frequency offset estimates obtained from the preset historical moment to the current moment; Δ t is a time interval between the preset historical time and the current time; epsilon is a preset time interval threshold; η is a predetermined number threshold.

Optionally, the apparatus further comprises:

and the adjusting module is used for adjusting the frequency offset of the crystal oscillator according to the frequency offset adjusting quantity determined by the determining module.

The present disclosure also provides a computer-readable storage medium, on which a computer program is stored, which when executed by a processor, implements the steps of the above frequency adjustment method for a crystal oscillator provided by the present disclosure.

The present disclosure also provides an electronic device, comprising:

a memory having a computer program stored thereon;

a processor for executing the computer program in the memory to implement the steps of the frequency adjustment method for a crystal oscillator provided by the present disclosure.

In the technical scheme, firstly, smoothing is carried out on the obtained current frequency offset estimation and the variance of the current frequency offset estimation so as to obtain a smoothed frequency offset estimation and a smoothed frequency offset estimation variance; and then, determining a frequency offset adjustment amount for adjusting the output frequency of the crystal oscillator according to the smoothed frequency offset estimation and the smoothed frequency offset estimation variance. Therefore, under different frequency offset estimation conditions, the frequency deviation of the crystal oscillator can be stably and effectively controlled in a smaller range, and the throughput rate and the performance of the system are improved.

Additional features and advantages of the disclosure will be set forth in the detailed description which follows.

Drawings

The accompanying drawings, which are included to provide a further understanding of the disclosure and are incorporated in and constitute a part of this specification, illustrate embodiments of the disclosure and together with the description serve to explain the disclosure without limiting the disclosure. In the drawings:

fig. 1 is a flow chart illustrating a method for frequency tuning of a crystal oscillator according to an exemplary embodiment.

Fig. 2 is a flow chart illustrating a method for frequency tuning of a crystal oscillator according to another exemplary embodiment.

Fig. 3 is a block diagram illustrating a frequency adjustment apparatus for a crystal oscillator according to an exemplary embodiment.

Fig. 4 is a block diagram illustrating a frequency adjustment apparatus for a crystal oscillator according to another exemplary embodiment.

FIG. 5 is a block diagram illustrating an electronic device in accordance with an example embodiment.

Detailed Description

The following detailed description of specific embodiments of the present disclosure is provided in connection with the accompanying drawings. It should be understood that the detailed description and specific examples, while indicating the present disclosure, are given by way of illustration and explanation only, not limitation.

Fig. 1 is a flow chart illustrating a method for frequency tuning of a crystal oscillator according to an exemplary embodiment. As shown in fig. 1, the method may include the following steps.

In step 101, a current frequency offset estimate is obtained.

In the present disclosure, the method may be applied to an automatic frequency control system (i.e., AFC system). The current frequency offset estimation may be an estimated value of an instantaneous frequency offset obtained between the user terminal and the base station at the current time. Illustratively, the current frequency offset estimate may be obtained by a differential frequency offset estimation algorithm, a maximum likelihood estimation-based frequency offset estimation algorithm, a least squares-based frequency offset estimation algorithm, or the like. Since the specific way of obtaining the current frequency offset estimate is well known to those skilled in the art, it is not described in detail in this disclosure.

In addition, in order to reduce jitter of the current frequency offset estimation and ensure stationarity of the AFC system and the crystal oscillator signal, so as to improve system performance, after the current frequency offset estimation is obtained in step 101, smoothing processing may be performed on the current frequency offset estimation and a variance of the current frequency offset estimation, respectively. Specifically, the corresponding smoothing processing can be performed by the following step 102 and step 103.

In step 102, the current frequency offset estimation is smoothed to obtain a smoothed frequency offset estimation.

In an embodiment, after obtaining the current frequency estimate, the current frequency offset estimate may be smoothed according to a last smoothed frequency offset estimate, where the AFC system may obtain the current frequency offset estimate according to a fixed period or in real time, and the last smoothed frequency offset estimate may be obtained by smoothing an instantaneous frequency offset estimate obtained last time.

Specifically, a corresponding first storage module may be provided in the AFC system to store the frequency offset estimate after the last smoothing; therefore, after the current frequency offset estimation is obtained each time, the frequency offset estimation after the last smoothing can be read by accessing the first storage module, and then the current frequency offset estimation can be smoothed according to the frequency offset estimation after the last smoothing.

For example, the current frequency offset estimate may be smoothed by the following equation (1), to obtain a smoothed frequency offset estimate:

Figure BDA0001710900830000081

wherein the content of the first and second substances,

Figure BDA0001710900830000082

estimating the smoothed frequency offset;

Figure BDA0001710900830000083

estimating the current frequency offset;

Figure BDA0001710900830000084

estimate the frequency offset for the last smoothed frequency offset, and

Figure BDA0001710900830000085

k is the number of frequency offset estimates obtained from the preset historical moment to the current moment; alpha is a smoothing factor.

In this disclosure, the preset historical time may be a latest frequency offset adjustment time, may be earlier than the latest frequency offset adjustment time, and may be later than the latest frequency offset adjustment time, which is not specifically limited in this disclosure. The fixed period may be set by a user or may be a default, and is not particularly limited in this disclosure.

In another embodiment, the AFC system may perform smoothing on the current frequency offset estimate obtained in step 101 according to a plurality of frequency offset estimates (i.e., reference frequency offset estimates used for determining crystal frequency offset adjustment) obtained from a preset historical time to the current time.

Specifically, a corresponding second storage module may be provided in the AFC system, so that the AFC system may store the instantaneous frequency offset estimate at the current time in the second storage module after acquiring it each time. In this way, after the AFC system obtains the current frequency offset estimation, the AFC system can read the multiple frequency offset estimations obtained from the preset historical time to the current time by accessing the second storage module, and then obtain the smoothed frequency offset estimation by averaging the multiple frequency offset estimations, that is, the smoothing operation on the current frequency offset estimation is completed.

Illustratively, the current frequency offset estimate may be smoothed by the following equation (2) to obtain a smoothed frequency offset estimate

Figure BDA0001710900830000091

Figure BDA0001710900830000092

Wherein the content of the first and second substances,

Figure BDA0001710900830000093

and estimating the ith frequency offset acquired from the preset historical moment to the current moment.

Returning to fig. 1, in step 103, the variance of the current frequency offset estimation is smoothed to obtain a smoothed frequency offset estimation variance.

In one embodiment, after obtaining the current frequency offset estimate, the AFC system may first determine a variance of the current frequency offset estimate, and then perform smoothing on the variance of the current frequency offset estimate. Specifically, the AFC system may smooth the variance of the current frequency offset estimate according to the last smoothed frequency offset estimate variance, where the last smoothed frequency offset estimate variance is obtained by smoothing the variance of the last obtained frequency offset estimate. Moreover, a corresponding third storage module can be arranged in the AFC system to store the frequency offset estimation variance after the last smoothing; in this way, after the AFC system obtains the variance of the current frequency offset estimation each time, the last smoothed frequency offset estimation variance can be read by accessing the third storage module, and then the variance of the current frequency offset estimation can be smoothed according to the last smoothed frequency offset estimation variance.

Illustratively, the variance of the current frequency offset estimate can be smoothed by the following equation (3) to obtain a smoothed frequency offset estimate variance:

wherein the content of the first and second substances,

Figure BDA0001710900830000102

estimating a variance for the smoothed frequency offset;

Figure BDA0001710900830000103

a variance of the current frequency offset estimate;the variance is estimated for the most recently smoothed frequency offset, wherein,

Figure BDA0001710900830000105

in another embodiment, after obtaining the current frequency offset estimate, the variance of multiple frequency offset estimates obtained from a preset historical time to the current time may be obtained first, and then, the variance of the current frequency offset estimate may be smoothed according to the variance of the multiple frequency offset estimates.

Specifically, a corresponding fourth storage module may be provided in the AFC system, so that the AFC system may store the variance of the instantaneous frequency offset estimate at the current time in the fourth storage module after acquiring it each time. In this way, after the AFC system obtains the current frequency offset estimation, the variance of the multiple frequency offset estimates obtained from the preset historical time to the current time can be read by accessing the fourth storage module, and then the smoothed frequency offset estimation variance is obtained by averaging the variances of the multiple frequency offset estimates, that is, the smoothing operation of the variance of the current frequency offset estimation is completed.

Illustratively, the variance of the current frequency offset estimate can be smoothed by the following equation (4) to obtain a smoothed frequency offset estimate variance

Figure BDA0001710900830000106

Wherein the content of the first and second substances,the variance of the ith frequency offset estimation obtained from the preset historical moment to the current moment;

Figure BDA0001710900830000109

and estimating the ith smoothed frequency offset acquired from the preset historical moment to the current moment.

Returning to fig. 1, in step 104, a frequency offset adjustment amount is determined according to the smoothed frequency offset estimation and the smoothed frequency offset estimation variance.

After the smoothed frequency offset estimation is obtained in step 102 and the smoothed frequency offset estimation variance is obtained in step 103, a frequency offset adjustment amount for adjusting the output frequency of the crystal oscillator may be determined according to the two.

Illustratively, the above-described frequency offset adjustment amount may be determined by the following equations (5) and (6):

Figure BDA0001710900830000111

Figure BDA0001710900830000112

wherein f isadjAdjusting the amount of the frequency offset; condA, condB, condC are conditions that affect the value of the frequency offset adjustment; gamma is a preset ratio threshold; Δ t is a time interval between the preset historical time and the current time; epsilon is a preset time interval threshold; η is a predetermined number threshold.

In the present disclosure, the condA, condB, condC may be boolean variables, and their values are as follows:

when the square of the smoothed frequency offset estimate and the variance of the smoothed frequency offset estimate are greater than a preset ratio threshold (i.e., when

Figure BDA0001710900830000113

Time), condA can be determined to be true; when the square of the smoothed frequency offset estimate and the variance of the smoothed frequency offset estimate are less than or equal to the preset ratio threshold (i.e., when

Figure BDA0001710900830000114

Time), condA may be determined to be false. When the time interval between the preset history time and the current time is greater than the preset time interval threshold (i.e., when Δ t)>Epsilon), indicating that the time span of the reference frequency offset estimation for determining the crystal oscillator frequency offset adjustment reaches the time requirement for frequency offset adjustment, and at the moment, determining that condB is true; when the time interval between the preset historical time and the current time is less than or equal to the preset time interval threshold (i.e., when Δ t is less than or equal to ∈), it is indicated that the time span of the reference frequency offset estimation for determining the crystal oscillator frequency offset adjustment does not meet the time requirement for performing the frequency offset adjustment, and at this time, it may be determined that condB is false. When the number of frequency offset estimates obtained from the preset historical time to the current time is greater than a preset number threshold (i.e., when k is greater than k)>Eta), indicating that the number of reference frequency offset estimations for determining the crystal oscillator frequency offset adjustment meets the number requirement for performing the frequency offset adjustment, and at this time, determining condC as true; when the number of the frequency deviation estimation obtained from the preset historical moment to the current moment is less than or equal to the preset valueWhen the number threshold is set (i.e., when k ≦ η), it indicates that the number of reference frequency offset estimates used for determining the crystal frequency offset adjustment does not reach the number requirement for performing the frequency offset adjustment, and at this time, condC may be determined to be false.

When condA, condB, condC are true simultaneously, i.e. when condA&&condB&&When condC is true, the frequency deviation adjustment amount fadjIs the smoothed frequency offset estimate determined in step 102 above

Figure BDA0001710900830000121

At this time, the frequency offset adjustment may be performed on the crystal oscillator according to the frequency offset adjustment amount (i.e., the following step 105 is performed); otherwise, the frequency offset adjustment fadjThe value of (a) is zero, and at the moment, frequency offset adjustment of the crystal oscillator is not needed.

In addition, the smoothing factor, the preset ratio threshold, the preset time interval threshold and the preset number threshold may be values set by a user, or may be default empirical values, and are not specifically limited in this disclosure. In one embodiment, the user may determine the preset number threshold according to the signal-to-noise ratio, which generally decreases with the increase of the signal-to-noise ratio, and in the narrowband Internet of Things (Narrow-Band Internet of Things, NB-IoT), the preset number threshold η may be determined according to the following equation (7):

Figure BDA0001710900830000122

where r is the signal-to-noise ratio.

In addition, the value range of the smoothing factor α may be (0, 1)]And, the smoothing factor α may be set by the user according to the actual situation, or may be default (for example,

Figure BDA0001710900830000131

) And is not particularly limited in this disclosure.

In the technical scheme, firstly, smoothing is carried out on the obtained current frequency offset estimation and the variance of the current frequency offset estimation so as to obtain a smoothed frequency offset estimation and a smoothed frequency offset estimation variance; and then, determining a frequency offset adjustment amount for adjusting the output frequency of the crystal oscillator according to the smoothed frequency offset estimation and the smoothed frequency offset estimation variance. Therefore, under different frequency offset estimation conditions, the frequency deviation of the crystal oscillator can be stably and effectively controlled in a smaller range, and the throughput rate and the performance of the system are improved.

Fig. 2 is a flow chart illustrating a method for frequency tuning of a crystal oscillator according to another exemplary embodiment. As shown in fig. 2, the above method may further include the following steps.

In step 105, the frequency offset of the crystal oscillator is adjusted according to the frequency offset adjustment amount.

In this disclosure, after the frequency offset adjustment amount is obtained in step 104, the frequency offset adjustment amount may be converted into a bias voltage signal of a crystal oscillator, and the crystal oscillator is controlled to adjust an output frequency, thereby adjusting an operating clock of the AFC system.

Fig. 3 is a block diagram illustrating a frequency adjustment apparatus for a crystal oscillator according to an exemplary embodiment. Referring to fig. 3, the apparatus 300 may include: an obtaining module 301, configured to obtain a current frequency offset estimate; a first smoothing module 302, configured to smooth the current frequency offset estimate obtained by the obtaining module 301 to obtain a smoothed frequency offset estimate; a second smoothing module 303, configured to smooth the variance of the current frequency offset estimation obtained by the obtaining module 302 to obtain a smoothed frequency offset estimation variance; a determining module 304, configured to determine a frequency offset adjustment amount according to the smoothed frequency offset estimation of the first smoothing module 301 and the smoothed frequency offset estimation variance obtained by the second smoothing module 302.

Optionally, the first smoothing module 302 may be configured to perform smoothing processing on the current frequency offset estimate obtained by the obtaining module 301 according to equation (1) above to obtain a smoothed frequency offset estimate.

Optionally, the first smoothing module 302 may be configured to smooth the current frequency offset estimate obtained by the obtaining module 301 through the above equation (2), so as to obtain a smoothed frequency offset estimate.

Optionally, the second smoothing module 303 may be configured to smooth the variance of the current frequency offset estimate obtained by the obtaining module 302 through the above equation (3), so as to obtain a smoothed frequency offset estimate variance.

Optionally, the second smoothing module 303 may be configured to smooth the variance of the current frequency offset estimate obtained by the obtaining module 301 through the above equation (4), so as to obtain a smoothed frequency offset estimate variance.

Optionally, the determining module 304 may be configured to determine the frequency offset adjustment amount according to the smoothed frequency offset estimation obtained by the first smoothing module 302 and the smoothed frequency offset estimation variance obtained by the second smoothing module 303 through equations (5) and (6) above.

Fig. 4 is a block diagram illustrating a frequency adjustment apparatus for a crystal oscillator according to another exemplary embodiment. Referring to fig. 4, the apparatus 300 may further include: an adjusting module 305, configured to perform frequency offset adjustment on the crystal oscillator according to the frequency offset adjustment amount determined by the determining module 304.

With regard to the apparatus in the above-described embodiment, the specific manner in which each module performs the operation has been described in detail in the embodiment related to the method, and will not be elaborated here.

The present disclosure also provides a computer-readable storage medium having stored thereon a computer program which, when executed by a processor, implements the steps of the above-described frequency adjustment method for a crystal oscillator.

Fig. 5 is a block diagram illustrating an electronic device 500 according to an exemplary embodiment, where the electronic device 500 may be provided as a frequency adjustment apparatus for a crystal oscillator. As shown in fig. 5, the electronic device 500 may include: a processor 501 and a memory 502. The electronic device 500 may also include one or more of a multimedia component 503, an input/output (I/O) interface 504, and a communication component 505.

The processor 501 is configured to control the overall operation of the electronic device 500, so as to complete all or part of the steps in the frequency adjustment method for a crystal oscillator. The memory 502 is used to store various types of data to support operations at the electronic device 500, such as instructions for any application or method operating on the electronic device 500, as well as application-related data, such as audio, video, smoothing factors, preset historical time, preset time interval thresholds, preset quantity thresholds, preset ratio thresholds, last smoothed frequency offset estimate variance, each acquired frequency offset estimate, and so forth. Based on this, the processor 501 may perform the above step 102, step 103, and step 104 by using the last smoothed frequency offset estimate, the last smoothed frequency offset estimate variance, the frequency offset estimate obtained each time, and the like in the Memory 502, where the Memory 502 may be implemented by any type of volatile or nonvolatile Memory device or 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, magnetic disk, or optical disk. The multimedia component 503 may include a screen and an audio component. Wherein the screen may be, for example, a touch screen and the audio component is used for outputting and/or inputting audio signals. For example, the audio component may include a microphone for receiving external audio signals. The received audio signal may further be stored in the memory 502 or transmitted through the communication component 505. The audio assembly also includes at least one speaker for outputting audio signals. The I/O interface 504 provides an interface between the processor 501 and other interface modules, such as a keyboard, mouse, buttons, etc. These buttons may be virtual buttons or physical buttons. The communication component 505 is used for wired or wireless communication between the electronic device 500 and other devices. Wireless Communication, such as Wi-Fi, bluetooth, Near Field Communication (NFC), 2G, 3G, or 4G, or a combination of one or more of them, so that the corresponding Communication component 505 may include: Wi-Fi module, bluetooth module, NFC module.

In addition, it should be noted that the processor 501 may also be configured to execute the functions of the adjusting module, and since the functions of the adjusting module are described above, the descriptions of the adjusting module are omitted in this disclosure.

In an exemplary embodiment, the electronic Device 500 may 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 frequency adjustment method for the crystal oscillator described above.

In another exemplary embodiment, a computer readable storage medium including program instructions, which when executed by a processor, implement the steps of the above-described frequency adjustment method for a crystal oscillator is also provided. For example, the computer readable storage medium may be the memory 502 described above that includes program instructions that are executable by the processor 501 of the electronic device 500 to perform the frequency adjustment method for a crystal oscillator described above.

The electronic device 500 of this embodiment may perform smoothing processing on the obtained current frequency offset estimate and the variance of the current frequency offset estimate to obtain a smoothed frequency offset estimate and a smoothed frequency offset estimate variance; and then, determining a frequency offset adjustment amount for adjusting the output frequency of the crystal oscillator according to the smoothed frequency offset estimation and the smoothed frequency offset estimation variance. Therefore, under different frequency offset estimation conditions, the frequency deviation of the crystal oscillator can be stably and effectively controlled within a small range, and the throughput rate and the performance of the system are improved.

The preferred embodiments of the present disclosure are described in detail with reference to the accompanying drawings, however, the present disclosure is not limited to the specific details of the above embodiments, and various simple modifications may be made to the technical solution of the present disclosure within the technical idea of the present disclosure, and these simple modifications all belong to the protection scope of the present disclosure.

It should be noted that the various features described in the above embodiments may be combined in any suitable manner without departing from the scope of the invention. In order to avoid unnecessary repetition, various possible combinations will not be separately described in this disclosure.

In addition, any combination of various embodiments of the present disclosure may be made, and the same should be considered as the disclosure of the present disclosure, as long as it does not depart from the spirit of the present disclosure.

19页详细技术资料下载
上一篇:一种医用注射器针头装配设备
下一篇:氮化镓HEMT管集成电路、反激电路、无桥PFC电路及激光雷达

网友询问留言

已有0条留言

还没有人留言评论。精彩留言会获得点赞!

精彩留言,会给你点赞!