# QAM Constellation Construction - Basic 4/8 QAM

I wanted to know how to construct the set of amplitudes/phase for QAM modulation. I saw that a QAM signal can be represented as: $$s_m(t)=A_{mi}g(t)\cos(2\pi f_c t)-A_{mq}g(t)\sin(2\pi f_c t)$$ where $A_{mi}$ and $A_{mq}$are two amplitude levels and $g(t)$ is the pulse. The resultant amplitude is given by: $$A_{ra}=\sqrt{A_{mi}^2+A_{mq}^2}$$

And the resultant phase is given by: $$\theta_m=\arctan\left(\frac{A_{mi}}{A_{mq}}\right)$$

Given the above, what values should I take for the amplitude levels so that I will get the resultant amplitude and phase?

I tried generating the amplitude and phase values for simple 4 QAM by taking 2 different amplitude levels and 2 different phase levels like below: $$A_{mi}=\left\{-1, 1\right\}, \quad A_{mq}=\left\{-1, 1\right\}$$

Then plotted the 4 possibilities (which seems pretty overlapping): Its clear that I need to take different amplitude levels for inphase and quadrature carriers. But is there any generalized formula for $A_{mi}$ and $A_{mq}$ so that I can generate my resultant amplitude and phase for QAM?

$$\begin{array}{|c|c|c|c|} \hline A_{mi} & A_{mq} & A_{ra} & \theta_m\\\hline -1 & -1 & \sqrt 2 & \frac \pi4\\\hline -1 & 1 & \sqrt 2 & -\frac \pi4\\\hline 1 & -1 & \sqrt 2 & -\frac \pi4\\\hline 1 & 1 & \sqrt 2 & \frac \pi4\\\hline \end{array}$$

• The phase is not arctan(y/x) but arctan(x,y) also known as atan2 function – Dilip Sarwate Jun 2 '17 at 13:56

You can choose any mapping that you desire from your unique data sequences to the symbol locations on the QAM constellation. It is common and usually best to Gray-code the mapping such that only one bit changes between adjacent constellation locations (those with minimum Euclidean distance). This way if there is a symbol error due to noise crossing an immediate decision threshold, there will only be one bit error.

See figure below showing the common mapping for QAM using Gray Coding from Wikipedia under "Gray Coding". Notice that the adjacent constellation points only differ by one bit. Under AWGN conditions at threshold error conditions with equi-probable symbols only one bit error would result with this mapping approach (the optimum error boundaries with equi-probable constellation points are mid way between the points shown).

For Gray-coded QPSK the mapping is quite trivial as illustrated by the figure from this link:

And here is a link to a simulation showing the significance in BER performance when Gray-coding QPSK.

The amplitude and phase for each possible symbol is directly taken from the constellation's I and Q values as shown in the diagrams above, and as traditionally done for any complex I, Q pair:

The amplitude is

$$A= \sqrt{I^2+Q^2}$$

And the phase is:

$$\phi = \mathrm{atan2}(Q,I)$$

• Arbitrary mappings work but don't result in QAM because the signals cannot be represented as two amplitude-modulated signals in phase quadrature as the OP wants. – Dilip Sarwate Jun 2 '17 at 14:06
• I meant arbitrary assignments of bit patterns to the standard QAM constellations all of which can be represented as two AM signals – Dan Boschen Jun 2 '17 at 22:24
• Yes, but the standard interpretation of QAM is that the $I$ bit and the $Q$ bit modulate phase-orthogonal carriers while with arbitrary assignments, (which always makes the $01$ point and the $10$ point adjacent instead of diametrically opposite as with Gray coding assignment), one of $I$and $Q$ is modulated onto one carrier while the other carrier carries $I\oplus Q$. Yes, the signals are amplitude modulated, and they are in phase quadrature but to say that it is QAM in the generally understood meaning of the term is a bit of a stretch – Dilip Sarwate Jun 3 '17 at 19:40
• I am not sure I follow Dilip so added a picture to clarify my answer. Gray Coding with QAM is quite common so not yet sure what you are getting at- do you think my answer is not correct? – Dan Boschen Jun 3 '17 at 22:56
• The edit looks at Gray-coded 16QAM whereas the question is about 4-QAM (and maybe 8-QAM), and the issue is your assertion that an arbitrary mapping of $(I,Q)$ to the 4 constellation points is 4-QAM in the usual sense of the term. WLOG, a non-Gray coded assignment labels the four points (going counterclockwise around the circle) as $00, 10, 01, 11$ which increases BER and also means that $I\oplus Q$ modulates the inphase carrier while $Q$ modulates the quadrature carrier, which is not standard 4-QAM both from BER perspective as well as implementation perspective. – Dilip Sarwate Jun 5 '17 at 20:59