# Patent

## Title
Compensation for gain imbalance, phase imbalance and DC offsets in a transmitter

## Abstract

A method for correcting gain imbalance error, phase imbalance error and DC offset errors in a transmitter having an OFDM-based I/Q modulator is disclosed. The method employs a compensator prior to the I/Q-modulator to compensate for the gain and phase imbalance and DC offset. The compensator is efficiently updated with the estimated values of gain and phase imbalance and DC offsets obtained by performing the DFT operation in the digital baseband domain while sending a pair of orthogonal test tones to the modulator's inputs from a digital baseband chip, then down converting the RF modulated signal through a nonlinear device and a bandpass filter to a baseband signal, and finally sampling it using an A/D. The delay mismatch, which is mainly generated by lowpass filters between the I and Q branches, is also minimized in this method.

## Background
FIELD OF THE INVENTION
The invention relates to a system and method for efficiently compensating for the errors such as gain imbalance, phase imbalance and DC offset in a transmitter having a quadrature modulator.
DESCRIPTION OF THE RELATED ART
In digital communication systems, information to be transmitted in quadrature modulation architecture is generally split into two data sequences using a serial-to-parallel converter. One of the data sequences is provided to an inphase (I) branch and the other is provided to a quadrature (Q) branch. The data sequences on the I and Q branches are then pulse shaped or lowpass filtered to form band-limited baseband signals with spectral efficiency. The I and Q baseband signals separately modulate the phases or amplitudes of a pair of orthogonal carrier signals to realize the spectrum transfer from the baseband domain to the radio frequency (RF) domain to enable effective transmission through an antenna. In more detail, the quadrature modulation involves mixing the I branch and Q branch baseband signals with a pair of orthogonal carrier signals using a pair of mixer circuits and then summing the outputs of the mixer circuits. The carrier signals are nominally orthogonal, i.e., they are supposed to have a 90 degree phase difference.
Gain imbalance, phase imbalance and DC offsets caused by mismatching errors in quadrature based modulators degrade the overall system performance. For example, such errors may cause the overall system to fail to meet the required mask of power spectral density (PSD) of the transmitted signal or the required error vector magnitude (EVM). The gain imbalance is mainly due to the following contributing factors: an imbalance in the amplitudes of the sine and cosine carrier signals; an imbalance in the amplitudes of the I and Q branch baseband signals; and non-identical mixer circuits.
The phase imbalance is the amount by which the carrier signals depart from being purely orthogonal, i.e., their departure from the ideal condition of being 90 degree apart in phase. DC offsets are the offsets on the I and Q baseband braches. DC offsets result in carrier leakage at the final transmitter output. (Carrier leakage is undesirable since it increases power consumption.) It would be of tremendous benefit to the field of telecommunication if there existed a mechanism capable of compensating for errors such as the gain imbalance, phase imbalance and/or DC offsets in a transmitter.
U.S. Pat. No. 6,771,709, issued on Aug. 3, 2004 to Huang et al., describes a system and method for direct transmitter self-calibration. The system, illustrated in FIG. 1, provides a calibration method for determining coefficients of a pre-distortion circuit prior to the I/Q modulator from some measurements and calculations so that the cascaded pre-distortion circuit and the I/Q modulator achieves a maximum local oscillator (LO) suppression and sideband suppression. This system includes a digital pre-distortion circuit 200d and an analog baseband and the RF I/Q modulator circuit 200a. The gain imbalance error α and the DC offset errors CI and CQ (contributed in the analog baseband) and the phase imbalance error φ (contributed in the RF I/Q modulator circuit 200a) are corrected using the coefficients h1, h2, C1, and C2, where the factors h1 and h2 are defined as h1=tan(φ) and h2=1/αcos(φ). The I-branch and Q-branch signals are modified using these pre-distortion coefficients in the circuit 200d. The pre-distorted I/Q signals are fed to the RF I/Q modulator 250 after passing through digital-to-analog (D/A) converter 230 and lowpass filter (LPF) 240. At the output of the summer 253, the RF modulated signal s(t), which bears the influence of the gain and phase imbalance errors and DC offset errors, is fed through a feedback loop including an envelope detector diode 256, a LPF 241, an analog-to-digital (A/D) converter 231 and a digital signal processing (DSP) circuit 222. The DSP 222 functions as a parameter estimator to compute the coefficients h1, h2, C1, and C2. The drawback of this technique is that the coefficients require several complicated computational operations such as matrix multiplications and inversion. These operations increase the cost and complexity of the device.
Another method for correcting the gain/phase imbalance is described in U.S. Pat. No. 7,010,278, entitled “Sideband Suppression Method and Apparatus for Quadrature Modulator Using Magnitude Measurements”, issued on Mar. 7, 2006 to Kirschenmann et al. This method estimates the gain imbalance by separately measuring the ratio of the magnitudes of the RF modulated signals (a) when applying a DC signal at the I branch input and zero at the Q branch input and (b) when applying zero at the I branch input and a DC signal at the Q branch input. Then, the phase imbalance is estimated by measuring the amplitudes of the RF modulated signals several times when applying different DC input combinations at the I and Q branches and known phase shift values. The disadvantage of this method is that test inaccuracy may cause estimation errors when applying the DC input signals to the I and Q branches. Furthermore, since the method does not provide for DC offset compensation, DC offsets on the I and Q branches cause measurement errors during the amplitude measurements. In order to minimize the effect of DC offsets on the estimations of the gain imbalance and phase imbalance, doubled measurements and calculations are needed. This increases measurement and calculation load, and thus, increases the cost of the calibration.
Marchesani (IEEE Trans. on Communications, Vol. 48, No. 4, April 2000, pp. 552-556) suggests a technique to digitally compensate for imperfections in quadrature modulators. The envelope signal is detected at the modulator output and then sampled through an A/D converter. The expected value of the sampled signal is calculated over a large number of samples. Finally, estimated values of gain/phase imbalance errors and DC errors are obtained at the output of the integration. Even though a simple least-mean-square (LMS) algorithm is used in this technique, the expected values of the desired quantities have to be calculated over a large number of samples to make those terms small enough. Hence, this method is not suitable for frame-based transmission systems.
SUMMARY OF THE INVENTION
In one set of embodiments, a transmitter may include a compensator circuit, a quadrature modulator and a feedback path. The feedback path may be configured to extract an envelope of the RF signal generated by the quadrature modulator and to apply an adjustable time delay to the envelope signal.
In some embodiments, a method of compensating for one or more errors in the transmitter may involve the following operations. (1) An orthogonal pair of tones may be supplied to the compensator circuit. (2) The delay value of a delay unit in the feedback path may be adjusted in order to approximate the condition that a sum of a first phase lag corresponding to the delay value and a second phase lag associated with one or more filters in the transmitter is an integer multiple of π. (3) An update for one or more parameters of the compensator circuit may be generated. The process of generating an update for the one or more parameters may include: capturing a block of samples from the feedback path, computing a complex Fourier transform coefficient corresponding to the frequency kfb from the block of samples, where fb is the frequency of the orthogonal pair of test tones, where k is one or two, and computing the update for the one or more parameters using the Fourier transform coefficient. (4) The updated one or more parameters may be supplied to the compensator circuit. The operations (3) and (4) may be repeated a number of times until a termination condition is achieved.
An example of errors that may be compensated for include DC offset errors such as inphase DC offset error and quadrature DC offset error. When compensating for DC offset error(s), k equals one. Another example of errors that may be compensated for includes gain imbalance error and phase imbalance error. When compensating for gain imbalance error and/or phase imbalance error, k equals two.
In some embodiments, the method may be applied to compensate for only one error if desired. For example, it may be known a priori that a certain class of transmitters has negligible gain imbalance error, and thus, the compensation for gain imbalance error need not be performed for that transmitter class.
In one set of embodiments, the transmitter may include a compensator, a pair of digital-to-analog (D/A) conversion units, a quadrature modulator, a feedback circuit and a control unit. The compensator circuit may be configured to receive and operate on a first pair of discrete-time signals in order to generate a second pair of discrete-time signals. The pair of digital-to-analog (D/A) conversion units may be configured to convert the second pair of discrete-time signals respectively into a third pair of analog signals. The quadrature modulator may be configured to operate on the third pair of analog signals in order to generate an output RF signal. The feedback circuit may be configured to detect an envelope signal from the output RF signal and to apply a time delay to the envelope signal in order to generate a feedback signal. The control unit may be configured to adjust an amount of the time delay and to compute and update one or more compensation parameters of the compensator circuit. The compensator circuit may also be configured to operate on the first pair of discrete-time signals so that the second pair of discrete-time signals compensate for one or more errors in the transmitter.
In some embodiments, the compensator circuit may include a 2×2 matrix multiply circuit and a pair of scalar multiplication units. The 2×2 matrix multiply circuit may be configured to perform a matrix multiplication operation on the first pair of discrete-time signals in order to generate an intermediate pair of discrete-time signals. The pair of scalar multiplication units may be configured to multiply the intermediate pair of discrete-time signals respectively by a pair of gain parameter values in order to obtain a pair of scaled discrete-time signals.
In some embodiments, the one or more compensation parameters of the compensator circuit may include a phase imbalance parameter. The compensator may be configured to receive the phase imbalance parameter from the control unit and to determine coefficients of the matrix multiplication operation based on the phase imbalance parameter.
In some embodiments, the compensator circuit may include a pair of DC offset circuits in order to compensate for DC offset errors in the transmitter.
In some embodiments, the transmitter may also include an inverse Fast Fourier Transform (IFFT) unit configured to receive and operate on blocks of coefficients in order to generate the first pair of discrete-time signals. The control unit may be configured to control a selection of the blocks of coefficients from a memory (e.g., a memory internal to the transmitter).
The feedback circuit may include a nonlinear device and a bandpass filter. The nonlinear device may be configured to operate on the output RF signal in order to generate a signal s(t). The bandpass filter may be configured to filter the signal s(t) in order produce the envelope signal.
The feedback circuit may include an adjustable delay unit configured to perform said application of the time delay to the envelope signal. The adjustable delay unit may be configured to receive a control signal, from the control unit, indicating the amount of the time delay.
In some embodiments, the compensator circuit, the pair of D/A conversion units and the control units are fabricated on a first chip, and, the quadrature modulator and the feedback circuit are fabricated on a second chip.
In some embodiments, the transmitter is fabricated on a single chip.
In some embodiments, the control unit may be configured to read and execute program instructions stored in a memory.
In one set of embodiments, a transmitter may include an analog portion and a digital signal processing (DSP) portion. The analog portion includes a quadrature modulator. Unfortunately, the analog portion may have errors associated with its operation, e.g., errors such as phase imbalance error, gain imbalance error and DC offset errors. Thus, the DSP portion may include a compensator configured to compensate for the transmitter errors (or any subset of these errors).
In some embodiments, a method for providing adaptive compensation of the transmitter errors may involve: sending a pair of orthogonal calibration tones from the DSP portion to the I and Q branches of the quadrature modulator; estimating values of one or more of the errors, and then, updating parameters of the compensator using the estimated values. The compensation method may be performed either during a calibration mode, prior to data transmission mode, or, in an idle period without data transmission. The error value estimation and parameter update processes may be repeated until the errors are sufficiently compensated. To accurately and quickly estimate values of the errors, an adaptive algorithm based on the Discrete Fourier Transform (DFT) operation may be employed.
In one embodiment, the analog portion may include lowpass filters and voltage amplifiers in addition to the quadrature modulator. The transmitter may also include a compensator circuit in the DSP portion. The compensator may include subcircuits to compensate for gain imbalance error, phase imbalance error and DC offset errors. In addition, the transmitter may also include: a power detection circuit that is used to perform envelope detection on the RF modulated signal at the output of the modulator; a bandpass filter that is used to attenuate the DC component and high order harmonics of the envelope signal; and an A/D conversion device that is used to convert the analog output of the power detection circuit to a digital signal.
In some embodiments, the transmitter of the present invention provides a low cost and effective on chip correction method based on the DFT and inverse DFT (IDFT) operations for the transmitter errors founded in a transmitter architecture supporting the OFDM signal format, but not limited to the OFDM format. OFDM is an acronym for “orthogonal frequency division multiplexing”. Note that DFT and IDFT operations are inherently required in OFDM-based transmitters or transceivers.



