Main Content

iqimbal2coef

Convert I/Q imbalance to compensator coefficient

Description

C = iqimbal2coef(A,P) converts an I/Q amplitude and phase imbalance to its equivalent compensator coefficient.

example

Examples

collapse all

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 raised cosine transmit filter System object.

txRCosFilt = comm.RaisedCosineTransmitFilter;

Modulate and filter random 64-ary symbols.

M= 64;
data = randi([0 M-1],100000,1);
dataMod = qammod(data,M);
txSig = txRCosFilt(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.

iqComp = comm.IQImbalanceCompensator('CoefficientOutputPort',true);
[compSig,coef] = iqComp(rxSig);

Compare the final compensator coefficient to the coefficient generated by the iqimbal2coef function. Observe that there is good agreement.

idealcoef = iqimbal2coef(ampImb,phImb);
[coef(end); idealcoef]
ans = 2×1 complex

  -0.1137 + 0.1296i
  -0.1126 + 0.1334i

Input Arguments

collapse all

Amplitude imbalance in dB, specified as a real-valued row or column vector.

Example: 3

Example: [0; 5]

Data Types: double

Phase imbalance in degrees, specified as a real-valued row or column vector.

Example: 10

Example: [15; 45]

Data Types: double

Output Arguments

collapse all

Coefficient that perfectly compensates for the I/Q imbalance, returned as a complex-valued vector having the same dimensions as A and P.

More About

collapse all

Extended Capabilities

expand all

C/C++ Code Generation
Generate C and C++ code using MATLAB® Coder™.

Version History

Introduced in R2014b