# Patent

## Title
Fast filter calibration apparatus

## Abstract

A method includes generating a calibration signal by a clock generator, feeding the calibration signal to a first filter through a first switch unit, comparing an output of the first filter with the calibration signal through a frequency detector and a phase comparator and generating a first updated bandwidth code to adjust a bandwidth frequency of the first filter.

## Background
This application is a divisional of U.S. patent application Ser. No. 13/114,788, entitled “Fast Filter Calibration Apparatus,” filed on May 24, 2011, which application is incorporated herein by reference.


BACKGROUND
As technologies evolve, new internet phone services for mobile devices emerge. In accordance with a specification for providing broadcast services to mobile devices, digital television broadcasting standards may be divided into three major categories. Advanced Television Standards Committee (ATSC) is a standard used in North America. Integrated Service Digital Broadcasting (ISDB) is a standard mainly used in Japan. Digital Video Broadcasting (DVB) is a standard used in European countries. Digital Video Broadcasting-Handheld (DVB-H), as a subset of DVB, is specifically designed to provide mobile broadcasting services to mobile handsets, such as mobile phones.
Each mobile handset may comprise a receiver to handle a variety of mobile standards and corresponding frequency spectra adopted by the variety of mobile standards. There are two prevailing receiver architectures. One is a super-heterodyne architecture, which converts an input signal of a receiver into an intermediate frequency signal so that better receiver performance can be achieved because receiver components such as filters can be optimized to work at the intermediate frequency. The other prevailing receiver architecture is based upon direct conversion. A direct conversion receiver mixes a radio frequency signal with a signal generated by a local oscillator at the radio frequency. The direct conversion receiver further comprises low frequency filters used to eliminate unwanted noise from the mixed signal and convert the mixed signal directly to a baseband frequency signal without an intermediate frequency.
The performance of receiver filters has direct impact on quality of baseband signals. The receiver filters' performance may vary under different operating conditions. For example, due to variations in process, voltage, and temperature (PVT), the bandwidth of a filter may shift out of the range to which it is specified. In order to compensate for the variations due to PVT, a calibration process may be employed to fine-tune the bandwidth of a receiver filter so that the receiver can provide high quality baseband signals.



BRIEF DESCRIPTION OF THE DRAWINGS
For a more complete understanding of the present invention, and the advantages thereof, reference is now made to the following descriptions taken in conjunction with the accompanying drawings, in which:
FIG. 1 illustrates a simplified block diagram of a fast filter calibration system in accordance with an embodiment;
FIG. 2 illustrates in detail a block diagram of the fast filter calibration system shown in FIG. 1;
FIG. 3 illustrates a block diagram of an exemplary analog baseband filter fast calibration system in accordance with an embodiment;
FIG. 4 illustrates the operation of an auto calibration apparatus in accordance with an embodiment;
FIG. 5 illustrates the operation of a fast calibration apparatus in accordance with an embodiment;
FIG. 6 illustrates the process of a bandwidth code (BWC) update in accordance with an embodiment;
FIG. 7 illustrates a flowchart of identifying a channel setting by means of the BWC update controller shown in FIG. 6; and
FIG. 8 illustrates a flowchart of employing the fast calibration apparatus in an analog baseband filter calibration process.