BRIEF DESCRIPTION OF THE DRAWINGS
FIG. 1 illustrates a block diagram of a transmitter according to U.S. Pat. No. 6,771,709 invented by Huang et al.
FIG. 2 illustrates one embodiment of a transmitter including a digital baseband circuit 500b and an analog RF circuit 500a. 
FIG. 3 illustrates one embodiment of compensator circuit 300 and its inputs from control unit 404.
FIG. 4 illustrates one embodiment of controllable delay unit 514.
FIG. 5 is a graph of the delay response D(ω) according to the embodiment of controllable delay unit 514 shown in FIG. 4.
FIG. 6 illustrates one embodiment of a method for compensating for errors in a transmitter (especially in the analog portion of a transmitter).
FIG. 7 illustrates one embodiment of a method of compensating for one or more errors associated with a transmitter (especially the analog portion of a transmitter).
FIG. 8 illustrates a transmitter including a compensator, a quadrature modulator, a feedback circuit and a control unit, where the transmitter is configured to compensator for errors associated with the transmitter (especially the analog portion of the transmitter).



While the invention is described herein by way of example for several embodiments and illustrative drawings, those skilled in the art will recognize that the invention is not limited to the embodiments or drawings described. It should be understood, that the drawings and detailed description thereto are not intended to limit the invention to the particular form disclosed, but on the contrary, the intention is to cover all modifications, equivalents and alternatives falling within the spirit and scope of the present invention as defined by the appended claims. As used throughout this specification, the word “may” is used in a permissive sense (i.e., in the sense of “having the potential to”), rather than in the mandatory sense (i.e., in the sense of “must”). Furthermore, the phrase “A includes B” is used to mean “A includes B, but is not limited to B”.
DETAILED DESCRIPTION OF THE PREFERRED EMBODIMENTS
Referring to FIG. 2, a block diagram of a transmitter 500 is depicted. The transmitter 500 may include an analog RF circuit 500a and a digital baseband circuit 500b. A pair of analog baseband input signals 501 and 502, referred to herein as the inphase signal IC(t) and the quadrature signal QC(t), may enter the analog RF circuit 500a from the digital baseband circuit 500b. The inphase signal IC(t) may be supplied to a lowpass reconstruction filter 503, thereby producing an inphase signal IT(t) 1101. The inphase signal IT(t) may be used to modulate an inphase carrier signal A(t) 1105 supplied by local oscillator 1108. This modulation may be achieved by multiplying the inphase signal IT(t) and the inphase carrier signal A(t) in a first mixer 1103.
Similarly, the quadrature signal QC(t) may be supplied to a lowpass reconstruction filter 504, thereby producing a quadrature signal QT(t) 1102. The quadrature signal QT(t) may be used to modulate a quadrature carrier signal B(t) 1107 supplied by phase shifter (PS) 1106. This modulation may be achieved by multiplying the quadrature signal QT(t) and the quadrature carrier B(t) in a second mixer 1104.
The phase shifter 1106 may receive the inphase carrier signal A(t) from the local oscillator 1108. The phase shifter 1106 may be configured to shift the inphase carrier signal nominally by 90 degrees in order to generate the quadrature carrier signal B(t). Because of imperfections in the circuitry of phase shifter 1106, the phase difference between the inphase carrier signal and the quadrature carrier signal may not be exactly equal to 90 degrees. The phase imbalance φ is defined as the departure of this phase difference from 90 degrees. Without loss of generality, the inphase and quadrature carrier signals may be expressed in a manner that symmetrically distributes the phase imbalance as follows:

A(t)=cos(ωCt+φ/2)=cos [ωC(t+τT/2)]

B(t)=sin(ωCt−φ/2)=sin [ωC(t−τT/2)]

where ωc is the angular frequency of the local oscillator 1108 and t represents time. The parameter τT is the delay mismatch between the carrier signals A(t) and B(t).

The phase-modulated signals 1110 and 1111, generated by the first and second mixers respectively, may be summed using an adder 1109 to form a quadrature-modulated radio frequency (RF) signal expressed as

y(t)=IT(t)cos(ωCt+φ/2)−QT(t)sin(ωCt−φ/2)   (1)

The RF signal y(t) 506 may be supplied to a bandpass filter (BPF) 510 which is configured to remove high frequency harmonics. The output f(t) 507 of the BPF 510 may be provided to a power amplifier (PA) 520. The power amplifier 520 amplifies the signal f(t) for transmission onto a channel, e.g., the atmosphere or free space.
One of the characteristic properties of the quadrature modulator 1001 is its sideband suppression (SBS). The digital baseband circuit 500b may facilitate a measurement of SBS by providing a pair of orthogonal tones as the input signals IC(t) and QC(t) to the analog RF circuit 500a. In other words, the digital baseband circuit may provide

IC(t)=cos(ωbt)

QC(t)=sin(ωbt)

where ωb is the radian frequency of the tones. The signals IT(t) and QT(t) at the output of the lowpass filters 503 and 504 may then be expressed as:

IT(t)=GIIC(t)+DI=GI cos(ωbt)+DI  (2a)

QT(t)=GQQC(t)+DQ=GQ sin(ωbt)+DQ  (2b)

where GI represents the I branch gain, GQ represents the Q branch gain, DI is the DC offset in the I branch, and DQ is the DC offset in Q branch.

The gain imbalance ε is defined as




  
    
      
        ɛ
        =
        
          
            
              G
              I
            
            
              G
              Q
            
          
          -
          1
        
      
    
    
      
        (
        3
        )
      
    
  




Under the normalization condition of GI2+GQ2=2, the gain amplitudes GI and GQ can be expressed as





  
    
      
        
          G
          I
        
        =
        
          
            
              (
              
                1
                +
                ɛ
              
              )
            
            ⁢
            
              
                2
                
                  2
                  +
                  
                    2
                    ⁢
                    ɛ
                  
                  +
                  
                    ɛ
                    2
                  
                
              
            
          
          ≈
          
            1
            +
            
              ɛ
              2
            
          
        
      
    
    
      
        (
        
          4
          ⁢
          a
        
        )
      
    
  
  
    
      
        
          G
          Q
        
        =
        
          
            
              2
              
                2
                +
                
                  2
                  ⁢
                  ɛ
                
                +
                
                  ɛ
                  2
                
              
            
          
          ≈
          
            1
            -
            
              ɛ
              2
            
          
        
      
    
    
      
        (
        
          4
          ⁢
          b
        
        )
      
    
  




These expressions are derived using the Taylor series approximations to GI and GQ under the assumption that |ε|<<1. It is not likely that the gain amplitudes GI and GQ actually obey the normalization condition, but one can pretend that they do since the pretence does not compromise the ability to achieve compensation using compensator 300 and may result in simpler expression for GI and GQ in terms of ε. Note that other normalization conditions may be, i.e., the sum of the squares of GI and GQ may be assumed to be equal to some positive constant other than two.

In terms of ε, therefore, equations (2a) and (2b) reduce to:




  
    
      
        
          
            I
            T
          
          ⁡
          
            (
            t
            )
          
        
        ≈
        
          
            
              (
              
                1
                +
                
                  ɛ
                  2
                
              
              )
            
            ⁢
            
              cos
              ⁡
              
                (
                
                  
                    ω
                    b
                  
                  ⁢
                  t
                
                )
              
            
          
          +
          
            D
            I
          
        
      
    
    
      
        (
        
          5
          ⁢
          a
        
        )
      
    
  
  
    
      
        
          
            Q
            T
          
          ⁡
          
            (
            t
            )
          
        
        ≈
        
          
            
              (
              
                1
                -
                
                  ɛ
                  2
                
              
              )
            
            ⁢
            
              sin
              ⁡
              
                (
                
                  
                    ω
                    b
                  
                  ⁢
                  t
                
                )
              
            
          
          +
          
            D
            Q
          
        
      
    
    
      
        (
        
          5
          ⁢
          b
        
        )
      
    
  




By applying basic trigonometric identities to expression (1), it follows that

y(t)=U(t)cos(ωCt)−V(t)sin(ωCt)  (6)

where

U(t)=IT(t)cos(φ/2)+QT(t)sin(φ/2)  (7a)

V(t)=IT(t)sin(φ/2)+QT(t)cos(φ/2)  (7b)

Thus, the phase imbalance φ is equivalently represented in the baseband domain in terms of a matrix transformation on the signal pair (IT(t), QT(t)). (Note that this matrix transformation is invertible.) Therefore, the gain imbalance ε, the phase imbalance φ, and the DC offsets DI and DQ are all represented in the equivalent baseband signals U(t) and V(t). Various methods for estimating and compensating for these errors are described below.
In order to detect the envelope of the RF signal f(t) 507, the RF signal f(t) may be supplied to a square-law device 511 (or more generally, a nonlinear device). The output of the square-law device 511 may be supplied to a bandpass filter 512. The bandpass filter 512 may include a DC blocking circuit and a lowpass filter. The output r(t) 513 of the bandpass filter may be supplied to a controllable delay unit 514. The controllable delay unit 514 may introduce a delay τe to the signal r(t). Thus, the output w(t) of the controllable delay unit 514 may be expressed as w(t)=r(t−τe). The value of the delay τe may be under the control of the control unit 404 through a bus 405. In one embodiment, the bus 405 is a three-wire interface (TWIF). The controllable delay unit may be configured to have a constant gain over a wide frequency range.
The output of the controllable delay unit 514 may be supplied to a buffer amplifier unit 515. The output of the buffer amplifier unit 515 may be supplied to an analog-to-digital (A/D) converter 403. The discrete-time signal p(n) generated by the A/D converter 403 may be supplied to the control unit 404.
The output s(t) 508 of the square-law device 511 is

s(t)=U2 cos2(ωCt)+V2 sin2(ωCt)−2UV cos(ωCt)sin(ωCt)  (8a)

Applying trigonometric identities, it follows that





  
    
      
        
          s
          ⁡
          
            (
            t
            )
          
        
        =
        
          
            
              1
              2
            
            ⁢
            
              
                U
                2
              
              ⁡
              
                (
                
                  1
                  +
                  
                    cos
                    ⁡
                    
                      (
                      
                        2
                        ⁢
                        
                          ω
                          c
                        
                        ⁢
                        t
                      
                      )
                    
                  
                
                )
              
            
          
          +
          
            
              1
              2
            
            ⁢
            
              
                V
                2
              
              ⁡
              
                (
                
                  1
                  -
                  
                    cos
                    ⁡
                    
                      (
                      
                        2
                        ⁢
                        
                          ω
                          c
                        
                        ⁢
                        t
                      
                      )
                    
                  
                
                )
              
            
          
          -
          
            UV
            ⁢
            
              
            
            ⁢
            
              sin
              ⁡
              
                (
                
                  2
                  ⁢
                  
                    ω
                    c
                  
                  ⁢
                  t
                
                )
              
            
          
        
      
    
    
      
        (
        
          8
          ⁢
          b
        
        )
      
    
  




Noting that the terms at frequency 2ωc will be nullified by the bandpass filter 512, it is convenient to lump all these terms together as the signal Z(t):





  
    
      
        
          s
          ⁡
          
            (
            t
            )
          
        
        =
        
          
            
              1
              2
            
            ⁢
            
              
                U
                2
              
              ⁡
              
                (
                t
                )
              
            
          
          +
          
            
              1
              2
            
            ⁢
            
              
                V
                2
              
              ⁡
              
                (
                t
                )
              
            
          
          +
          
            Z
            ⁡
            
              (
              t
              )
            
          
        
      
    
    
      
        (
        
          8
          ⁢
          c
        
        )
      
    
  




