Abstract:
A method and a circuit for self-calibration and testing QPSK transmitter/receiver IC&#39;s is provided. The method and circuit enable variable error parameters such as gain mismatch, offset voltages, and phase errors inherent in the circuit and signals to be measured and taken into account by the digital signal processors for minimum bit error rates during cellular communications.

Description:
BACKGROUND OF THE INVENTION 
     1. Field of the Invention 
     The present invention relates to the calibration of transmitter/receivers. More particularly, it relates to QPSK transmitter/receiver IC&#39;s and a method and apparatus for the self-calibration and testing thereof. 
     When communicating with cellular phones, both sides of the communication are transmitting and receiving signals. Upon transmission, the voice signal is modulated and transmitted. The receiver receives the signal and demodulates it to reproduce the transmitted signal. Ideally, the resulting demodulated signal should be identical to the transmitted signal. However, variable parameters such as gain mismatch, offset voltages and phase errors inherent in the signal and circuit cause the demodulated signal to vary from the transmitted signal. 
     Generally with GSM cellular phones, a Quadrature Phase Shifted Keying (QPSK) modulation scheme is used. QPSK has four vector components for the signals, each of which are 90° apart. This differs from a PSK modulation scheme where there are two vector components 180° apart (e.g., one at 0° and the other at 180°). With QPSK, we have vector components at 45° with a coordinate (1,1); 135° with a coordinate (-1,1); 225° with a coordinate (-1,-1); and, 315° with a coordinate at (1,-1) where the X-axis is the Q channel (quadrature phase) and the Y-axis is the I channel (in phase). For purposes of calculation of the variable parameters, the Q channel can be designated Cosine, and the I channel can be designated Sine. 
     The amplitude of the four vector components for QPSK, under ideal conditions, would be √2. However, since the circuits do not operate ideally, when one modulates a signal and sends it, the demodulated signal on the receiver end does not have the same vector coordinates and amplitude as the originally transmitted signal. Thus, the received signal does not contain the same data. 
     These inaccuracies are caused by errors in both the transmit and receive channels and mixers. Gain mismatch and offset voltages in both the transmit and receive mixers, in addition to phase errors inherent in both channels result in vector positions that are different than those transmitted. 
     It would therefore be desirable to have a circuit that enables the performance of a self-calibration technique for determining these error components and which subsequently adds them back to the system in order to numerically correct the demodulated output of the receiver mixer. 
     SUMMARY OF THE INVENTION 
     The present invention provides a method and a corresponding circuit implementation which allows parameters such as gain mismatch, offset voltages, and phase errors inherent in the circuit to be measured and compensated for by the digital signal processors to provide minimum bit error rates in the QPSK modulation scheme of the receivers and transmitters. 
     According to the invention, a circuit and method is provided for determining the variable parameters in QPSK transmitter/receiver IC&#39;s and compensating the demodulated signal to substantially eliminate the determined errors upon initiation of a cellular phone call. 
     It is therefore an object of the present invention to provide a method and apparatus for testing and self-calibrating transmitter/receiver IC&#39;s operating in a QPSK modulation scheme. 
     Another object of the invention is to provide a method and apparatus for determining the errors present in the transmitter/receiver operating in a QPSK modulation scheme. 
     It is another object of the present invention to provide a method and apparatus that compensates for the errors detected in the QPSK transmitter/receiver. 
     Yet another object of the invention is to provide a method and apparatus for testing and self-calibrating QPSK transmitter/receiver IC&#39;s that operates efficiently and reliably. 
    
    
     BRIEF DESCRIPTION OF THE DRAWINGS 
     Other objects and features of the present invention will become apparent from the following detailed description considered in connection with the accompanying drawings which disclose an embodiment of the present invention. It should be understood, however, that the drawings are designed for the purpose of illustration only and not as a definition of the limits of the invention. 
     In the drawings, wherein similar reference characters denote similar elements throughout the several views: 
     FIG. 1a is a graphical representation of the four ideal vector positions for QPSK; 
     FIG. 1b is a graphical representation of a random vector sequence for the ideal case after demodulation; 
     FIG. 2 is a graphical representation of the vector positions where the transmitter mixers have a ±0.5 db gain mismatch; 
     FIG. 3 is a graphical representation of the vector positions where the receiver mixers have a ±0.5 db gain mismatch; 
     FIG. 4 is a graphical representation of the vector positions when the transmit LO signals are not exactly quadrature; 
     FIG. 5 is a graphical representation of the vector positions when the receiver LO signals are not exactly quadrature; 
     FIG. 6 is a graphical representation of the vector positions when there is a delay between the transmitter signal and the receiver signal due to the communications channel and filters; 
     FIG. 7 is a graphical representation of the vector positions when there is a 10% DC offset voltage in the receiver I and Q channels; 
     FIG. 8 is a graphical representation of the vector positions when all previous errors of FIGS. 2-7 are combined; 
     FIG. 9 is a schematic diagram of the circuit according to the invention; 
     FIG. 10a is a schematic diagram of an embodiment of the leak circuit of FIG. 9; and 
     FIG. 10b is a schematic diagram of an embodiment of the peak detector circuits of FIG. 9. 
    
    
     DETAILED DESCRIPTION OF PREFERRED EMBODIMENTS 
     As described earlier, there are four vector components to the signals when dealing with QPSK modulation. FIG. 1a shows the vector positions for QPSK in the ideal case. The coordinates of each vector, (1,1), (-1,1), (-1,-1) and (1,-1), have been denoted by X. Each of these vectors have an amplitude of √2. 
     The following graphical representations are examples of the effects that various errors in the QPSK transmitter and receiver portions have on the vector components of the signals. 
     FIG. 1b shows the vector positions for QPSK in the ideal case after introducing modulation. The bold X for the ideal vector coordinates falls on the crowded X as a result of the random modulation. 
     FIG. 2 shows the vector positions when the I and Q channels of the transmit mixers have a ±0.5 db gain mismatch. The deviation from the ideal case (X) can be clearly seen. Specifically, it has made the Q side smaller than the I side. Thus, all of the points on the Q axis (x axis) have moved inward, whereas the points on the I axis (y axis) really haven&#39;t changed much. 
     FIG. 3 shows the vector positions when the I and Q channels of the receiver mixers have a ±0.5 db gain mismatch. Note that the net or end result is the same as that shown in FIG. 2. Thus, when there is a gain mismatch in either the transmit or receive path, the end result is the same, and the vector positions change mostly with respect to the Q channel. 
     FIG. 4 shows what happens to the vector positions when the local oscillator (LO) signal going to the transmit mixer is not exactly 90° (i.e., not in quadrature). A 5° phase error has been introduced to show the effect on the vector positions. Thus, having an LO signal that is not exactly 90° can cause the vertical slanting of the ideal vector positions. FIG. 5 shows the same effect of the LO signal inaccuracies in the receiver end. The end result being the same as that of the transmit end. Thus, again, we are showing that is really doesn&#39;t matter whether the error is in the receiver or transmitter, the deviation effect is the same. 
     FIG. 6 shows the effect of the addition of offsets, gain errors, or any other error that shows itself as a phase shift. The effect of these errors rotate the vectors around the origin. For example, an assumed 20° phase shift would result due to these effects. 
     FIG. 7 shows the effect of the vector positions when there is a 10% DC offset voltage in the receiver I and Q channels. Here the vector positions shift outward and not with respect to the origin. Thus, the vectors are actually moving from the origin as opposed to changing shape around the origin. The several error situations demonstrated by FIGS. 2-6 show the changing vector positions and shape while the origin remains fixed. However, when a DC offset voltage is introduced, the vectors do not just change shape, they are shifted away from the origin. 
     FIG. 8 is an actual case of a received QPSK signal which shows the effect on the vector positions when a combination of all previously discussed errors is made. Thus, the deviation from the ideal case (X) can easily be seen. It becomes readily apparent that there is a need to compensate the received signal to eliminate the effect of these errors on the cellular transmission. 
     FIG. 9 shows the circuit according to the invention. The circuit has a transmitter block Tx on the left hand side, and the receiver block Rx on the right hand side. A Leak Circuit 100, disposed between the Tx and Rx blocks, enables the attenuation of the transmit signal and the subsequent feed back (loop back) of the transmit signal into the receiver for calibrating the circuit. Leak circuit 100 is not a circuit that is included as part of the receiver design, but it provides a feedback of a small portion of the transmit signal into the receiver. 
     For example, two cellular phones are communicating with each other. One phone is transmitting and the other phone is receiving. The correction provided by the circuit is between the receiver and transmitter of the same phone. Thus, when one phone is transmitting, that same phone will also receive the signal it is transmitting and thereby enables the corrections to be made in both the transmit and receive blocks of the same phone. 
     The gain of the transmitter and receiver mixers are depicted by T i  and R i , respectively, for the I channel, and T q  and R q , respectively, for the Q channel. The LO input signals that ideally would be 90°, are depicted by Cos(ωt) and Sin(ωt), but because they are not exact, we have introduced α, which is a phase error variable of approximately 5°. As such, the LO input is now Cos(ωt+α). 
     A group of detectors 102, 104, and 106 are included in the circuit. These detectors are shown as a diode and a capacitor, and the signal of the transmitter mixers can be found on these capacitors. As such, the detectors act as peak detectors. 
     The transmitter (Tx) block has inputs at pins 3 and 4 of ITxIn and ITxInX, respectively, and pins 9 and 10 of QTxIn and QTxInX. Since I and Q are vectors positions, we have coordinates as inputs for each the I and Q channels. The receiver outputs are depicted at pins 15 and 16 as IRxOut and IRxOutX, respectively, and pins 21 and 22 as QRxOut and QRxOutX, respectively. It is at these output pins 15, 16, 21, and 22, that the measurement for determining the errors in the signal and circuit are taken. 
     FIG. 10a shows an example of one implementation of leak circuit 100. The input of leak circuit 100 is the output of the transmitter block (Tx), and the output is the input of the receiver block (Rx). Leak circuit 100 is just an RC network which provides enough attenuation to take the output of the transmit signal and make it very small and feed it back to the receiver. 
     FIG. 10b shows examples of the envelope detectors 102, 104 and 106. Detector 104 has an input MOUTP which goes through a diode where the signal drops by V BE , then it continues through the circuit and passes through a buffer (NMOS device) to provide the needed isolation and buffering required and thereby provides the output POUTP. This is an example of the I channel detector. The circuit 102 is identical to that of 104 and is for the Q channel. The remaining detector 106 is also similar to the others, except that the input is V cc . 
     The purpose for detector 106 is to provide a reference point for taking measurements with respect to the corresponding parts of the outputs. Since the outputs at pins 15, 16, 21, and 22 (FIG. 9) are differentials, we measure the output at pin 15 with respect to the output at pin 16, and measure the output at pin 21 with respect to the output at pin 22. Thus, the outputs at pins 16 and 22 become the reference points or common points for our measurements. Therefore, detector 106 provides the needed DC reference to pins 16 and 22 by not being a variable signal but rather a fixed V cc  in this case. 
     Detector 106 includes a current mirror consisting of QPK4, an npn device, and QPK5, a diode connector. A DC current PKCUR (DC biasing current) is injected into the circuit at this point, and the current mirror of QPK4 and QPK5 generates a DC voltage at POUTB which will then be the difference, or reference for making measurements. So the measurements will then be made between the POUTN, for example, and POUTB for the Q channel, and in the other case for the I channel, the measurement is done between POUTP and POUTB. 
     The transmitter mixers have unequal gains (T i  &amp; T q ) and include offset voltages (V fi  &amp; V fq ) at the transmitter inputs. The respective local oscillator (LO) signals are a few degrees off quadrature as indicated by variable α. The communications channels introduce another unknown phase shift indicated by β, and the receiver mixers have unequal gains (R i  &amp; R q ). Moreover, the receivers introduce unknown overall offset voltages V offq  &amp; V offi  for the Q and I channels, respectively. (FIG. 9) 
     As a result of these variables, we have to come up with a set of measurements that result in the extraction of these variable parameters. For the purpose of this analysis we will assume that the input signals are I and Q and the output signals, after the loop back, are I o  and Q o . We also define the transmitter gain mismatch D T  =T i  /T q  and the receiver gain mismatch D R  =R i  /R q . It can then be shown that the signals coming out of the receiver blocks (Rx) before low pass filtering are: 
     
         [(E+v.sub.fi)T.sub.i Cos(ωt+α+β)+(Q+v.sub.fq)T.sub.q Sin(ωt+β)].R.sub.q Sin(ωt)+V.sub.offq    (1) 
    
     
         [(I+v.sub.fi)T.sub.i Cos(ωt+α+β)+(Q+v.sub.fq)T.sub.q Sin(ωt+β)].R.sub.i Cos(ωt+α)+V.sub.offi(2) 
    
     Expansion of these equations provides multiple components of 2ωt. Thus, when we low pass filter these signals, the 2ωt components are canceled out and the resulting signals at the I and Q outputs should be: 
     
         -I=0.5[(I+v.sub.fi)T.sub.i R.sub.i Cos(β)+(Q+v.sub.fq)T.sub.q R.sub.i Sin(β-α)]+V.sub.offi                           (3) 
    
     
         Q.sub.o =0.5[(I+v.sub.fi)T.sub.i R.sub.q (-Sin(α+β))+(Q+v.sub.fq)T.sub.q R.sub.q Cos(β)]+V.sub.offq (4) 
    
     There are 10 unknowns in the above equations (1-4). Since there are four possible inputs, one might assume that making appropriate assumptions about two of the variables (given the four vector positions of I &amp; Q) all of the unknowns can be calculated by solving the resulting set of 8 equations. Unfortunately, however, the resulting equations are not independent. Thus, we need further data to solve for the variable parameters. 
     If we were to assume there is a possibility of turning off only one of the I and Q channel sides in the transmitter circuit, more equations can be obtained. Thus, if we turn off the Q side and leave the I side active, we arrive at the following two output equations: 
     
         [(I+v.sub.fi)T.sub.i Cos(ωt+α+β)].R.sub.i Cos(ωt+α)+V.sub.offi                          (5) 
    
     
         [(I+v.sub.fi)T.sub.i Cos(ωt+α+β)].R.sub.q Sin(ωt)+V.sub.offq                                  (6) 
    
     Then again, expanding these equations and then low pass filtering to remove the 2ωt components, the resulting signals at the I and Q outputs would be: 
     
         I.sub.oi =0.5[(I+v.sub.fi)T.sub.i R.sub.i Cos(β)]+V.sub.offi (7) 
    
     
         Q.sub.oi =0.5[(I+v.sub.fi)T.sub.i R.sub.q (-Sin(α+β))]+V.sub.offq                        (8) 
    
     Now, if we turn off the I side of the transmitter and leave the Q side active, we arrive at the following equations: 
     
         [(Q+v.sub.fq)T.sub.q Sin(ωt+β)].R.sub.i Cos(ωt+α)+V.sub.offi                          (9) 
    
     
         [(Q+v.sub.fq)T.sub.q Sin(ωt+β)].R.sub.q Sin(ωt)+V.sub.offq (10) 
    
     Again, expanding these equations and then low pass filtering the signals to remove the 2ωt components, the resulting signals at the I and Q outputs would be: 
     
         I.sub.oq =0.5[(Q+v.sub.fq)T.sub.q R.sub.i Sin(β-α)]+V.sub.offi (11) 
    
     
         Q.sub.oq =0.5[(Q+v.sub.fq)T.sub.q R.sub.q Cos(β)]+V.sub.offq (12) 
    
     With these equations, we can begin to calculate the unknowns. 
     Receiver Offset Voltages 
     Again by enabling the I and Q path of the transmit section independent of each other, we can determine the receiver offset voltages V offi  and V offq  for the I and Q channels, respectively. 
     
         V.sub.offi =I.sub.o -I.sub.oq -I.sub.oi                    (13) 
    
     
         V.sub.offq =Q.sub.o -Q.sub.oq -Q.sub.oi                    (14) 
    
     Transmitter Gain Mismatch 
     In this case we use envelope detectors 102, 104, and 106 (FIG. 9) to find the signal level coming out of the transmitter. Therefore we define E di  as the I channel signal level, E dq  as the Q channel signal level and E Vcc  as the reference signal. 
     
         E.sub.di =V.sub.cc -V.sub.BE -V.sub.GS +(IT.sub.i).sub.peak (15) 
    
     
         E.sub.dq =V.sub.cc -V.sub.BE -V.sub.GS +(QT.sub.q).sub.peak (16) 
    
     
         E.sub.V.sbsb.cc =V.sub.cc -V.sub.BE -V.sub.GS              (17) 
    
     it is now clear from the above that the transmitter gain ratio will be: 
     
         D.sub.T =ζ(E.sub.di -E.sub.V.sbsb.cc /ζ(E.sub.dq -E.sub.V.sbsb.cc)(18) 
    
     where the function ζ extracts a DC level proportional to the AC component of the signal. 
     If we assume that the transmitter input voltages are BG &amp; 0 (case 1) and 0 &amp; BG (case 2) then a second way to calculate the same signal is to use the following equation, 
     
         D.sub.T =(E.sub.di1 +E.sub.di2 -2E.sub.V.sbsb.cc)/(E.sub.dq1 +E.sub.dq2 -2E.sub.V.sbsb.cc)                                        (19) 
    
     In this case, the transmitter inputs are driven by static low or high signals as opposed to the previous case where a dynamic input vector was needed. 
     Transmitter Offset Voltages 
     If we assume that the transmitter input voltages are BG &amp; 0 (case 1) and 0 &amp; BG (case 2) then the offset voltage can be calculated from 
     
         V.sub.fi =V.sub.BG (E.sub.di1 -E.sub.di2)/(E.sub.di1 +E.sub.di2 -2E.sub.V.sbsb.cc)                                        (20) 
    
     
         V.sub.fq =V.sub.BG (E.sub.dq1 -E.sub.dq2)/(E.sub.dq1 +E.sub.dq2 -2E.sub.V.sbsb.cc)                                        (21) 
    
     Calculating the α and β phase errors The base band input signals I and Q each may be assigned two values which we call H and L. As such, the following equations are derived: 
     
         I.sub.oiH -I.sub.oiL =0.5[(H-L)T.sub.i R.sub.i Cos(β)](22) 
    
     
         I.sub.oqH -I.sub.oqL =0.5[(H-L)T.sub.q R.sub.i Sin(β-α)](23) 
    
     
         Q.sub.oiH -Q.sub.oiL =0.5[(H-L)T.sub.i R.sub.q (-Sin(α+β))](24) 
    
     
         Q.sub.oqH -Q.sub.oiL =0.5[(H-L)T.sub.q R.sub.q Cos(β)](25) 
    
     
         (I.sub.oqH -I.sub.oqL)/(I.sub.oiH -I.sub.oiL)=(T.sub.q /T.sub.i)(Sin(β-α)/Cos(β))                (26) 
    
     
         (Q.sub.oiH -Q.sub.oiL)/(Q.sub.oqH -Q.sub.oqL)=(T.sub.i /T.sub.q)(-Sin(α+β)/Cos(β))               (27) 
    
     If we define two more auxiliary variables X and Y such that 
     
         (I.sub.oqH -I.sub.oqL)/(I.sub.oiH -I.sub.oiL)=(T.sub.q /T.sub.i)Y(28) 
    
     
         (Q.sub.oiH -Q.sub.oiL)/(Q.sub.oqH -Q.sub.oqL)=(T.sub.i /T.sub.q)(-X)(29) 
    
     
         Y=Sin(β-α)/Cos(β)                          (30) 
    
     
         X=Sin(α+β)/Cos(β)                          (31) 
    
     
         Y Cos(β)=Cos(α)Sin(β)-Cos(β)Sin(α)(32) 
    
     
         X Cos(β)=Cos(α)Sin(β)+Cos(β)Sin(α)(33) 
    
     The values of α and β can then be easily calculated to be: 
     
         α=Sin.sup.-1 [(X-Y)/2]                               (34) 
    
     
         β=tg.sup.-1 [(X+Y)/(2 Cos(α))]                  (35) 
    
     Receiver Gain Mismatch 
     From the equations obtained above, the receiver gain mismatch D R  will be obtained from the following equations: 
     
         D.sub.R D.sub.T =(I.sub.oiH -I.sub.oiL)/(Q.sub.oqH -Q.sub.oqL)(36) 
    
     where D T  and D R  were previously defined to be D T  =T i  /T q  and D R  =R i  /R q . 
     In order to perform these calculations and determine the unknowns, it is necessary to have control over the I &amp; Q channels independently, in addition to enabling the activation and deactivation of the receiver section. This control is provided by logic control signals TC5, TC6, TC7, TC10 and TC11. (FIG. 9) These logic signals actually enable and disable the different paths of the circuit and thereby allow more measurements to be obtained. 
     The logic control signals are provided from a microprocessor, or other form of intelligence, within the cellular phone upon initiation of a call. Upon initiation, these control signals become part of the input and the measurements are taken to determine what errors are present in the channels and circuit. These error determinations are based on the present conditions such as, for example, temperature, location, etc. Once the measurements are made and calibration is complete, the need for the logic signals is complete. 
     Control signal TC5 activates the loop back (feedback) of a small part of the transmit signal into the receiver, and thereby allows calibration measurements to be taken. A high TC5 signal enables the loop back of the transmit signal. Once the calibration is complete, TC5 goes low and deactivates the loop back condition. Signals TC6 and TC7 control the turning on and off of the I and Q channels of the transmitter block independent of each other. As explained earlier, this enables the determination of additional equations (5-14), and the subsequent calculation of the error components. The signal definition for control signals TC6 and TC7 can be as follows: 
     
         ______________________________________TC6  TC7______________________________________L    L         Transmit I &amp; Q channel powered upL      H        Transmit I channel powered up, Q powered downH      L        Transmit Q channel powered up, I powered downH      H        Transmit I &amp; Q channel powered up______________________________________ 
    
     Control signal TC10 enables the discharge of the capacitors in peak detectors 102, 104, and 106. Every time a new call is initiated, and a new set of measurements need to be taken, the capacitors within peak detectors 102, 104, and 106 must be discharged because there may still be information from previous measurements stored therein. Thus, upon initiation of the call, control signal TC10 discharges these capacitors by simply shorting them out. When TC10 is low, the detectors are left open, and when TC10 is high, the detector capacitors are shorted. 
     Control signal TC11 enables the deactivation of the receiver section Rx in order to take the necessary measurements in the transmitter portion. Thus, when TC11 is low, the receiver section is powered up, and when it is high, the receiver section is powered down. 
     While one embodiment of the present invention has been shown and described, it is to be understood that many changes and modifications may be made thereunto without departing from the spirit and scope of the invention as defined in the appended claims.