Corresponding numerals and symbols in the different figures generally refer to corresponding parts unless otherwise indicated. The figures are drawn to clearly illustrate the relevant aspects of the various embodiments and are not necessarily drawn to scale.
DETAILED DESCRIPTION OF ILLUSTRATIVE EMBODIMENTS
The making and using of the presently preferred embodiments are discussed in detail below. It should be appreciated, however, that the present invention provides many applicable inventive concepts that can be embodied in a wide variety of specific contexts. The specific embodiments discussed are merely illustrative of specific ways to make and use the invention, and do not limit the scope of the invention.
The present invention will be described with respect to preferred embodiments in a specific context, a fast calibration apparatus for an analog baseband filter. The invention may also be applied, however, to a variety of filters in different types of receiver circuits.
Referring initially to FIG. 1, a simplified block diagram of a fast filter calibration system is illustrated in accordance with an embodiment. The fast filter calibration system comprises a multi clock system (also known as a clock generator) 100, a switch unit 102, a filter unit 104, a fast calibration apparatus 106 and an auto calibration apparatus 108. In accordance with an embodiment, the multi clock system 100 generates a calibration signal having the same frequency as the bandwidth of filters to be calibrated. The multi clock system 100 may further comprise a mixer (not shown but illustrated in FIG. 2). The detailed function of the mixer will be described with respect to FIG. 2. The switch unit 102 has two inputs coupled to the output of the multi clock system 100. The switch unit 102 has an output coupled to the input of the filter unit 104. The switch unit 102 is configured such that: when the filters of the filter unit 104 are under a calibration mode, the switch unit 102 forwards the calibration signal generated by the multi clock system 100 to the filter unit 104; when the filters of the filter unit 104 are operating under a normal mode after the calibration mode is complete, the switch unit 102 forwards the output signal of the mixer to the filter unit 104.
The filter unit 104 comprises a plurality of filters. Each filter may comprise a variable capacitor. By adjusting the variable capacitor's value through a bandwidth code (BWC), the filter can adjust its bandwidth accordingly. When the filter unit 104 is operating under a calibration mode, the output signal of the filter unit 104 is coupled to an input of the auto calibration apparatus 108. In auto calibration apparatus 108, the output signal of the filter unit 104 is compared with the output signal of the multi clock system 100, and a phase comparator and a frequency detector of the auto calibration apparatus 108 determine whether there is a phase lag and/or a frequency shift between these two signals. Furthermore, if a state machine of the auto calibration apparatus 108 finds that the phase lag and/or the frequency shift cannot satisfy a predetermined threshold, the auto calibration apparatus 108 adjusts the bandwidth of the filter unit 104 by sending an updated BWC corresponding to a new bandwidth frequency of the filter unit. The fast calibration apparatus 106 receives the comparison results from the auto calibration apparatus 108 and speeds up the bandwidth calibration process by employing a fast locked state machine. The details of the operation of the fast calibration apparatus 106 will be described below with respect to FIG. 5.
FIG. 2 illustrates in detail a block diagram of a fast filter calibration system. As illustrated in FIG. 2, the multi clock system 100 further comprises a mixer 202 and a multi clock generator 204. The multi clock generator 204 comprises a crystal, an oscillator, a read-only memory (ROM) table, a frequency divider and a frequency synthesizer. As known in the art, the multi clock generator 204 is capable of generating a calibration signal based upon a clock signal generated by the crystal and the oscillator, a first control signal stored in the ROM table and a second control signal supplied by an auto calibration clock signal divided by a factor of N by means of the frequency divider. In order to calibrate the in-phase signal path and the quadrature signal path, the multi clock generator 204 may generate both in-phase calibration signals and quadrature calibration signals at the output of the multi clock generator 204. The operation of the multi clock generator is known in the art, and thus is not further discussed herein.
The mixer 202 receives a baseband frequency signal and generates an in-phase component and a quadrature component of the baseband frequency signal. The in-phase component may have the same phase as the received baseband frequency signal or a phase shift of 180 degrees between the in-phase component and the received baseband frequency signal. In contrast, the quadrature component may have a phase shift of either 90 degrees or 270 degrees. As described above with respect to FIG. 1, under a normal operation mode, the mixer 202 provides both the in-phase component and the quadrature component of the received signal to the filter unit 104. On the other hand, when the filter unit 104 is operating under a calibration mode, the multi clock generator 204 provides a calibration signal based upon a first control signal stored in the ROM table and a second control signal supplied by the auto calibration apparatus 108.
The switch unit 102 comprises a first simple changeover switch 206 dedicated to receive the in-phase component of the baseband frequency signal from the output of the mixer 202 during a normal operation. Likewise, the switch unit 102 further comprises a second simple changeover switch 208 dedicated to forward the quadrature component of the based frequency signal from the output of the mixer 202. On the other hand, when the filter unit 104 is operating under a calibration mode, both simple changeover switches 206 and 208 are configured to receive the calibration signal from the multi clock generator and forward the calibration signal to the filter unit 104.
The filter unit 104 may comprise two analog baseband filters. As illustrated in FIG. 2, an in-phase signal filter 210 receives in-phase signal components from the first simple changeover switch 206. Likewise, a quadrature signal filter 212 is use to attenuate unwanted frequencies of quadrature signal components received from the second simple changeover switch 208. Both in-phase signal filter 210 and quadrature signal filter 212 may comprise a variable capacitor whose value can be adjusted by changing a BWC sent from the auto calibration apparatus 108 to the filter unit 104. Furthermore, the variable capacitor is designed to select different bandwidth values for the analog baseband filter (e.g., in-phase signal filter 210). In accordance with an embodiment, the analog baseband filter may have a bandwidth value in a range from 1 MHz to 10 MHz by selecting different BWC values.
In the design stage of an analog baseband filter (e.g., in-phase signal filter 210), a particular variable capacitor value and its corresponding binary code are designed to set the bandwidth value of the analog baseband filter. However, due to variations in process, voltage, and temperature (PVT), the bandwidth of the analog baseband filter may shift out of the range to which it is specified. In order to accurately calibrate the bandwidth of the in-phase signal filter 210 and the quadrature signal filter 212, the auto calibration apparatus 108 and the fast calibration apparatus 106 are employed to generate an appropriate binary code for a given characterization frequency. More particularly, based upon a given signal generated by the multi clock system 100 and the output of the analog baseband filter (e.g., filter 210), the auto calibration apparatus 108 generates a BWC, which is applied to adjusting the variable capacitor of the analog baseband filter so that the bandwidth of the analog baseband filter changes accordingly. The auto calibration apparatus 108 keeps generating BWC (either incrementing or decrementing by 1) until the output of the baseband filter has a frequency matching that of the signal generated by the multi clock system 100. As a result, the last BWC is saved as a channel setting for the analog baseband filter. The fast calibration apparatus 106 is used to speed up the process of identifying the last BWC. The detailed operation of the fast calibration apparatus 106 will be described below with respect to FIG. 5.
FIG. 3 illustrates a block diagram of an exemplary analog baseband filter fast calibration system in accordance with an embodiment. In order to calibrate the bandwidth of an analog baseband filter (e.g., in-phase signal filter 210 shown in FIG. 3), a characterization signal is generated by the multi clock system 100 (not shown but illustrate in FIG. 2) and fed into the in-phase signal filter 210 as well as a frequency detector 302 and a phase comparator 304. The frequency detector 302 and the phase comparator 304 form the auto calibration apparatus 108. Both the frequency detector 304 and the phase comparator 304 receive the input signal and the output signal of the in-phase signal filter 210 and compare both signals in frequency and phase respectively. The detailed operation of the frequency detector 302 and the phase comparator 304 will be illustratively explained with respect to FIG. 4. The fast calibration detector 214, as the main element of the fast calibration apparatus 106, receives the comparison results from the frequency detector 302 and the phase comparator 304 and generates an updated BWC value. In accordance with an embodiment, BWC is an 8-bit signal used to adjust the variable capacitor of the analog baseband filter (e.g., in-phase signal filter 210). It should be noted that while an 8-bit BWC is employed to illustrate the inventive aspects of various embodiments, one skilled in the art will recognize that an 8-bit BWC is simply one manner of BWC signals and that other BWC signals could be employed (such as employing 4-bit or 16-bit BWC). It should further be noted that the filter 210 can be any other appropriate types, such as band-pass filters and high-pass filters.
FIG. 4 illustrates the operation of an auto calibration apparatus in accordance with an embodiment. The auto calibration apparatus 108 may comprises a frequency detector 302, a phase comparator 304 and a BWC update controller 402. During an 8-bit accuracy calibration process, for example, the calibration process may start from the highest value of an 8-bit BWC (255 in decimal). In accordance with the operation of the auto calibration apparatus, a binary code equal to 255 in decimal may correspond to the lowest bandwidth to be calibrated. For example, an analog baseband filter is capable of having a bandwidth value from 1 MHz to 10 MHz by selecting different variable capacitance values. The highest value of the 8-bit binary code (255 in decimal) may correspond to one variable capacitor value by which the analog baseband filter is set to 1 MHz bandwidth. On the contrary, the lowest value of the 8-bit binary code (0 in decimal) may correspond to another variable capacitor value by which the analog baseband filter is set to 10 MHz bandwidth. When a 4 MHz bandwidth frequency is calibrated, a number 65 (in decimal) may correspond to the variable capacitor by which the filter can be set to a 4 MHz bandwidth. In accordance with another embodiment, when a 5 MHz bandwidth frequency is calibrated, a number 51 (in decimal) may correspond to the variable capacitor by which the filter can be set to a 5 MHz bandwidth.
As shown in FIG. 4, both the frequency detector 302 and the phase comparator 304 compare the filter output set by the initial value 255 with the input signal of the filter. When the comparison results cannot satisfy the predetermined thresholds for frequency shift and phase lag, the BWC update controller 402 reduces BWC by 1 and adjusts the filter's bandwidth accordingly. The frequency detector 302 and the phase comparator 304 keep comparing the output of the filter and the input signal of the filter until the comparison results show the phase lag and frequency shift between input signal and the output signal of the filter are within the predetermined thresholds. As a result, the BWC update controller 402 stops updating the BWC value and reports a channel setting code.
FIG. 5 illustrates the operation of a fast calibration apparatus in accordance with an embodiment. The fast calibration apparatus 106 may comprises a frequency detector 302, a phase comparator 304 and a BWC update controller 402. The example described above with respect to FIG. 4 is reused to illustrate an advantageous feature of the fast calibration apparatus 106. As described above, when a 4 MHz bandwidth frequency is calibrated, a number 65 (in decimal) may be used to set a variable capacitor's value so that the filter can achieve a 4 MHz bandwidth. As shown in FIG. 5, both the frequency detector 302 and the phase comparator 304 compare the filter output set by the initial value 255 with the input signal of the filter. When the comparison results cannot satisfy the predetermined thresholds for frequency shift and phase lag, the BWC update controller 402 jumps from 255 to 67 directly and adjust the filter's bandwidth accordingly. As a consequence, the frequency detector 302 and the phase comparator 304 can finish the calibration of 4 MHz bandwidth within the next two cycles. As a result, the fast calibration apparatus 106 can save the total calibration time and resources. For example, in accordance with an embodiment, the total calibration time for a bandwidth frequency (e.g., 4 MHz) is 125 us if the BWC update follows the following sequence:

    
    
        255→254→253→ . . . →67→66→65

