You are on page 1of 16

ECE101COMMUNICATION SYSTEMS

Quadrature Amplitude Modulation with 16M-ary Number over Intersymbol Interference Channel
Mottaqui Karim, Grace Wang, Raymond Wong
12/23/2010

1 Objective
The objective was to design and simulate a communication link that would minimize the bit error rate and maximize the total bit rate of the transmitted signal. Provided an intersymbol interference channel, we successfully achieved a bit error rate of less than 10-6 with a 16M-ary quadrature amplitude modulation system.

2 Table of Contents
1 Objective 2 Table of Contents 3 Introduction 3.1 Channel Nature and Signal Modulation Scheme 3.2 Adaptive Filters and Convolutional Coding 4 Analysis 4.1 Receiver Stage . 4.2 Channel Stage .. 4.3 Transmission Stage . 2 3 4 4 4 6 6 6 7

5 Results and Conclusions 8 5.1 Results for M=4 ... 8 5.2 Results for M=16 . 9 5.3 Closing Remarks . 10 6 Acknowledgements 7 References A MATLAB Code 11 12 13

3 Introduction
Simulation of the communication link was achieved through extensive use of the Communication Toolbox extension of MATLAB. It is a software package that extends the MATLAB environment functionalities that allow for the simulation of multiple aspects of a communication system. The Communication Toolbox was employed in coding essentially all of the salient features of the communication link simulation. 3.1 Channel Nature and Signal Modulation Scheme The message signal was propagated over an intersymbol interference (ISI) channel. ISI channels are characterized by a form of distortion where each symbol interferes with the subsequent symbols of the transmitted signal. Symbols are defined as waveforms, states, or conditions of a channel that remind fixed in value for a certain period of time. Typically, symbols are used to encode binary data. In our simulation of a communication link, we were limited to one thousand transmission symbols. The signal was modulated using the Quadrature Amplitude Modulation (QAM) technique. QAM is a combination of both phase shift keying and amplitude modulation. More specifically, it consists of two carrier waves that are completely out of phase with each other (in quadrature). The advantage of using QAM is that the multiple carrier wave nature of the technique allows for a greater bit transfer rate. A greater the M-ary number of the QAM system allows for a greater number of bits to be transmitted through the channel. However, it should be noted that the drawback to transmitting with greater M-ary numbers is that the bit error rate (BER) tends to increase. Essentially, more sophisticated equalization and filtration methods are required in order to transmit with larger M-ary numbers. 3.2 Adaptive Filters and Convolutional Coding An equalizer attempts to reconstruct a signal that has been transmitted through an ISI channel. We employed the decision feedback equalizer (DFE), which is a type of adaptive filter that uses feedback from previous equalization iterations to further minimize bit error. It usually employs training sequences as a reference when it begins filtering. To achieve adaptive filtering through the DFE, we employed two adaptive algorithms: the Least Mean Square (LMS) algorithm and the Recursive Least Squares (RLS) algorithm. The LMS algorithm works by computing the filter coefficients that produce the minimal least squares of the error signal. The LMS filter performs three tasks: it calculates the output signal from the adaptive filter, it computes the error signal, and finally generates the filter coefficients. Because the LMS does not involve any matrix operations, it requires less computational resources and memory than the second algorithm that was employed: the RLS algorithm. The RLS filter minimizes the power of the error signal produced by the filtration process, or convergence, much fast than the LMS. However, it requires more computational resources because it employs a much more complicated filtering algorithm.

The raised cosine filter was used to further to further supplement the performance of the communication system. A raised cosine filter is a low pass filter that is used to pulse shape a transmission stream (in this case, the message signal). Pulse shaping, which is the technique of changing the wave form of a transmitted signal, is used primarily to limit the bandwidth of the transmission which helps to limit the ISI of the channel. The raised cosine filter is symmetrical about the 0 Hz frequency line; it is completely flat in the pass band, sinusoidal (in the form of a cosine wave) in between the pass band and the stop band, and zero elsewhere. It was used primarily to allow a means of pulse shaping the transmitted signal, which made it possible to send more data over the channel. Furthermore, convolutional coding was employed to minimize the bit error rate (BER) of the received signal. Convolutional coding is the process of adding redundancy to an original signal to lower the error rate of a communication link. We begin by specifying a ratio of the number of input bits to output bits. We continue by specifying the number of delay elements in our scheme. Next, we come up with a generator polynomial which we then convert to a trellis. From here, we are free to encode or decode the signal as we please. This entire process is somewhat complicated, but rendered rather simple through the use of the Communication Toolbox in MATLAB.