Substituting for U(t) and V(t) using (7a) and (7b) respectively, one obtains:




  
    
      
        
          s
          ⁡
          
            (
            t
            )
          
        
        =
        
          
            
              1
              2
            
            ⁢
            
              
                {
                
                  
                    
                      
                        
                          
                            [
                            
                              
                                
                                  (
                                  
                                    1
                                    +
                                    
                                      ɛ
                                      /
                                      2
                                    
                                  
                                  )
                                
                                ⁢
                                
                                  cos
                                  ⁡
                                  
                                    (
                                    
                                      
                                        ω
                                        b
                                      
                                      ⁢
                                      t
                                    
                                    )
                                  
                                
                              
                              +
                              
                                D
                                I
                              
                            
                            ]
                          
                          ⁢
                          
                            cos
                            ⁡
                            
                              (
                              
                                φ
                                /
                                2
                              
                              )
                            
                          
                        
                        +
                      
                    
                  
                  
                    
                      
                        
                          [
                          
                            
                              
                                (
                                
                                  1
                                  -
                                  
                                    ɛ
                                    /
                                    2
                                  
                                
                                )
                              
                              ⁢
                              
                                sin
                                ⁡
                                
                                  (
                                  
                                    
                                      ω
                                      b
                                    
                                    ⁢
                                    t
                                  
                                  )
                                
                              
                            
                            +
                            
                              D
                              Q
                            
                          
                          ]
                        
                        ⁢
                        
                          sin
                          ⁡
                          
                            (
                            
                              φ
                              /
                              2
                            
                            )
                          
                        
                      
                    
                  
                
                }
              
              2
            
          
          +
          
            
              1
              2
            
            ⁢
            
              
                {
                
                  
                    
                      
                        
                          
                            [
                            
                              
                                
                                  (
                                  
                                    1
                                    +
                                    
                                      ɛ
                                      /
                                      2
                                    
                                  
                                  )
                                
                                ⁢
                                
                                  cos
                                  ⁡
                                  
                                    (
                                    
                                      
                                        ω
                                        b
                                      
                                      ⁢
                                      t
                                    
                                    )
                                  
                                
                              
                              +
                              
                                D
                                I
                              
                            
                            ]
                          
                          ⁢
                          
                            sin
                            ⁡
                            
                              (
                              
                                φ
                                /
                                2
                              
                              )
                            
                          
                        
                        +
                      
                    
                  
                  
                    
                      
                        
                          [
                          
                            
                              
                                (
                                
                                  1
                                  -
                                  
                                    ɛ
                                    /
                                    2
                                  
                                
                                )
                              
                              ⁢
                              
                                sin
                                ⁡
                                
                                  (
                                  
                                    
                                      ω
                                      b
                                    
                                    ⁢
                                    t
                                  
                                  )
                                
                              
                            
                            +
                            
                              D
                              Q
                            
                          
                          ]
                        
                        ⁢
                        
                          cos
                          ⁡
                          
                            (
                            
                              φ
                              /
                              2
                            
                            )
                          
                        
                      
                    
                  
                
                }
              
              2
            
          
          +
          
            Z
            ⁡
            
              (
              t
              )
            
          
        
      
    
    
      
        (
        
          8
          ⁢
          d
        
        )
      
    
  




The gain imbalance and the phase imbalance of the analog RF circuit 500a may be compensated for by appropriate selection of values of the parameters in the digital baseband circuit 500b. Assume for the sake of discussion that the DC offsets DI and DQ are zero. In this case, equation (8d) reduces to:




  
    
      
        
          
            
              
                s
                ⁡
                
                  (
                  t
                  )
                
              
              =
              
              ⁢
              
                
                  
                    1
                    2
                  
                  ⁢
                  
                    
                      {
                      
                        
                          
                            
                              
                                
                                  (
                                  
                                    1
                                    +
                                    
                                      ɛ
                                      /
                                      2
                                    
                                  
                                  )
                                
                                ⁢
                                
                                  cos
                                  ⁡
                                  
                                    (
                                    
                                      
                                        ω
                                        b
                                      
                                      ⁢
                                      t
                                    
                                    )
                                  
                                
                                ⁢
                                
                                  cos
                                  ⁡
                                  
                                    (
                                    
                                      φ
                                      /
                                      2
                                    
                                    )
                                  
                                
                              
                              +
                            
                          
                        
                        
                          
                            
                              
                                (
                                
                                  1
                                  -
                                  
                                    ɛ
                                    /
                                    2
                                  
                                
                                )
                              
                              ⁢
                              
                                sin
                                ⁡
                                
                                  (
                                  
                                    
                                      ω
                                      b
                                    
                                    ⁢
                                    t
                                  
                                  )
                                
                              
                              ⁢
                              
                                sin
                                ⁡
                                
                                  (
                                  
                                    φ
                                    /
                                    2
                                  
                                  )
                                
                              
                            
                          
                        
                      
                      }
                    
                    2
                  
                
                +
              
            
          
        
        
          
            
              
              ⁢
              
                
                  
                    1
                    2
                  
                  ⁢
                  
                    
                      {
                      
                        
                          
                            
                              
                                
                                  (
                                  
                                    1
                                    +
                                    
                                      ɛ
                                      /
                                      2
                                    
                                  
                                  )
                                
                                ⁢
                                
                                  cos
                                  ⁡
                                  
                                    (
                                    
                                      
                                        ω
                                        b
                                      
                                      ⁢
                                      t
                                    
                                    )
                                  
                                
                                ⁢
                                
                                  sin
                                  ⁡
                                  
                                    (
                                    
                                      φ
                                      /
                                      2
                                    
                                    )
                                  
                                
                              
                              +
                            
                          
                        
                        
                          
                            
                              
                                (
                                
                                  1
                                  -
                                  
                                    ɛ
                                    /
                                    2
                                  
                                
                                )
                              
                              ⁢
                              
                                sin
                                ⁡
                                
                                  (
                                  
                                    
                                      ω
                                      b
                                    
                                    ⁢
                                    t
                                  
                                  )
                                
                              
                              ⁢
                              
                                cos
                                ⁡
                                
                                  (
                                  
                                    φ
                                    /
                                    2
                                  
                                  )
                                
                              
                            
                          
                        
                      
                      }
                    
                    2
                  
                
                +
                
                  Z
                  ⁡
                  
                    (
                    t
                    )
                  
                
              
            
          
        
        
          
            
              =
              
              ⁢
              
                
                  
                    1
                    2
                  
                  ⁢
                  
                    {
                    
                      
                        
                          
                            1
                            +
                            
                              
                                ɛ
                                2
                              
                              /
                              4
                            
                            +
                            
                              ɛ
                              ⁢
                              
                                
                              
                              ⁢
                              
                                cos
                                ⁡
                                
                                  (
                                  
                                    2
                                    ⁢
                                    
                                      ω
                                      b
                                    
                                    ⁢
                                    t
                                  
                                  )
                                
                              
                            
                            +
                          
                        
                      
                      
                        
                          
                            
                              (
                              
                                1
                                -
                                
                                  
                                    ɛ
                                    2
                                  
                                  /
                                  4
                                
                              
                              )
                            
                            ⁢
                            
                              sin
                              ⁡
                              
                                (
                                φ
                                )
                              
                            
                            ⁢
                            
                              sin
                              ⁡
                              
                                (
                                
                                  2
                                  ⁢
                                  
                                    ω
                                    b
                                  
                                  ⁢
                                  t
                                
                                )
                              
                            
                          
                        
                      
                    
                    }
                  
                
                +
                
                  Z
                  ⁡
                  
                    (
                    t
                    )
                  
                
              
            
          
        
      
    
    
      
        (
        9
        )
      
    
  




The bandpass filter 512 operates on the signal s(t) to produce signal r(t). In particular, the bandpass filter 512 blocks the DC component and the signal Z(t). Thus, the signal r(t) conforms to the expression:

r(t)≈gε cos(2ωbt)+gφ sin(2ωbt)  (10)

where g is the gain of the envelope detector (including the device 511 and the bandpass filter 512). The factor of 1⁄2 from expression (9) has been absorbed into the gain g. The gain imbalance and phase imbalance are assumed to be small, e.g., |ε|<<1 and |φ|<<1 radian.

Note that the gain imbalance ε appears in the amplitude of the cos(2ωbt) term of signal r(t), while the phase imbalance φ appears in the amplitude of the sin(2ωbt) term of signal r(t). Thus, an estimate {circumflex over (ε)} for the gain imbalance and an estimate {circumflex over (φ)} for the phase imbalance may be determined from the following formulas:




  
    
      
        
          ɛ
          ^
        
        =
        
          
            2
            g
          
          ⁢
          Re
          ⁢
          
            {
            
              R
              ⁡
              
                (
                
                  2
                  ⁢
                  
                    ω
                    b
                  
                
                )
              
            
            }
          
        
      
    
    
      
        (
        
          11
          ⁢
          a
        
        )
      
    
  
  
    
      
        
          φ
          ^
        
        =
        
          
            -
            
              2
              g
            
          
          ⁢
          Im
          ⁢
          
            {
            
              R
              ⁡
              
                (
                
                  2
                  ⁢
                  
                    ω
                    b
                  
                
                )
              
            
            }
          
        
      
    
    
      
        (
        
          11
          ⁢
          b
        
        )
      
    
  




where R(2ωb) is the Fourier Transform of the signal r(t) evaluated at radian frequency 2ωb, Re{z} denotes the real part of the complex quantity z, and Im{z} denotes the imaginary part of the complex quantity z.

Since the value of the parameter g might not be known (or known precisely), it may be difficult to estimate the exact values of ε and φ through a one time calculation based on formulas (11a) and (11b). Thus, it may be convenient to use an iterative process to approach the values of ε and φ as follows. Let {circumflex over (ε)}(k) be the current estimate for the gain imbalance ε. Let {circumflex over (φ)}(k) be the current estimate of the phase imbalance φ. The integer variable k is an iteration index for the iterative process. The control unit 404 may provide the current gain imbalance estimate {circumflex over (ε)}(k) to the compensator 300. The compensator 300 may compute values for gain parameters Ĝ1 and ĜQ based on the current gain imbalance estimate {circumflex over (ε)}(k). In some embodiments, the compensator may determine the values for the gain parameters based on (or, in accordance with) the following expressions:




  
    
      
        
          
            G
            ^
          
          I
        
        =
        
          
            1
            
              1
              +
              
                ɛ
                ^
              
            
          
          ⁢
          
            
              
                2
                +
                
                  2
                  ⁢
                  
                    ɛ
                    ^
                  
                
                +
                
                  
                    ɛ
                    ^
                  
                  2
                
              
              2
            
          
        
      
    
    
      
        (
        
          11
          ⁢
          c
        
        )
      
    
  
  
    
      
        
          
            G
            ^
          
          Q
        
        =
        
          
            
              
                2
                +
                
                  2
                  ⁢
                  
                    ɛ
                    ^
                  
                
                +
                
                  
                    ɛ
                    ^
                  
                  2
                
              
              2
            
          
          .
        
      
    
    
      
        (
        
          11
          ⁢
          d
        
        )
      
    
  




In other embodiments, the compensator 300 may compute the values of the gain parameters according to the simplified relations: Ĝ1=1−{circumflex over (ε)}(k)/2 and ĜQ=1+{circumflex over (ε)}(k)/2.
The compensator 300 may include amplifiers 305 and 306 that implement amplification by Ĝ1 and amplification by ĜQ respectively.
Furthermore, the control unit 404 may provide the current phase imbalance estimate {circumflex over (φ)}(k) to the compensator so that the compensator 300 may compute values for the transformation parameters B1, B2, B3 and B4 based on the current phase imbalance estimate.
The compensator 300 may include a set of four multipliers that implement multiplication by B1, B2, B3 and B4, respectively. In one embodiment, the compensator 300 may compute the values of the transformation parameters as shown in FIG. 3 according to the relations:

B1=B4=cos(−{circumflex over (φ)}(n)/2)  (12a)

B2=B3=sin(−{circumflex over (φ)}(n)/2).  (12b)

The control unit 404 may capture a block of N samples of the signal p(n) from the A/D converter 403, perform an N-point Discrete Fourier Transform (DFT) on the block of signal samples to obtain a Fourier spectrum P(j), j=0, 1, 2, . . . , N-1, and then, update the gain imbalance estimate and the phase imbalance estimate according to the following expressions:




  
    
      
        
          
            ɛ
            ^
          
          ⁡
          
            (
            
              n
              +
              1
            
            )
          
        
        =
        
          
            
              ɛ
              ^
            
            ⁡
            
              (
              n
              )
            
          
          +
          
            Δ
            ⁢
            
              ɛ
              ^
            
          
        
      
    
    
      
        (
        
          13
          ⁢
          a
        
        )
      
    
  
  
    
      
        
          
            
              φ
              ^
            
            ⁡
            
              (
              
                n
                +
                1
              
              )
            
          
          =
          
            
              
                φ
                ^
              
              ⁡
              
                (
                n
                )
              
            
            +
            
              Δ
              ⁢
              
                
              
              ⁢
              
                φ
                ^
              
            
          
        
        ⁢
        
          

        
        ⁢
        where
      
    
    
      
        (
        
          13
          ⁢
          b
        
        )
      
    
  
  
    
      
        
          Δ
          ⁢
          
            
          
          ⁢
          
            ɛ
            ^
          
        
        =
        
          λRe
          ⁢
          
            {
            
              P
              ⁡
              
                (
                
                  
                    
                      2
                      ⁢
                      
                        ω
                        b
                      
                    
                    
                      ω
                      S
                    
                  
                  ⁢
                  N
                
                )
              
            
            }
          
        
      
    
    
      
        (
        
          13
          ⁢
          c
        
        )
      
    
  
  
    
      
        
          Δ
          ⁢
          
            
          
          ⁢
          
            φ
            ^
          
        
        =
        
          
            -
            λIm
          
          ⁢
          
            {
            
              P
              ⁡
              
                (
                
                  
                    
                      2
                      ⁢
                      
                        ω
                        b
                      
                    
                    
                      ω
                      S
                    
                  
                  ⁢
                  N
                
                )
              
            
            }
          
        
      
    
    
      
        (
        
          13
          ⁢
          d
        
        )
      
    
  




