Sdrsharp auto I/Q balance correction

Has anyone look at the way sdrsharp does automatic I/Q balance
correction?

It seems to iterate over an FFT, looking to maximize the difference
between bins and their images. But that badly fails when the incoming
signal

has symmetric spectral features–the algorithm could badly screw up
and remove spectral features that are there in the signal, rather than
being images present due to poor I/Q balance.

But it’s late, and I’m not sure if I’m interpreting this optimization
strategy correctly:


Marcus L.
Principal Investigator
Shirleys Bay Radio Astronomy Consortium
http://www.sbrac.org

On Thu, Apr 5, 2012 at 5:26 AM, Marcus D. Leech [email protected]
wrote:

Hi Marcus,

I believe this explanation by the author clarifies the issue you raise:
http://www.reddit.com/r/RTLSDR/comments/uje3q/sample_python_code_and_results_for_iq_correction/c4w47bt

Alex

Hi Marcus,

You’re the very first person to ask this question and I’m very pleased
to contribute my 2cts.
The energy of every FFT bin contains a fraction of the legitimate signal
and another fraction of the energy of the mirror signal. The algorithm
maximizes the difference between every symmetrical bins using a trial
and error scheme.
In absence of IQ imbalance, the partial derivatives of the objective
function, with respect to the phase and gain, are null for any input
signal. The algo won’t change the phase and gain error as there’s no
improvement of the situation.
In presence of imbalance, the phase and gain error variables are bumped
by a small amount, and the function is evaluated again. Suppose we have
two legitimate signals at symmetrical bins. The change of the objective
function will only reflect the evolution of the imbalance. After many
iterations, the algo will converge to some point that maximizes the
distance between signals and their images.
One important detail: We’re evaluating the function for the whole
spectrum. This means the phase and gain errors constitute an average
point. A direct implication is that the algo cannot relax the imbalances
that are dependent on the frequency. I have successfully tested a new
version of the current algo that fixes the issue. Some screenshots:
http://sdrsharp.com/downloads/frequency-dependent-imbalance-direct.png
http://sdrsharp.com/downloads/frequency-dependent-imbalance-corrected.png
http://sdrsharp.com/downloads/frequency-dependent-imbalance.png

Youssef