### Problem

Why, when assembling an I/Q modulator or demodulator using MIXER_B/MIXER_F, is a phase shift of +90 degrees applied to the LO signal rather than -90 degrees?

### Solution

In an ideal I/Q modulator or demodulator, the I channel is mixed with cos(2Ï€ fLO t), while the Q channel is mixed with -sin(2Ï€ fLO t):

Using the identity:

cos(fLO = cos(s)Â·cos(t) - sin(s)Â·sin(t)

We can relate -sin(2Ï€fLOt) to cos(2Ï€fLOt) by:

cos(fLO + Ï€/2) = cos(fLO)Â·cos(Ï€/2) - sin(fLO)Â·sin(Ï€/2) = -sin(fLO)

Therefore, applying a 90 degree phase shift to cos(2Ï€fLOt) is identical to -sin(2Ï€fLO t).