# IQ imbalance amplitude

I have to fix the amplitude of measured IQ receiver data. According to my information about the data, I can estimate that one signal needs to be corrected to the other in amplitude. The phase offset/imbalance can be ignored in this case. I would like to implement this in MATLAB. At the moment my I/Q signal looks like this:

I would like to correct it, that is shows a circle (would be the ideal result). But until now, I found no direct way to do that. I have no possibility to train or measure the amplitude imbalance from the I/Q receiver direclty. I have only the data. What have I to do, to normalize the Q component that the chart shows a circle?

I have already tried to calculate the amplitude offset: o=sqrt(Q^2/(1-I^2)), but this doesn't work. Both signals have a small DC offset (really small, about $10^{-4}$ in relation to values between $0$ and $1$), but this is not relevant.

• How do you know it's pure scaling IQ imbalance? Feb 5, 2016 at 14:31
• Try to plot the complex spectrum of the signal, then you will have an image on the negative frequency if you have IQ errors. Aug 3, 2016 at 22:54

What it looks like you are experiencing is carrier offset and not IQ imbalance, at least from this view that you show. Looking at the scale of the two axis it looks balanced and it is just that each axis is drawn at a different scale?

See my example plot below of QPSK before and after proper carrier recovery. Note that it also helps to show the correct symbol locations (from your timing recovery which can be done under carrier offset conditions), which are indicated by the red dots in the plot.

For more details on implementations to remove the carrier offset please see my post here:

High modulation index PSK - carrier recovery

I am interested in what particular modulation you are actually using as there may be more direct methods we could suggest, even a cross correlation of your signal with a delayed version of itself can reveal the frequency offset for example, such as depicted in the figure below), which I would be tempted to do in a post processing analysis for quickly accessing what the carrier is, that or just discerning the rate of rotation from the trajectory:

Once you successfully "stop it from spinning", here are practical techniques to remove offset errors (amp and phase imbalance) if you indeed have that problem:

First, this is what IQ imbalance would look like (in addition you could also have a "DC offset" which would appear as a stronger carrier in your spectrum):

And here is a simple technique for IQ imbalance correction:

With the techniques to establish the $\alpha$ and $\beta$ coefficients in the plots below:

• Could you provide the closed-form formula for $\alpha$ ?. I have implemented the algorithm in C++ and somehow alpha becomes NaN. May 14, 2019 at 15:54
• It is the avg of the absolute value of your Q samples, divided by the average of the absolute value of your I samples. The exponential averager is one way of taking the average where k is a number close to but less than 1. The closer you get to 1, the longer the averaging time (but also the more you need to be careful about precision especially if working in fixed point). May 14, 2019 at 17:14
• The exponential averager is given by y[n] = (1-k) x[n] + k y[n-1]. In the end, if the mean of the absolute value of the I and Q samples are equal, then alpha would be 1 indicating amplitude balance. May 14, 2019 at 17:19
• Thanks. One more question: To my understanding, I/Q imbalance is a fairly constant quantity with respect to time. Is it possible to calculate the correction parameters once and use them for correction during the entire communication chain instead of calculating them continuously? May 16, 2019 at 14:17
• @MosesBrowneMwakyanjala sorry just noticed your question now. Yes of course. This is equivalent to the consideration if you need a dynamic or static equalizer for any distortion source. A filter with fixed coefficients would be the example of a static solution. Mar 5, 2020 at 12:05

There's a lot of papers out there on IQ imbalance corrections out there, but from a practical background I know that the typical way to calibrate this IQ imbalance, if it really can be sufficiently modeled as non-unity scalar factor between the I and Q amplitudes by observing a complex signal with known moments.

This, in the devices I know is done by disconnecting the actual antenna input, and just measuring Johnson-Nyquist (aka thermal) noise -- that should be uncorrelated and having the same magnitude on both I and Q.

Then, observing the resulting digital signal for a while, calculating the ratio of I and Q magnitude squares and thus calculating the inverse of the correction factor is what suffices in correcting these kind of hardware impairments.

There's a whole GNU Radio module dedicated to cancelling that out later on -- have a look at gr-iqbal's source code.

• I see your point, but I cannot disconnect the antenna. I have only the given data (I and Q). The idea of calculating a correction factor based on I^2+Q^2 = 1 is known to me. I have tested that, but it does not work the way I would expect it (result: like in the picture above).
– m79
Feb 5, 2016 at 14:24
• well, the problem is that you need to estimate the I and Q imbalance based on what you can observe. If you know your signal should have the same variance on I and Q, then considering the $\frac{\sum I^2}{\sum Q^2}$ should give you a viable correction factor. If that doesn't help, your model of hardware impairment is not correct, and you will need to refine it. Feb 5, 2016 at 14:30
• @m79 by the way, I can't really spot that kind of pure scaling imbalance in your constellation plot. Feb 5, 2016 at 14:31
• The phase imbalance can be ignored in my case. I have tried your equation in matlab, but the result is still same. Maybe I have missunderstood something. My code: signal1 = signal1./max(abs(signal1)); signal2 = signal2./max(abs(signal2)); correct = sum(signal1.^2)/sum(signal2.^2); signal2 = signal2./correct; out = signal1+1i*signal2;
– m79
Feb 5, 2016 at 17:07
• The variance of I and Q is nearly equal.
– m79
Feb 5, 2016 at 17:10

Is this just a problem of how you've plotted it in Matlab? Try axis square or see Matlab help on Control Ratio of Axis Lengths and Data Unit Lengths