In contrast, the total calibration time for the same bandwidth frequency with a fast calibration apparatus is approximately 5 us based upon the following sequence:

        255→67→66→65

An advantageous feature of having a fast calibration apparatus is that the total calibration time and resources can be reduced.

    
    


FIG. 6 illustrates the process of a BWC update in accordance with an embodiment. As shown in FIG. 6, at each falling edge of a BWC refresh pulse, the BWC update controller 402 (not shown but illustrated in FIG. 5) detects the change of BWC. For example, at a first time instance, changes occur. As a result, an indicator BWC-Update-STOP (shown in FIG. 6) remains “0” in accordance with the operation of the BWC update controller 402. Likewise, at a second time instance as shown in FIG. 6, the BWC values at the second time instance change again. As a consequence, the indicator BWC-Update-STOP remains “0”. At a third time instance, the BWC values remain the same as the previous time instance. The BWC update controller records this as the first No-BWC-Update event (shown in FIG. 6) and does not change the status of the indicator BWC-Update-STOP until a repetitive No-BWC-Update event comes. At a fourth time instance, the BWC update controller detects the BWC values remain the same again. According to the operation of the BWC update controller 402, when the BWC-Update-STOP changes its status from “0” to “1”, which indicates that a reliable BWC code has been identified, the last BWC can be saved as a channel setting for a particular bandwidth frequency.
FIG. 7 illustrates a flowchart of identifying a channel setting by means of the BWC update controller shown in FIG. 6. In a calibration process, an initial BWC value may be selected to start the calibration process. In an 8-bit accuracy calibration, the initial value may be 255 in decimal as described above with respect to FIG. 5. A BWC latch receives the initial value and adjusts the variable capacitor of an analog baseband filter accordingly at step 702. Subsequently, at step 704, when a new refresh pulse comes, a phase comparator (not shown) and a frequency detector (not shown) compare the input signal and the output signal of the analog baseband filter.
At step 706, a state machine (not shown) receives the comparison results from the phase comparator and the frequency detector. When the phase lag and the frequency shift are not within the predetermined thresholds, the state machine sets two indicators PD and FC as “1” and the calibration process takes the route formed by steps 708 and 710 wherein the BWC value is changed. In a calibration process with the fast calibration apparatus 106 (not shown), the BWC update controller 402 may bypass step 710 and change the BWC from 255 to 67 or some other predetermined values directly. In the subsequent iteration processes, when the calibration process takes the route formed by steps 708 and 710 again, at step 710, the BWC value is reduced by 1.
On the other hand, when both the phase lag and the frequency shift can satisfy the predetermined thresholds, the state machine sets two indicators PD and FC as “0” at step 712. Subsequently, at step 714, the calibration process determines whether an indicator BWC-Update-STOP is “0” or “1”. As described above with respect to FIG. 6, when the indicator BWC-Update-STOP is still “0”, the calibration process returns to the step 702 and starts the calibration again. In contrast, when the indicator BWC-Update-STOP has been changed to “1”, the last BWC value is saved as a channel setting at step 720.
FIG. 8 illustrates a flowchart of employing the fast calibration apparatus in an analog baseband filter calibration. At step 802, when a calibration process starts, the initial binary code for setting the bandwidth of the analog baseband filter may be far away from the correct value. For example, in an 8-bit accuracy calibration process, the initial value may be 255 in comparison with a correct value 65. At step 804, the fast calibration apparatus acknowledges a guaranteed-by-design value such as 65 through the design information of the analog baseband filter. Due to various variations such as PVT, the fast calibration apparatus selects a number higher than the guaranteed-by-design value so that the various variations can be covered. In this example, a number 67 may be given at step 804 to start the calibration process. At step 806, the fast calibration system comprising a phase comparator and a frequency detector compares the input signal and the output signal of the analog baseband filter. At step 808, a state machine decides whether the phase lag and the frequency shift are within the predetermined thresholds. If the phase lag and the frequency shift cannot satisfy the predetermined thresholds, the calibration process returns to step 804 and reduces the number by 1 (such as from 67 to 66). The calibration process repeats the process until both the phase lag and the frequency shift are within the thresholds. At step 810, the calibration process stops and the last number (e.g., 65 in this example) will be recorded as a channel setting.
Although embodiments of the present invention and its advantages have been described in detail, it should be understood that various changes, substitutions and alterations can be made herein without departing from the spirit and scope of the invention as defined by the appended claims.
Moreover, the scope of the present application is not intended to be limited to the particular embodiments of the process, machine, manufacture, composition of matter, means, methods and steps described in the specification. As one of ordinary skill in the art will readily appreciate from the disclosure of the present invention, processes, machines, manufacture, compositions of matter, means, methods, or steps, presently existing or later to be developed, that perform substantially the same function or achieve substantially the same result as the corresponding embodiments described herein may be utilized according to the present invention. Accordingly, the appended claims are intended to include within their scope such processes, machines, manufacture, compositions of matter, means, methods, or steps.