where stepsize λ, which controls the convergence speed, is a small positive value, and ωS is the radian frequency corresponding to the sample rate of the A/D converter 403. For example, in one set of embodiments, λ may be any value in the range from 0.00001 to 0.01.

The integer N may take any in a wide range of values. For example, in one set of embodiments, N may be a value of the form 2L where L is an element of the set {6, 7, 8, 9, 10, 11}. In one particular embodiment, N equals 26=64. Although powers of two may be convenient from the point of view of computational efficiency, the present inventions do not constrain the integer N to be a power of two.
The updated gain imbalance estimate and the updated phase imbalance estimate may be transferred to the compensator 300 and put into force, whereupon the next cycle of the iterative process may begin. The estimates {circumflex over (ε)}(k) and {circumflex over (φ)}(k) eventually converge to ε and φ respectively. In some embodiments, the value λ may be constant through the whole iterative process. In other embodiments, the value λ may vary in the iterative process.
Note that there is a time delay τd due to the filter 512 and due to the reconstruction filters 503 and 504. In addition, the controllable delay unit 514 introduces a delay τe. Taking these delays into account, the signal w(t) at the output the controllable delay unit 514 is given by:




  
    
      
        
          
            
              
                
                  w
                  ⁡
                  
                    (
                    t
                    )
                  
                
                ≈
                
                ⁢
                
                  r
                  ⁡
                  
                    (
                    
                      t
                      -
                      
                        τ
                        d
                      
                      -
                      
                        τ
                        e
                      
                    
                    )
                  
                
              
            
          
          
            
              
                =
                
                ⁢
                
                  
                    g
                    ⁢
                    
                      
                    
                    ⁢
                    ɛ
                    ⁢
                    
                      
                    
                    ⁢
                    cos
                    ⁢
                    
                      {
                      
                        2
                        ⁢
                        
                          
                            ω
                            b
                          
                          ⁡
                          
                            (
                            
                              t
                              -
                              
                                τ
                                d
                              
                              -
                              
                                τ
                                e
                              
                            
                            )
                          
                        
                      
                      }
                    
                  
                  +
                  
                    g
                    ⁢
                    
                      
                    
                    ⁢
                    φsin
                    ⁢
                    
                      {
                      
                        2
                        ⁢
                        
                          
                            ω
                            b
                          
                          ⁡
                          
                            (
                            
                              t
                              -
                              
                                τ
                                d
                              
                              -
                              
                                τ
                                e
                              
                            
                            )
                          
                        
                      
                      }
                    
                  
                
              
            
          
          
            
              
                ≈
                
                ⁢
                
                  
                    
                      g
                      ⁡
                      
                        (
                        
                          
                            ɛ
                            ⁢
                            
                              
                            
                            ⁢
                            
                              cos
                              ⁡
                              
                                (
                                
                                  
                                    φ
                                    d
                                  
                                  +
                                  
                                    φ
                                    e
                                  
                                
                                )
                              
                            
                          
                          -
                          
                            φ
                            ⁢
                            
                              
                            
                            ⁢
                            
                              sin
                              ⁡
                              
                                (
                                
                                  
                                    φ
                                    d
                                  
                                  +
                                  
                                    φ
                                    e
                                  
                                
                                )
                              
                            
                          
                        
                        )
                      
                    
                    ⁢
                    
                      cos
                      ⁡
                      
                        (
                        
                          2
                          ⁢
                          
                            ω
                            b
                          
                          ⁢
                          t
                        
                        )
                      
                    
                  
                  +
                
              
            
          
          
            
              
                
                ⁢
                
                  g
                  (
                  
                    
                      ɛ
                      ⁢
                      
                        
                      
                      ⁢
                      
                        sin
                        ⁡
                        
                          (
                          
                            
                              φ
                              d
                            
                            +
                            
                              φ
                              e
                            
                          
                          )
                        
                      
                    
                    +
                    
                      φ
                      ⁢
                      
                        
                      
                      ⁢
                      
                        cos
                        ⁡
                        
                          (
                          
                            
                              φ
                              d
                            
                            +
                            
                              φ
                              
                                e
                                )
                              
                            
                          
                          )
                        
                      
                      ⁢
                      
                        sin
                        ⁡
                        
                          (
                          
                            2
                            ⁢
                            
                              ω
                              b
                            
                            ⁢
                            t
                          
                          )
                        
                      
                    
                  
                
              
            
          
        
         
      
    
    
      
        
          
            
              (
              
                14
                ⁢
                a
              
              )
            
          
        
        
          
            
              (
              
                14
                ⁢
                b
              
              )
            
          
        
      
    
  




where the phases φd=2ωbτd and φe=2ωbτe. Therefore, the estimation of the parameters ε and φ is complicated in the presence of the delays. The gain imbalance ε now appears in the amplitude of both the cos(2ωbt) term and the sin(2ωbt) term. The phase imbalance does also. To overcome this problem, the delay τe may be selected so as to satisfy (or, at least approximate) the condition:

φd+φe=2ωb(τd+τe)=kπ

for k an integer value in the range {0, 1, 2, . . . , KMAX}, where KMAX is a positive integer. For example, in one embodiment, KMAX equals two. When this condition is satisfied, expression (14b) reduces to:

w(t)=gε cos(2ωbt)+gφ sin(2ωbt)  (14c)

Note that expression (14c) is the same as expression (10).

To obtain the appropriate value for the delay τe, the following procedure may be used. First, the control unit 404 may: set {circumflex over (φ)}=0, and set the gain imbalance estimate {circumflex over (ε)} to a value whose magnitude (absolute value) is guaranteed to be large relative to the phase imbalance φ. In one set of embodiments, {circumflex over (ε)} may be set so that |{circumflex over (ε)}| is greater than or equal to 0.6. For example, in one embodiment, {circumflex over (ε)} is set equal to 0.8.
Second, the control unit 404 may adjust the delay value τe and repeatedly compute the quantities Re{P[(2ωb/ωs)N]} and Im{P[(2ωb/ωs)N]} in order to determine (or estimate) the value of τe that maximizes |Re{P[(2ωb/ωs)N]}| or minimizes |Im{P[(2ωb/ωs)N]}|. The delay value τe may be adjusted by modifying one or more parameters of the controllable delay unit 514.
The control unit 404 may employ any of a variety of known search procedures to locate this optimizing value of τe. For example, in one embodiment, the control unit employs an M-bit binary search algorithm. The binary search algorithm uses a total of M-1 steps. The value of M depends on the desired accuracy of τe. For example, in one embodiment, M is equal to 6. Note that other values of M may be used.
One embodiment of the controllable delay unit 514 is shown in FIG. 4. The capacitor C may be a switched-capacitance array. The desired capacitance value may be switched through bus 405 (e.g., a three-wire interface) after each decision of the search procedure.
It is apparent from expression (14b) that the optimizing value of τe satisfies (or approximates) the phase condition φd+φe=kπ, which may be equivalently stated as:

sin(φd+φe)=sin [2ωb(τd+τe)]=0

Thus, once the optimizing value of delay τe is determined by maximizing |Re{P[(2ωb/ωs)N]}|, expression (14b) is approximated by expression (14c), which is identical to (10), and the iterative procedure described above based on expressions (13a), (13b), (13c) and (13d) may be used to estimate the phase imbalance and gain imbalance. However, before the iterative procedure is started the gain parameter {circumflex over (ε)} and the phase parameter {circumflex over (φ)} of the compensator 300 in FIG. 3 are reset to their initial values of one and zero, respectively.

One embodiment of the controllable delay unit 514 is shown in FIG. 4. The controllable delay unit 514 may be a first-order allpass filter having positive unit gain. The controllable delay unit 514 may include three resistors R1, R2 and R3, an operational amplifier 650 and a capacitor C. The capacitance of the capacitor C may be varied in order to adjust the delay τe. In one embodiment, the resistors R1, R2 and R3 all share the same value of resistance, i.e., R1=R2=R3=R. In this case, the transfer function T(s) of the first-order allpass filter and its delay response D(ω) may conform to the following expressions:




  
    
      
        
          T
          ⁡
          
            (
            s
            )
          
        
        =
        
          
            s
            -
            σ
          
          
            s
            +
            σ
          
        
      
    
    
      
        (
        15
        )
      
    
  
  
    
      
        
          D
          ⁡
          
            (
            ω
            )
          
        
        =
        
          
            2
            /
            σ
          
          
            1
            +
            
              
                (
                
                  ω
                  /
                  σ
                
                )
              
              2
            
          
        
      
    
    
      
        (
        16
        )
      
    
  




where s is a complex variable, ω is radian frequency, and σ=1/RC. A graph of the delay response D(ω) versus the normalized frequency ω/σ is shown in FIG.5.

In addition, the control unit 404 may compensate for the DC offsets DI and DQ of the transmitter by appropriate selection of values for offset parameters {circumflex over (D)}I and {circumflex over (D)}Q as described below. The compensator 300 may include adders 307 and 308 to offset the outputs of amplifiers 305 and 306 respectively. The adder 307 receives the output IB(n) of the amplifier 305 and the negative of the offset parameter value {circumflex over (D)}I. Thus, the output IC(n) of the adder 307 conforms to the expression IC(n)=IB(n)−{circumflex over (D)}I. Similarly, the adder 308 receives the output QB(n) of the amplifier 306 and the negative of the offset parameter value {circumflex over (D)}Q. Thus, the output QC(n) of the adder 308 conforms to the expression QC(n)=QB(n)−{circumflex over (D)}Q. The estimated offset values {circumflex over (D)}I and {circumflex over (D)}Q may be stored in corresponding registers internal to the compensator 300.
For the sake of discussion, assume that φ=0 and GI=GQ=G (or ε=0). In this case, signals U(t) and V(t) in expressions (7a)-(7b) may be expressed as:

U(t)=cos(ωbt)+DI 

V(t)=sin(ωbt)+DQ 

Thus, expression (8c) for s(t) reduces to:





  
    
      
        
          s
          ⁡
          
            (
            t
            )
          
        
        =
        
          
            
              1
              2
            
            ⁢
            
              
                (
                
                  
                    cos
                    ⁡
                    
                      (
                      
                        
                          ω
                          b
                        
                        ⁢
                        t
                      
                      )
                    
                  
                  +
                  
                    D
                    I
                  
                
                )
              
              2
            
          
          +
          
            
              1
              2
            
            ⁢
            
              
                (
                
                  
                    sin
                    ⁡
                    
                      (
                      
                        
                          ω
                          b
                        
                        ⁢
                        t
                      
                      )
                    
                  
                  +
                  
                    D
                    Q
                  
                
                )
              
              2
            
          
          +
          
            Z
            ⁡
            
              (
              t
              )
            
          
        
      
    
    
      
        (
        17
        )
      
    
  




Since the bandpass filter 512 removes the DC component and the terms at frequency 2ωC, it follows that:

r(t)≈2g{DI cos(ωbt)+DQ sin(ωbt)}  (18)

Observe that the DC offset DI appears in the amplitude of the cos(ωbt) term, while the DC offset DQ appears in the amplitude of the sin(ωbt) term. Thus, estimates for the DC offset DI and the DC offset DQ may be obtained from the following formulas:




  
    
      
        
          
            D
            ^
          
          I
        
        =
        
          
            1
            g
          
          ⁢
          Re
          ⁢
          
            {
            
              R
              ⁡
              
                (
                
                  ω
                  b
                
                )
              
            
            }
          
        
      
    
    
      
        (
        
          19
          ⁢
          a
        
        )
      
    
  
  
    
      
        
          
            D
            ^
          
          Q
        
        =
        
          
            -
            
              1
              g
            
          
          ⁢
          Im
          ⁢
          
            {
            
              R
              ⁡
              
                (
                
                  ω
                  b
                
                )
              
            
            }
          
        
      
    
    
      
        (
        
          19
          ⁢
          b
        
        )
      
    
  




where R(ω) is the Fourier transform of the signal r(t).

