Key focus: Let’s learn how to simulate matched filter receiver with square root raised cosine (SRRC) filter, for a pulse amplitude modulation (PAM) system.
Simulation Model
A basic pulse amplitude modulation (PAM) system as DSP implementation, is shown in Figure 1 by adding an upsampler (
In this model, a random stream of source bits is first segmented into
This article is part of the book Wireless Communication Systems in Matlab, ISBN: 978-1720114352 available in ebook (PDF) format (click here) and Paperback (hardcopy) format (click here).
%Program: MPAM modulation
N = 10ˆ5; %Number of symbols to transmit
MOD_TYPE = 'PAM'; %modulation type
M = 4; %modulation level for the chosen modulation MOD_TYPE
d = ceil(M.*rand(1,N)); %random numbers from 1 to M for input to PAM
u = modulate(MOD_TYPE,M,d);%MPAM modulation
figure; stem(real(u)); %plot modulated symbols
Each MPAM modulated symbol should last for some duration called symbol time, denoted as
%Program: Upsampling
L=4; %Oversampling factor (L samples per symbol period)
v=[u;zeros(L-1,length(u))];%insert L-1 zero between each symbols
%Convert to a single stream
v=v(:).';%now the output is at sampling rate
stem(real(v)); title('Oversampled symbols v(n)');
In order to fill-in proper values in place of the inserted zeros, interpolation is performed by a pulse shaping filter by convolving the output of the upsampler and the pulse shaping function. The pulse shaping function needs to satisfy Nyquist criterion for zero ISI, otherwise, aliasing effect will wreak havoc. If the amplitude response of the channel is flat and if the noise is white, then the amplitude response of the pulse shaping function can be split equally between the transmitter and receiver. For this simulation the desired Nyquist pulse shape is a raised-cosine pulse shape and the task of raised-cosine filtering is equally split between the transmit and receive filters. This gives rise to square-root raised-cosine (SRRC) filters at the transmitter and receiver. This is a matched filter system, where the receive filter is matched with the transmit pulse shaping filter.
A matched filtering system is a theoretical framework and it is not a specific type of filter. It offers improved noise cancellation by improving the signal noise ratio at the output of the receive filter. The implementation starts with the design of an SRRC filter with roll-off factor
Filters will not produce instantaneous output and they take sometime to produce the output. That is, the output of the filter is shifted in time with respect to the input. For symmetric FIR filters of length
%Program: SRRC pulse shaping
%----Pulse shaping-----
beta = 0.3;% roll-off factor for Tx SRRC filter
Nsym=8;%SRRC filter span in symbol durations
L=4; %Oversampling factor (L samples per symbol period)
[p,t,filtDelay] = srrcFunction(beta,L,Nsym);%design filter
s=conv(v,p,'full');%Convolve modulated syms with p[n] filter
figure; plot(real(s),'r'); title('Pulse shaped symbols s(n)');
The pulse shaped signal samples are sent through an AWGN channel, where the transmitted samples are added with noise samples that are generated according to the required
%Program: Adding AWGN noise for given SNR value
EbN0dB = 10; %EbN0 in dB for AWGN channel
snr = 10*log10(log2(M))+EbN0dB; %Converting given Eb/N0 dB to SNR
%log2(M) gives the number of bits in each modulated symbol
r = add_awgn_noise(s,snr,L); %AWGN , add noise for given SNR, r=s+w
%L is the oversampling factor used in simulation
figure; plot(real(r),'r');title('Received signal r(n)');
For the receiver system, we assume that the ADC in the receiver produces an integer number of samples per symbol (i.e,
Next, we assume that the receiver has perfect knowledge of symbol timing instants and therefore, we will not be implementing a symbol timing synchronization subsystem in the receiver. At the receiver, the matched filter symbols are first passed through a downsampler that samples the filter output at correct timing instances.
The sampling instances are influenced by the delay of the FIR filters (SRRC filters in Tx and Rx). For symmetric FIR filters of length
%Program: Symbol rate sampler and demodulation
%------Symbol rate Sampler-----
uCap = vCap(2*filtDelay+1:L:end-(2*filtDelay))/L;
%downsample by L from 2*filtdelay+1 position result by normalized L,
%as the matched filter result is scaled by L
figure; stem(real(uCap)); hold on;
title('After symbol rate sampler $\hat{u}$(n)',...
'Interpreter','Latex');
dCap = demodulate(MOD_TYPE,M,uCap); %demodulation
Rate this article: Note: There is a rating embedded within this post, please visit this post to rate it.
Books by the author
Topics in this chapter
Pulse Shaping, Matched Filtering and Partial Response Signaling ● Introduction ● Nyquist Criterion for zero ISI ● Discrete-time model for a system with pulse shaping and matched filtering □ Rectangular pulse shaping □ Sinc pulse shaping □ Raised-cosine pulse shaping □ Square-root raised-cosine pulse shaping ● Eye Diagram ● Implementing a Matched Filter system with SRRC filtering □ Plotting the eye diagram □ Performance simulation ● Partial Response Signaling Models □ Impulse response and frequency response of PR signaling schemes ● Precoding □ Implementing a modulo-M precoder □ Simulation and results |
---|
thank you for your work , can you help me for faster than Nyquist signaling(code MATLAB)
hi, Im working on FTN. I would be happy to exchange ideas. email me
sadeqebrahimi@gmail.com
Dr Mathuraman, I think the word “filter” in “Matched filter” is a misnomer. Why a matched filters is a filter though it is not filtering or affecting any input signal’s frequency component? It is a correlator or simply a mathematical inner product (correlation) to get the energy in that (time span). If the spectrum of the so called filters matches that of the signal then the peak occurs at the center. Right! Also if the input is signal + awgn noise (with zero mean) because of the Summation of the Square (signal +noise),= Sum(signal^2) + Sum(cross prodctd) + Sum(noise^2). The third term Summation( noise^2) converges to zero ( because mu -0) there by SNR is increased. Am I right. Please help Om
Technically, filtering operation is complete or partial suppression of certain aspect of the incoming signal. Matched filter tries to maximize the SNR, there by suppressing the effect of additive noise in the received signal (Compare received signal and the matched filter output in Figure 4).
Great Stuff. Can you publish a book for synchronization techniques next? That would be a great addition!
Thank you for the suggestion… I will try to work on that..