Convert I/Q imbalance to compensator coefficient
C = iqimbal2coef(A,P)
Generate coefficients for the I/Q imbalance compensator System object™ using
iqimbal2coef. The compensator corrects for an I/Q imbalance using the generated coefficients.
Create a QAM modulator and a raised cosine transmit filter to generate a 64-QAM signal.
hMod = comm.RectangularQAMModulator('ModulationOrder',64); hTxFilter = comm.RaisedCosineTransmitFilter;
Modulate and filter random 64-ary symbols.
data = randi([0 63],100000,1); dataMod = step(hMod,data); txSig = step(hTxFilter,dataMod);
Specify amplitude and phase imbalance.
ampImb = 2; % dB phImb = 15; % degrees
Apply the specified I/Q imbalance.
gainI = 10.^(0.5*ampImb/20); gainQ = 10.^(-0.5*ampImb/20); imbI = real(txSig)*gainI*exp(-0.5i*phImb*pi/180); imbQ = imag(txSig)*gainQ*exp(1i*(pi/2 + 0.5*phImb*pi/180)); rxSig = imbI + imbQ;
Normalize the power of the received signal.
rxSig = rxSig/std(rxSig);
Remove the I/Q imbalance by creating and applying a
comm.IQImbalanceCompensator object. Set the compensator such that the complex coefficients are made available as an output argument.
hIQComp = comm.IQImbalanceCompensator('CoefficientOutputPort',true); [compSig,coef] = step(hIQComp,rxSig);
Compare the final compensator coefficient to the coefficient generated by the
iqimbal2coef function. Observe that there is good argreement.
idealcoef = iqimbal2coef(ampImb,phImb); [coef(end); idealcoef]
ans = -0.1137 + 0.1296i -0.1126 + 0.1334i
A— Amplitude imbalance
Amplitude imbalance in dB, specified as a real-valued row or column vector.
P— Phase imbalance
Phase imbalance in degrees, specified as a real-valued row or column vector.
Define S and X as 2-by-1 vectors representing the I and Q components of the ideal and I/Q imbalanced signals, respectively.
where K is a 2-by-2 matrix whose values are determined by the amplitude imbalance, A, and phase imbalance, P. A is expressed in dB and P is expressed in degrees.
The imbalance can be expressed as:
Then K has the form:
The vector Y is defined as the I/Q imbalance compensator output.
For the compensator to perfectly remove the I/Q imbalance, R must be the matrix inversion of K, namely:
Using complex notation, the vector Y can be rewritten as:
The output of the function is w2/w1. To exactly obtain the original signal, the compensator output needs to be scaled and rotated by the complex number w1.
There are cases for which the output of
If the phase imbalance is ±90°, the in-phase and quadrature components will become co-linear; consequently, the I/Q imbalance cannot be compensated.
If the amplitude imbalance is 0 dB and the phase imbalance is 180°, w1 = 0 and w2 = 1i; therefore, the compensator takes the form of y = 1i*conj(x).