As with the gain imbalance and phase imbalance, the DC offsets DI and DQ may be estimated using an iterative process. Let {circumflex over (D)}I(k) denote the current estimate for the DC offset DI. Let {circumflex over (D)}Q(k) denote the current estimate for the DC offset DQ. The control unit 404 may capture a block of N samples of the signal p(n) from the A/D converter 403, perform an N-point DFT on the block of signal samples to obtain a Fourier spectrum P(j), j=0, 1, 2, . . . , N-1, and then update the DC offset estimates according to the following expressions:




  
    
      
        
          
            
              D
              ^
            
            I
          
          ⁡
          
            (
            
              k
              +
              1
            
            )
          
        
        =
        
          
            
              
                D
                ^
              
              I
            
            ⁡
            
              (
              k
              )
            
          
          +
          
            Δ
            ⁢
            
              
            
            ⁢
            
              
                D
                ^
              
              I
            
          
        
      
    
    
      
        (
        
          20
          ⁢
          a
        
        )
      
    
  
  
    
      
        
          
            
              D
              ^
            
            Q
          
          ⁡
          
            (
            
              k
              +
              1
            
            )
          
        
        =
        
          
            
              
                D
                ^
              
              Q
            
            ⁡
            
              (
              k
              )
            
          
          +
          
            Δ
            ⁢
            
              
            
            ⁢
            
              
                D
                ^
              
              Q
            
          
        
      
    
    
      
        (
        
          20
          ⁢
          b
        
        )
      
    
  
  
    
      where
    
    
      
        
      
    
  
  
    
      
        
          Δ
          ⁢
          
            
          
          ⁢
          
            
              D
              ^
            
            I
          
        
        =
        
          λ
          ⁢
          
            
          
          ⁢
          Re
          ⁢
          
            {
            
              P
              ⁡
              
                (
                
                  
                    
                      ω
                      b
                    
                    
                      ω
                      S
                    
                  
                  ⁢
                  N
                
                )
              
            
            }
          
        
      
    
    
      
        (
        
          21
          ⁢
          a
        
        )
      
    
  
  
    
      
        
          Δ
          ⁢
          
            
          
          ⁢
          
            
              D
              ^
            
            Q
          
        
        =
        
          
            -
            λ
          
          ⁢
          
            
          
          ⁢
          Im
          ⁢
          
            {
            
              P
              ⁡
              
                (
                
                  
                    
                      ω
                      b
                    
                    
                      ω
                      S
                    
                  
                  ⁢
                  N
                
                )
              
            
            }
          
        
      
    
    
      
        (
        
          21
          ⁢
          b
        
        )
      
    
  




where ωS is the radian frequency corresponding to the sample rate of the A/D converter 403.

Similar to the gain imbalance and phase imbalance estimations, the delay τd may also complicate the DC offset estimations. Taking into account both the delay τd and the delay τe, the signal w(t) at the output of the controllable delay unit 514 is given by:




  
    
      
        
          w
          ⁡
          
            (
            t
            )
          
        
        ≈
        
          2
          ⁢
          g
          ⁢
          
            {
            
              
                
                  
                    
                      
                        D
                        I
                      
                      ⁢
                      
                        
                      
                      ⁢
                      
                        cos
                        ⁡
                        
                          (
                          
                            
                              ω
                              b
                            
                            ⁡
                            
                              (
                              
                                t
                                -
                                
                                  τ
                                  d
                                
                                -
                                
                                  τ
                                  e
                                
                              
                              )
                            
                          
                          )
                        
                      
                    
                    +
                  
                
              
              
                
                  
                    
                      D
                      Q
                    
                    ⁢
                    
                      
                    
                    ⁢
                    
                      sin
                      ⁡
                      
                        (
                        
                          
                            ω
                            b
                          
                          ⁡
                          
                            (
                            
                              t
                              -
                              
                                τ
                                d
                              
                              -
                              
                                τ
                                e
                              
                            
                            )
                          
                        
                        )
                      
                    
                  
                
              
            
            }
          
        
      
    
    
      
        (
        
          21
          ⁢
          c
        
        )
      
    
  
  
    
      
        
          
        
        ⁢
        
          =
          
            
              2
              ⁢
              
                g
                ⁡
                
                  (
                  
                    
                      
                        D
                        I
                      
                      ⁢
                      
                        
                      
                      ⁢
                      
                        cos
                        ⁡
                        
                          (
                          
                            
                              φ
                              d
                            
                            +
                            
                              φ
                              e
                            
                          
                          )
                        
                      
                    
                    -
                    
                      
                        D
                        Q
                      
                      ⁢
                      
                        
                      
                      ⁢
                      
                        sin
                        ⁡
                        
                          (
                          
                            
                              φ
                              d
                            
                            +
                            
                              φ
                              e
                            
                          
                          )
                        
                      
                    
                  
                  )
                
              
              ⁢
              
                
              
              ⁢
              
                cos
                ⁡
                
                  (
                  
                    
                      ω
                      b
                    
                    ⁢
                    t
                  
                  )
                
              
            
            +
          
        
      
    
    
      
        (
        
          21
          ⁢
          d
        
        )
      
    
  
  
    
      
        
          
        
        ⁢
        
          2
          ⁢
          
            g
            (
            
              
                
                  D
                  I
                
                ⁢
                
                  
                
                ⁢
                
                  sin
                  ⁡
                  
                    (
                    
                      
                        φ
                        d
                      
                      +
                      
                        φ
                        e
                      
                    
                    )
                  
                
              
              +
              
                
                  D
                  Q
                
                ⁢
                
                  
                
                ⁢
                
                  cos
                  ⁡
                  
                    (
                    
                      
                        φ
                        d
                      
                      +
                      
                        φ
                        
                          e
                          )
                        
                      
                    
                    )
                  
                
                ⁢
                
                  
                
                ⁢
                
                  sin
                  ⁡
                  
                    (
                    
                      
                        ω
                        b
                      
                      ⁢
                      t
                    
                    )
                  
                
              
            
          
        
      
    
    
      
        
      
    
  




Note that the inphase offset DI appears in both the amplitude of the cos(ωbt) term and the amplitude of the sin(ωbt) term. The quadrature offset DQ does also. To overcome this problem, the delay τe may be adjusted until the following phase condition is satisfied (or, at least approximated):

φd+φe=ωb(τd+τe)=kπ  (21e)

for some integer value k in the range {0, 1, 2, . . . , KMAX}, where KMAX is a positive integer. In one embodiment, KMAX equals two. When this condition is satisfied, expression (21d) reduces to:

w(t)≈2g{DI cos(ωbt)+DQ sin(ωbt)}  (21f)

Note that the expression (21f) is identical to (18).

To obtain an appropriate value for the delay τe, the following procedure may be employed. First, the control unit 404 may intentionally set the DC offset parameters {circumflex over (D)}I and {circumflex over (D)}Q so that the condition |DIeff|>>|DQeff| is met, where the effective inphase and quadrature offsets are given by:

DIeff=DI−{circumflex over (D)}I  (21g)

DQeff=DQ−{circumflex over (D)}Q  (21h)

In one set of embodiments, the quadrature parameter {circumflex over (D)}Q may be set equal to zero, and the inphase parameter {circumflex over (D)}I may be set to be a value greater than or equal to 25 millivolts (mV).
Second, the control unit 404 may set the gain imbalance value {circumflex over (ε)} equal to zero and the phase imbalance value {circumflex over (φ)} equal to zero, and transfer these settings to the compensator 300. In response to these settings, the compensator 300 may set the gain parameters ĜI and ĜQ equal to one and the transformation parameters B1, B2, B3 and B4 as follows: B1=B4=1 and B2=B3=0.
Alternatively, if gain imbalance and phase imbalance estimations have already been performed, the control unit 404 may simply allow the final converged values of the gain imbalance estimate and the phase imbalance estimate to remain in force. In this case, the compensator 300 may continue to use the gain parameter values that were previously determined based on the final converged value of the gain imbalance estimate; and continue to use the transformation parameter values B1, B2, B3 and B4 that were computed based on the final converged value of the phase imbalance estimate.
Third, the control unit 404 may adjust the delay τe and repeatedly compute the quantities Re{P[(ωb/ωs)N]} and Im{P[(ωb/ωs)N]} in order to determine the value of τe that maximizes |Re{P[(ωb/ωs)N]}| and minimizes |Im{P[(ωb/ωs)N]}|. The control unit 404 may employ any of a variety of known search procedures to locate the optimizing value of τe. Once the optimizing value of τe is obtained, it may be stored in the control unit 404 for use in the next iteration of the DC offset calibration.
Because the effective inphase offset dominates the effective quadrature offset, the optimizing value of τe satisfies (or comes close to satisfying) the phase condition in (21e). Once the optimizing value of τe is determined, the iterative procedure described above based on expressions (20a), (20b), (21a) and (21b) may be used to estimate the DC offsets DI and DQ. However, before the iterative procedure is started the offset parameters {circumflex over (D)}I and {circumflex over (D)}Q may be reset to zero.
To show that the compensator 300 really removes the effects of any gain/phase imbalances and DC offsets (after the calibration procedures described herein) at the inputs of the analog RF circuit 500a, the relation between [U(t),V(t)] and [I(n),Q(n)] is derived as follows. Note that the compensator output signals IC(n) and QC(n) are related to the compensator input signals I(n) and Q(n) by the following expression:




  
    
      
        
          [
          
            
              
                
                  
                    I
                    C
                  
                  ⁡
                  
                    (
                    n
                    )
                  
                
              
            
            
              
                
                  
                    Q
                    C
                  
                  ⁡
                  
                    (
                    n
                    )
                  
                
              
            
          
          ]
        
        =
        
          
            
              
                [
                
                  
                    
                      
                        
                          G
                          ^
                        
                        I
                      
                    
                    
                      0
                    
                  
                  
                    
                      0
                    
                    
                      
                        
                          G
                          ^
                        
                        Q
                      
                    
                  
                
                ]
              
              ⁡
              
                [
                
                  
                    
                      
                        B
                        1
                      
                    
                    
                      
                        B
                        3
                      
                    
                  
                  
                    
                      
                        B
                        2
                      
                    
                    
                      
                        B
                        4
                      
                    
                  
                
                ]
              
            
            ⁡
            
              [
              
                
                  
                    
                      I
                      ⁡
                      
                        (
                        n
                        )
                      
                    
                  
                
                
                  
                    
                      Q
                      ⁡
                      
                        (
                        n
                        )
                      
                    
                  
                
              
              ]
            
          
          -
          
            [
            
              
                
                  
                    
                      D
                      ^
                    
                    I
                  
                
              
              
                
                  
                    
                      D
                      ^
                    
                    Q
                  
                
              
            
            ]
          
        
      
    
    
      
        (
        22
        )
      
    
  




Furthermore, expressions (7a) and (7b) for U(t) and V(t) can be written in matrix as




  
    
      
        
          [
          
            
              
                
                  U
                  ⁡
                  
                    (
                    t
                    )
                  
                
              
            
            
              
                
                  V
                  ⁡
                  
                    (
                    t
                    )
                  
                
              
            
          
          ]
        
        =
        
          
            [
            
              
                
                  
                    cos
                    ⁡
                    
                      (
                      
                        φ
                        /
                        2
                      
                      )
                    
                  
                
                
                  
                    sin
                    ⁡
                    
                      (
                      
                        φ
                        /
                        2
                      
                      )
                    
                  
                
              
              
                
                  
                    sin
                    ⁡
                    
                      (
                      
                        φ
                        /
                        2
                      
                      )
                    
                  
                
                
                  
                    cos
                    ⁡
                    
                      (
                      
                        φ
                        /
                        2
                      
                      )
                    
                  
                
              
            
            ]
          
          ⁡
          
            [
            
              
                
                  
                    
                      I
                      T
                    
                    ⁡
                    
                      (
                      t
                      )
                    
                  
                
              
              
                
                  
                    
                      Q
                      T
                    
                    ⁡
                    
                      (
                      t
                      )
                    
                  
                
              
            
            ]
          
        
      
    
    
      
        (
        
          23
          ⁢
          a
        
        )
      
    
  




