Abstract:
A calibration signal generator for use in a balancing circuit calibration device in a radio receiver, the calibration signal generator comprising: a means of amplifying a clocking signal from a clocking signal generator to provide a first calibration signal; a means of generating a second calibration signal from the clocking signal, the first and second calibration signals being transmissible to a one or more mixing circuits in the balancing circuit calibration device; and a means synchronizing the operation of other circuit elements in the balancing circuit calibration device with the clocking signal; characterized in that the clocking signal generator is present in the radio receiver and used therein for other functions.

Description:
FIELD OF THE INVENTION 
     The present invention relates to a calibration signal generator, and in particular, a calibration signal generator for use in a balancing circuit calibration device for a radio receiver. 
     BACKGROUND OF THE INVENTION 
     The growing market for portable wireless communication systems (e.g. wireless phones, wireless local area networks [WLANs], and global positioning systems [GPS]) has increased the need for low-cost and high-performance receivers. Thus, in view of their relatively simple implementation and low cost, very low intermediate frequency (VLIF) circuits are being increasingly used in wireless receivers (instead of other architectures such as superheterodyne and direct conversion). 
     VLIF receivers require stringent balancing of their IQ paths to maintain acceptable image rejection. Even with careful analogue design, dedicated systems are required for such balancing. However, these systems require calibration to counter the effects of process, temperature, supply and frequency variation. 
     Calibration can be accomplished online (i.e. whilst receiving an incoming signal) or offline (i.e. using a dedicated training signal). However, recent studies have shown that adaptive algorithms used in online calibration, do not converge rapidly enough to meet the demands of an enhanced GPRS (EGPRS) standard. Similarly, providing dedicated hardware for offline calibration is proving very costly. In general prior art systems for calibrating balancing circuits require three different frequency sources, namely
         a real-valued radio-frequency (RF)-tone tunable to any frequency (f RX ) in a designated mobile phone frequency band (and thereby generate a test tone for the balancing circuits);   a complex-valued RF-local-oscillator (LO) tunable to a small-frequency-offset (f 0 ) (approximately 100 KHz) from the real-valued RF-tone; f RX  and   a digital-local-oscillator (DLO) capable of generating a complex-valued digital intermediate frequency (IF) tone (of frequency f 0 ) and a sampling-frequency (f S ) matching that of analogue to digital converters (ADCs) in the balancing circuits.       

     In particular, US patent Application US20050008107 describes a receiver which comprises a mechanism for correcting frequency dependent I/Q phase error, wherein the receiver employs a dedicated RF tone generator to drive its mixer circuits. U.S. Pat. No. 6,931,343 describes an on-signal calibration system which uses the I and Q signals of a transmitter to remove distortions in an RF output signal. Similarly, UK Patent GB2406984 describes a method and arrangement for self-tuning I-Q balancing for an I-Q radio receiver. 
     SUMMARY OF THE INVENTION 
     According to the invention there is provided a calibration signal generator as provided in the appended Claims. 
    
    
     
       BRIEF DESCRIPTION OF THE DRAWINGS 
       Two embodiments of the invention will hereby be described, by way of example only, with reference to the accompanying figures in which: 
         FIG. 1  is a block diagram of a conventional wireless receiver; 
         FIG. 2  is a frequency spectrum of an incoming modulated signal ŝ(t) which is demodulated to a baseband signal {circumflex over (x)}(t); 
         FIG. 3  is a block diagram of a demodulation system in the conventional wireless receiver of  FIG. 1 ; 
         FIG. 4   a  is a frequency domain representation of the demodulation process provided by the demodulation system of  FIG. 3 ; 
         FIG. 4   b  is a complex number representation of the signal resulting from the demodulation process of  FIG. 4   a;    
         FIG. 5  is a spectrum of a desired demodulated baseband signal with an overlapping image spectrum of an unwanted frequency channel; 
         FIG. 6  is a complex domain representation of the operation of a conventional balancing circuit in the receiver of  FIG. 1 ; 
         FIG. 7  is a block diagram of a calibration signal generator according to any of the embodiments in use within a balancing circuit calibration device; 
         FIG. 8  is a block diagram of a PATH A  in the first embodiment of the calibration signal generator shown in  FIG. 7 ; 
         FIG. 9  is a block diagram showing the 6.5, 13, 26 and 52 MHz odd harmonic frequency plan with a 50% duty cycle of a crystal employed in the first embodiment; 
         FIG. 10  is a block diagram showing the presence in the 149 th , 150 th 151 st , 152 nd  and 153 rd  harmonics of a 13 MHz clocking signal in the PCS 1900 band; 
         FIG. 11  is a graph of the power in the 307 th  harmonic of a 6.5 MHz clocking signal as a function of a duty cycle of a squaring amplifier; and 
         FIG. 12  is a flowchart of the operation of algorithm for switching to another harmonic in the event that a duty cycle cannot be guaranteed for a given harmonic. 
         FIGS. 9-11  show harmonics and duty cycle parameters for generating calibration test tones in the GSM 850, GSM 900, DCS 1800 and PCS 1900 frequency bands using clocking signals of 6.5 MHz, 13 MHz, 26 MHz and 52 MHz signals from a crystal in accordance with the first embodiment. 
     
    
    
     DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS 
     The following discussion will first describe the origins and nature of I/Q imbalance during the normal operation of a demodulator in a radio receiver. The discussion will then turn to a broad overview of the calibration signal generator of the present embodiments with reference to its use in a balancing circuit calibration device. This will be followed by a more detailed examination of the clocking signal generating systems and clocking signal processing systems employed in the first and second embodiments. After this, the coherency conditions of the calibration signal generator will be examined. The description will finish with a discussion of two potential implementations of the calibration signal generator. 
     A. I/Q Imbalance 
     A radio frequency (RF) communication system typically comprises a transmitter and a receiver. In use, the transmitter transmits an information-bearing signal x(t) (sometimes known as a baseband signal) to the receiver. To more efficiently transmit the baseband signal x(t), the transmitter may modulate the signal onto a carrier signal of frequency ω c  (wherein ω c  is known as the carrier frequency). This causes the baseband signal x(t) to be shifted to the carrier frequency ω c . The resulting signal s(t) can be described by
 
 s ( t )= A ( t )sin(ω c   t +φ( t )+φ 0 )  (1)
 
