Sie sind auf Seite 1von 24

TITLE: PERFORMANCE OF DIGITAL COMMUNICATION SYSTEM CORRUPTED BY NOISE.

OBJECTIVES 1. To study the performance of digital communication system when it is corrupted by noise.
2. To study the performance of digital communication system when it is under the

influence of Inter-symbol Interface (ISI) only.


3. To study the performance of digital communication system when it is both under the

influence of Inter-symbol Interference (ISI) and corrupted by noise.

PROCEDURES Part 1: A basic digital communication system that transmits an Amplitude Shift Keying Signal (ASK)
1. In part 1(a) The purpose of the three function files which represents a basic digital

communication system that transmits an Amplitude Shift Keying (ASK) is explained. a) test_noise b) binseq_tx c) binseq_det

2. In Part 1 (b) the main specifications for the ASK signal in the main file is identified a) Bit rate b) Sampling frequency c) Voltage amplitude d) Number of bits in a packet e) Number of packets

3. In Part 1 (c), two M-files missing function is developed from the list before they can

be executed. a) A function to generate bytes of pseudorandom binary sequence b) A Q-function

4. In Part 1 (d) , Using the two functions developed in the previous procedure , Matlab programs is executed and tabulated its values following the parameters mentioned. a) Voltage amplitude b) Sampling frequency c) Bit rate d) Bit error e) Packet error f) Number of bits for the whole transmission g) Theoretical BER h) Measured BER i) Measured packet error rate (PER)

5. In Part 1 (e) , the previous step then repeated by varying the following parameters. a) Voltage amplitude, A=2,3,4 and 5 volts. Sampling frequency=10 and bit rate =1. b) Sampling frequency, fsamp=2,6,14 and 20Hz. Voltage amplitude=1 and bit rate =1. c) Bit rate = 2,3,4 and 5 bits/sec. voltage amplitude = 1 and sampling frequency =10.

6. In Part 1 (f)(i) , BER graph against each of the varying parameters in Part 1 (e) is plotted for both theoretical and measured BERs.

7. In Part 1 (f)(ii) , BER graph against SNR(dB) is plotted for each of the varying parameters in Part 1 (e) for theoretical and measured BERs

Part 2: Performance of digital communication system under the influence of Inter-symbol Interference (ISI) only.

8. In Part 2 (1), under the influence of Intersymbol Interference (ISI) the systems

performance is evaluated without the noise and the altered part of the programs is indicated.

9. In Part 2 (a), steps in Part 1 (d),(e),and (f) is repeated and results is commented.

Part 3: Performance of digital communication system under the influence of Inter-symbol Interference (ISI) with corrupted by noise.

10. In Part 3 (a), the systems performance again is considered under the influence of

Intersymbol Interference and modified program is identified.

11. In Part 3 (b), steps in Part 1 (d),(e),and (f) is repeated and results is commented.

12. The overall results obtained from Part 1 to Part 3 are contrast and compared.

Coding 1. Coding for test_noise:


% Program to test the BER and packet-error rate for binary sequences.

function test_noise() A=1

fsamp=10 bit_rate=1 npack=1000; ndelay=0; knoise=0.9; Loop=10; h = [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]; bit_error=0; packet_error=0; energy_bit=(A^2)*fsamp/bit_rate; power_noise=knoise^2; N0=power_noise*bit_rate/fsamp; gamma=(A^2)/(N0); SNR=energy_bit/power_noise; SNR_dB=10*log10(SNR) BER_theory=Q_function(sqrt(gamma)); for l=1:Loop s0=rand_seq1(npack); %s0

%ISI problem

%Generate sequence

y=binseq_tx(fsamp,bit_rate,s0); %transmitted signal %y % introduce ISI y = filter(h,1,y); y=A*y; y_lng=length(y); %y_lng ns=randn(1,y_lng); for k=1:y_lng y0(k)=y(k)+knoise*ns(k); end %y0

%Signal + noise