and expressions (2a) and (2b) for IT(t) and QT(t) can be written in matrix form as:





  
    
      
        
          [
          
            
              
                
                  
                    I
                    T
                  
                  ⁡
                  
                    (
                    t
                    )
                  
                
              
            
            
              
                
                  
                    Q
                    T
                  
                  ⁡
                  
                    (
                    t
                    )
                  
                
              
            
          
          ]
        
        =
        
          
            
              [
              
                
                  
                    
                      G
                      I
                    
                  
                  
                    0
                  
                
                
                  
                    0
                  
                  
                    
                      G
                      Q
                    
                  
                
              
              ]
            
            ⁡
            
              [
              
                
                  
                    
                      
                        I
                        C
                      
                      ⁡
                      
                        (
                        t
                        )
                      
                    
                  
                
                
                  
                    
                      
                        Q
                        C
                      
                      ⁡
                      
                        (
                        t
                        )
                      
                    
                  
                
              
              ]
            
          
          +
          
            [
            
              
                
                  
                    D
                    I
                  
                
              
              
                
                  
                    D
                    Q
                  
                
              
            
            ]
          
        
      
    
    
      
        (
        
          23
          ⁢
          b
        
        )
      
    
  




Substituting expression (23b) into (23a) gives:




  
    
      
        
          [
          
            
              
                
                  U
                  ⁡
                  
                    (
                    t
                    )
                  
                
              
            
            
              
                
                  V
                  ⁡
                  
                    (
                    t
                    )
                  
                
              
            
          
          ]
        
        =
        
          
            [
            
              
                
                  
                    c
                    ⁡
                    
                      (
                      
                        φ
                        2
                      
                      )
                    
                  
                
                
                  
                    s
                    ⁡
                    
                      (
                      
                        φ
                        2
                      
                      )
                    
                  
                
              
              
                
                  
                    s
                    ⁡
                    
                      (
                      
                        φ
                        2
                      
                      )
                    
                  
                
                
                  
                    c
                    ⁡
                    
                      (
                      
                        φ
                        2
                      
                      )
                    
                  
                
              
            
            ]
          
          ⁢
          
            {
            
              
                
                  [
                  
                    
                      
                        
                          G
                          I
                        
                      
                      
                        0
                      
                    
                    
                      
                        0
                      
                      
                        
                          G
                          Q
                        
                      
                    
                  
                  ]
                
                ⁡
                
                  [
                  
                    
                      
                        
                          
                            I
                            C
                          
                          ⁡
                          
                            (
                            t
                            )
                          
                        
                      
                    
                    
                      
                        
                          
                            Q
                            C
                          
                          ⁡
                          
                            (
                            t
                            )
                          
                        
                      
                    
                  
                  ]
                
              
              +
              
                [
                
                  
                    
                      
                        D
                        I
                      
                    
                  
                  
                    
                      
                        D
                        Q
                      
                    
                  
                
                ]
              
            
            }
          
        
      
    
    
      
        (
        
          23
          ⁢
          c
        
        )
      
    
  




where c(x) represents cos(x) and s(x) represents sin(x).

Substituting expression (22) into expression (23c) and evaluating at time t=nT, where T is the sampling period of the D/A conversion, gives:




  
    
      
        
          [
          
            
              
                
                  U
                  ⁡
                  
                    (
                    nT
                    )
                  
                
              
            
            
              
                
                  V
                  ⁡
                  
                    (
                    nT
                    )
                  
                
              
            
          
          ]
        
        =
        
          
            [
            
              
                
                  
                    c
                    ⁡
                    
                      (
                      
                        φ
                        2
                      
                      )
                    
                  
                
                
                  
                    s
                    ⁡
                    
                      (
                      
                        φ
                        2
                      
                      )
                    
                  
                
              
              
                
                  
                    s
                    ⁡
                    
                      (
                      
                        φ
                        2
                      
                      )
                    
                  
                
                
                  
                    c
                    ⁡
                    
                      (
                      
                        φ
                        2
                      
                      )
                    
                  
                
              
            
            ]
          
          ⁢
          
            {
            
              
                
                  
                    
                      
                        
                          [
                          
                            
                              
                                
                                  
                                    G
                                    I
                                  
                                  ⁢
                                  
                                    
                                      G
                                      ^
                                    
                                    I
                                  
                                
                              
                              
                                0
                              
                            
                            
                              
                                0
                              
                              
                                
                                  
                                    G
                                    Q
                                  
                                  ⁢
                                  
                                    
                                      G
                                      ^
                                    
                                    Q
                                  
                                
                              
                            
                          
                          ]
                        
                        ⁡
                        
                          [
                          
                            
                              
                                
                                  B
                                  1
                                
                              
                              
                                
                                  B
                                  3
                                
                              
                            
                            
                              
                                
                                  B
                                  2
                                
                              
                              
                                
                                  B
                                  4
                                
                              
                            
                          
                          ]
                        
                      
                      ⁡
                      
                        [
                        
                          
                            
                              
                                I
                                ⁡
                                
                                  (
                                  n
                                  )
                                
                              
                            
                          
                          
                            
                              
                                Q
                                ⁡
                                
                                  (
                                  n
                                  )
                                
                              
                            
                          
                        
                        ]
                      
                    
                    -
                  
                
              
              
                
                  
                    
                      
                        [
                        
                          
                            
                              
                                G
                                I
                              
                            
                            
                              0
                            
                          
                          
                            
                              0
                            
                            
                              
                                G
                                Q
                              
                            
                          
                        
                        ]
                      
                      ⁡
                      
                        [
                        
                          
                            
                              
                                
                                  D
                                  ^
                                
                                I
                              
                            
                          
                          
                            
                              
                                
                                  D
                                  ^
                                
                                Q
                              
                            
                          
                        
                        ]
                      
                    
                    +
                    
                      [
                      
                        
                          
                            
                              D
                              I
                            
                          
                        
                        
                          
                            
                              D
                              Q
                            
                          
                        
                      
                      ]
                    
                  
                
              
            
            }
          
        
      
    
    
      
        (
        
          24
          ⁢
          a
        
        )
      
    
  




After performing the estimation processes described above, {circumflex over (φ)}≈φ, {circumflex over (ε)}≈ε, {circumflex over (D)}I≈DI and {circumflex over (D)}Q≈DQ. The gain parameters ĜI and ĜQ are set so that GIĜI≈1 and GQĜQ≈1. Thus, expression (24a) reduces to:




  
    
      
        
          [
          
            
              
                
                  U
                  ⁡
                  
                    (
                    nT
                    )
                  
                
              
            
            
              
                
                  V
                  ⁡
                  
                    (
                    nT
                    )
                  
                
              
            
          
          ]
        
        ≈
        
          
            [
            
              
                
                  
                    c
                    ⁡
                    
                      (
                      
                        φ
                        2
                      
                      )
                    
                  
                
                
                  
                    s
                    ⁡
                    
                      (
                      
                        φ
                        2
                      
                      )
                    
                  
                
              
              
                
                  
                    s
                    ⁡
                    
                      (
                      
                        φ
                        2
                      
                      )
                    
                  
                
                
                  
                    c
                    ⁡
                    
                      (
                      
                        φ
                        2
                      
                      )
                    
                  
                
              
            
            ]
          
          ⁢
          
            
              {
              
                
                  
                    
                      
                        
                          [
                          
                            
                              
                                
                                  B
                                  1
                                
                              
                              
                                
                                  B
                                  3
                                
                              
                            
                            
                              
                                
                                  B
                                  2
                                
                              
                              
                                
                                  B
                                  4
                                
                              
                            
                          
                          ]
                        
                        ⁡
                        
                          [
                          
                            
                              
                                
                                  I
                                  ⁡
                                  
                                    (
                                    n
                                    )
                                  
                                
                              
                            
                            
                              
                                
                                  Q
                                  ⁡
                                  
                                    (
                                    n
                                    )
                                  
                                
                              
                            
                          
                          ]
                        
                      
                      -
                    
                  
                
                
                  
                    
                      
                        [
                        
                          
                            
                              
                                
                                  G
                                  I
                                
                                ⁢
                                
                                  
                                    D
                                    ^
                                  
                                  I
                                
                              
                            
                          
                          
                            
                              
                                
                                  G
                                  Q
                                
                                ⁢
                                
                                  
                                    D
                                    ^
                                  
                                  Q
                                
                              
                            
                          
                        
                        ]
                      
                      +
                      
                        [
                        
                          
                            
                              
                                D
                                I
                              
                            
                          
                          
                            
                              
                                D
                                Q
                              
                            
                          
                        
                        ]
                      
                    
                  
                
              
              }
            
            .
          
        
      
    
    
      
        (
        
          24
          ⁢
          b
        
        )
      
    
  




Since DI≈GI{circumflex over (D)}I and DQ≈GQ{circumflex over (D)}Q, expression (24b) reduces to:




  
    
      
        
          [
          
            
              
                
                  U
                  ⁡
                  
                    (
                    nT
                    )
                  
                
              
            
            
              
                
                  V
                  ⁡
                  
                    (
                    nT
                    )
                  
                
              
            
          
          ]
        
        ≈
        
          
            
              [
              
                
                  
                    
                      c
                      ⁡
                      
                        (
                        
                          φ
                          2
                        
                        )
                      
                    
                  
                  
                    
                      s
                      ⁡
                      
                        (
                        
                          φ
                          2
                        
                        )
                      
                    
                  
                
                
                  
                    
                      s
                      ⁡
                      
                        (
                        
                          φ
                          2
                        
                        )
                      
                    
                  
                  
                    
                      c
                      ⁡
                      
                        (
                        
                          φ
                          2
                        
                        )
                      
                    
                  
                
              
              ]
            
            ⁡
            
              [
              
                
                  
                    
                      c
                      (
                      
                        -
                        
                          
                            φ
                            ^
                          
                          2
                        
                      
                      )
                    
                  
                  
                    
                      s
                      (
                      
                        -
                        
                          
                            φ
                            ^
                          
                          2
                        
                      
                      )
                    
                  
                
                
                  
                    
                      s
                      (
                      
                        -
                        
                          
                            φ
                            ^
                          
                          2
                        
                      
                      )
                    
                  
                  
                    
                      c
                      (
                      
                        -
                        
                          
                            φ
                            ^
                          
                          2
                        
                      
                      )
                    
                  
                
              
              ]
            
          
          ⁡
          
            [
            
              
                
                  
                    I
                    ⁡
                    
                      (
                      n
                      )
                    
                  
                
              
              
                
                  
                    Q
                    ⁡
                    
                      (
                      n
                      )
                    
                  
                
              
            
            ]
          
        
      
    
    
      
        (
        
          25
          ⁢
          a
        
        )
      
    
  




Applying basic trigonometric identities gives:




  
    
      
        
          [
          
            
              
                
                  U
                  ⁡
                  
                    (
                    nT
                    )
                  
                
              
            
            
              
                
                  V
                  ⁡
                  
                    (
                    nT
                    )
                  
                
              
            
          
          ]
        
        ≈
        
          
            [
            
              
                
                  
                    c
                    (
                    
                      
                        φ
                        +
                        
                          φ
                          ^
                        
                      
                      2
                    
                    )
                  
                
                
                  
                    s
                    (
                    
                      
                        φ
                        -
                        
                          φ
                          ^
                        
                      
                      2
                    
                    )
                  
                
              
              
                
                  
                    s
                    (
                    
                      
                        φ
                        -
                        
                          φ
                          ^
                        
                      
                      2
                    
                    )
                  
                
                
                  
                    c
                    (
                    
                      
                        φ
                        +
                        
                          φ
                          ^
                        
                      
                      2
                    
                    )
                  
                
              
            
            ]
          
          ⁢
          
            
          
          [
          
            
              
                
                  I
                  ⁡
                  
                    (
                    n
                    )
                  
                
              
            
            
              
                
                  Q
                  ⁡
                  
                    (
                    n
                    )
                  
                
              
            
          
          ]
        
      
    
    
      
        (
        
          25
          ⁢
          b
        
        )
      
    
  




Because {circumflex over (φ)}≈φ, expression (25b) reduces to:





  
    
      
        
          [
          
            
              
                
                  U
                  ⁡
                  
                    (
                    nT
                    )
                  
                
              
            
            
              
                
                  V
                  ⁡
                  
                    (
                    nT
                    )
                  
                
              
            
          
          ]
        
        ≈
        
          
            cos
            ⁡
            
              (
              φ
              )
            
          
          ⁡
          
            [
            
              
                
                  
                    I
                    ⁡
                    
                      (
                      n
                      )
                    
                  
                
              
              
                
                  
                    Q
                    ⁡
                    
                      (
                      n
                      )
                    
                  
                
              
            
            ]
          
        
      
    
    
      
        (
        
          25
          ⁢
          c
        
        )
      
    
  




