The design for QAM modulator below is for a standard 16-QAM constellation. The general form of an M-ary signal can be defined as S(t) = sqrt((2*Emin)/Ts)*ai*cos(2πfot) + sqrt((2*Emin)/Ts)*bi*sin(2πfot) Here, Emin is the energy of the signal with lowest amplitude and ai and bi are pair of independent integers chosen according to the location of the particular signal point. Fo is the carrier frequency and Ts is the symbol period. Non-rectangular QAM constellations achieve marginally better bit-error rate (BER) but are harder to modulate and demodulate. Hence, below is the simulation of a rectangular QAM constellation. Simulation model in MATLAB Following is the methodology of simulation of the QAM modulator in MATLAB, 1) Generation of random binary sequence, this is the input which is to be modulated. 2) Assigning group of 4 bits to each 16-QAM constellation symbol per the Gray mapping 3) Addition of white Gaussian Noise 4) Demodulation of 16-QAM symbols Upon reception of the signal, the demodulator examines the received symbol, which may have been corrupted by the channel or the receiver (e.g. additive white Gaussian noise). It selects, as its estimate of what was actually transmitted, that point on the constellation diagram which is closest (in a Euclidean distance sense) to that of the received symbol. Thus it will demodulate incorrectly if the corruption has caused the received symbol to move closer to another constellation point than the one transmitted. The constellation diagram allows a straightforward visualization of this process. 5) De-mapping per decimal to Gray conversion 6) Counting the number of bit errors 7) Running this for each value of SNR so that we can get can arrive at a relation between bit errors and SNR
The block diagram of the QAM simulation model is as shown below,
Code for MATLAB clear;
clc; N = 10^4; % number of symbols M = 16; % constellation size k = log2(M); % bits per symbol % defining the real and imaginary PAM...