performance of digital communication system corrupted by noise (1) (2)
TRANSCRIPT
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_noiseb) binseq_txc) binseq_det
2. In Part 1 (b) the main specifications for the ASK signal in the main file is identifieda) Bit rateb) Sampling frequencyc) Voltage amplituded) Number of bits in a packete) 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 sequenceb) 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 frequencyc) Bit rated) Bit errore) Packet errorf) Number of bits for the whole transmissiong) Theoretical BERh) Measured BERi) 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 BER’s.
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 BER’s
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=1fsamp=10bit_rate=1npack=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]; %ISI problem
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); %Generate sequence %s0 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); %Signal + noise end %y0 [s1]=binseq_det(fsamp,bit_rate,y0,ndelay); %decode received signal using Matched Filter %s0 %Use to observe 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 bit_error=bit_error+ctr_bit_error; packet_error=packet_error+ctr_packet_error; end bit_errorpacket_errorTotal_bits=Loop*npackBER_theoryBER_measured=bit_error/Total_bitsPER_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 amplitudTb=1/b; % bit-durationns=Tb*fs;num_s=length(s); % untuk menentukan baris dan lajur sequence yang diberinum_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); % Sum prod x20-x21 within a bit-duration. s21(ctr0)=sum21; ctr0=ctr0+1; ptr0=0; if sum21>0 % Detect '0' bit s(ptr1)=0; else % Detect '1' bit s(ptr1)=1; end s(ptr1); ptr1=ptr1+1;
sum21=0; end ptr0=ptr0+1;end % For diagnostic purposes, the difference in correlation for k=1:ptr1-1 s_diff(k)=s21(k);ends_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=1fsamp=12bit_rate=4npack=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]; %ISI problem 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); %Generate sequence %s0 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); %Signal + noise
end %y0 [s1]=binseq_det(fsamp,bit_rate,y0,ndelay); %decode received signal using Matched Filter %s0 %Use to observe 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 bit_error=bit_error+ctr_bit_error; packet_error=packet_error+ctr_packet_error; end bit_errorpacket_errorTotal_bits=Loop*npackBER_theoryBER_measured=bit_error/Total_bitsPER_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 onplot(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 onplot(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 onplot(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. Test_noise = to test the BER and packet-error rate for binary sequences.
ii. Binseq_text = to get the sequence for ASK
iii. 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. Voltage Amplitude, A = 1V
iv. Number of bits in a packet = 1000 bits
v. 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; endend
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 VALUES
Voltage Amplitude, (V) 1 2 3 4 5Sampling Frequency,(Hz)
10 10 10 10 10
Bit Rate (Bits/sec) 1 1 1 1 1SNR (dB) 10.9151 16.9357 20.4576 22.9563 24.8945Bit Error 3 0 0 0 0Packet Error 2 0 0 0 0Total Bits 10000 10000 10000 10000 10000Theoretical BER 2.2100e-4 1.0530e-12 2.7973e-26 3.6111e-45 2.1579e-69Measured BER 3.0000e-4 0 0 0 0PER 0.2000 0 0 0 0
Table 1: Varying the Following Parameter for Voltage Amplitude
2) Sampling frequency, fsamp
PARAMETER VALUES
Voltage Amplitude, (V) 1 1 1 1 1Sampling Frequency,(Hz) 2 6 10 14 20Bit Rate (Bits/sec) 1 1 1 1 1SNR (dB) 3.9254 8.6967 10.9151 12.3764 13.9254Bit Error 543 31 2 0 0Packet Error 10 10 2 0 0Total Bits 10000 10000 10000 10000 10000Theoretical BER 0.0581 0.0032 2.2100e-004 1.6095e-005 3.3643e-007Measured BER 0.0543 0.0031 2.0000e-004 0 0PER 1 1 0.2000 0 0
Table 2: Varying the Following Parameter for Sampling Frequency
3) Bit Rate
PARAMETER VALUES
Voltage Amplitude, (V) 1 1 1 1 1
Sampling Frequency,(Hz) 10 10 12 12 10Bit Rate (Bits/sec) 1 2 3 4 5SNR (dB) 10.9151 7.9048 6.1439 4.8945 3.9254Bit Error 2 65 144 261 585Packet Error 2 10 10 10 10Total Bits 10000 10000 10000 10000 10000Theoretical BER 2.2100e-004 0.0065 0.0131 0.0271 0.0581Measured BER 2.0000e-004 0.0065 0.0144 0.0261 0.0585PER 0.2000 1 1 1 1
Table 3: Varying the Following Parameter for Bit Rate
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 VALUES
Voltage Amplitude, (V) 1 2 3 4 5Sampling Frequency,(Hz) 10 10 10 10 10Bit Rate (Bits/sec) 1 1 1 1 1SNR (dB) ∞ ∞ ∞ ∞ ∞Bit Error 0 0 0 0 0Packet Error 0 0 0 0 0Total Bits 10000 10000 10000 10000 10000Theoretical BER 0 0 0 0 0Measured BER 0 0 0 0 0PER 0 0 0 0 0Table 4: Varying the Following Parameter for Voltage Amplitude
2) Sampling frequency, fsamp
PARAMETER VALUES
Voltage Amplitude, (V) 1 1 1 1 1Sampling Frequency,(Hz) 2 6 10 14 20Bit Rate (Bits/sec) 1 1 1 1 1SNR (dB) ∞ ∞ ∞ ∞ ∞Bit Error 0 0 0 0 0Packet Error 0 0 0 0 0Total Bits 10000 10000 10000 10000 10000Theoretical BER 0 0 0 0 0Measured BER 0 0 0 0 0PER 0 0 0 0 0
Table 5: Varying the Following Parameter for Sampling Frequency
3) Bit Rate
PARAMETER VALUES
Voltage Amplitude, (V) 1 1 1 1 1Sampling Frequency,(Hz) 10 10 10 10 10Bit Rate (Bits/sec) 1 2 3 4 5SNR (dB) ∞ ∞ ∞ ∞ ∞Bit Error 0 0 0 0 0Packet Error 0 0 0 0 0Total Bits 10000 10000 10000 10000 10000Theoretical BER 0 0 0 0 0Measured BER 0 0 0 0 0PER 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.
2. 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.
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 5Sampling Frequency,(Hz) 10 10 10 10 10Bit Rate (Bits/sec) 1 1 1 1 1SNR (dB) 10.9151 16.9357 20.4576 22.9563 24.8945Bit Error 420 38 0 0 0Packet Error 10 1 0 0 0Total Bits 10000 10000 10000 10000 10000Theoretical BER 2.2100e-004 1.0530e-012 2.7973e-026 3.6111e-045 2.1579e-069Measured BER 0.0420 0.0038 3.0000e-004 0 0PER 1 0.8000 0.3000 0 0
Table 7: Varying the Following Parameter for Voltage Amplitude
2) Sampling frequency, fsamp
PARAMETER VALUES
Voltage Amplitude, (V) 1 1 1 1 1Sampling Frequency,(Hz) 2 6 10 14 20Bit Rate (Bits/sec) 1 1 1 1 1SNR (dB) 3.9254 8.6967 10.9151 12.3764 13.9254Bit Error 1735 1488 425 9 0Packet Error 10 10 10 6 10Total Bits 10000 10000 10000 10000 10000Theoretical BER 0.0581 0.0032 2.2100e-004 1.6095e-005 3.3643e-007Measured BER 0.1735 0.1488 0.0425 9.0000e-004 0PER 1 1 1 0.6000 0
Table 8: Varying the Following Parameter for Sampling Frequency
3) Bit Rate
PARAMETER VALUES
Voltage Amplitude, (V) 1 1 1 1 1Sampling Frequency,(Hz) 10 10 12 12 10Bit Rate (Bits/sec) 1 2 3 4 5SNR (dB) 10.9151 7.9048 6.9357 4.8945 3.9254Bit Error 413 1303 1484 1233 870Packet Error 10 10 10 10 10Total Bits 10000 10000 10000 10000 10000Theoretical BER 2.2100e-004 0.0065 0.0131 0.0271 0.0581Measured BER 0.0413 0.1310 0.1484 0.1233 0.0870PER 1 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. It’s because this part using BER theory where it is not affected by Influence of Inter-symbol Interference (ISI).
2. 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).
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 can’t 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.