4 Analysis
The MATLAB code can be categorized into three stages: transmission, channel, and receiver. In each stage, a certain portion of the communication link was simulated. We began by generating a message signal and preparing it for transmission. Next, we applied noise to it as it was transmitted through the non ideal channel. Finally, we took the necessary steps to equalize, demodulate, and decode the signal and calculate the bit error rate. 4.1 Transmission Stage A random stream of bits was generated to imitate a generalized message bit stream. By making the data stream random, we ensure that the communication process that was simulated is completely general and thus applicable in a multitude of situations. In order to minimize the bit error rate, an error detection and correction scheme was implemented. The error-control coding method that we used in our simulation was convolutional coding. Convolution encoders use a trellis structure to properly code the randomly generated data stream. Before the M-ary QAM modulator can perform its function, the string of bits has to be converted into integer symbols from 0 to M-1. In our example we used the M = 4 and M = 16 M-ary numbers. With M = 4, two bits are grouped together to form an integer symbol in the range of 0 to 3. With M=16, four bits are grouped together to form an integer symbol in the range of 0 to 15. This process of mapping from bits to symbols is done with the bi2de and reshape functions of MATLAB. Before the data stream was transmitted across the channel, it was pulse shaped with a raised cosine filter. Pulse shaping centralizes the bandwidth in a signal and limits the sideband frequencies. By doing this it eliminates a good amount of intersymbol interference. If the sideband frequencies are not suppressed, they will distort the preceding transmitted symbols. 4.2 Channel Stage In an ideal channel, the received message is identical to the transmitted message. Realistically speaking, channels are not ideal because of channel properties and environmental factors. When a data stream goes through a non-ideal channel, it is subjected to distortion due to effects from the channel. This introduces errors such as those seen from intersymbol interference. In our communication link, we simulated two channels: one that introduces moderate ISI and one that introduces severe ISI. We analyzed how well our communication system did against both the moderate ISI and severe ISI channels. In any environment, signals are subjected to additive white gaussian noise (AWGN). We simulated this effect in our communication link by introducing a noise element to our signal; essentially, we added noise to our transmission. This contributed to the non-ideality of the communication process, thus accounting for environmental factors. In our design, errors caused

by the AWGN are detected and corrected by the convolutional coding. For the noise to be correctly added the SNR has to be properly scaled according to the code rate of the convolutional coding and the oversampling rate of the pulse shaping. This was all achieved with the awgn function of MATLAB in the channel stage of signal transmission. 4.3 Receiver Stage At the receiver stage, all the processes that we implemented in the transmitter stage need to be undone in order to recover the original transmitted message. After the message data stream has gone through the channel, it is filtered by the raised cosine filter and down sampled to return to the original pulse shape. After it is down sampled it goes through our linear RLS equalizer, which helps to further diminish the ISI. Initially in the course of designing and implementing this simulation, we used a decision feedback equalizer (DFE), we were able to experimentally determine the optimal initial feed forward and feedback weights as 5 and 2, respectively. In addition, the training length was set to 75, because we want the training length to be long enough for the equalizer best approximate; but we dont want the training length to be too long, because then it would take forever to run the simulation, because the we would need to increase the number of iterations. According to Mathworks, the recursive least squares (RLS) algorithm for the first block of data ensures rapid tap convergence, and the least mean square (LMS) algorithm thereafter ensures rapid execution speed. Therefore, to compare just the RLS algorithm versus the RLS and LMS algorithm, we plotted two bit error rate vector. Running the simulation with just the equalizer, the difference between the two ways of implementing an equalizer was indistinguishable; however, when we added convolution coding, the bit error rate vector with only the RLS algorithm reached a smaller bit error rate with the same signal to noise ratio. After the equalizer, the received message is QAM demodulated from the constellation structure into a stream of symbols. Then it is mapped back from integer back to bits. Convolution decoding is then applied to the bits. During this decoding process, errors are detected and corrected using the original trellis structure used during the encoding process. If an error is detected, the coding scheme will find the most likely transmitted sequence of bits that the received sequence corresponded to.

