If you look back at my earlier post on QAM, you will notice that in the modulator(transmitter side), you will notice that we are multiplying one signal by $\sin(50x)$ and the other by $\cos(50x)$. These signals are generated by separating the original message signal into two signals, and then multiplying one by $\sin(50x)$ and the other by $\cos(50x)$. Now, in the previous post I used a sinusoidal message signal for illustration. In reality, message signals are generally NOT perfect sinusoids.

Without further ado, here is the explanation of QAM (formulation heavily adapted from Telecommunication Breakdown by Johnson&Sethares)

Let the message $m(t)$ be separated into two signals $m_1(t)$ and $m_2(t)$. Then we modulate by multiplying one by $\cos$ and the other by $\sin$. In other words, if $v(t)$ is our modulated signal, $v(t)$ is generated by the following:

$v(t)$ $= A_c$ $( m_1(t)$ $\cos(2\pi f_c t)$ $- m_2(t) \sin(2\pi f_c t) )$. This is the signal transmitted. At the receiver, in the demodulater, we duplicated the signal received: call these $x_1(t)$ and $x_2(t)$. $x_1(t)$ $= v(t) \cos(2 \pi f_ct)$ =

$A_c m_1(t) \cos^2(2 \pi f_c t) - A_c m_2(t) \sin(2 \pi f_c t) \cos(2 \pi f_c t) =$

$\frac{A_c m_1(t)}{2} (1 + \cos(4 \pi f_c t) ) - \frac{A_c m_2(t)}{2} ( \sin(4 \pi f_c t) )$. Putting this signal through a lowpass filter(filters high frequencies) gives $s_1(t) = \frac{A_c m_1(t)}{2}$, and we have recovered the message.

Now, $x_2(t) = v(t) \sin(2 \pi f_c t) = A_c m_1(t) \cos(2 \pi f_c t) \sin(2 \pi f_c t)$

$- A_c m_2(t) sin^2(2 \pi f_c t) = \frac{A_c m_1(t)}{2} \sin(4 \pi f_c t) - \frac{A_c m_2(t)}{2}(1 - \cos(4 \pi f_c t) )$. With a lowpass filter, we get $x_2(t) = \frac{-A_c m_2(t) }{2}$

We can look at some IT++ code in the future