0% found this document useful (0 votes)
15 views4 pages

Ace Lab Report 1

The experiment aims to generate 5000 random bits to simulate Binary Phase Shift Keying (BPSK) transmission over an AWGN channel and compare the Bit Error Rate (BER) with and without a matched filter. Results indicate that matched filtering significantly improves performance by reducing BER, particularly at low SNR, while both methods converge at higher SNR values. The findings align with theoretical expectations regarding BPSK performance in noisy environments.

Uploaded by

SRH
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
15 views4 pages

Ace Lab Report 1

The experiment aims to generate 5000 random bits to simulate Binary Phase Shift Keying (BPSK) transmission over an AWGN channel and compare the Bit Error Rate (BER) with and without a matched filter. Results indicate that matched filtering significantly improves performance by reducing BER, particularly at low SNR, while both methods converge at higher SNR values. The findings align with theoretical expectations regarding BPSK performance in noisy environments.

Uploaded by

SRH
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

ACE Lab Report - 1

Name: P SRIHARI
Roll No: 25SP06015

Aim of the Experiment


The aim of this experiment is to generate 5000 random bits to simulate Binary Phase
Shift Keying (BPSK) transmission over an Additive White Gaussian Noise (AWGN)
channel and compare the Bit Error Rate (BER) and SNR performance with and without
a matched filter.

Brief Theory of the Topic


Digital communication systems use modulation techniques to transmit binary data over
noisy channels.

BPSK Modulation
Binary Phase Shift Keying maps binary data into two phases:

0 → −1, 1 → +1

Thus, the transmitted symbols are:

s(t) = ±1

Pulse Shaping
Each symbol is transmitted using a rectangular pulse of 4 samples per symbol.

Noise Model
The channel is modeled as Additive White Gaussian Noise (AWGN) with zero mean and
variance determined by the Signal-to-Noise Ratio (SNR).

Matched Filter Receiver


A matched filter maximizes the SNR at the decision instant. The impulse response of
the matched filter is the time-reversed version of the transmit pulse.

Bit Error Rate (BER)


The BER is calculated as:
Nerror
BER =
Ntotal

1
For BPSK in AWGN, the theoretical BER is:
r !
Eb
Pb = Q 2
N0

where Z ∞
1 2 /2
Q(x) = √ e−t dt
2π x

Methodology
1. Generate 5000 random bits.

2. Map bits to BPSK symbols: 0 → −1, 1 → +1.

3. Perform pulse shaping using a rectangular pulse of 4 samples/symbol.

4. Transmit the signal through AWGN channel for various SNR values.

5. Without matched filter: downsample and detect.

6. With matched filter: convolve with matched filter and sample.

7. Compute BER for both cases.

8. Plot BER vs. SNR for comparison.

MATLAB Code
1 % 1. Generate 5000 random bits
2 bits = randi ([0 1] , 1 , 5000) ;
3

4 % 2. Map bits to BPSK symbols : 0 -> -1 , 1 -> +1


5 symbols = 2* bits - 1;
6

7 % 3. Upsample using rectangular pulse (4 samples per symbol )


8 sps = 4;
9 upsampled = upsample ( symbols , sps ) ;
10 pulse = ones (1 , sps ) ;
11 tx_signal = conv ( upsampled , pulse ) ;
12

13 % Time vector ( optional )


14 t = [Link] length ( tx_signal ) -1;
15

16 % 4. Add AWGN noise and evaluate for various SNRs


17 SNR_dB = [Link];
18 ber_no_filter = zeros ( size ( SNR_dB ) ) ;
19 ber_with_filter = zeros ( size ( SNR_dB ) ) ;
20

21 for i = 1: length ( SNR_dB )


22 % Add AWGN

2
23 rx_signal = awgn ( tx_signal , SNR_dB ( i ) , ’ measured ’) ;
24

25 % Without matched filter


26 rx_down = rx_signal (1 + sps *(0:4999) ) ;
27 rx_bits_no _filte r = rx_down > 0;
28 ber_no_filter ( i ) = sum ( rx_bi ts_no_ filter ~= bits ) / length (
bits ) ;
29

30 % With matched filter


31 matched = conv ( rx_signal , fliplr ( pulse ) ) ;
32 matched_sampled = matched ( sps + sps *(0:4999) ) ;
33 rx_bits_filter = matched_sampled > 0;
34 ber_with_filter ( i ) = sum ( rx_bits_filter ~= bits ) / length (
bits ) ;
35 end
36

37 % 6. Plot BER vs SNR


38 semilogy ( SNR_dB , ber_no_filter , ’ro - - ’ , SNR_dB , ber_with_filter ,
’b * - ’) ;
39 legend ( ’ Without Matched Filter ’ , ’ With Matched Filter ’) ;
40 xlabel ( ’ SNR ( dB ) ’) ;
41 ylabel ( ’ Bit Error Rate ( BER ) ’) ;
42 title ( ’ BER vs SNR ’) ;
43 grid on ;

Results
The BER vs SNR plot shows that the matched filter improves performance significantly.
BER decreases exponentially with SNR, as expected.

Figure 1: Screenshot of MATLAB output

3
Observations
• Without matched filtering, BER is higher due to suboptimal detection.

• Matched filtering reduces BER, especially at low SNR.

• At higher SNR values, both approaches converge.

• Simulation matches theoretical BPSK BER performance.

Conclusion
The experiment demonstrates that matched filtering enhances BPSK detection in AWGN
channels by reducing the probability of error. The BER vs SNR curve confirms theoretical
expectations.

References
1. Simon Haykin, Communication Systems, Wiley.

2. John G. Proakis, Digital Communications, McGraw Hill.

3. MATLAB Documentation: awgn, conv, semilogy.

4. Learn LaTeX — Overleaf Documentation. Retrieved August 16, 2025,

You might also like