1
$\begingroup$

Okay I'm really confused about analyzing the waveform I generated using 16-QAM on MATLAB... I transmitted a $y = [0 \ 1 \ 2 \ 3 \ 4 \ldots \ 15]$ discrete signal (in order) to qammod function in MATLAB usign 16-QAM. Its constellation diagram is the standard 16 symbols on the combination of values of $-3,\ -1,\ 1,\ 3$ on Q and I. Then I modulated the I and Q components respectively with a cosine and sine, with a carrier frequency of $36\textrm{ kHz}$. My result is this:16-QAM

I know it follows a complex envelope, but how do I know that I got a correct waveform based on my original signal?

$\endgroup$
  • $\begingroup$ Feed the signal to a demodulator and plot the received constellation and/or eye diagrams. $\endgroup$ – MBaz Mar 30 '17 at 2:26
  • $\begingroup$ Why are you modulating it with a 36 KHz carrier? (If this is for simulation purposes, there usually is no need to add the carrier...) $\endgroup$ – Dan Boschen Mar 30 '17 at 3:02
2
$\begingroup$

Look at the magnitude and angle of the signal relative to your carrier and you should see the same thing you would see if you looked at your angle at baseband using the I and Q samples.

It is difficult to see anything with the carrier there (and I would never simulate with an actual carrier when I can do everything at baseband, just in case you put it at the carrier for simulation purposes). To inspect this waveform, I suggest rotating it to baseband by multiplying it by $e^{-j2\pi f_c t}$, low pass filter the high frequency component assuming your input was real, and then plot the complex signal on an I Q complex plot. (Real on one axis and Imaginary on the other). You should expect to see the signal moving through your 16QAM constellation points with a trajectory that depended on the pulse shaping filter used. Alternatively you could also look at the real and imaginary separately in an eye diagram.

Here are some plots I have showing that may help illustrate the different cases:

On the left is an eye diagram and the associated constellation diagram for QPSK, with two cases for the IQ (real-imaginary) constellation; one where it was derived from an incorrect sampling point (timing error) and the other where each symbol was properly sampled, as indicated by the vertical bars in the eye diagram. Note the eye diagram is simply our waveform versus time over one symbol period, plotted again and again (as in infinite hold on a scope) such that we see every possible trajectory from one symbol to the next, which is dependent on the history of all prior symbols over the memory of our channel.

On the right is the constellation diagram for 16QAM, where the large one is what it would look like with a carrier offset (similar to your case), such that it is essentially our 16 points spinning (which doesn't tell us much!), and the other is after removing the spin with $exp^{+j2\pi f_c t}$ or $exp^{-j2\pi f_c t}$ depending on which way the diagram is rotating. In your case with a real signal both spins are present, so multiply by either and low pass filter the resulting higher spin portion. One direction will have an inverted spectrum compared to other, so if you go the wrong way you may have an inverted result, but this is easy to undo by simply swapping I and Q). The smaller plot on the right is the resulting 16QAM constellation plotted as real vs imaginary of ONLY the correct sampling locations within each symbol were chosen (no timing error as in the QPSK case shown), but we do see evidence of phase error and some amplitude error (hence the spreading of the dots), as well as the possibility of other distortions such as multipath etc causing intersymbol interference; all having the effect of increasing the size of the dots in our constellation (leading to errors!).

enter image description here

Below is another example for QPSK showing the constellation and eye diagram side by side, and also showing the significance of sampling at the correct sample positions (in red) versus the overall trajectory of the waveform.

enter image description here

And finally here is an example eye diagram for 16 QAM:

enter image description here

$\endgroup$
  • $\begingroup$ Yes please illustrate an example. Thank u $\endgroup$ – LeBlanc Lord Mar 30 '17 at 2:06
2
$\begingroup$

Multiply your signal by the 36 KHz carrier (in phase with the signal you used to multiply up; basically the same signal), low pass filter to a reasonable value greater than your modulation rate (2x or more would be fool=proof) but sufficient to reject the high frequency signal at 2x36 KHz. The resulting signal will be your original QAM modulation.

$\endgroup$
  • $\begingroup$ This is still not clear to me, thank you for the help though. My question is this: what value can you set the carrier in if I sampled my input signal to an 8KHz sampling frequency and 8 bits per sample (64Kbits per second) $\endgroup$ – LeBlanc Lord Mar 31 '17 at 15:08
  • $\begingroup$ What is the symbol rate and are you using any sort of pulse shaping? The best choice would always be 1/4 the sampling rate with a real signal output as that would center your signal in the Nyquist band? And that would be most important if your sampling rate is not significantly higher than your symbol rate; but you would want to incorporate pulse shaping and have a sample rate at least 2x or more your symbol rate $\endgroup$ – user27621 Mar 31 '17 at 15:30
  • $\begingroup$ Symbol rate is bit rate over 4 (for 16 qam) right? So my bit rate is calculated to be 64Kbits per second, so divided by 4 would net me a symbol rate of 18KHz. What if I want my sampling frequency to be constant at 8KHz? What carrier frequency should I use and what t? Isn't the t dependent on the symbol period? $\endgroup$ – LeBlanc Lord Mar 31 '17 at 15:43
  • $\begingroup$ Yes for 64kbps you will have a 18KHz symbol rate. Note that unfiltered (no pulse shaping) the spectrum of that is a Sinc will a null to bull BW of 36 KHz. We use pulse shaping to reduce that to almost half depending on pulse shape used. And you need excess bandwidth to allow for filtering which is how I came up with 2 samples per symbol minimum or a 36KHz sampling rate for your baseband I and Q samples. If you need to move that to a digital IF, say at 1/4 the sampling rate for example, your sampling rate should be 100KHz or more to leave some room for filtering the alias copy. $\endgroup$ – user27621 Mar 31 '17 at 19:05
  • 1
    $\begingroup$ For simulation there is no carrier - "DC" is the carrier. $\endgroup$ – user27621 Apr 1 '17 at 0:13

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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