wherein A(t), φ(t) and φ {tilde over (0)}  denote the amplitude, phase and phase offset of the signal. The modulated signal s(t) may be altered (e.g. by noise) on transmission through a channel (or medium), to form the signal (received by the receiver) ŝ(t).
 
     Referring to  FIG. 1 , a receiver  10  comprises an antenna  12  linked to receiver circuitry  14 . In use, the antenna  12  receives the modulated signal ŝ(t). Referring to  FIG. 2 , the receiver circuitry then converts the received signal ŝ(t) into a baseband signal {circumflex over (x)}(t) (by multiplying the received signal ŝ(t) with a local reference signal at the carrier frequency ω c ) and recovers modulating information (A(t) and φ(t)) therefrom. 
     More specifically, referring to  FIG. 3 , the receiver circuitry  14  converts the received signal ŝ(t) into a complex baseband signal by quadrature demodulation with quadrature and in-phase mixers  16 ,  18 . The quadrature mixer  16  multiplies the received signal ŝ(t) with a sine wave at the carrier frequency ω c  and low pass filters  20  the resulting signal to yield a quadrature signal Q(t), which can be described by the expression:
 
 Q ( t )= A ( t )sin(φ( t )+φ 0 )  (2)
 
     Similarly, the in-phase mixer  18  multiplies the received signal ŝ(t) with a cosine wave at the carrier frequency ω c  and low pass filters  22  the resulting signal to yield an in-phase signal I(t), which can be described by the expression
 
 I ( t )= A ( t )cos(φ( t )+φ 0 )  (3)
 
     Thus, in effect, a quadrature demodulator splits a received signal ŝ(t) into in-phase (I(t)) and quadrature (Q(t)) components that are processed separately in respective I and Q channels. 
     Referring to  FIG. 4   a , the in-phase and quadrature signals can be represented as a complex number {circumflex over (x)}(t), wherein {circumflex over (x)}(t)=I(t)+jQ(t). Referring to  FIG. 4   b , and using Euler&#39;s law, the amplitude and phase terms (A(t) and φ(t)) of the received signal ŝ(t) can be determined from the following expressions: 
     
       
         
           
             
               
                 
                   
                     A 
                     ⁡ 
                     
                       ( 
                       t 
                       ) 
                     
                   
                   = 
                   
                     
                       
                         
                           I 
                           ⁡ 
                           
                             ( 
                             t 
                             ) 
                           
                         
                         2 
                       
                       + 
                       
                         
                           Q 
                           ⁡ 
                           
                             ( 
                             t 
                             ) 
                           
                         
                         2 
                       
                     
                   
                 
               
               
                 
                   ( 
                   4 
                   ) 
                 
               
             
             
               
                 
                   
                     ϕ 
                     ⁡ 
                     
                       ( 
                       t 
                       ) 
                     
                   
                   = 
                   
                     
                       tan 
                       
                         - 
                         1 
                       
                     
                     ⁡ 
                     
                       ( 
                       
                         
                           Q 
                           ⁡ 
                           
                             ( 
                             t 
                             ) 
                           
                         
                         
                           I 
                           ⁡ 
                           
                             ( 
                             t 
                             ) 
                           
                         
                       
                       ) 
                     
                   
                 
               
               
                 
                   ( 
                   5 
                   ) 
                 
               
             
           
         
       
     
     The discussions so far, have related to an ideal situation in which the sine and cosine signals, employed in the quadrature demodulator, are perfectly balanced. However, in practice, the sine and cosine signals are typically provided by an RF oscillator whose outputs are rarely in perfect quadrature (i.e. usually have different amplitudes and are not exactly 90° out of phase). Thus, such balance is unlikely. The mixers  16 ,  18  may introduce further imbalance (since the gain and phase response through the I and Q paths is not exactly the same). 
     As a result, the translation of a received signal ŝ(t) to the baseband may include a translation in the other direction. In this case, whilst components from the desired frequency translation will dominate the resulting spectrum, components produced by the frequency translation in the opposite direction will also exist. Furthermore, as shown in  FIG. 5 , an image of a strong unwanted frequency channel  24  may fall within the frequency band of a desired signal  25 . Referring to  FIG. 6 , and representing an imbalance in a receiver&#39;s I and Q channels by a complex variable α+jβ the introduction of a balancing circuit (1/(α+jβ)) (comprising mixing circuits) into the receiver can overcome the imbalance. 
     B. Calibration of a Receiver&#39;s Balancing Circuit 
     The basic premise underlying the present embodiments is the re-use of equipment already included within a receiver to generate a test tone for calibrating the receiver&#39;s balancing circuits. In particular, the present embodiments use the harmonics of a clock source already included within a receiver to:
         clock a synthesiser (normally present in the receiver&#39;s demodulator) to generate a complex second calibration signal (of frequency f C =f RX +/−f 0 , wherein f 0  is an offset frequency); and   generate a real-valued first calibration signal (of frequency f RX ).       

     This approach contrasts with traditional test-tone generating systems that require an additional dedicated test tone synthesiser or an external clock source to clock the demodulator&#39;s synthesiser. Accordingly, the present embodiments substantially reduces the silicon area occupied by the receiver&#39;s demodulator. Furthermore, the present embodiments enable the receiver&#39;s balancing circuits to be calibrated over a large frequency range. 
     A first embodiment employs the receiver&#39;s quartz crystal as a clocking signal generator. A second embodiment uses a synthesiser (for example a digital phase locked loop (DPLL)) as a clocking signal generator. Neither embodiment is limited to a particular type of injection of the test tone. In particular, both embodiments embrace high-side and low-side injection. High side injection is where a complex second calibration signal frequency (f RX ) is programmed to be higher than the test tone (f C ) (i.e. f C =f RX +f 0 ). However, in low side injection f C =f RX −f 0 . Regardless of the specific form of injection employed, the operation of the balancing circuit calibration device will result in a tone (at a difference frequency), from which a single-bin DFT can extract balancing information. In both embodiments, the calibration process is performed only once (i.e. ‘off-line’ at power up or during manufacture) and regular re-calibration is unnecessary. 
     C. General Structure of a Calibration Signal Generator for a Balancing Circuit Calibration Device 
     A receiver&#39;s balancing circuit is calibrated using a scheme such as that described in UK Patent number GB2406984 (which is included herein by reference). 
     Referring to  FIG. 7 , a calibration signal generator  26  is typically used together with a balancing circuit calibration device  200  in a receiver (not shown) to calibrate the balancing of the receiver&#39;s mixer circuits (not shown) and thereby overcome the deleterious effects of I/Q imbalance. The receiver (not shown) comprises a clocking signal generator  27  with at least two output ports. The calibration signal generator  26  comprises a connection between the first output port of the clocking signal generator  27  and a squaring amplifier  28 . During calibration, the clocking signal generator  27  generates a clocking signal (of frequency f d ) which is transmitted through the first output port to the squaring amplifier  28 . In response, the squaring amplifier  28  produces a signal (of frequency f RX ) which effectively acts as the signal ŝ(t)) received by the receiver during normal operation. For simplicity, this signal will be known henceforth as a “first calibration signal”. The first calibration signal is transmitted to an RF input (RF IN ) of the receiver&#39;s mixing circuits  29 ,  30 . 
     The calibration signal generator  26  also comprises a connection between the second output port of the clocking signal generator  27  and a synthesiser  31 . The synthesiser  31  is connected in turn to a quadrature generator  32 . Both the synthesiser  31  and the quadrature generator  32  are already present in the receiver (not shown) for the purpose of generating injected sine and cosine signals in the receiver&#39;s demodulator. The signal from the quadrature generator  32  (which for simplicity, will be known henceforth as a “second calibration signal”) effectively acts as the carrier signals (sin(ω c t) and cos(ω c t)) injected into the demodulator during the normal operation of the receiver. 
     To this end, the second calibration signal is transmitted to a carrier input port (C IN ) of the mixing circuits  29 ,  30 . During normal operation, the quadrature generator  32  is a first source of imbalance (as the sine and the cosine signals from the quadrature generator  32  will not be in perfect quadrature). The mixing circuits  29 ,  30  typically provide the remaining imbalance in a receiver, since each of the mixing circuits  29 ,  30  will have its own separate gain and phase behaviour. 
     The clocking signal (of frequency f d ) is also transmitted to the rest of the components of the balancing circuit calibration device  26 , wherein it effectively acts as a master clocking signal synchronising the operation of these components. The clock rate of these components is given by f DSP . If f d  does not equal f DSP , the clocking signal is transmitted to a frequency divider  100  or other suitable per-processing component prior to transmission to the rest of the components of the balancing circuit calibration device  26 . 
     Since both the second calibration signal and the first calibration signal are clocked from the same clock source, namely the clocking signal generator  27 , the two signals are synchronised and coherency is maintained (see later coherency discussion). For simplicity, the signal path from the clocking signal generator  27  to the RF input (RF IN ) of the mixing circuits  29 ,  30  will be denoted henceforth as PATH A . Similarly, the signal path from the clocking signal generator  27  to the carrier input (C IN ) of the mixing circuits  29 ,  30 , will be denoted as PATH B . 
     On receipt of the second calibration signal and the first calibration signal, the mixing circuits  29 ,  30  produce a complex signal (I and Q components) whose frequency spectrum has a main-component of frequency f 0 &lt;&lt;f RX  (and possibly spurs, noise and other components). This complex signal is transmitted to baseband filters  33 ,  34 . The output signal from the baseband filters  33 ,  34  is sampled and digitized by analogue to digital converters (ADCs)  35 ,  36  and filters  37 ,  38  whose operation-free frequencies are respectively given by f ADC  and f DSP , wherein f 0 &lt;&lt;f DSP &lt;&lt;f ADC . The output signals from the filters  37 ,  38  are then transmitted to a single bin DFT circuits  39 ,  40 . To perform a discrete fourier transform, the single bin DFT circuits  39 ,  40  also receive sine and cosine signals at frequency f DLO  from a digital local oscillator (DLO)  105  (which is clocked by the master clocking signal of frequency f DSP ). It should be noted that for the correct operation for the single bin DFT circuits  39 ,  40  the synchronicity of the second calibration signal and the first calibration signal is crucial. 
     Application of the single-bin DFT  39 ,  40  to the sampled digitised I and Q signals yields two complex values from which the quadrature of the balancing circuit can be determined and ultimately a balancing gain for the receiver calculated. In particular, the fundamental component of the sampled, digitised test tone is given by
 
 I   m ( n )+ jQ   m ( n )= AA   i  cos(θ( n )+φ i +φ)− jAA   q  sin(θ( n )+φ q +φ)  (6)
 
wherein θ(n)=2πf 0 nT s  is the sampled phase and T S  is the sample period (and φ is an arbitrary phase common to both the I and Q paths).
 
Taking a single bin DFT at the discrete phase θ(n)=2πf 0 nT s  over N points, where N=N 2 −N 1 +1 yields
 
                       I   m     ⁡     (   θ   )       =       ∑     n   =     N   1         N   2       ⁢           ⁢         I   m     ⁡     (   n   )       ⁢     ⅇ     -     jθ   ⁡     (   n   )                       (   7   )                   Q   m     ⁡     (   θ   )       =       ∑     n   =     N   1         N   2       ⁢           ⁢         Q   m     ⁡     (   n   )       ⁢     ⅇ     -     jθ   ⁡     (   n   )                       (   8   )               
N 1  is chosen to be sufficiently large for transient components to settle out. N 2  is chosen to satisfy a coherency constraint (to be discussed later).
 
     These expressions can be re-written in polar coordinates as: 
     
       
         
           
             
               
                 
                   
                     
                       I 
                       m 
                     
                     ⁡ 
                     
                       ( 
                       θ 
                       ) 
                     
                   
                   = 
                   
                     
                       AN 
                       2 
                     
                     ⁢ 
                     
                       A 
                       i 
                     
                     ⁢ 
                     
                       ⅇ 
                       
                         j 
                         ⁡ 
                         
                           ( 
                           
                             
                               ϕ 
                               i 
                             
                             + 
                             ϕ 
                           
                           ) 
                         
                       
                     
                   
                 
               
               
                 
                   ( 
                   9 
                   ) 
                 
               
             
             
               
                 
                   
                     
                       Q 
                       m 
                     
                     ⁡ 
                     
                       ( 
                       θ 
                       ) 
                     
                   
                   = 
                   
                     j 
                     ⁢ 
                     
                       AN 
                       2 
                     
                     ⁢ 
                     
                       A 
                       q 
                     
                     ⁢ 
                     
                       ⅇ 
                       
                         j 
                         ⁡ 
                         
                           ( 
                           
                             
                               ϕ 
                               q 
                             
                             + 
                             ϕ 
                           
                           ) 
                         
                       
                     
                   
                 
               
               
                 
                   ( 
                   10 
                   ) 
                 
               
             
           
         
       
     
     A microcontroller (not shown) uses the quadrature information from the DFT  39 ,  40  results to solve a balancing equation  41  and obtain a complex balancing gain to balance the receiver at a target frequency. In particular, using expressions (10) and (11) the complex balancing gain A b e jφ     b    to balance the Q channel can be determined from 
     
       
         
           
             
               
                 
                   
                     
                       A 
                       b 
                     
                     ⁢ 
                     
                       ⅇ 
                       
                         jϕ 
                         b 
                       
                     
                   
                   = 
                   
                     
                       
                         j 
                         ⁢ 
                         
                             
                         
                         ⁢ 
                         
                           
                             I 
                             m 
                           
                           ⁡ 
                           
                             ( 
                             θ 
                             ) 
                           
                         
                       
                       
                         
                           Q 
                           m 
                         
                         ⁡ 
                         
                           ( 
                           θ 
                           ) 
                         
                       
                     
                     = 
                     
                       
                         
                           A 
                           i 
                         
                         
                           A 
                           q 
                         
                       
                       ⁢ 
                       
                         ⅇ 
                         
                           j 
                           ⁡ 
                           
                             ( 
                             
                               
                                 ϕ 
                                 i 
                               
                               - 
                               
                                 ϕ 
                                 q 
                               
                             
                             ) 
                           
                         
                       
                     
                   
                 
               
               
                 
                   ( 
                   11 
                   ) 
                 
               
             
           
         
       
     
     Expression (12) can be represented in Cartesian form as: 
                       A   b     ⁢     ⅇ     jϕ   b         =         j   ⁢           ⁢       I   m     ⁡     (   θ   )             Q   m     ⁡     (   θ   )         =         -     I   m       +     j   ⁢           ⁢     I   re             Q   re     +     j   ⁢           ⁢     Q   im                     (   12   )               
and solved to produce
 
     
       
         
           
             
               
                 
                   
                     
                       A 
                       b 
                     
                     ⁢ 
                     
                       ⅇ 
                       
                         jϕ 
                         b 
                       
                     
                   
                   = 
                   
                     
                       α 
                       + 
                       jβ 
                     
                     = 
                     
                       
                         
                           ( 
                           
                             
                               - 
                               
                                 I 
                                 im 
                               
                             
                             + 
                             
                               j 
                               ⁢ 
                               
                                   
                               
                               ⁢ 
                               
                                 I 
                                 re 
                               
                             
                           
                           ) 
                         
                         ⁢ 
                         
                           ( 
                           
                             
                               Q 
                               re 
                             
                             - 
                             
                               j 
                               ⁢ 
                               
                                   
                               
                               ⁢ 
                               
                                 Q 
                                 im 
                               
                             
                           
                           ) 
                         
                       
                       
                         
                           Q 
                           re 
                           2 
                         
                         + 
                         
                           Q 
                           im 
                           2 
                         
                       
                     
                   
                 
               
               
                 
                   ( 
                   13 
                   ) 
                 
               
             
           
         
       
     
     Equating the real and imaginary terms in expression (13) yields 
     
       
         
           
             
               
                 
                   
                     [ 
                     
                       
                         
                           α 
                         
                       
                       
                         
                           β 
                         
                       
                     
                     ] 
                   
                   = 
                   
                     
                       
                         [ 
                         
                           
                             
                               
                                 Q 
                                 im 
                               
                             
                             
                               
                                 - 
                                 
                                   Q 
                                   re 
                                 
                               
                             
                           
                           
                             
                               
                                 Q 
                                 re 
                               
                             
                             
                               
                                 Q 
                                 im 
                               
                             
                           
                         
                         ] 
                       
                       
                         
                           Q 
                           re 
                           2 
                         
                         + 
                         
                           Q 
                           im 
                           2 
                         
                       
                     
                     ⁡ 
                     
                       [ 
                       
                         
                           
                             
                               I 
                               re 
                             
                           
                         
                         
                           
                             
                               I 
                               im 
                             
                           
                         
                       
                       ] 
                     
                   
                 
               
               
                 
                   ( 
                   14 
                   ) 
                 
               
             
           
         
       
     
     Similarly, the complex balancing gain A b e jφ     b    for balancing the I channel can be determined from 
                       A   b     ⁢     ⅇ     jϕ   b         =           A   q       A   i       ⁢     ⅇ     j   ⁡     (       ϕ   q     -     ϕ   i       )           =         Q   m     ⁡     (   θ   )         j   ⁢           ⁢       I   m     ⁡     (   θ   )                     (   15   )               
which can be solved to yield:
 
     
       
         
           
             
               
                 
                   
                     [ 
                     
                       
                         
                           α 
                         
                       
                       
                         
                           β 
                         
                       
                     
                     ] 
                   
                   = 
                   
                     
                       
                         [ 
                         
                           
                             
                               
                                 - 
                                 
                                   I 
                                   im 
                                 
                               
                             
                             
                               
                                 I 
                                 re 
                               
                             
                           
                           
                             
                               
                                 - 
                                 
                                   I 
                                   re 
                                 
                               
                             
                             
                               
                                 - 
                                 
                                   I 
                                   im 
                                 
                               
                             
                           
                         
                         ] 
                       
                       
                         
                           I 
                           re 
                           2 
                         
                         + 
                         
                           I 
                           im 
                           2 
                         
                       
                     
                     ⁡ 
                     
                       [ 
                       
                         
                           
                             
                               Q 
                               re 
                             
                           
                         
                         
                           
                             
                               Q 
                               im 
                             
                           
                         
                       
                       ] 
                     
                   
                 
               
               
                 
                   ( 
                   16 
                   ) 
                 
               
             
           
         
       
     
     The resulting complex balancing gains are converted into polar form (by a Cordic  42 ) and further converted into a form compatible with the receiver&#39;s balancing circuits. The result is stored  44  for later use in configuring the mixing circuits  29 ,  30  prior to receipt of an incoming signal. 
     For example, if balancing is applied to the Q channel, the mixing equation becomes
 
 I   0   +jQ   0 =( I   m   +JQ   m   A   b   e   jφ     b   ) e   jθi     f     =I   m   e   jθ     if     +jQ   m   e   j (θ   if     +φ     b   )  (17)
 
wherein I m +jQ m  is an injected complex signal and e jθ     if    a complex carrier. Expression (17) can be solved in matrix format to yield
 
     
       
         
           
             
               
                 
                   
                     [ 
                     
                       
                         
                           
                             I 
                             0 
                           
                         
                       
                       
                         
                           
                             Q 
                             0 
                           
                         
                       
                     
                     ] 
                   
                   = 
                   
                     
                       [ 
                       
                         
                           
                             
                               cos 
                               ⁢ 
                               
                                   
                               
                               ⁢ 
                               
                                 θ 
                                 if 
                               
                             
                           
                           
                             
                               
                                 - 
                                 
                                   A 
                                   b 
                                 
                               
                               ⁢ 
                               
                                 sin 
                                 ⁡ 
                                 
                                   ( 
                                   
                                     
                                       θ 
                                       if 
                                     
                                     + 
                                     
                                       ϕ 
                                       b 
                                     
                                   
                                   ) 
                                 
                               
                             
                           
                         
                         
                           
                             
                               sin 
                               ⁢ 
                               
                                   
                               
                               ⁢ 
                               
                                 θ 
                                 if 
                               
                             
                           
                           
                             
                               
                                 A 
                                 b 
                               
                               ⁢ 
                               
                                 cos 
                                 ⁡ 
                                 
                                   ( 
                                   
                                     
                                       θ 
                                       if 
                                     
                                     + 
                                     
                                       ϕ 
                                       b 
                                     
                                   
                                   ) 
                                 
                               
                             
                           
                         
                       
                       ] 
                     
                     ⁡ 
                     
                       [ 
                       
                         
                           
                             
                               I 
                               m 
                             
                           
                         
                         
                           
                             
                               Q 
                               m 
                             
                           
                         
                       
                       ] 
                     
                   
                 
               
               
                 
                   ( 
                   18 
                   ) 
                 
               
             
           
         
       
     
     As an aside, in an alternative configuration, the sequencing of the balancing equation  41  solution is rearranged so that it is performed in polar form. In this case, the Cordic  42  is used twice, to convert the DFT  39 ,  40  results into polar format. The balancing equation  41  is formulated and solved in polar format and the result directly stored  44  for later use. 
     The first and second embodiments are concerned with the clocking signal generator  27  and its relationship with the squaring amplifier  28  and synthesiser  31 . 
     D. Clocking Signal Generator in a Balancing Circuit Calibration Apparatus 
     Embodiment 1 
     Crystal Clocking Signal Generator 
     Referring to  FIG. 8 , the first embodiment of the clocking signal generator  127  comprises the receiver&#39;s quartz crystal  46  connected to a divider circuit  48 . In the present example, the crystal provides a 52 MHz clocking signal. However, it will be appreciated that the first embodiment  127  is not limited to a crystal of this frequency. In particular, crystals of other frequencies could also be used, with corresponding divider circuits. The divider circuit  48  divides the frequency of the clocking signal from the crystal  46  according to a pre-defined integer factor ( ) so that the frequency of the output signal from the divider circuit  48  is 1/times the frequency (f d ) of the clocking signal from the crystal  46 . 
     D.1(a) PATH A  from Crystal 
     The squaring amplifier  50  converts the output signal from the divider circuit  48  into a series of pulses. The squaring amplifier  50  has a predefined duty cycle ( ), being the ratio of the duration that the pulses are non-zero to the overall period of the pulses. The value of the duty cycle determines the power in a given harmonic of the output signal from the divider circuit  48 , wherein the square wave output signal from the squaring amplifier  50  is the first calibration signal. 
     D.1(a)(i) Frequency Divider Circuit ( 48 ) 
     There are four frequency bands designated for the operation of mobile phones, namely:
         Global System for Mobile Communications (GSM) 850 band (downlink 869-894 MHz)   GSM 900 band (downlink 935-960 MHz)   Digital Cellular System (DCS) 1800 band (downlink 1805-1880 MHz); and   Personal Communication Service (PCS) 1900 band (downlink 1930-1990 MHz).       

     For the sake of example, the present embodiment will be described, with reference to the above GSM frequency bands. However, it will be understood that the present embodiments are not limited to a GSM implementation, but could instead be implemented with any suitable receiver protocol (e.g. 3G) and associated frequency band. To develop a generalised calibration scheme for a GSM receiver, it is necessary to detect receiver I/Q imbalance in all of the above-mentioned GSM frequency bands. Further, for robust calibration in each such frequency band, it is necessary to generate a plurality of test tones within each frequency band. 
     Referring to  FIG. 9 , the 17 th  harmonic of the clocking signal from the 52 MHz crystal has a frequency of 884 MHz (i.e. 17×52 MHz). This signal is roughly in the middle of the GSM 850 band. However, the 52 MHz clocking signal has no other harmonics in the other GSM frequency bands. In other words, the raw signal from the 52 MHz crystal provides very limited coverage of the four GSM frequency bands. Thus, the raw signal from the 52 MHz crystal is not suitable for developing a generalised calibration scheme for a GSM receiver. 
     Dividing the frequency of the 52 MHz clocking signal by two, results in a 26 MHz clocking signal. The 37 th  harmonic of the resulting 26 MHz clocking signal has a frequency of 962 MHz, which is within the GSM 900 frequency band. Similarly, the 71 st  harmonic of the 26 MHz clocking signal has a frequency of 1846 MHz, which is within the DCS 1800 frequency band. Thus, greater coverage of the four GSM frequency bands is achieved by dividing the 52 MHz clocking signal (from the crystal) by two. Continuing from this, it can be seen that the best coverage of the four GSM frequency bands is achieved by dividing the frequency of the 52 MHz clocking signal by eight (to produce a 6.5 MHz clocking signal). 
     D.1(a)(ii) Squaring Amplifier 
     Merely using a divider circuit  48  to divide the frequency of the clocking signal from the crystal  46  and thereby obtain harmonics in the four GSM frequency bands is not sufficient to generate a first calibration signal suitable for calibrating a receiver&#39;s balancing circuits. In particular, even if the frequency of a given harmonic resides within a desired GMS frequency band, the harmonic is of little use for calibration if it does not contain enough power to be detectable above ambient noise levels. 
     For example, and referring to  FIG. 10 , the 150 th  harmonic of a 13 MHz clock signal (obtained by dividing the 52 MHZ clocking signal from the crystal by four) has a frequency of 1950 MHz, which is within the PCS 1900 frequency band. This clocking signal achieves its maximum power with a duty cycle (of the squaring amplifier) of 2/8 and 6/8. However, the 152 nd  harmonic of the 13 MHz clocking signal (i.e. with a frequency of 1976 MHz, which is within the PCS 1900 frequency band) does not have enough power to be useful for calibration, with a duty cycle resolution of ⅛. 
     For a clocking signal of peak-to-peak amplitude A, and a squaring amplifier duty cycle δ, the amplitude (X n ) of the nth harmonic of the clocking signal is given by: 
     
       
         
           
             
               
                 
                   
                     x 
                     n 
                   
                   = 
                   
                     2 
                     ⁢ 
                     
                         
                     
                     ⁢ 
                     A 
                     ⁢ 
                     
                         
                     
                     ⁢ 
                     δ 
                     ⁢ 
                     
                       
                         sin 
                         ⁡ 
                         
                           ( 
                           
                             n 
                             ⁢ 
                             
                                 
                             
                             ⁢ 
                             πδ 
                           
                           ) 
                         
                       
                       
                         n 
                         ⁢ 
                         
                             
                         
                         ⁢ 
                         πδ 
                       
                     
                   
                 
               
               
                 
                   ( 
                   19 
                   ) 
                 
               
             
           
         
       
     
     Thus, the power P n  in the nth harmonic is given by 
     
       
         
           
             
               
                 
                   
                     P 
                     n 
                   
                   = 
                   
                     
                       
                          
                         
                           X 
                           n 
                         
                          
                       
                       2 
                     
                     2 
                   
                 
               
               
                 
                   ( 
                   20 
                   ) 
                 
               
             
           
         
       
     
     From these expressions it can be seen that the power in a given harmonic is dependent on the squaring amplifier&#39;s duty cycle. In particular, it can be seen that higher order harmonics have reduced power compared with lower order harmonics; and are particularly sensitive to changes in the duty cycle. Beyond the problem of detecting a low power first calibration signal above ambient noise, the use of such a first calibration signal would entail a long calculation time for the performance of the single bin—DFT (of  FIG. 7 ). For example, if a 307 th  harmonic was used as a first calibration signal, the calibration process would take approximately 3 ms. However, the calculation time decreases inversely with the power in a first calibration signal. 
     For example, the highest harmonic of a clocking signal of 6.5 MHz, is the 307 th  harmonic. If this clocking signal has a peak-to-peak amplitude A=200 mV and is used in a balancing circuit whose mixing circuits have a gain of 13 dB and whose base band filters have a gain of 18 dB, the baseband power of the first calibration signal as a function of the duty cycle (δ) of the squaring amplifier is shown in  FIG. 11 . In this case, it can be seen that maximum power is achieved with a 50% duty cycle. The power in the harmonic is very sensitive to changes in the duty cycle. Thus, very narrow tolerances are allowed on the setting of the duty cycle to enable a test-tone with sufficient power to be generated. 
     An odd-valued nth harmonic of the clocking signal achieves its maximum power at: 
     
       
         
           
             
               
                 
                   
                     
                       n 
                       ⁢ 
                       
                           
                       
                       ⁢ 
                       πδ 
                     
                     = 
                     
                       
                         
                           
                             ( 
                             
                               
                                 2 
                                 ⁢ 
                                 
                                     
                                 
                                 ⁢ 
                                 m 
                               
                               + 
                               1 
                             
                             ) 
                           
                           ⁢ 
                           
                             π 
                             2 
                           
                         
                         ⇒ 
                         δ 
                       
                       = 
                       
                         
                           
                             2 
                             ⁢ 
                             
                                 
                             
                             ⁢ 
                             m 
                           
                           + 
                           1 
                         
                         
                           2 
                           ⁢ 
                           
                               
                           
                           ⁢ 
                           n 
                         
                       
                     
                   
                   , 
                   
                     m 
                     ∈ 
                     
                       z 
                       + 
                     
                   
                 
               
               
                 
                   ( 
                   21 
                   ) 
                 
               
             
           
         
       
     
     For example, the third harmonic (n=3) of a clocking signal achieves its maximum power for a duty cycle (δ) of ⅙, 3/6 and ⅚. Similarly, the fourth harmonic (n=4) of the clocking signal achieves its maximum power for a duty cycle (δ) of ⅛, ⅜, ⅝ and ⅞. 
     Thus, if a duty cycle can be divided into steps of ⅛, maximal power can be achieved in the odd harmonics of a clocking signal of 6.5 MHz (obtained by dividing the clocking signal from the 52 MHz crystal by eight), with a duty cycle (δ) of 
     
       
         
           
             
               
                 
                   
                     δ 
                     = 
                     
                       
                         
                           
                             2 
                             ⁢ 
                             
                                 
                             
                             ⁢ 
                             m 
                           
                           + 
                           1 
                         
                         
                           2 
                           ⁢ 
                           
                               
                           
                           ⁢ 
                           n 
                         
                       
                       = 
                       
                         k 
                         8 
                       
                     
                   
                   , 
                   
                     
 
                   
                   ⁢ 
                   
                     k 
                     ∈ 
                     
                       { 
                       
                         1 
                         , 
                         2 
                         , 
                         3 
                         , 
                         4 
                         , 
                         5 
                         , 
                         6 
                         , 
                         7 
                       
                       } 
                     
                   
                 
               
               
                 
                   ( 
                   22 
                   ) 
                 
               
             
           
         
       
     
       FIGS. 9-11  indicate duty cycles and harmonics to obtain useful first calibration signals using 6.5 MHz, 13 MHz, 26 MHz and 52 MHz clocking signals. 
     Referring to  FIG. 12 , in cases where a duty cycle cannot be guaranteed an additional algorithm is provided for switching to another harmonic. The algorithm comprises the following steps: 
     (1) assuming a near 50% duty cycle (so that odd harmonics have maximum power and even harmonics have minimum power); 
     (2) measuring the approximate power in a current harmonic (following an attempt to calibrate the receiver&#39;s balancing circuits), by summing the absolute value of the four individual DFT sums (which arise because each DFT sum is complex with a real and imaginary term);
 
(3) using the neighbouring even harmonic or the nearest odd harmonic with a doubling in divisor of the clocking signal, in the event that the approximate power is less than a predefined threshold (e.g. If the 307 th  odd harmonic of the 52 Mhz/8 clocking signal is less than the lower threshold, use the neighbouring even harmonics (i.e. 306 or 308) or the nearest odd harmonic (153 or 155) of the 52 Mhz/4 clocking signal, since in this case, the duty cycle has shifted from 50% and the power in the odd harmonics is decreasing, while the power in the even harmonics is increasing, similarly, the nearest odd harmonic with a doubling or divisor is achieving maximal power; and
 
(4) re-running the calibration process, with the receiver&#39;s synthesiser reprogrammed offset from the even harmonic by f 0 .
 
     More particularly, loop index selects different configurations of clock divider and PLL frequencies in a sub-band if the previous IQ calibration tone was not of sufficient magnitude to perform calibration. It will be noted that, synthesiser control word signifies a different frequency of the RF local oscillator. 
     D.1 (b) PATH B  from Crystal 
     Referring to  FIGS. 7 and 8 , the clocking signal (f d ) from the crystal  46  is mixed with a signal (f C ) from the synthesiser  31  to generate a second calibration signal. The synthesiser  31  is programmed to be a specific offset (f 0 ) from the relevant crystal harmonic, and the second calibration signal resulting from the mixing of the signals from the crystal  46  and the synthesiser  31  has a fundamental equal to the offset. 
     Embodiment 2 
     Synthesiser Clocking Signal Generator 
     The second embodiment uses a synthesiser, for example a digital phase locked loop (DPLL) (which is normally present in a receiver to synchronise it with a base station)) to generate a clocking signal. The synthesiser is programmed so that a harmonic of its clock signal falls at the target frequency at which the receiver is to be balanced. The synthesiser is not connected to a frequency divider  48 , but otherwise, the synthesiser has the same connection paths (PATH A  and PATH B ) as the crystal of the first embodiment. 
     E. Coherency Requirements 
     Referring to  FIG. 7 , the calibration of a receiver&#39;s balancing circuits (from a single bin DFT  39 ,  40  or discrete time Fourier transform (DTFT)) requires three sufficient-conditions to be satisfied. 
     Condition 1: Coherent Offset i.e. Condition on the Difference Between f c  and f RX ) 
     The clocking signal generator  27  and the synthesiser  31  must be programmed so that the offset frequency (f 0 )) occurs at an integer division of the baseband rate (i.e. the difference stated in equation 23 is exactly equal to the offset frequency (f 0 )) stated in equation 25). More particularly, the mixing circuits  29 ,  30  must produce a complex, possibly unbalanced tone of frequency (f c ), given exactly by
 
 f   0   =f   c   −f   d *harmonic  (23)
 
     The offset of the synthesiser  31  is selected so that the offset frequency (f 0 ) of the second calibration signal occurs at an integer division of the baseband data rate (i.e. so that the second calibration signal is coherent with the baseband sampling rate). This ensures that the absolute frequency setting of the relevant harmonic from the clocking signal generator  27  and the synthesiser  31  is no longer crucial. 
     Condition 2: Coherent DLO (on Offset Frequency f 0 ) 
     To optimise the accuracy and convergence of the single bin DFT  39 ,  40  (or DTFT), the DLO ( 105 ) must be capable of generating a tone at exactly the bin frequency of the DFT  39 ,  40  (or DTFT). In general, a DLO  105  can produce a digital tone having a frequency of 
                     f   DLO     =     D   ⁢       f   DSP       M   DLO                 (   24   )               
