The function `iqimbal2coef`

is
a supporting function for the `comm.IQImbalanceCompensator`

System object™.

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:

where,

The output of the function is *w*_{2}/*w*_{1}.
To exactly obtain the original signal, the compensator output needs
to be scaled and rotated by the complex number *w*_{1}.

**Note**

There are cases for which the output of `iqimbal2coef`

is unreliable.

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°, *w*_{1} =
0 and *w*_{2} =
1i; therefore, the compensator takes the form of *y* =
1*i**conj(*x*).