Thus, after the compensator is configured (by the control unit 404) with the parameter values determined as a result of the estimation processes described above, the equivalent baseband signals U(t) and V(t) at the input of the quadrature modulator 1001, evaluated at time t=nT, are approximately scalar multiples of the digital input signals I(n) and Q(n), respectively, where the scalar multiple is cos(φ). The effects of any gain imbalance, phase imbalance and DC offset errors in the analog RF transmitter 500a will have been compensated for (or, at least significantly compensated for).
Note that if the phase error φ=0 in expressions (7a) and (7b), U(t) and V(t) are approximately equal to IT(t) and IQ(t), respectively.
In one set of embodiments, the compensator 300 may be configured to receive the estimates {circumflex over (D)}I, {circumflex over (D)}Q, {circumflex over (ε)} and {circumflex over (φ)} from the control unit 404 and store these estimates in four corresponding internal registers (not shown). In one embodiment, the compensator 300 may be configured to compute the gain parameters ĜI and ĜQ based on the expressions:

ĜI=1−{circumflex over (ε)}/2

ĜQ=1+{circumflex over (ε)}/2

In some embodiments, the analog RF circuit 500a may include a filter control unit 505, as shown in FIG. 2, configured to adjust the cutoff frequencies of the reconstruction filters 503 and 504 (or, in an alternative embodiment, the cutoff frequency of one of the reconstruction filters) in order to achieve the condition that the cutoff frequency of filter 503 is equal, or approximately equal, to the cutoff frequency of filter 504. The corner frequencies of the reconstruction filters may be adjusted by using a switched capacitor matrix (or switched capacity array) with the aid of a reference clock signal.
In those embodiments where the corner frequency (frequencies) are adjustable, the adjustment(s) is (are) preferably performed before the compensations of the gain imbalance, phase imbalance and the DC offsets in order to minimize errors in those compensations.
The digital baseband circuit 500b (see FIG. 2) may include an Inverse Fast Fourier Transform (IFFT) unit 309 configured to receive blocks of coefficients and to apply an Inverse FFT to each of the blocks in order to generate a complex signal x(n)=I(n)+jQ(n), where j is the square root of −1, where I(n) is the real part of x(n), and where Q(n) is the imaginary part of x(n).
Note that the parameter estimation and compensation processes described above rely on the generation of orthogonal test tones at the signal nodes I(n) and Q(n). Orthogonal test tones may be generated using an orthogonal frequency division multiplexing (OFDM) technique, e.g., a technique such as is described in the IEEE 802.11a/g/n standard or in the WiMedia UWB standard. For example, the complex calibration tone signal in IEEE 802.11a/g/n may be expressed as an inverse Fourier transform of a set of coefficients dk, k=−N/2, . . . , −1, 0, 1, . . . , N/2, as follows:




  
    
      
        
          x
          ⁡
          
            (
            t
            )
          
        
        =
        
          
            ∑
            
              k
              =
              
                
                  -
                  N
                
                /
                2
              
            
            
              N
              /
              2
            
          
          ⁢
          
            
              d
              k
            
            ⁢
            
              
            
            ⁢
            
              exp
              (
              
                j
                ⁢
                
                  
                
                ⁢
                2
                ⁢
                
                  
                
                ⁢
                π
                ⁢
                
                  
                
                ⁢
                k
                ⁢
                
                  
                
                ⁢
                
                  t
                  
                    T
                    p
                  
                
              
              )
            
          
        
      
    
    
      
        (
        28
        )
      
    
  




In expression (28), N is the total number of subcarriers, Tp is the IFFT period, dk is the complex data value corresponding to the kth subcarrier, and j is the square root of negative one. (Note that the definition of the term “subcarrier” does not include the DC component corresponding to k=0. Also note that NTs=Tp, or equivalently, fS/N=1/Tp, where fS=1/Ts is the sample rate.) To generate a calibration tone, set dL=1 for a selected integer value L in the range −N/2<L<N/2 and set dk=0 for k≠L . Then, expression (28) can be expressed in the discrete-time domain as

x(n)=exp(j2πLnΔf)  (29)

Where Δf=1/Tp. Expression (29) implies that

I(n)=cos(2πΩn)  (30a)

Q(n)=sin(2πΩn)  (30b)

Where Ω=LΔf

In one set of embodiments, a method for calibrating a transmitter (e.g., a transmitter such as transmitter 500 of FIG. 2) may be performed as described in FIG. 6. The method may be performed by control unit 404 during a calibration period, prior to operation of the transmitter. The method is described in terms of a collection of “operations” as follows.
In operation 610, the control unit may determine whether at least one of the DC offset compensations has been selected (e.g., by the user, by maintenance personnel, by calibration software running on a host computer, etc.). If at least one of the DC offset compensations has been selected, the control unit may proceed to operation 615. If neither of the DC offset compensations has been selected, the control unit may proceed to operation 625.
In operation 615, the control unit may direct the IFFT unit 309 to generate an orthogonal pair of test tones with angular frequency ωb, e.g., by controlling the transfer of a pre-selected set of coefficients from memory (e.g., memory internal to the digital baseband circuit 500b or internal to the transmitter 500) to the IFFT unit 309. Furthermore, the control unit may perform a search process to determine the optimizing value of the delay τe (of the adjustable delay unit 514 in FIG. 2) by maximizing |Re{P[(ωb/ωs)N]}| as described above in the discussion of DC offset compensation, where the optimal τe approximates the condition

ωb(τd+τe)−kπ

for some integer value k.

With the optimizing value of delay τe in force (at the adjustable delay unit 514), the control unit may perform operation 620. In operation 620, the control unit may repeatedly update the DC offset parameters {circumflex over (D)}I and {circumflex over (D)}Q of a compensator (e.g., compensator 300) using the iterative algorithm described above. The control unit may iterate until a termination condition is achieved. For example, the termination condition may be the condition that the iteration count (of iterations already performed) achieves a predetermined number NMAX. The number NMAX may be determined at design time. As an alternative, the number NMAX may be specified by a user of the transmitter 500. As another alternative, the number NMAX may be determined by a software program (e.g., a software program executing on a host computer which is coupled to the transmitter 500) and transferred to the control unit 404 prior to transmitter calibration time.
In one embodiment, the number NMAX is a value in the range from 3 to 20 inclusive. In another embodiment, the number NMAX is a value in the range from 5 to 15 inclusive. In yet another embodiment, the number NMAX is a value in the range from 7 to 10 inclusive.
In operation 625, the control unit may determine whether at least one of gain imbalance compensation and phase imbalance compensation has been selected. If at least one of these compensations has been selected, the control unit may proceed with operation 630. If neither of these compensations has been selected, the control unit may terminate processing relative to the method of FIG. 6.
In operation 630, the control unit may direct the IFFT unit 309 to generate an orthogonal pair of test tones with angular frequency ωb, e.g., by controlling the transfer of a pre-selected set of coefficients from memory to the IFFT unit 309. Furthermore, the control unit may perform a search process to determine the optimizing value of the delay τe (of the adjustable delay unit 514 in FIG. 2) by maximizing |Re{P[2(ωb/ωs)N]}| as described above in the discussion of gain/phase imbalance compensation, in order to approximate the condition

2ωb(τd+τe)=kπ

for some integer value k.

With the optimizing value of delay τe in force (at the adjustable delay unit 514), the control unit may perform operation 635. In operation 635, the control unit may repeatedly update the value of the gain imbalance parameter {circumflex over (ε)} and/or the value of the phase imbalance parameter {circumflex over (φ)} in the compensator using the iterative algorithm described above. The control unit may iterate until a termination condition is achieved. Various alternatives are possible for the termination condition, as with operation 620.
In one embodiment, the control unit (or some other agent) may be direct the adjustment of the corner frequency of one or both of the reconstruction filters 503 and 504 so that the corner frequency of filter 503 is at least approximately equal to the corner frequency of the filter 504. This adjustment of the corner frequency (frequencies) may improve the quality of the compensation processes described above.
In one set of embodiments, a transmitter may include a compensator circuit, a quadrature modulator and a feedback path. The compensator circuit operates on input signals to generate modified signals which are supplied to the quadrature modulator. The compensator generates the modified signals in a manner that compensates for errors in the transmitter. The feedback path may be configured to extract an envelope of the RF signal generated by the quadrature modulator and to apply an adjustable time delay to the envelope signal.
In some embodiments, a method of compensating for one or more errors in the transmitter may involve the following operations as illustrated in FIG. 7.
At 710, an orthogonal pair of tones may be supplied to the compensator circuit, e.g., as described above using an inverse Discrete Fourier Transform (DFT).
At 715, the delay value of a delay unit in the feedback path may be adjusted in order to approximate the condition that a sum of a first phase lag corresponding to the delay value and a second phase lag associated with one or more filters in the transmitter is a multiple of 2π. The adjustment may be performed (e.g., as described above) using measurements of the real and imaginary parts of the signal provided by the feedback path. The second phase lag may be the sum of phase lags associated with filters in the circuit path between the input IC(n) or QC(n) and the feedback signal w(t). For example, the second phase lag may be sum of the phase lag associated with the reconstruction filter 503 (or reconstruction filter 504) and the phase lag associated with bandpass filter 512.
At 720, an update for one or more parameters of the compensator circuit may be generated, e.g., as variously described above. The process of generating an update for the one or more parameters may include: capturing a block of samples from the feedback path, computing a transform coefficient corresponding to the frequency kfb from the block of samples, where fb is the frequency of the orthogonal pair of tones, where k is one or two, and computing the update for the one or more parameters using the transform coefficient.
At 725, the updated one or more parameters may be supplied to the compensator circuit.
The operations 720 and 725 may be repeated a number of times until a termination condition is achieved. This repetition is suggested in FIG. 7 by the conditional test 730.
The process 715 of adjusting the delay value may include: 1) capturing samples from the feedback path; 2) computing the transform coefficient corresponding to the frequency kfb from the captured samples; 3) adjusting the delay value of the delay unit; and 4) repeating (1) through (3) in order to maximize the real part of the transform coefficient. Alternatively, 4) may involve repeating (1) through (3) in order to minimize the imaginary part of the transform coefficient.
An example of errors that may be compensated for include DC offset errors such as inphase DC offset error and quadrature DC offset error in the transmitter. When compensating for DC offset error(s), k equals one. Prior to process 715, a quadrature DC offset parameter of the compensator circuit may be set equal to zero and an inphase DC offset parameter of the compensator circuit may be set equal to a nonzero value.
Another example of errors that may be compensated for includes gain imbalance error and phase imbalance error. When compensating for gain imbalance error and/or phase imbalance error, k equals two. Prior to process 715, a phase imbalance parameter of the compensator may be set equal to zero and a gain imbalance parameter of the compensator may be set equal to a nonzero value.
In some embodiments, the method may be applied to compensate for only one error if desired. For example, it may be known a priori that a certain class of transmitters has negligible gain imbalance error, and thus, the compensation for gain imbalance error need not be performed for that transmitter class.
In some embodiment, the termination condition is the condition that the count of complete repetitions of 720 and 725 has reached a predetermined maximum value.
In some embodiments, the process of computing the update for the one or more parameters may include: 1) computing an increment for one of the one or more parameters based on the real part of the transform coefficient, and 2) adding the increment to a previous value of the one parameter.
In some embodiments, the process of computing the update for the one or more parameters may include: 1) computing an increment for one of the one or more parameters based on the imaginary part of the transform coefficient, and 2) adding the increment to a previous value of the one parameter.
In one set of embodiments, the transmitter 800 may include a number of circuit units, e.g., as illustrated in FIG. 8. The transmitter 800 may include a compensator 810, a pair 815 of digital-to-analog (D/A) conversion units, a quadrature modulator 820, a feedback circuit 830 and a control unit 840. The compensator circuit 810 may be configured to receive and operate on a first pair 805 of discrete-time signals in order to generate a second pair 812 of discrete-time signals. The pair 815 of D/A conversion units may be configured to convert the second pair 812 of discrete-time signals respectively into a third pair 817 of analog signals. The quadrature modulator 820 may be configured to operate on the third pair 817 of analog signals in order to generate an output RF signal 825. The feedback circuit 830 may be configured to detect an envelope signal from the output RF signal and to apply a time delay to the envelope signal in order to generate a feedback signal 835, e.g., as shown in FIG. 2. The control unit 840 may be configured to receive the feedback signal 835, to adjust the amount of the time delay, and to compute and update one or more compensation parameters of the compensator circuit based on captured samples (or blocks of samples) of the feedback signal.
Bus 842 may be used to transfer the updated compensation parameter(s) to the compensation circuit 810.
The compensator circuit 810 may also be configured to operate on the first pair 805 of discrete-time signals so that the second pair 812 of discrete-time signals compensate for one or more errors in the transmitter.
In some embodiments, the compensator circuit 810 may include a 2×2 matrix multiply circuit and a pair of scalar multiplication units. The 2×2 matrix multiply circuit may be configured to perform a matrix multiplication operation on the first pair 805 of discrete-time signals in order to generate an intermediate pair of discrete-time signals. The pair of scalar multiplication units may be configured to multiply the intermediate pair of discrete-time signals respectively by a pair of gain parameter values in order to obtain a pair of scaled discrete-time signals. One example of a 2×2 matrix multiply circuit is illustrated by the adders 303 and 304 and the set 601 of four multipliers in FIG. 2. One example of the pair of scalar multiplication units is illustrated by the multipliers 305 and 306 of FIG. 2.
In some embodiments, the one or more compensation parameters of the compensator circuit 810 may include a phase imbalance parameter {circumflex over (φ)}. The compensator circuit may be configured to receive the phase imbalance parameter from the control unit (e.g., via bus 842) and to determine coefficients of the matrix multiplication operation based on the phase imbalance parameter.
In some embodiments, the one or more compensation parameters of the compensator circuit 810 may include a gain imbalance parameter {circumflex over (ε)}. The compensator circuit 810 may be configured to receive the gain imbalance parameter {circumflex over (ε)} from the control unit (e.g., via bus 842) and to determine an inphase DC offset parameter {circumflex over (D)}I and a quadrature DC offset parameter {circumflex over (D)}Q from the gain imbalance parameter. These DC offset parameters may be used to control a pair of DC offset circuits in order to compensate for DC offset errors in the transmitter. One example of the pair of DC offset circuits is illustrated by adders 307 and 308 in FIG. 2.
In some embodiments, the compensator circuit 810 may be configured to compensate both for phase imbalance error and gain imbalance error. Thus, the one or more compensation parameters of the compensator circuit 810 may include a phase imbalance parameter {circumflex over (φ)} and a gain imbalance parameter {circumflex over (ε)}.
In some embodiments, the control unit 840 may be configured to compute the inphase DC offset parameter and the quadrature DC offset parameter, and provide these parameters to the compensation circuit 810 (instead of providing the gain imbalance parameter {circumflex over (ε)}).
In some embodiments, the transmitter may also include an inverse Fast Fourier Transform (IFFT) unit configured to receive and operate on blocks of coefficients in order to generate the first pair of discrete-time signals. The control unit 840 may be configured to control a selection of the blocks of coefficients from a memory (e.g., a memory internal to the transmitter).
The feedback circuit 830 may include a nonlinear device and a bandpass filter, e.g., as illustrated in FIG. 2. The nonlinear device may be configured to operate on the output RF signal in order to generate a signal s(t). The bandpass filter may be configured to filter the signal s(t) in order produce the envelope signal r(t). The feedback circuit 830 may also include an adjustable delay unit configured to perform said application of the time delay to the envelope signal, e.g., as illustrated in FIG. 4. The adjustable delay unit may be configured to receive a control signal 837, from the control unit, indicating the amount of the time delay, e.g., as illustrated in FIG. 2.
In some embodiments, the compensator circuit 810, the pair 815 of D/A conversion units and the control unit 840 are fabricated on a first chip, and, the quadrature modulator 820 and the feedback circuit 830 are fabricated on a second chip. The first chip may also include an analog-to-digital (A/D) conversion unit to capture samples of the feedback signal 835.
In some embodiments, the control unit may be configured to read and execute program instructions stored in a memory. The program instructions may include a program module (or set of program modules) for performing the FFT operation. Note that transceiver chips are quite often designed with the capability to perform the FFT operation.
Various embodiments of the present invention provide the ability to adaptively compensate for any subset of the following errors associated with a transmitter: the gain imbalance error, the phase imbalance error, the inphase DC offset error, and the quadrature DC offset error.
Any of the various method embodiments disclosed herein (or any combinations thereof or portions thereof) may be implemented in terms of program instructions. The program instructions may be stored in (or on) any of various memory media. A memory medium is a medium configured for the storage of information. Examples of memory media include various kinds of magnetic media (e.g., magnetic tape or magnetic disk); various kinds of optical media (e.g., CD-ROM); various kinds of semiconductor RAM and ROM; various media based on the storage of electrical charge or other physical quantities; etc.
Furthermore, various embodiments of a system including a memory and a processor are contemplated, where the memory is configured to store program instructions and the processor is configured to read and execute the program instructions from the memory. In various embodiments, the program instructions encode corresponding ones of the method embodiments described herein (or combinations thereof or portions thereof). For example, the control unit 404 of FIG. 2, or the control unit 840 of FIG. 8, may be a processor configured to execute program instructions stored in a memory (e.g., a memory internal to the transmitter 500 or internal to the digital baseband circuit 500b).
Various embodiments may further include receiving, sending or storing program instructions and/or data implemented in accordance with the foregoing description upon a computer-accessible medium. Generally speaking, a computer-accessible medium may include storage media or memory media such as magnetic or optical media, e.g., disk or CD-ROM, volatile or non-volatile media such as RAM (e.g. SDRAM, DDR SDRAM, RDRAM, SRAM, etc.), ROM, etc. as well as transmission media or signals such as electrical, electromagnetic, or digital signals, conveyed via a communication medium such as network and/or a wireless link.
The various methods as illustrated in the Figures and described herein represent exemplary embodiments of methods. The methods may be implemented on programmable hardware, custom designed circuitry, or a combination thereof.
In FIG. 6, DC offset compensations are illustrated as being performed prior to the gain/phase imbalance compensations. In one alternative embodiment, the order is reversed, i.e., the gain/phase imbalance compensations are performed before DC offset compensations.

