EE4TK4 Project 2
Computer Simulation on Matched Filters for Detection
of BPSK and BFSK Signals
November 2, 2009
1 Introduction
As most of the communication channels are bandpass in nature [1], digital signals are modu-
lated by a carrier wave of appropriate frequency before transmission. In order to distinguish
the transmitted bits in the presence of noise with minimum probability of error, a receiver
has to be carefully designed. For the detection of binary signals in spectrally white noise,
the matched filter is optimum in the sense that the output signal-to-noise ratio (SNR) is
maximized at the end of the bit period and thus the probability of error in the threshold
detection is minimized.
In this project, we would like to design matched filters for the reception of binary Frequency
Shift Keying (FSK) and Phase Shift Keying (PSK) signals and investigate the performance
in each case.
2 Experiment
Consider the binary transmission system as shown in Figure 1. The input to the system
is a binary sequence {bk } of bit duration Tb . Depending on the modulation scheme being
employed, the modulated signal s(t) takes on different waveforms. For BFSK systems, the
modulated signals are given by
½
s1 (t) = A cos(ω1 t) if bk = 1
s(t) =
s2 (t) = A cos(ω2 t) if bk = 0
1
noise
n(t)
sample
every Tb
seconds
modulator channel + matched filter Threshold Detector
input s(t) v(t) vo (t) output
binary binary
data data
bk bk
Figure 1: Block Diagram of a Binary Data Transmission System
where 0 < t < Tb , A is the amplitude of the modulated waveform, and
2π(n0 + n1 )
ω1 = ,
Tb
2π(n0 − n1 )
ω2 = .
Tb
In this project, we choose
n0 = 5,
n1 = 2.
For BPSK modulation, we can write
½
s1 (t) = A cos(ωc t) if bk = 1,
s(t) =
s2 (t) = −A cos(ωc t) if bk = 0.
where 0 ≤ t ≤ Tb , A is the amplitude of the modulated waveform, and we choose
2π
ωc = 5 .
Tb
The modulated signal will then be transmitted through the channel, and is corrupted by
some additive noise n(t). For simplicity, the channel is assumed to be ideal and the channel
noise is assumed to be white and Gaussian with power spectral density
η
Sn (ω) = .
2
The optimum receiver consists of a matched filter, a sampler, and a threshold detector.
The signal-plus-noise v(t) is filtered, producing vo (t). The transmitted bit is obtained by
comparing the sampled vo (t) at the end of the bit period with a pre-determined threshold
VT according to the following rule:
½
1 if vo (Tb ) > VT ,
b̂k =
0 if vo (Tb ) < VT .
2
3 Procedures
In computer simulations, a very important issue is that the signals and noise have to be
sampled. Since the bit period is Tb , and in the above theory, we assumed the transmitted
sinusoidal pulses have rectangular envelope, therefore, to represent the continuous signal
shapes adequately, we must sample at a substantially higher frequency than the bit fre-
quency. Let the sampling frequency be
2π 2π
ωs = = N.
Ts Tb
Here in this project, we choose Ts to be unity and N = 30. Using this sampling period, we
generate the following:
1. Generate a random sequence of binary bits {bk } using MATLAB. Note that this se-
quence of binary digits are represented by rectangular pulses having amplitudes ±1,
each lasting for a period of Tb and sampled at Ts . What is the effective bandwidth of
this sequence of rectangular pulses?
This sequence of pulses will modulate different carriers of amplitude A in the trans-
mission either by FSK or by PSK as described in Section 2.
2. Generate a zero-mean, white Gaussian random sequence ν(nTs ) sampled at Ts . This
noise sequence has a two-sided power spectral density of η2 . In this project, we fix
η = 2. Note that since ν(nTs ) is sampled, the power of this noise sequence depends
on the sampling period Ts , the smaller is Ts , the larger is the noise power. Find an
expression for the power of this noise sequence in terms of η and Ts .
3. Since the noise sequence ν(nTs ) has a bandwidth much larger than the effective band-
width of the signal pulses, the noise outside the effective bandwidth is irrelevant to the
transmission of the data. We therefore define an effective input signal-to-noise ratio
ρ such that
A2 Tb
ρ=
2η
where A is the amplitude of the modulated pulse. When expressed in dB, we have
SN Re = 10 log10 [(A2 Tb )/(2η)]
In this project, we investigate the transmission and reception of FSK and PSK signals
in an effective input signal-to-noise ratio range of −4 dB to 4 dB.
4. With a fixed value of η = 2, for each chosen value of SN Re in the range of −4 db to
4 dB, generate a sequence of FSK modulated pulses and another sequence of PSK mod-
ulated pulses using the value of A calculated. This procedure yields the transmitted
signal s(t).
3
5. The sampled noise sequence is added to each of the s(t) representing the FSK and
PSK sequences. This mixture yields the noisy signal v(t) resulted from transmitting
through the channel.
6. Each of the noisy signal sequences is then passed through the matched filter designed
respectively for the specific transmission scheme. Denote the output of the matched-
filter at the end of each bit period by v0 (kTb ).
7. Compare v0 (kTb ) with the respective threshold in each of the cases and decide if the
transmitted bit bk is 1 or 0.
8. For a suitably selected number of bits transmitted in the sequence, evaluate the bit-
error rate (experimental probability of error) of the each of the transmission schemes
at the specific SN Re . Bit-error rate is the number of erroneous bit at the output in
comparison with the transmitted binary sequence, i.e.,
total number of erroneous bits
Pexp =
total number of transmitted bits
9. Since noise is a random process, repeat Step 1 through Step 8 for 20 realizations of
noise and calculate the average bit-error rate, P̄exp , for the same chosen SN Re .
10. Repeat Step 1 through Step 9 for another value of effective signal-to-noise ratio (SN Re
ranges from −4 dB to 4 dB).
11. Plot the performance graphs of binary FSK and PSK transmissions (Bit-Error Rate
against Signal-to-Noise Ratio). Compare these curves with the theoretical performance
and comment on your results.
References
[1] K.M. Wong, “Notes on Digital Communication Systems”, Custom Courseware, McMas-
ter University, 2009.