## Claims

1. A method comprising:
generating a calibration signal by a clock generator;
feeding the calibration signal to a first filter through a first switch unit, wherein the first filter comprises a variable capacitor;
comparing an output signal of the first filter with the calibration signal through a frequency detector and a phase comparator; and
generating a first updated bandwidth code to adjust a bandwidth frequency of the first filter through changing a value of the variable capacitor based upon the first updated bandwidth code.

2. The method of claim 1, further comprising:
comparing, by the phase comparator, an input signal of the first filter with the output signal of the first filter; and
reporting a phase lag between the input signal of the first filter and the output signal of the first filter.

3. The method of claim 1, further comprising:
comparing, by the frequency detector, an input signal of the first filter with the output signal of the first filter; and
reporting a frequency shift between the input signal of the first filter and the output signal of the first filter.

4. The method of claim 1, further comprising:
feeding the calibration signal to a second filter through a second switch unit;
comparing an output signal of the second filter with the calibration signal through the frequency detector and the phase comparator; and
generating a second updated bandwidth code to adjust a bandwidth frequency of the second filter.

5. The method of claim 4, wherein:
the first filter is an in-phase filter; and
the second filter is a quadrature filter.

6. The method of claim 1, further comprising:
adjusting the bandwidth frequency of the first filter until:
a phase lag between an input signal of the first filter and an output signal of the first filter is within a predetermined phase lag threshold; and
a frequency shift between the input signal of the first filter and the output signal of the first filter is within a predetermined frequency shift threshold.