[s1]=binseq_det(fsamp,bit_rate,y0,ndelay); using Matched Filter %s0 transmitted and detected data %s1 %Calculate number of error % k=1; ctr_bit_error=0; ctr_packet_error=0; while (k<=length(s0)) if s0(k)~=s1(k) ctr_bit_error=ctr_bit_error+1; ctr_packet_error=1; end k=k+1; end

%decode received signal %Use to observe

bit_error=bit_error+ctr_bit_error; packet_error=packet_error+ctr_packet_error; end bit_error packet_error Total_bits=Loop*npack BER_theory BER_measured=bit_error/Total_bits PER_measured=packet_error/Loop

2. Coding for binseq_text:


% % % % % % Fungsi di bawah adalah untuk mendapatkan sequence bagi ASK Beberapa variable yang perlu dimasukkan pada main MATLAB ialah Frekuensi sampling, signal frekuensi, bit-rate dan sequence Berikut adalah contohnya : >> s=[1 0 1 1 0] >> x=binseq1(8000,100,s)

function [x]=binseq_tx(fs,b,s) a=1; % a mewakili amplitud Tb=1/b; % bit-duration ns=Tb*fs; num_s=length(s); % untuk menentukan baris dan lajur sequence yang diberi num_t=ns*num_s; ctr=1; sctr=1; while(sctr<=num_s) if s(sctr)==1 % apabila s=1, arahan berikut akan dibuat for k=ctr:ctr+ns x(k)=a; end else for k=ctr:ctr+ns x(k)=-a; end end ctr=ctr+ns; sctr=sctr+1; end

3. Coding for binseq_det:


% % Function to implement coherent ASK detection for 1 packet of chosen length.

function [s]=binseq_det(fsamp,bit_rate,x,ndelay) Nbit=round(fsamp/bit_rate); Npack=length(x); x0=zeros(1,2*Npack);

sig0=zeros(1,2*Npack); sig1=zeros(1,2*Npack); x0_det=zeros(1,2*Npack); x1_det=zeros(1,2*Npack); s=zeros(1,round(Npack/Nbit)); for k=1:Npack x0(k)=x(k); end % Generate subcarriers at f1. %

sig0(1:Npack)=-1; sig1(1:Npack)=1; % Multiply the subcarriers with received signal. %

for k=1:Npack x0_det(k)=x0(k)*sig0(k); x1_det(k)=x0(k)*sig1(k); end %subplot(211),plot(x0_det); %subplot(212),plot(x1_det); % Detect transmitted sequence. %

ptr0=1; ptr1=1; ctr0=1; for k=1:Npack x20(ptr0)=x0_det(k); x21(ptr0)=x1_det(k); if (ptr0==Nbit) sum21=sum(x20)-sum(x21); duration. s21(ctr0)=sum21; ctr0=ctr0+1; ptr0=0; if sum21>0 % s(ptr1)=0; else s(ptr1)=1; end s(ptr1); ptr1=ptr1+1; sum21=0;

Sum prod x20-x21

within a bit-

Detect '0' bit % Detect '1' bit

end %

end ptr0=ptr0+1;

For diagnostic purposes, the difference in correlation

for k=1:ptr1-1 s_diff(k)=s21(k); end s_diff';

4. Coding for test_noise_ISI


% % Program to test the BER and packet-error rate for binary sequences. function test_noise_ISI

function test_noise_ISI() A=1 fsamp=12 bit_rate=4 npack=1000; ndelay=0; knoise=0.9; Loop=10; h = [1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0]; bit_error=0; packet_error=0; energy_bit=(A^2)*fsamp/bit_rate; power_noise=knoise^2; N0=power_noise*bit_rate/fsamp; gamma=(A^2)/(N0); SNR=energy_bit/power_noise; SNR_dB=10*log10(SNR) BER_theory=Q_function(sqrt(gamma)); for l=1:Loop s0=rand_seq1(npack); %s0 %Generate sequence

%ISI problem

y=binseq_tx(fsamp,bit_rate,s0); %transmitted signal %y % introduce ISI y = filter(h,1,y); y=A*y; y_lng=length(y); %y_lng ns=randn(1,y_lng); for k=1:y_lng y0(k)=y(k)+knoise*ns(k); end %y0

