3

I know the way to generate QPSK signals using the following

TxS=round(rand(1,N))*2-1;  % QPSK symbols are transmitted symbols
TxS=TxS+sqrt(-1)*(round(rand(1,N))*2-1);

In the above, the symbols are 2 alphabets +1/-1. But I cannot understand how to generate 16- Quadrature Amplitude Modulation signal for the same alphabet space? Is it possible? Or what is the usual way for generating ?

Also, is it a practice to work with complex signals and not real ?

Marcus Müller
  • 34,677
  • 4
  • 53
  • 94
SKM
  • 959
  • 2
  • 19
  • 45

2 Answers2

5

Take a look at this: http://www.mathworks.com/help/comm/ref/comm.rectangularqamdemodulator-class.html

hMod = comm.RectangularQAMModulator('ModulationOrder',16);
dataIn = randi([0 15],10000,1);
txSig = step(hMod,dataIn);

You can also use:

TxS = (randi(4,N,1)*2-5)+i*(randi(4,N,1)*2-5)
Jerry
  • 4,258
  • 3
  • 31
  • 58
  • I do not have this module - comm.RectangularQAMModulator. Therefore, is there any other way? – SKM May 22 '15 at 19:11
  • 1
    This is from Communications System Toolbox. You can use `randi(4,N,1)` to generate a vector of random integers from 1 to 4 and them adjust the range and scale for both components. Then add them as you did. – Jerry May 22 '15 at 19:24
  • Thank you very much. I have a conceptual question which is not part of this Question. If I want to generate for 64-QAM, then I will use Randi(8,N,1) ? Also, if I only want real signals then is it ok to ignore the imaginary and work only with TxS = (Randi(4,N,1)*2-5) ? Or is it always a practice to work with complex? – SKM May 22 '15 at 19:36
  • 1
    @SKM: If you ignore the imaginary part, you will not have quadrature. The complex representation is just encoding the two components in quadrature as-if they were real and imaginary parts, because real and imaginary are also in quadrature to each other. – Ben Voigt May 22 '15 at 19:50
  • 1
    @SKM: You're welcome. Yes, you will use 8 for 64 QAM. For your other question, all signals are real. This is just baseband representation. Complex part just represents the quadrature component, which will translate into a 90 degree phase shift in passband. – Jerry May 22 '15 at 20:51
1

Yes, it's usual to work with complex numbers (representing the I/Q (in-phase/quadrature) plane) rather than real numbers. This comes from the fact that in software defined radio, you typically consider the complex base band.

Of course, you cannot represent 16 points with only two dimensions and two values in each of these. You might want to read up on digital comms theory.

Marcus Müller
  • 34,677
  • 4
  • 53
  • 94