7. A method comprising:
generating, by a multi clock generator, a characterization signal;
sending the characterization signal to an analog filter comprising a variable capacitor;
comparing an output signal of the analog filter with the characterization signal at a frequency detector and a phase comparator; and
generating, by a first calibration unit, a starting binary code for calibrating a bandwidth frequency of the analog filter based upon:
a binary code corresponding to the bandwidth frequency of the analog filter, wherein the binary code is generated based upon a predetermined value; and
a margin number corresponding to processing and operational variations of the bandwidth frequency of the analog filter.

8. The method of claim 7, further comprising:
generating a baseband frequency signal by a mixer; and
forwarding the baseband frequency signal to the analog filter through a switch unit coupled between the mixer and the analog filter when the analog filter is operating at a normal mode.

9. The method of claim 8, further comprising:
forwarding the characterization signal to the analog filter through the switch unit when the analog filter is operating at a calibration mode.

10. The method of claim 7, wherein:
the analog filter comprises a first analog filter and a second analog filter, and wherein the multi clock generator generates an in-phase characterization signal for calibrating the first analog filter dedicated to in-phase components of a high frequency signal and a quadrature characterization signal for calibrating the second analog filter dedicated to quadrature components of the high frequency signal.

11. The method of claim 7, wherein:
the multi clock generator further comprises a read-only memory (ROM) through which the multi clock generator receives a control signal for generating the characterization signal.