%Signal + noise

[s1]=binseq_det(fsamp,bit_rate,y0,ndelay); using Matched Filter %s0 transmitted and detected data %s1 %Calculate number of error %

%decode received signal %Use to observe

k=1; ctr_bit_error=0; ctr_packet_error=0; while (k<=length(s0)) if s0(k)~=s1(k) ctr_bit_error=ctr_bit_error+1; ctr_packet_error=1; end k=k+1; end bit_error=bit_error+ctr_bit_error; packet_error=packet_error+ctr_packet_error; end bit_error packet_error Total_bits=Loop*npack BER_theory BER_measured=bit_error/Total_bits PER_measured=packet_error/Loop

5. Coding for Plotting BER versus Varying ParameterGraph:

% Graph plotting for Varying Parameter for Amplitude, Frequency & Bit Rate x=1:5; y=[2.2100e-004 1.0530e-012 2.7973e-026 3.6111e-045 2.1579e-069];

subplot(3,1,1); plot(x,y,'-ro','linewidth',2); axis([0 6 -1e-4 3e-4 ]) title('BER versus Amplitude Graph','FontWeight','bold','horizontalAlignment', 'center') xlabel('Voltage Amplitude,A /V','Fontsize',8) ylabel('Bit Error Rate, BER') grid on

x1=[2 6 10 20 24]; y1=[0.0581 0.0032 2.2100e-004 1.6095e-005 3.3643e-007]; subplot(3,1,2); plot(x1,y1,'-bo','linewidth',2); axis([0 25 -0.05 0.1]) title('BER versus Frequency Graph','FontWeight','bold','horizontalAlignment', 'center') xlabel('Frequency Sampling,fsamp /Hz','Fontsize',8) ylabel('Bit Error Rate, BER') grid on y2=[2.2100e-004 0.0065 0.0131 0.0271 0.0581]; subplot(3,1,3); plot(x,y2,'-go','linewidth',2); axis([0 6 -0.01 0.07]) title('BER versus Bit Rate Graph','FontWeight','bold','horizontalAlignment', 'center') xlabel('Bit Rate, /bps','Fontsize',8) ylabel('Bit Error Rate, BER') grid on

6. Coding for Plotting BER versus SNR(dB)Graph for Varying Parameter:


%Graph plotting for BER(theoretical, measured) versus SNR(db) x=[10.9151 16.9357 20.4576 22.9563 24.8945]; y=[2.2100e-004 1.0530e-012 2.7973e-026 3.6111e-045 2.1579e-069]; y1=[0.0420 0.0038 3.0000e-004 0 0]; subplot(3,1,1); plot(x,y,'-ro','linewidth',2); hold on plot(x,y1,'-bo','linewidth',2); title('BER versus SNR(dB)Graph for Varying Amplitude','FontWeight','bold','horizontalAlignment', 'center') xlabel('SNR (dB)','Fontsize',8) ylabel('Bit Error Rate, BER') legend('Theoretical BER','Measured BER') axis([10 26 -0.01 0.05]) grid on

x1=[3.9254 8.6967 10.9151 12.3764 13.9254]; y1=[0.0581 0.0032 2.2100e-004 1.6095e-005 3.3643e-007]; y2=[0.1735 0.1488 0.0425 9.0000e-004 0]; subplot(3,1,2); plot(x1,y1,'-ro','linewidth',2); hold on plot(x1,y2,'-bo','linewidth',2); title('BER versus SNR(dB)Graph for Varying Frequency','FontWeight','bold','horizontalAlignment', 'center') xlabel('SNR (dB)','Fontsize',8) ylabel('Bit Error Rate, BER') legend('Theoretical BER','Measured BER') axis([3 15 -0.1 0.2]) grid on x2=[10.9151 7.9048 6.1439 4.8945 3.9254]; y3=[2.2100e-004 0.0065 0.0131 0.0271 0.0581]; y4=[0.0413 0.1310 0.1484 0.1233 0.0870]; subplot(3,1,3); plot(x2,y3,'-ro','linewidth',2); hold on plot(x2,y4,'-bo','linewidth',2); title('BER versus SNR(dB)Graph for Varying Frequency','FontWeight','bold','horizontalAlignment', 'center') xlabel('SNR (dB)','Fontsize',8) ylabel('Bit Error Rate, BER') legend('Theoretical BER','Measured BER') axis([3 11 -1e-2 0.16]) grid on

