Patent ID: 8345801

Claim:
A method, comprising: receiving an in-phase (I) signal and a quadrature (Q) signal corresponding to the I signal, the Q signal having an ideal phase offset of 90 degrees from the I signal, wherein there is a phase and gain mismatch between the I signal and the Q signal; iteratively adjusting, based on a comparison between a current IQ power and a past IQ power, a phase offset between the I signal and the Q signal to minimize an IQ power, wherein the IQ power is the average-time power of a digital baseband in-phase (DB-I) signal and a digital baseband quadrature (DB-Q) signal, corresponding to the I signal and the Q signal, respectively; adjusting a gain of the Q signal to minimize the IQ power; generating with a numerically-controlled oscillator (NCO) a first sine signal and a first cosine signal based on a frequency code; and generating with the NCO a second sine signal and a second cosine signal based on the frequency code and the phase offset, wherein the DB-I signal is generated based on the first sine signal and the second cosine signal, and wherein the DB-O signal is generated based on the first cosine signal and the second sine signal.