Disclosure of Invention
Therefore, the invention aims to provide a self-adaptive background calibration method for the bandwidth of an all-digital phase-locked loop, which calibrates the loop bandwidth of the all-digital phase-locked loop, and compared with the traditional phase-locked loop which does not calibrate the loop bandwidth, the sensitivity of the loop to analog parameters is greatly reduced, thereby preventing the loop bandwidth from changing due to the influence of non-ideal factors such as process, voltage, temperature and the like, and greatly improving the loop performance.
In order to achieve the above purpose, the present invention adopts the following technical scheme:
an adaptive background calibration method for the bandwidth of an all-digital phase-locked loop comprises a variable phase accumulator VPA, a reference phase accumulator RPA, an automatic frequency calibration module AFC, a digital control oscillator DCO, a digital loop filter DLF, a time-to-digital converter TDC, a delta-sigma modulator DSM and a subtracter;
The calibration method comprises the following steps:
Firstly, determining the loop gain of the all-digital phase-locked loop, wherein the loop gain is expressed as follows:
In the formula, N is the frequency division ratio of a phase-locked loop, which means that the frequency divider accumulates N digital control oscillator DCO output signal periods in one reference clock period, K T and K TDC are the gains of the digital control oscillator DCO and the time-digital converter TDC respectively, and alpha and beta are loop filter parameters;
Then, the loop bandwidth is approximated using the normalized gain frequency of the loop bandwidth, and then the loop bandwidth is expressed as:
In this formula, f ref is the phase-locked loop reference frequency, loop gain factor g=nk TKTDC;
finally, by introducing two calibration loops based on an LMS algorithm, estimating a loop gain factor, and then accessing the loop gain factor g obtained through estimation into the loop through the negation operation, so that the loop bandwidth becomes:
At this point, the loop bandwidth is only related to the filter parameter β and the pll reference clock frequency f ref;
The method comprises the steps of adopting two calibration loops based on an LMS algorithm, wherein the input of one loop is a training sequence which is not subjected to delay processing, the input of the other loop is a training sequence which is subjected to delay processing of a reference clock period, after the two calibration loops generate corresponding loop gain factor estimated values, adding the two corresponding loop gain factor estimated values to obtain a final loop gain factor estimated value, and accessing the loop through inverting operation to finally obtain a bandwidth calibration loop with a bandwidth estimation result which is not influenced by non-ideal factors.
Further, the two calibration loops based on LMS algorithm are used, the training sequence used is a pseudo-random sequence, and the pseudo-random sequence is a pseudo-random sequence output by the delta-sigma modulator DSM between the digital loop filter DLF and the digitally controlled oscillator DCO.
Further, the gain of the DCO is specifically expressed as:
ΔC is the minimum variable capacitance of the switched capacitor array of the numerically controlled oscillator, C tot is the capacitance of the resonant cavity of the numerically controlled oscillator, and T out is the period of the DCO output signal.
Further, the gain of the time-to-digital converter TDC is specifically expressed as:
In this formula Δt TDC is the resolution of the time-to-digital converter.
Further, the non-ideal factors include process P, voltage V and temperature T.
Further, the variable phase accumulator VPA and the reference phase accumulator RPA are used for converting frequency information into phase information;
The automatic frequency calibration module AFC is used for comparing output values of the variable phase accumulator VPA and the reference clock period counter and judging the size relation of the variable phase accumulator VPA and the reference clock period counter, so as to change the rough adjustment and medium adjustment control words of the numerical control oscillator DCO;
The digital controlled oscillator DCO outputs signals with corresponding frequencies according to the input multi-bit control word.
Further, when the all-digital phase-locked loop starts to work, the method specifically comprises the following working procedures:
Firstly, locking the output signal frequency of a digital controlled oscillator DCO to a sub-band of a target frequency through an automatic frequency calibration module AFC, completing the calibration of a coarse tuning and a middle tuning control word of the digital controlled oscillator DCO, after completing the calibration, completing the locking of a coarse tuning and a middle tuning loop of an all-digital phase-locked loop again, and after completing the locking, adjusting a fine tuning part of the DCO control word by a phase discrimination loop to lock the fine tuning part to the target frequency, wherein the phase discrimination loop comprises a reference phase accumulator RPA, a variable phase accumulator VPA, a time-digital converter TDC, a digital loop filter DLF, a delta-sigma modulator DSM and a subtracter;
The fine tuning loop of the all-digital phase-locked loop starts to work, and the fine tuning loop comprises that an output signal CKV of the digital controlled oscillator DCO after being divided by a frequency divider N enters a time-digital converter TDC and a variable phase accumulator VPA respectively, the variable phase accumulator VPA counts the integer part of the period of the CKV of the DCO after being divided by the frequency divider N, the time-digital converter TDC carries out fractional part quantization on the CKV, and the output of the variable phase accumulator VPA and the output of the time-digital converter TDC are integrated, wherein the output obtained after integration is the phase value of the output frequency CKV;
Finally, the subtracter subtracts the reference phase from the output phase, the obtained phase error is sent to the digital loop filter DLF, the digital loop filter DLF calculates a new digital control oscillator DCO control word according to the phase error, wherein the new digital control oscillator DCO control word is sent to the input end of the digital control oscillator DCO after passing through the delta-sigma modulator DSM, and the full digital phase-locked loop is locked after the fine tuning part of the digital control oscillator DCO control word is calibrated.
The beneficial effects of the invention are as follows:
the invention uses the LMS algorithm with two taps, adopts the calibration loop of the two LMS algorithms to replace the calibration loop of the single LMS algorithm to estimate the loop bandwidth factor, and after the two calibration loops generate corresponding loop gain estimated values, the two calibration loops are increased to obtain final loop gain estimated values and are connected into the loop through the negation operation, thereby avoiding the problem that the bandwidth estimated result is affected by non-ideal factors such as delay of a loop frequency divider and the like and is inaccurate.
The invention uses the pseudo-random sequence output by the delta-sigma modulator in the loop to replace the random training sequence input externally, thereby avoiding the influence of the training sequence input externally on the noise performance and the power consumption of the loop.
Compared with the traditional fixed-point algorithm, the LMS algorithm provided by the invention has the advantages that the floating-point algorithm is used for representing the floating-point algorithm, the precision is higher, the representable range is also much larger, and the change of the loop bandwidth can be tracked more accurately.
Detailed Description
For the purpose of making the objects, technical solutions and advantages of the embodiments of the present invention more apparent, the technical solutions of the embodiments of the present invention will be clearly and completely described below with reference to the accompanying drawings in the embodiments of the present invention, and it is apparent that the described embodiments are some embodiments of the present invention, but not all embodiments of the present invention. All other embodiments, which can be made by those skilled in the art based on the embodiments of the invention without making any inventive effort, are intended to be within the scope of the invention.
Example 1
Referring to fig. 1-5, the present embodiment provides an adaptive background calibration method for the bandwidth of an All-digital phase-locked Loop, and the specific structure of the All-digital phase-locked Loop ADPLL (All-DIGITAL PHASE Lock Loop) is shown in fig. 1, and includes;
Variable phase Accumulator VPA (Variable Phase Accumulator), reference phase Accumulator RPA (REFERENCE PHASE Accumulator), automatic frequency calibration module AFC (Auto Frequency Calibrator), digitally controlled oscillator DCO, digital loop filter DLF (Digital Loop Filter), time-to-digital converter TDC (TIME DIGITAL converter), delta-Sigma Modulator DSM (Delta-Sigma Modulator) and subtractor.
Wherein the variable phase accumulator VPA and the reference phase accumulator RPA are used for converting frequency information into phase information;
The automatic frequency calibration module AFC is configured to compare output values of the variable phase accumulator VPA and the reference clock period counter, determine a magnitude relation between the variable phase accumulator VPA and the reference clock period counter, and further change a coarse adjustment control word and a medium adjustment control word of the numerically controlled oscillator DCO;
the digitally controlled oscillator DCO outputs a signal of a corresponding frequency according to the input multi-bit control word.
Specifically, when the all-digital phase-locked loop is started to work, the method specifically comprises the following working procedures:
Firstly, the frequency of the output signal of the numerically controlled oscillator DCO is quickly locked to the sub-band of the target frequency through the automatic frequency calibration module AFC, and the calibration of the coarse and medium control words of the numerically controlled oscillator DCO is completed. After the coarse tuning and the middle tuning of the DCO control word of the numerical control oscillator are calibrated, the coarse tuning and the middle tuning loops of the all-digital phase-locked loop are locked. After the locking is completed, the phase discrimination loop comprising the reference phase accumulator RPA, the variable phase accumulator VPA, the time-to-digital converter TDC, the digital loop filter DLF, the delta-sigma modulator DSM and the subtractor adjusts the fine tuning part of the DCO control word to lock to the target frequency.
Then, the fine tuning loop of the all-digital phase-locked loop starts to work, and the fine tuning loop comprises that the output signal CKV of the digital controlled oscillator DCO after being divided by the frequency divider N enters the time-digital converter TDC and the variable phase accumulator VPA respectively. The variable phase accumulator VPA counts the integer part of the period of the CKV after the DCO is divided by the frequency divider N, the time-digital converter TDC carries out fractional part quantization on the CKV, and the output of the variable phase accumulator VPA and the output of the time-digital converter TDC are integrated, wherein the integrated output is the phase value of the output frequency CKV.
Finally, the subtracter subtracts the reference phase from the output phase, the error of the obtained phase is sent to the digital loop filter DLF, and the digital loop filter DLF calculates a new DCO control word of the digitally controlled oscillator according to the phase error, wherein the new DCO control word of the digitally controlled oscillator is sent to the input end of the DCO of the digitally controlled oscillator after passing through the delta-sigma modulator DSM. After the fine tuning part of the control word of the numerically controlled oscillator DCO finishes calibration, the all-digital phase-locked loop finishes locking.
Specifically, in this embodiment, as shown in fig. 1, the output signal of the DCO is CKV multiplied by N, and the output frequency accuracy of the DCO is improved by using the delta-sigma modulator DSM in the DCO, and the quantization noise of the DCO can be shaped to shift the quantization noise from low frequency to high frequency.
The method specifically comprises the following steps:
step S1, calculating the bandwidth of the all-digital phase-locked loop;
specifically, in the present embodiment, the step S1 includes the steps of:
Step S101, determining loop gain of the loop, wherein the expression is as follows:
In the formula, N is a phase-locked loop frequency division ratio, which means that N digital control oscillator DCO output signal periods are accumulated by a frequency divider in one reference clock period, K T and K TDC are gains of a digital control oscillator DCO (s/bit) and a time-digital converter TDC (bit/s), and alpha and beta are loop filter parameters;
in step S102, in order to obtain a simplified formula of the loop bandwidth, the loop bandwidth may be approximated by using the normalized gain frequency of the loop bandwidth, and thus the loop bandwidth is obtained by the following formula:
In this formula, f ref is the phase-locked loop reference frequency, and the loop gain factor g=nk TKTDC, which is proportional to the DCO, TDC gain.
The DCO gain (s/bit) is specifically expressed as:
in the formula, deltaC is the minimum variable capacitance value of the switch capacitor array of the numerically controlled oscillator, C tot is the capacitance value of the resonant cavity of the numerically controlled oscillator, T out is the period of the DCO output signal, is determined by the resistance and the capacitance of the DCO, and is greatly influenced by the process.
The above-mentioned TDC gain (bit/s) is specifically expressed as:
In this formula Δt TDC is the resolution of the time to digital converter, which is proportional to the propagation delay of the digital logic gate, which is greatly affected by the process, voltage, temperature. Therefore, the loop bandwidth factor G is easily changed by non-ideal factors such as process, voltage, temperature, etc.
Step S103, estimating a loop gain factor through a self-adaptive calibration loop, and accessing the loop gain factor g obtained through estimation into the loop through inverting operation, so that the loop bandwidth becomes:
at this time, the loop bandwidth is only related to the filter parameter β and the pll reference clock frequency, and is not changed due to the influence of the loop non-ideal factors such as process, voltage, temperature, etc.
S2, estimating a loop bandwidth factor of the all-digital phase-locked loop;
specifically, in this embodiment, the step S2 specifically includes:
As can be seen from fig. 1, the ADPLL fine tuning loop is composed of an analog part and a digital part, wherein the analog part includes a signal transmission chain of DCO, a frequency divider, and a TDC, and the rest is the digital part.
The open loop transfer function of the loop simulation portion may be expressed asThe loop gain factor G can thus be estimated by injecting a training signal at the DCO input and calibrated at the TDC output.
The schematic diagram of loop bandwidth factor estimation is shown in fig. 2, and specifically includes:
x n is a training sequence, a pseudo-random sequence, and is injected into the ADPLL loop and the calibration loop to connect the two.
In the calibration loop, the integrating operation in the ADPLL open loop transfer function is replaced by a digital integrator, the result of x [ n ] passing through the integrator is multiplied by the loop gain factor estimated value g [ n ] and compared with the TDC output d [ n ], the difference e [ n ] between the two is fed back to the adaptive algorithm module, and then the latest estimated loop gain factor g [ n ] is output, and the steps are circulated until e [ n ] is zero.
S3, selecting a training sequence;
specifically, in this embodiment, the step S3 specifically includes:
for the training sequence x n an externally input pseudo random sequence may be used instead, but this introduces additional noise to the loop, deteriorating the noise performance of the loop.
In order to avoid the influence of the externally input training sequence on the noise performance and power consumption of the loop, it is preferable to use a signal originally existing in the loop instead.
The ADPLL loop in this embodiment uses DSM in the DCO to improve the output frequency accuracy of the DCO and shape the DCO quantization noise. The output of the DSM happens to be a random sequence. In the embodiment, the pseudo-random sequence output by DSM in the loop is used for replacing the training sequence input from outside, so that the noise performance of the loop is ensured.
Step S4, executing an adaptive LMS algorithm in a calibration loop:
specifically, the adaptive LMS algorithm in the calibration loop is divided into a single-tap LMS algorithm and a two-tap LMS algorithm proposed in this embodiment.
Single tap adaptive LMS algorithm:
ADPLL using a conventional single tap calibration loop is shown in fig. 3. The pseudo-random sequence output by DSM in the loop is used as an input training sequence of a calibration loop, and the loop gain factor estimated value obtained by the calibration loop is accessed into the loop through the negation operation, so that the loop bandwidth is not influenced by non-ideal factors.
The two-tap adaptive LMS algorithm employed in this embodiment:
Non-ideal factors such as a loop divider can lead to inaccurate loop gain factor estimation by a single-tap adaptive LMS algorithm. The non-idealities caused by the loop divider delay are shown in FIG. 4, assuming that the training signal x [ n ] injected into the DCO is a unit pulse, the periodic increment of the DCO output signal is a rectangular pulse of duration T ref, magnitude K T.
In the next reference period, x [ n ] becomes zero, and thus the phase jump variable remains to its final peak NK T. As shown in fig. 4 (a), assuming that the loop frequency divider has no delay, the sequence dn obtained by multiplying the output signal of the DCO by the TDC gain K TDC after sub-sampling by the frequency divider is a training signal x n delayed by one reference clock period and having an amplitude that is enlarged by a gain factor G, and at this time, the single-tap LMS algorithm can accurately predict the loop gain factor G.
As shown in fig. 4 (b), in the actual case, there is a delay in the loop divider, because the loop divider sub-samples the output signal of the DCO once every reference clock cycle, because there is a delay in the loop divider, the phase jump variable has not yet reached its peak value when sub-sampled by the divider after one reference clock cycle in which the value of the training sequence x n is changed, and thus the sequence d n is smaller than the loop gain factor G after one reference clock cycle in which the value of the training sequence x n is changed, and there is a large error in the loop gain factor G predicted by the LMS algorithm with a single tap. Due to the existence of loop divider delay, the output signal of DCO after two reference clock periods of x [ n ] change is subsampled by the divider again and multiplied by TDC gain K TDC, and the value of d [ n ] at the moment is not zero. Since the phase jump variable NK T is constant, the sum of the instantaneous d [ n ] values of these two reference clock cycles is exactly equal to the loop gain factor G.
The present embodiment uses two LMS algorithm calibration loops instead of a single LMS algorithm calibration loop to estimate the loop bandwidth as shown in fig. 5. The input of one loop is the original training sequence x [ n ] which is not subjected to delay treatment, the input of the other loop is the training sequence which is subjected to delay treatment in one reference clock period, the two calibration loops generate corresponding loop gain factor estimated values G [ k ], the two calibration loops are added to obtain accurate loop gain factor estimated values G, and the loop is accessed through the negation operation, so that the bandwidth calibration loop with the bandwidth estimation result not influenced by non-ideal factors such as delay of a loop frequency divider is finally obtained.
In summary, the present invention provides an adaptive background calibration method for the bandwidth of an all-digital phase-locked loop, which reduces the sensitivity of the loop bandwidth to analog parameters in the loop by using an all-digital automatic control loop, so that the bandwidth remains constant. Compared with a single-tap LMS algorithm, the calibration algorithm provided by the invention can eliminate the problem of inaccurate estimation results caused by non-ideal factors such as delay of a loop frequency divider. Meanwhile, the algorithm adopts floating point operation, compared with fixed point operation, the floating point operation has higher accuracy and a much larger representable range, and can track the change of loop bandwidth more accurately.
The present invention is not described in detail in the present application, and is well known to those skilled in the art.
The foregoing describes in detail preferred embodiments of the present invention. It should be understood that numerous modifications and variations can be made in accordance with the concepts of the invention by one of ordinary skill in the art without undue burden. Therefore, all technical solutions which can be obtained by logic analysis, reasoning or limited experiments based on the prior art by the person skilled in the art according to the inventive concept shall be within the scope of protection defined by the claims.