where f DLO  is a DLO clock, M DLO  is the modulus of a DLO phase accumulator and Dεz + .
 
     However, to be coherent with the offset frequency (f 0 ), the DLO  105  must satisfy the following equality 
                       M   DLO     D     =       f   DSP       f   o               (   25   )               
so that, the D th  bin of the DLO  105  falls exactly on f 0  wherein the ratio
 
             (       M   DLO     D     )         
is an integer (i.e., does not have a fractional-part).
 
Condition 3: Coherent DFT (on the Size (N2−N1+1) of the Single-Bin DTFT Computation)
 
     To maximise the accuracy and minimise the convergence time of the DFT algorithm, the fundamental frequency of the sampled, digitised output from the ADCs  35 ,  36  must fall exactly on the bin of the single-bin DFT  39 ,  40 . 
     This condition prevents spectral leakage and can be achieved by ensuring that an exact integer number of periods (M) of the fundamental are sampled and used in the DFT summation. This is equivalent to a restriction on (N 2 −N 1 +1). The bin frequency (f bin ) can be determined from the following expression 
                     f   bin     =       M   ⁢       f   s     N       =     f   o               (   26   )               
wherein N is the number of sample points applied to the DFT  39 ,  40  and Mεz +  is the integer number of periods of the fundamental used in the DFT  39 ,  40 .
 
     Referring to the single bin DFT expressions (7) and (8), N 2  must satisfy the coherency constraint 
     
       
         
           
             
               
                 
                   
                     N 
                     2 
                   
                   = 
                   
                     
                       N 
                       1 
                     
                     + 
                     
                       M 
                       ⁢ 
                       
                         
                           f 
                           s 
                         
                         
                           f 
                           o 
                         
                       
                     
                     - 
                     1 
                   
                 
               
               
                 
                   ( 
                   27 
                   ) 
                 
               
             
           
         
       
     
     As mentioned earlier, N 1  is chosen to be sufficiently large for system transients to settle out. Similarly, M is chosen to trade between accuracy and fixed-point implementation limitations. The larger the value of M, the longer the average effect of the correlation or coherent detection of the DFT  39 ,  40  (and the finer the accuracy). However, as M grows, larger word sizes are required to implement the DFT  39 ,  40  and balancing equation  41 . 
     F. Implementation Examples 
     The first implementation relates to a balancing circuit calibration device in which the output from its clocking signal generator is of fixed frequency (f d ). The second implementation relates to balancing circuit calibration device in which the output from its clocking signal generator is of variable frequency, thereby resulting in variations in the master clocking signal (f DSP ) and the operating frequency of the receiver&#39;s ADC s . The second implementation demonstrates that the present embodiments are not limited to a fixed frequency (f d ) from the clocking signal generator. In particular, the present embodiments also work for the general case of a variable f d , provided that the above described coherency requirements are satisfied. Both implementations are described with reference to  FIG. 7 . 
     F.1 Fixed f d  Implementation 
     Condition 1: Coherent Offset 
     The underlying data rate of the balancing circuit calibration apparatus is demonstrated in the output rate of the filters  37 ,  38  (which in the present implementation is 52 MHz/24). To ensure that the digital baseband fundamental falls exactly on the bin of the DFT  39 ,  40 , the frequency of the fundamental must be chosen to be an integer division of the master clocking signal rate, as given in expression 28 below. 
     
       
         
           
             
               
                 
                   
                     f 
                     0 
                   
                   = 
                   
                     
                       
                         f 
                         DSP 
                       
                       k 
                     
                     = 
                     
                       
                         
                           
                             52 
                             ⁢ 
                             
                                 
                             
                             ⁢ 
                             MHz 
                           
                           
                             24 
                             ⁢ 
                             k 
                           
                         
                         ⁢ 
                         
                             
                         
                         ⁢ 
                         k 
                       
                       ∈ 
                       
                         z 
                         + 
                       
                     
                   
                 
               
               
                 
                   ( 
                   28 
                   ) 
                 
               
             
           
         
       
     
     For example, for an offset frequency close to 100 kHz, taking k=21 gives f 0 =103.1746 kHz. 
     Condition 2: Coherent DLO 
     For a 52 MHz master clocking signal, the second coherency condition is satisfied with the following expression 
     
       
         
           
             
               
                 
                   
                     D 
                     ⁢ 
                     
                       
                         F 
                         DLO 
                       
                       
                         M 
                         DLO 
                       
                     
                   
                   = 
                   
                     
                       f 
                       0 
                     
                     = 
                     
                       
                         52 
                         ⁢ 
                         
                             
                         
                         ⁢ 
                         MHz 
                       
                       
                         k 
                         ⁢ 
                         .24 
                       
                     
                   
                 
               
               
                 
                   ( 
                   29 
                   ) 
                 
               
             
           
         
       
     
     In practice, the only way this can be satisfied for the general case, is by constraining the phase accumulator modulus. For example, taking f DLO =52 MHz/4, the modulus must satisfy M DLO =6 kD, k,Dεz + . 
     F.2 Variable f d  Implementation 
     If the same clocking signal (of frequency f d ) is used to generate the first calibration signal, and provide the master clocking signal (f DSP ), f DSP  and f ADC  will change with changes in f d  (as the receiver is tuned to different channels). However, under coherency condition 2, the DLO  105  must generate a tone at exactly the bin frequency of the single-bin DFT  39 ,  40 . To maintain high performance, the DLO  105  must meet very stringent demands on its phase-noise and frequency-accuracy. In particular, the frequency of the tone generated by the DLO  105  must not vary regardless of any changes in f DSP . 
     Ideally, a receiver&#39;s ADCs  35 ,  36  must be capable of delivering a high-quality signal as their sampling frequency (f s ) changes. However, normally both f s  and f ADC  change when f d  is changed. Since 
               f   s     =         f   d     *   harmonic     D           