## Claims

1. A method of compensating for one or more errors in a transmitter, wherein the transmitter includes a compensator circuit, a quadrature modulator and a feedback path, the method comprising:
(a) supplying an orthogonal pair of tones as calibration signals to the compensator circuit;
(b) adjusting a delay value of a delay unit in the feedback path in order to approximate the condition that a sum of a first phase lag corresponding to the delay value plus a second phase lag associated with one or more filters in the transmitter is an integer multiple of π;
(c) generating an update for one or more parameters of the compensator circuit, wherein said generating includes:
capturing a block of samples from the feedback path;
computing real and imaginary parts of the complex Fourier transform corresponding to the frequency kfb from the block of samples, wherein fb is the frequency of the orthogonal pair of tones, wherein k is one or two; and
computing the update for the one or more parameters using said real and imaginary parts of the complex Fourier transform corresponding to frequency kfb;

(d) supplying the updated one or more parameters to the compensator circuit; and
(e) repeating (c) and (d) a number of times until a termination condition is achieved.

2. The method of claim 1, wherein the one or more errors include an inphase DC offset error and a quadrature DC offset error of the transmitter, wherein k equals 1.

3. The method of claim 2 further comprising:
prior to (b), setting a quadrature DC offset parameter of the compensator circuit equal to zero and setting an inphase DC offset parameter of the compensator equal to a nonzero value.

4. The method of claim 2, wherein said adjusting the delay value includes:
(b1) capturing samples from the feedback path;
(b2) computing said real and imaginary parts of the complex Fourier transform corresponding to the frequency fb from the captured samples;
(b3) adjusting the delay value of the delay unit; and
(b4) repeating (b1) through (b3) in order to maximize said real part of the complex Fourier transform corresponding to the frequency fb.

5. The method of claim 1, wherein the one or more errors include a phase imbalance error and a gain imbalance error, wherein k equals 2.

6. The method of claim 5 further comprising:
prior to (b), setting a phase imbalance parameter of the compensator equal to zero and setting a gain imbalance parameter of the compensator equal to a nonzero value.

7. The method of claim 5, wherein said adjusting the delay value includes:
(b1) capturing samples from the feedback path;
(b2) computing said real and imaginary parts of the complex Fourier transform corresponding to the frequency 2fb from the captured samples;
(b3) adjusting the delay value of the delay unit; and
(b4) repeating (b1) through (b3) in order to maximize the real part of the complex Fourier transform.

8. The method of claim 1, wherein said termination condition is a condition that a count of completed repetitions of (c) and (d) is greater than or equal to a predetermined maximum value.

9. The method of claim 1, wherein said computing the update for the one or more parameters includes: computing a first increment for a first of the one or more parameters based on said real part of the complex Fourier transform corresponding to the frequency kfb, and adding the first increment to a previous value of the first parameter.

10. The method of claim 1, wherein said computing the update for the one or more parameters includes: computing a second increment for a second of the one or more parameters based on said imaginary part of the complex Fourier transform corresponding to the frequency kfb, and adding the second increment to a previous value of the second parameter.

11. A transmitter system comprising:
a quadrature modulator;
a compensator circuit configured to compensate for one or more errors in the quadrature modulator;
a feedback path; and
a control unit, wherein the control unit is configured to:
(a) direct an orthogonal pair of tones to be supplied as calibration signals to the compensator circuit;
(b) adjust a delay value of a delay unit in the feedback path in order to approximate the condition that a sum of a first phase lag corresponding to the delay value plus a second phase lag associated with one or more filters in the transmitter system is an integer multiple of π;
(c) generate an update for one or more parameters of the compensator circuit, wherein said generating includes:
capturing a block of samples from the feedback path;
computing real and imaginary parts of the complex Fourier transform corresponding to the frequency kfb from the block of samples, wherein fb is the frequency of the orthogonal pair of tones, wherein k is one or two; and
computing the update for the one or more parameters using said real and imaginary parts of the complex Fourier transform corresponding to frequency kfb;

(d) supply the updated one or more parameters to the compensator circuit; and
(e) repeat (c) and (d) a number of times until a termination condition is achieved.

12. The transmitter system of claim 11, wherein the one or more errors include an inphase DC offset error and a quadrature DC offset error of the transmitter, wherein k equals 1.

13. The transmitter system of claim 12, wherein the control unit is further configured to:
prior to (b), setting a quadrature DC offset parameter of the compensator circuit equal to zero and setting an inphase DC offset parameter of the compensator equal to a nonzero value.

14. The transmitter system of claim 12, wherein said adjusting the delay value includes:
(b1) capturing samples from the feedback path;
(b2) computing said real and imaginary parts of the complex Fourier transform corresponding to the frequency fb from the captured samples;
(b3) adjusting the delay value of the delay unit; and
(b4) repeating (b1) through (b3) in order to maximize said real part of the complex Fourier transform corresponding to the frequency fb.

15. The transmitter system of claim 11, wherein the one or more errors include a phase imbalance error and a gain imbalance error, wherein k equals 2.

16. The transmitter system of claim 15, wherein the control unit is further configured to:
prior to (b), setting a phase imbalance parameter of the compensator equal to zero and setting a gain imbalance parameter of the compensator equal to a nonzero value.

17. The transmitter system of claim 15, wherein said adjusting the delay value includes:
(b1) capturing samples from the feedback path;
(b2) computing said real and imaginary parts of the complex Fourier transform corresponding to the frequency 2fb from the captured samples;
(b3) adjusting the delay value of the delay unit; and
(b4) repeating (b1) through (b3) in order to maximize the real part of the complex Fourier transform.

18. The transmitter system of claim 11, wherein said computing the update for the one or more parameters includes: computing a first increment for a first of the one or more parameters based on said real part of the complex Fourier transform corresponding to the frequency kfb, and adding the first increment to a previous value of the first parameter.

19. The transmitter system of claim 11, wherein said computing the update for the one or more parameters includes:
computing a second increment for a second of the one or more parameters based on said imaginary part of the complex Fourier transform corresponding to the frequency kfb, and
adding the second increment to a previous value of the second parameter.

20. A computer-readable memory medium storing program instructions, wherein the program instructions, when executed by a computer system, cause the computer system to perform a method of compensating for one or more errors in a transmitter, wherein the transmitter includes a compensator circuit, a quadrature modulator and a feedback path, wherein the method comprises:
(a) supplying an orthogonal pair of tones as calibration signals to the compensator circuit;
(b) adjusting a delay value of a delay unit in the feedback path in order to approximate the condition that a sum of a first phase lag corresponding to the delay value plus a second phase lag associated with one or more filters in the transmitter is an integer multiple of π;
(c) generating an update for one or more parameters of the compensator circuit, wherein said generating includes:
capturing a block of samples from the feedback path;
computing real and imaginary parts of the complex Fourier transform corresponding to the frequency kfb from the block of samples, wherein fb is the frequency of the orthogonal pair of tones, wherein k is one or two; and
computing the update for the one or more parameters using said real and imaginary parts of the complex Fourier transform corresponding to frequency kfb;

(d) supplying the updated one or more parameters to the compensator circuit; and
(e) repeating (c) and (d) a number of times until a termination condition is achieved.