RESULT Part 1: Basic transmission A) Function Files


i. ii. iii.

Test_noise = to test the BER and packet-error rate for binary sequences. Binseq_text = to get the sequence for ASK Binseq_det = to implement coherent ASK detection for 1 packet

B) Main specifications. i. Bit Rate = 1 bits/sec ii. Sampling frequency, fsamp = 10 Hz

iii. iv. v.

Voltage Amplitude, A = 1V Number of bits in a packet = 1000 bits Number of packets = 10 packets

C) 1. Pseudorandom Binary sequence Coding

Function to generate a byte of pseudorandom binary sequence

function x=rand_seq1(npack) x0=rand(1,npack); for k=1:npack if x0(k)>0.5 x(k)=1; else x(k)=0; end end

2. Q-Function Coding
% An approximation for the Q function, Gaussian distribution.

function [y]=Q_function(x) y=qfunc(x);

Varying the following parameter, knoise = 0


h = [0 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0];

1) Voltage Amplitude, A

PARAMETER Voltage Amplitude, (V) Sampling Frequency,(Hz) Bit Rate (Bits/sec) 1 10 1 2 10 1

VALUES 3 10 1 4 10 1 5 10 1

SNR (dB) 10.9151 16.9357 20.4576 22.9563 Bit Error 3 0 0 0 Packet Error 2 0 0 0 Total Bits 10000 10000 10000 10000 Theoretical BER 2.2100e-4 1.0530e-12 2.7973e-26 3.6111e-45 Measured BER 3.0000e-4 0 0 0 PER 0.2000 0 0 0 Table 1: Varying the Following Parameter for Voltage Amplitude

24.8945 0 0 10000 2.1579e-69 0 0

2) Sampling frequency, fsamp

PARAMETER Voltage Amplitude, (V) Sampling Frequency,(Hz) Bit Rate (Bits/sec) SNR (dB)

VALUES

1 1 1 1 1 2 6 10 14 20 1 1 1 1 1 3.925 8.696 10.9151 12.3764 13.9254 4 7 Bit Error 543 31 2 0 0 Packet Error 10 10 2 0 0 Total Bits 10000 10000 10000 10000 10000 Theoretical BER 0.058 0.003 2.2100e-004 1.6095e-005 3.3643e-007 1 2 Measured BER 0.054 0.003 2.0000e-004 0 0 3 1 PER 1 1 0.2000 0 0 Table 2: Varying the Following Parameter for Sampling Frequency

3) Bit Rate

PARAMETER Voltage Amplitude, (V) Sampling Frequency,(Hz) Bit Rate (Bits/sec) SNR (dB) 1 10 1 10.9151

VALUES 1 10 2 7.904 8 1 12 3 6.143 9 1 12 4 4.894 5 1 10 5 3.9254

Bit Error Packet Error Total Bits Theoretical BER

65 144 261 585 10 10 10 10 10000 10000 10000 10000 0.006 0.013 0.027 0.0581 5 1 1 Measured BER 2.0000e-004 0.006 0.014 0.026 0.0585 5 4 1 PER 0.2000 1 1 1 1 Table 3: Varying the Following Parameter for Bit Rate

2 2 10000 2.2100e-004

Figure 1: BER versus Varying Parameter

Figure 2: BER (Theoretically, measured) Versus SNR (dB)

Comment:
1.

In figure 1, when amplitude and frequency increasing, the bit error rate (BER) has decreasing exponentially approximate to zero. But for the changing in the bit rate, the bit error rate (BER) increasing.

2. In figure 2, BER versus SNR graph shows that all varying parameters for both theory and measured are almost the same.

