Let us assume we have $16$ symbols to transmit. We can represent these $16$ symbols by $16$ unique signals and transmit. If at the receiver we can identify these $16$ signals correctly, we have identified the symbols transmitted correctly. I have used qammod([0:15],16,0) in MATLAB and got the output that is attached here.

>> a = qammod([0:15],16,0); a'

ans =

  -3.0000 - 3.0000i
  -3.0000 - 1.0000i
  -3.0000 + 1.0000i
  -3.0000 + 3.0000i
  -1.0000 - 3.0000i
  -1.0000 - 1.0000i
  -1.0000 + 1.0000i
  -1.0000 + 3.0000i
   1.0000 - 3.0000i
   1.0000 - 1.0000i
   1.0000 + 1.0000i
   1.0000 + 3.0000i
   3.0000 - 3.0000i
   3.0000 - 1.0000i
   3.0000 + 1.0000i
   3.0000 + 3.0000i

$0,1,\ldots,15$ represent the $16$ symbols. $16$ represents the number of symbols or the number of unique signals - sinusoids with different amplitudes and phases - to be transmitted. $0$ represents the offset phase.

Now I want to interpret the output. I actually got $16$ complex numbers.

  • What do they represent?
  • What are the magnitude, phase, real part and imaginary part of these complex numbers that they represent? I guess they represent the parameters of sinusoidal signals.
  • In both the real and imaginary parts we see $-1, -3 , 1$ and $3$. We do not see $-2, 0$ and $2$. Why?
  • 1
    $\begingroup$ I am afraid that this question is more about understanding the constellation diagram, rather than MATLAB's qammod function specifically. It would be good to know a little bit more about what you are trying to achieve. For example, is this a homework question? Are you trying to model a comms system? Is the constellation diagram the objective or part of what you are trying to do? I would suggest that the title is modified first to better reflect the content of the question. $\endgroup$
    – A_A
    May 29, 2016 at 6:31
  • $\begingroup$ This is for self-study/learning. This is not home work question. I was just going through how MATLAB can be used for communication systems. $\endgroup$ May 29, 2016 at 9:58

1 Answer 1


This is a basic question about how passband pulse-amplitude-modulation (PAM) works. It has nothing to do specifically with QAM, but it applies to any type of passband PAM (such as PSK, or any other choice of a constellation).

The question is how to obtain a transmit signal from a given point in a constellation diagram. Let's say that at time $t=kT$ we want to transmit a signal corresponding to the point $a_k$ in the constellation diagram, where $a_k$ is a complex number:


The complex number is multiplied by a (real-valued) transmit pulse $g(t)$ and by a complex carrier, and the transmitted signal is the real part of that complex-valued signal:


In practice you transmit a sequence of symbols, and the corresponding transmitted signal is given by


As you can see from $(1)$ and $(2)$, the transmitted signal can be represented either as two amplitude-modulated orthogonal carriers (sine and cosine), or as an amplitude and phase modulated carrier. In the first case the real and imaginary parts of $a_k$ determine the amplitudes of the two carriers, and in the second case the magnitude $|a_k|$ determines the amplitude of the carrier, and $\phi_k=\arg\{a_k\}$ is the phase of the carrier.

  • $\begingroup$ @ Matt L: That is a wonderful explanation. I am now clear. Constellation diagram is the drawing of these $a_k$, isn't it? Now when noise is added to the transmitted signal, can the corrupted signal be represented in this diagram, I mean some $b_k$? It is no longer the pure sinusoids. $\endgroup$ May 29, 2016 at 10:23
  • $\begingroup$ @SeethaRamaRajuSanapala: Yes, after demodulation you end up with complex symbols and if there's noise, these symbols can be anywhere in the complex plane. Have a look at this figure. The decision circuit maps these noisy symbols to the known symbols (the ones that were transmitted), but of course there will be errors if the noise is sufficiently strong compared to the signal level. $\endgroup$
    – Matt L.
    May 29, 2016 at 10:37
  • $\begingroup$ @ Matt L:You explain things so well I want to make my question more specific. If $s_k(t)$ is transmitted, the decoding circuit may be intelligent enough to associate it with $a_k$, Now if $s_k(t)+n(t)$ is received where $n(t)$ is noise, what will the corrupted received signal be associated with? Which $b_k$, basically what is the logic of the decoding used? How will it decide on the point in the scatter diagram (is it the right word?)?. Of course, once the point is decided, the natural decision would be to associate it with the closest $a_k$. $\endgroup$ May 29, 2016 at 11:59
  • $\begingroup$ @SeethaRamaRajuSanapala: You don't actually "decide" on the received points $b_k$; they are just the result of your demodulation and sampler. A simple receiver filters out some noise, then it demodulates the signal down to base-band, and samples the continuous-time input. The result of sampling the baseband signal are complex constellation points $b_k$ (because you actually sample two signals: in-phase and quadrature). The decoder then decides which symbols $a_k$ probably caused the received $b_k$. You're right that choosing the closest $a_k$ is a practical and often-used strategy. $\endgroup$
    – Matt L.
    May 29, 2016 at 12:07
  • $\begingroup$ @ Matt L:i used "decide" in the sense of demodulation. Your modulation equations are very well understood by me. Thanks for your efforts. Do such simple counterpart equations exist for demodulation? $\endgroup$ May 29, 2016 at 16:11

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.