Search code examples
matlabsignal-processingsoftware-defined-radio

Generate 16 QAM signal


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 ?


Solution

  • 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)