12. The method of claim 7, wherein:
setting the binary code by the first calibration unit based upon design information of the analog filter and processing and operational variations of the bandwidth frequency of the analog filter.

13. The method of claim 7, further comprising:
generating a phase lag signal at an output of the phase comparator; and
generating a frequency shift signal at an output of the frequency detector, wherein the phase comparator and the frequency detector are in an auto calibration apparatus coupled to the multi clock generator and the analog filter.

14. A method comprising:
receiving a characterization signal from a multi clock generator at an input of a filter comprising a variable capacitor, wherein the characterization signal has a frequency identical to a desired bandwidth frequency of the filter;
setting an initial bandwidth frequency of the filter;
comparing an input signal of the filter and an output signal of the filter;
adjusting a bandwidth frequency of the filter by changing a value of the variable capacitor via a binary code sent from a fast calibration apparatus; and
setting a calibration bandwidth frequency of the filter higher than the desired bandwidth frequency.

15. The method of claim 14, wherein:
the calibration bandwidth frequency is selected based upon the desired bandwidth frequency in consideration of process, voltage, and temperature variations.

16. The method of claim 14, further comprising:
comparing the input signal and the output signal of the filter and finding a phase lag between the input signal and the output signal of the filter; and
comparing the input signal and the output signal of the filter and finding a frequency shift between the input signal and output signal of the filter.

17. The method of claim 16, further comprising:
recording a channel setting based upon an updated binary code when a bandwidth frequency of the filter based upon the updated binary code satisfies:
the phase lag between the input signal of the filter and the output signal of the filter is within a predetermined phase lag threshold; and
the frequency shift between the input signal of the filter and the output signal of the filter is within a predetermined frequency shift threshold.

18. The method of claim 14, further comprising:
sending an updated binary code to adjust a bandwidth frequency of the filter until:
a phase lag between an input signal of the filter and an output signal of the filter is within a predetermined phase lag threshold; and
a frequency shift between the input signal of the filter and the output signal of the filter is within a predetermined frequency shift threshold.

19. The method of claim 14, wherein:
the variable capacitor is designed to select different bandwidth values for the filter.

20. The method of claim 14, further comprising:
adjusting the bandwidth frequency of the filter from 1 MHz to 10 MHz.