the absolute variation of f S  with changes in f d , is small relative to absolute variation of (f d *harmonic) [which is determined by the specification 3GPP 45.005].
 
Condition 1: Coherent Offset
 
     This condition may not be exactly satisfied because of the finite resolution of the clocking signal generator  27  and synthesiser  31  in  FIG. 7 . 
     Condition 2: Coherent DLO 
     DLO output is given by:
 
cos(2π n ( f   o   f   DSP ))+ j  sin(2π n ( f   o   f   DSP ))  (30)
 
where n is the index of a discrete sample acquired by the ADCs  35 ,  36  and f 0 =f mix −f d *harmonic. DLO resolution at f DSP  is about 2 KHz for current transceivers. However, if the error |f DLO −f 0 | exceeds 10 Hz the balancing circuit calibration device cannot estimate I/Q imbalance accurately. To overcome this problem, impose the condition f 0 =f DLO =f DSP /I (I=16, 32, 24, . . . or any integer of form 2 io ×3 i1 ×5 i2  where 0&lt;=i 0 &lt;5, 0&lt;=i 1 &lt;2, 0&lt;=i 2 &lt;2). In this case, the DLO output given in expression (26) simplifies to exp(j(2π/I)n) and is perfect, being limited only by its numerical precision. Furthermore, the phase-noise, frequency-accuracy performance of the DLO is good.
 
     The DLO output can be computed using CORDIC implemented by firmware on microcontroller. Alternatively, the DLO output can be calculated by means of a look-up table, generated in accordance with the Chinese remainder theorem. In particular, from expression (30) above, it can be seen that the DLO output sequence is periodic with period I samples at f DSP . If I=16, the DLO only needs to produce sixteen distinct values. Furthermore, the symmetry of a sinusoid means that eight of the values are exact negatives of the other eight (the set of 16 numbers comprises {a1, a2, . . . , a8, −a1, −a2, . . . −a8}). Thus, the table storage requirements for the DLO can be simplified by factor of 8 without requiring traditional-DLO interpolation. 
     Condition 3: Coherent DFT 
     This condition is satisfied since samples of size C can be exactly captured from the ADC and a single bin DTFT calculated thereon with 
                 (       f   s     C     )     ⁢   Z     =       f   0     =       f   s     M             
for some integers C, Z. This is equivalent to C=M*Z.
 
     However, in the present implementation, the problem of coherent sampling is easily solved since capturing multiples of sixteen samples at f S =f ADC  ensures that we have captured integral multiples of the fundamental-period of waveform at the output of the RF-analog-mixer for baseband processing. In other words, f o  occurs in the Z th  bin (Z=bin with offset tone) of a DTFT (of coherent FFT size point P coh ) of a signal sampled at f DSP , wherein Z refers to a bin with an offset tone and is given by P coh /16. 
     Modifications and alterations may be made to the above without departing from the scope of the invention.