Part 2: Under the Influence of Inter-Symbol Interference (ISI) only. Varying the following parameter, knoise = 0
h = [1 0 0 0 1/2 0 0 0 1/2 0 0 0 0 1/2 0 0];

1) Voltage Amplitude, A PARAMETER Voltage Amplitude, (V) Sampling Frequency, (Hz) Bit Rate (Bits/sec) SNR (dB) Bit Error Packet Error Total Bits 1 10 2 10 VALUES 3 10 4 10 5 10

1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 1000 1000 1000 1000 10000 0 0 0 0 Theoretical BER 0 0 0 0 0 Measured BER 0 0 0 0 0 PER 0 0 0 0 0 Table 4: Varying the Following Parameter for Voltage Amplitude 2) Sampling frequency, fsamp

PARAMETER Voltage Amplitude, (V) Sampling Frequency,(Hz) Bit Rate (Bits/sec) SNR (dB) Bit Error Packet Error Total Bits

VALUES

1 1 1 1 1 2 6 10 14 20 1 1 1 1 1 0 0 0 0 0 0 0 0 0 0 1000 1000 1000 1000 10000 0 0 0 0 Theoretical BER 0 0 0 0 0 Measured BER 0 0 0 0 0 PER 0 0 0 0 0 Table 5: Varying the Following Parameter for Sampling Frequency

3) Bit Rate

PARAMETER Voltage Amplitude, (V) Sampling Frequency,(Hz) Bit Rate (Bits/sec) SNR (dB) Bit Error Packet Error Total Bits

VALUES

1 1 1 1 1 10 10 10 10 10 1 2 3 4 5 0 0 0 0 0 0 0 0 0 0 1000 1000 1000 1000 10000 0 0 0 0 Theoretical BER 0 0 0 0 0 Measured BER 0 0 0 0 0 PER 0 0 0 0 0 Table 6: Varying the Following Parameter for Bit Rate

Figure 3: BER versus Varying Parameter

Figure 4: BER (Theoretically, measured) Versus SNR (dB)

Comment:
1.

In figure 1, all BER for all varying parameter have same value that is zero because there are no noise introduce in the signal. In figure 2, all BER for theoretical and measured have same value that is zero because there are no noises introduce in the signal and produce SNR infinity.

2.

Part 3: Under the Influence of Inter-symbol Interference (ISI) With Corrupted By Noise.

Varying the following parameter, knoise = 0.9


h = [1 0 0 0 1/2 0 0 0 1/2 0 0 0 0 1/2 0 0];

1) Voltage Amplitude, A PARAMETER VALUES

Voltage Amplitude, (V) 1 2 3 4 5 Sampling Frequency,(Hz) 10 10 10 10 10 Bit Rate (Bits/sec) 1 1 1 1 1 SNR (dB) 10.9151 16.9357 20.4576 22.9563 24.8945 Bit Error 420 38 0 0 0 Packet Error 10 1 0 0 0 Total Bits 10000 10000 10000 10000 10000 Theoretical BER 2.2100e-004 1.0530e-012 2.7973e-026 3.6111e-045 2.1579e-069 Measured BER 0.0420 0.0038 3.0000e-004 0 0 PER 1 0.8000 0.3000 0 0 Table 7: Varying the Following Parameter for Voltage Amplitude

2) Sampling frequency, fsamp

PARAMETER

VALUES 1 20 1 13.9254 0 10 10000 3.3643e-007 0 0

Voltage Amplitude, (V) 1 1 1 1 Sampling Frequency,(Hz) 2 6 10 14 Bit Rate (Bits/sec) 1 1 1 1 SNR (dB) 3.9254 8.6967 10.9151 12.3764 Bit Error 1735 1488 425 9 Packet Error 10 10 10 6 Total Bits 10000 10000 10000 10000 Theoretical BER 0.0581 0.0032 2.2100e-004 1.6095e-005 Measured BER 0.1735 0.1488 0.0425 9.0000e-004 PER 1 1 1 0.6000 Table 8: Varying the Following Parameter for Sampling Frequency

