Documentation

This is machine translation

Translated by Microsoft
Mouseover text to see original. Click the button below to return to the English verison of the page.

Note: This page has been translated by MathWorks. Please click here
To view all translated materals including this page, select Japan from the country navigator on the bottom of this page.

iqcoef2imbal

Convert compensator coefficient to amplitude and phase imbalance

Syntax

[A,P] = iqcoef2imbal(C)

Description

example

[A,P] = iqcoef2imbal(C) converts compensator coefficient C to its equivalent amplitude and phase imbalance.

Examples

collapse all

Use iqcoef2imbal to estimate the amplitude and phase imbalance for a given complex coefficient. The coefficients are an output from the step function of the IQImbalanceCompensator.

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 using the comm.IQImbalanceCompensator System object. Set the compensator object such that the complex coefficients are made available as an output argument.

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

Estimate the imbalance from the last value of the compensator coefficient.

[ampImbEst,phImbEst] = iqcoef2imbal(coef(end));

Compare the estimated imbalance values with the specified ones. Notice that there is good agreement.

[ampImb phImb; ampImbEst phImbEst]
ans = 

    2.0000   15.0000
    2.0178   14.5740

Input Arguments

collapse all

Coefficient used to compensate for an I/Q imbalance, specified as a complex-valued vector.

Example: 0.4+0.6i

Example: [0.1+0.2i; 0.3+0.5i]

Data Types: single | double

Output Arguments

collapse all

Amplitude imbalance in dB, returned as a real-valued vector with the same dimensions as C.

Phase imbalance in degrees, returned as a real-valued vector with the same dimensions as C.

More About

collapse all

I/Q Imbalance Compensation

The function iqcoef2imbal is a supporting function for the comm.IQImbalanceCompensator System object™.

Given a scaling and rotation factor, G, compensator coefficient, C, and received signal, x, the compensated signal, y, has the form

y=G[x+Cconj(x)].

In matrix form, this can be rewritten as

Y=RX,

where X is a 2-by-1 vector representing the imbalanced signal [XI, XQ] and Y is a 2-by-1 vector representing the compensator output [YI, YQ].

The matrix R is expressed as

R=[1+Re{C}Im{C}Im{C}1Re{C}]

For the compensator to perfectly remove the I/Q imbalance, R = K-1 because X=KS, where K is a 2-by-2 matrix whose values are determined by the amplitude and phase imbalance and S is the ideal signal. Define a matrix M with the form

M=[1αα1]

Both M and M-1 can be thought of as scaling and rotation matrices that correspond to the factor G. Because K = R-1, the product M-1 R K M is the identity matrix, where M-1 R represents the compensator output and K M represents the I/Q imbalance. The coefficient α is chosen such that

KM=L[Igaincos(θI)Qgaincos(θQ)Igainsin(θI)Qgainsin(θQ)]

where L is a constant. From this form, we can obtain Igain, Qgain, θI, and θQ. For a given phase imbalance, ΦImb, the in-phase and quadrature angles can be expressed as

θI=(π/2)(ΦImb/180)θQ=π/2+(π/2)(ΦImb/180)

Hence, cos(θQ) = sin(θI) and sin(θQ) = cos(θI) so that

L[Igaincos(θI)Qgaincos(θQ)Igainsin(θI)Qgainsin(θQ)]=L[Igaincos(θI)Qgainsin(θI)Igainsin(θI)Qgaincos(θI)]

The I/Q imbalance can be expressed as

KM=[K11+αK12αK11+K12K21+αK22αK21+K22]=L[Igaincos(θI)Qgainsin(θI)Igainsin(θI)Qgaincos(θI)]

Therefore,

(K21+αK22)/(K11+αK12)=(αK11+K12)/(αK21+K22)=sin(θI)/cos(θI)

The equation can be written as a quadratic equation to solve for the variable α, that is D1α2 + D2α + D3 = 0, where

D1=K11K12+K22K21D2=K122+K212K112K222D3=K11K12K21K22

When |C| ≤ 1, the quadratic equation has the following solution:

α=D2D24D1D32D1

Otherwise, when |C| > 1, the solution has the following form:

α=D2+D24D1D32D1

Finally, the amplitude imbalance, AImb, and the phase imbalance, ΦImb, are obtained.

K=K[1αα1]AImb=20log10(K11/K22)ΦImb=2tan1(K21/K11)(180/π)

Note

  • If C is real and |C| ≤ 1, the phase imbalance is 0 and the amplitude imbalance is 20log10((1–C)/(1+C))

  • If C is real and |C| > 1, the phase imbalance is 180° and the amplitude imbalance is 20log10((C+1)/(C−1)).

  • If C is imaginary, AImb = 0.

Extended Capabilities

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

Introduced in R2014b

Was this topic helpful?