5 Results and Conclusions


We successfully achieved the required BER for M=4 and M=16 in the moderate ISI channel. Furthermore, we were able to show that it is rather difficult to achieve a BER that is even close to the requirement when transmitting a signal on the severe ISI channel. Presented below are the BER graphs and charts that specify our BER values for M=4 and M=16. 5.1 Results for M=4

Figure 1: BER of Simulation through a Moderate ISI Channel with a DFE RLS and a DFE LMS Equalizer

Table 1: Bit Error Rates of DFE Equalizers using RLS, LMS with M = 4 1.41129032258064e-06 BER of DFE LMS 3.02419354838710e-07 BER of DFE RLS We calculate the final BER with the following, (1) Where: coderate: M: nSym: trainLength:

Convolutional coding rate M-ary number for QAM modulation Number of symbols transmitted number of training bits used for the RLS

Substituting our values for M = 4: (2) Next we calculate the final SNR: (3) Where Substituting our values for M = 4, we get: (4) 5.2 Results for M=16

Figure 2: BER of Simulation through a Moderate ISI Channel with a Linear RLS Equalizer

Table 2: Bit Error Rates of Linear RLS Equalizer with M = 16 3.91849529780564e-07 BER of Linear RLS We now compute the final BER of our system with M=16 using (1): (5)

And the final SNR using (3):

(6)

Figure 2: BER of Simulation through a Severe ISI Channel with a Linear RLS Equalizer

Thus, it is evident from inspection of (2), (4), (5), and (6) that with M=16 the communication link is capable of transmitting more than twice the amount of data with approximately the same SNR and BER than with M = 4. Furthermore, upon inspection of Figure 2, it is worth noting that the severe ISI channel cannot accommodate transmission of a signal without a severely high BER. 5.3 Closing Remarks We were able to get the DFE equalizer working for M = 4 but for higher M-ary values the DFE did not produce favorable results. Upon realizing this, we switched over to a linear RLS equalizer and also implemented a raised cosine filter. The use of the linear RLS equalizer and the raised cosine filter, along with the use of convolutional encoding helped us reach an M-ary value of 16. Furthermore, we initially also included a case where we attempted to combine the DFE LMS and RLS equalizers. We theorized that as the number of iterations went up, the combined LMS and RLS equalizer would be able to outdo the RLS equalizer. We eventually realized that we were completely incorrect and that the RLS equalizer was optimally suited for increasing the M-ary number while decreasing the BER. We also realized that the convolutional coding rate played a big factor in lowering BERs. We achieved noticeably better results in our M=4 configuration when we increased our convolutional code rate from 1/2 to 2/3. We kept this value for future versions of our code, including the version that was successful in implementing the system with an M-ary number of 16. These changes worked to lower our BER to the order of 106 for M=16, but when running simulations at M=32, we failed to achieve the BER requirement.

6 Acknowledgements
We would like to thank Professor Keene for his guidance on this project. We would also like to thank Michael Benoit and Ramon Sandoval for their advice on how to properly scale the noise.

7 References
[1] S. Haykin, Communication Systems. 4th ed. Hoboken, NJ: John Wiley & Sons Inc, 2001.

A MATLAB Code
%% ECE101 - Communications Theory Project--Mottaqui Karim, Grace Wang, Raymond Wong %% Initial Settings and definitions of important variables clc clear all; close all; numIter = 1000; % The number of iterations of the simulation %%set to one to get to work nSym = 999; % The number of symbols per packet SNR_Vec = 0:2:16; lenSNR = length(SNR_Vec); M = 16; % The M-ary number k = log2(M); coderate = 2/3; % Convolutonal Coding Rate t = poly2trellis([5 4],[23 35 0; 0 5 13]); % Trellis nsamp = 4; % Oversampling Rate rolloff = .9; filtorder = 200; delay = filtorder/(nsamp*2); rrcfilter = rcosine(1,nsamp,'fir/sqrt',rolloff,delay); %% Channels %chan = 1; % No channel chan = [1 .2 .4]; % Somewhat invertible channel impulse response, Moderate ISI %chan = [0.227 0.460 0.688 0.460 0.227]'; % Not so invertible, severe ISI 50% BER. awful basically, flat line %% Equalizer parameters nWts = 6; % number of weights algType1 = 'rls'; % RLS algorithm for first data block at each Eb/No forgetFactor = 0.999; %parameter of RLS algorithm stepSize = 0.01; %% Linear Equalizer