3) Bit Rate

PARAMETER Voltage Amplitude, (V) Sampling Frequency,(Hz) Bit Rate (Bits/sec) SNR (dB) 1 10 1 10.9151

VALUES 1 10 5 3.9254 870 10 10000 0.0581 0.0870 1

1 1 1 10 12 12 2 3 4 7.904 6.935 4.894 8 7 5 Bit Error 413 1303 1484 1233 Packet Error 10 10 10 10 Total Bits 10000 10000 10000 10000 Theoretical BER 2.2100e-004 0.006 0.013 0.027 5 1 1 Measured BER 0.0413 0.131 0.148 0.123 0 4 3 PER 1 1 1 1 Table 9: Varying the Following Parameter for Bit Rate

Figure 5: BER versus Varying Parameter

Figure 6: BER (Theoretically, measured) Versus SNR (dB)

Comment:
1.

In figure 1, when amplitude and frequency increasing, the bit error rate (BER) has decreasing exponentially approximate to zero. But for the changing in the bit rate, the bit error rate (BER) increasing. Its because this part using BER theory where it is not affected by Influence of Inter-symbol Interference (ISI). In figure 2, BER versus SNR graph shows that all varying parameters for both theory and measured are not the same because the measured BER not affected by Influence of Inter-symbol Interference (ISI).

2.

DISCUSSION:

1. In this lab session students were introduced on how measures the performance for a digital system corrupted by noise using the Matlab system. The performances of a digital system have probability of error of the output signal in communications systems.

2. Noise is corrupted multiplicative in the process of being transmitted from the channel due to turbulence in the air reflection and refractions. So, it limits ability to communicate. If the noise is increasing, the output signal will become error.

3. In transmission of communication signal, the channel bandwidth is required. The receiver input consists of the transmitted signal plus channel noise. For baseband signaling, the processing circuit in the receiver consists of low-pass filtering with appropriate amplification.

4. From this lab session as well it is learned that in Amplitude Shift Keying (ASK). It is a form of modulation that represents digital data as variations in the amplitude of a carrier wave. With running all there M-file coding, the value of bit rate sampling frequency, voltage amplitude, number of bits in a packet and number of packet will measured.

5. During experiment runs, all the coding must save in same folder. If not, the measure value cant get the value almost with the theory value.

6. In part 1 (e), the value of frequency sampling for bit 3 and bit 4 has been change to 12 in test_noise command because the value measure must become an integer number. If the value of bit 3 & bit 4 is not changing, the value measures have become to decimal number and make additional error in Binseq_tx coding file.

7. In part 2, the value of bit rate become to infinity (). With using influence of Inter-sysmbol Interference (ISI), Knoise = 0 and h=(10001/2 0001/2 001/2 ). Inter-symbol Interference is not affect the bit error. So the noise becomes equal to zero (0).

8. In part 3, the value of error is increasing. That because when the Inter-symbol Interference (ISI) was corrupted by noise, the tail of energy was created in transmission medium. The energy has been interferes with one or more subsequent symbol as Figure 1 in below. In receiver, the value the particular symbol is more susceptible to noise and incorrect interpretation.

Figure 7: Symbol is spread by the medium

9. To reduce the noise in transmission, the frequency must be increasing to make the bit rate be reducing. For to mitigate the detrimental effect of ISI, the band limited pulse which minimize the effect of ISI and channel impulse response has been cancel the ISI introduced in filter the receiver signal.

10. By comparing all the result, part 2 system that only ISI has a much better performance compare to the system with under influence noise.

CONCLUSION:

In this lab session, students were given a brief introduction towards the coding of Matlab Based Function and from here students were needed to alter this coding to solve problems given in the exercises of lab sheet. Moreover, Students indeed were

able to understanding of the concepts of digital communication systems. Besides that, Student can able to understanding the difference performance of digital communication system when it is under the influence of Intersymbol Interference (ISI) and when it is both under the influence of Intersymbol Interference (ISI) with corrupted by noise.

Das könnte Ihnen auch gefallen