linrls = lineareq(nWts, rls(0.999, 0.1)); linrls.SigConst = qammod(0:M-1,M); % Signal Constellation of the M-ary QAM Modulator linrls.ResetBeforeFiltering = 0; % Maintain continuity between iterations %% Time-varying Rayleigh multipath channel % ts = 1/1000; % chan = rayleighchan(ts,1); % chan.pathDelays = [0 ts 2*ts]; % chan.AvgPathGaindB = [0 -5 -10]; % chan.StoreHistory = 1; % Uncomment if you want to be able to do plot(chan) %% Create a vector to store the BER computed during each iteration berVec1 = zeros(numIter, lenSNR); % Initialize BER Vector tic %% Run the simulation numIter amount of times for i = 1:numIter display(['iteration number ' num2str(i) '.']) bits = randint(nSym*k*coderate, 1, [0 1]); % Generate random bits msg = bits; %% Encoding bits = convenc(bits,t); % Encode. %% Modulation BITStoSYMS = bi2de(reshape(bits,k,length(bits)/k).','left-msb'); % Map bits to symbols qamtx = qammod(BITStoSYMS,M); % BPSKmodulate the signal %% Apply Raised Cosine Filter tx = rcosflt(qamtx,1,nsamp,'filter',rrcfilter);

%% Channel if isequal(chan,1) txChan = tx; elseif isa(chan,'channel.rayleigh') reset(chan) % Draw a different channel each iteration txChan = filter(chan,tx); else txChan = filter(chan,1,tx); % Apply the channel. end for j = 1:lenSNR % one iteration of the simulation at each SNR Value %% Add Noise

txNoisy = awgn(txChan,SNR_Vec(j) + 10*log10(k*coderate) 10*log10(nsamp),'measured'); % Add AWGN % rx = qamdemod(txNoisy,M); % Demodulated Noise without Equalization %% Filter Received Message with Raised Cosine Filter RCFtxNoisy = rcosflt(txNoisy,1,nsamp,'Fs/filter',rrcfilter); RCFtxNoisy = downsample(RCFtxNoisy,nsamp); % Downsample. RCFtxNoisy = RCFtxNoisy(2*delay+1:end-2*delay); % Account for delay caused by pulse shaping. %% Training sequence signal trainlen = 21; trainsig = qamtx(1:trainlen); %% Linear RLS Equalizer reset(linrls); linrls.Weights = [0 0 0 0 0 0]; % Resetting weights after each iteration eqtx1 = equalize(linrls,RCFtxNoisy,trainsig); %% Demodulation demodrx1 = qamdemod(eqtx1,M); rx1 = de2bi(demodrx1,'left-msb'); % Map Symbols to Bits rx1 = reshape(rx1.',numel(rx1),1); %% Decoding tb = 16; % Traceback length for decoding rx1 = vitdec(rx1,t,tb,'cont','hard'); % Decode. decdelay = 2*tb; % Decoder delay, in bits %% Compute and store the BER for this iteration [zzz berVec1(i,j)] = biterr(msg(1+k*trainlen:end-decdelay), rx1(decdelay+1+k*trainlen:end)); end end toc %% Compute and plot the mean BER ber1 = mean(berVec1,1); semilogy(SNR_Vec, ber1) %% Compute the theoretical BER for this scenario % THIS IS ONLY VALID FOR BPSK! % YOU NEED TO CHANGE THE CALL TO BERAWGN FOR DIFF MOD TYPES

berTheory = berawgn(SNR_Vec,'psk',2,'nondiff'); %%binary psk with nondifferential decoding hold on semilogy(SNR_Vec,berTheory,'r') legend('BER EQ1','Theoretical BER', 'Location', 'SouthWest') hold on SNR = [0 16]; Errpt1 = [1e-4 1e-4]; Errpt2 = [1e-6 1e-6]; plot(SNR,Errpt1,'--c') plot(SNR,Errpt2,'--g')

You might also like