Documente Academic
Documente Profesional
Documente Cultură
Name ID number
Edemialem Tamiru……………………………...............….….RM7
Edemialem Tamiru……………………………...............….….RM7
Edemialem Tamiru……………………………...............….….RM7
Edemialem Tamiru……………………………...............….….RM7
Edemialem Tamiru……………………………...............….….RM7
i
7.1 Time division multiple-access (TDMA) ........................................................................................ 110
7. 2. Code division multiple-access (CDMA) ..................................................................................... 111
7. 3. Frequency division multiple-access (FDMA) ............................................................................. 112
Chapter Eight ............................................................................................................................................ 120
Channel Model ...................................................................................................................................... 120
8.1 AWGN Model .............................................................................................................................. 120
8.2 Fading Channel ............................................................................................................................ 123
Conclusion ................................................................................................................................................. 132
ii
2020GC
CHAPTER ONE
A digital communication system has several distinguishing features when compared with an
analog communication system. Both analog (such as voice signal) and digital signals (such as
data generated by computers) can be communicated over a digital transmission system. When the
signal is analog in nature, an equivalent discrete-time discrete-amplitude representation is
possible after the initial processing of sampling and quantization.
Figure 1.1 illustrates the functional diagram and the basic of a digital communication system.
The source output may be either an analog signal, such as audio or video signal, or digital signal.
In a digital communication system, the message produced by the source are converted into a
sequence of binary digits. Ideally, we should like to represent the source output (message) by as
Page 1
JU (JIT) ECE ELECTRONICS COMMUNICATION ENGINEERING”
2020GC
few binary digits as possible. In other words, we seek an efficient representation of the source
output that results in little or no redundancy. The process of efficiently converting the output of
either analog or digital source into a sequence of binary digits is called source encoding or data
compression. Then after the channel encoder introduces some redundancy in the binary
information sequence, in a controlled manner. Such introduction of controlled redundancy can be
used at the receiver to provide error correction capability to the data being transmitted. For
transmission of high-speed digital data (e.g. Computer communication systems), the digital
signal needs to be modulated. The primary purpose of the digital modulator is to map the binary
information sequence into high frequency analog signal waveforms (carrier signals).
Multiplexing and multiple access both involve the idea of resource sharing. Multiplexing takes
place locally and multiple access takes place remotely. Spreading is used in military applications
for achieving interference protection and privacy. Signals can be spread in frequency, in time, or
in both frequency and time. The communication channel is the physical medium that is used to
send the signal from the transmitter to the receiver. In wireless transmission, the channel may be
the atmosphere (free space). On the other hand, telephone channels usually employ a variety of
physical media, including wirelines, optical fiber cables, and wireless (microwave radio).
At the receiver side, the baseband decoder block converts back the line coded pulse waveform to
transmitted data sequence. Then The receiver front end and/or the demodulator provides
frequency down conversion for each of the received band pass waveform. Digital demodulation
is defined as recovery of a waveform (base band pulse). The estimates of the transmitted data
symbols are passed to the channel decoder. The channel decoder attempts to reconstruct the
original information sequence from knowledge of the code used by the channel encoder and the
redundancy contained in the received data. The source decoder accepts the output sequence from
the channel decoder. From the knowledge of the source encoding method used, it attempts to
reconstruct the original signal from the source. Because of channel decoding errors and possible
distortion introduced by the source decoder, the signal at the output of the source decoder is an
approximation to the original source output.
In the next of each chapter we mainly focus on the designing each system components of digital
communication and performance analysis of each elements by mainly in terms of bit error rate.
Page 2
JU (JIT) ECE ELECTRONICS COMMUNICATION ENGINEERING”
2020GC
CHAPTER TWO
SOURCE ENCODING
The process by which information symbols are mapped to alphabetical symbols is called source
coding. The mapping is generally performed in sequences or groups of information and
alphabetical symbols. Also, it must be performed in such a manner that it guarantees the exact
recovery of the information symbol back from the alphabetical symbols otherwise it will destroy
the basic theme of the source coding. The source coding is called lossless compression if the
information symbols are exactly recovered from the alphabetical symbols otherwise it is called
lossy compression. The Source coding also known as compression or bit-rate reduction process.
It is the process of removing redundancy from the source symbols, which essentially reduces
data size. Source coding is a vital part of any communication system as it helps to use disk space
and transmission bandwidth efficiently. The source coding can either be lossy or lossless. In case
of lossless encoding, error free reconstruction of source symbols is possible, whereas, exact
reconstruction of source symbols is not possible in case of lossy encoding. The minimum
average length of code words as function of entropy is restricted between an upper and lower
bound of the information source symbols by the Shannon’s source coding theorem.
In Fig.2 a general source encoding and decoding system is presented. Analog information
source is sampled and quantized and finally represented with binary (or M-ary) symbols b(kTs).
In
the receiver side the received symbols bˆ (kTs) are decoded and filtered back to analog signal. So
there is an analog-to-digital (A/D) conversion in the transmitter and digital-to-analog (D/A)
conversion in the receiver.
Page 3
JU (JIT) ECE ELECTRONICS COMMUNICATION ENGINEERING”
2020GC
The quantization operation typically transforms an analog signal X into a discrete signal Xq.
This
operation introduces some quantization noise Xq-X into the system and the system designer tries
to minimize the mean squared error E{(X-Xq)2}. If the samples X(kTs) are uncorrelated, then
they
can be quantized independently, but otherwise some data processing is needed to remove
correlation between samples before quantization.
A. Quantization
Classical uniform quantization divides the input voltage into equal intervals, thus ith interval
corresponds to range i∆+(∆/2). When input voltage falls into this range, quantizer gives an output
integer i. Nonuniform quantizer divides the input range into unequal intervals. The input signal is
first processed by a compressor and after that with a uniform quantizer. So called µ-law for a
compressor gives xc=vc/V as a function of x=v/V as follows
Where xc is the compressor output, v the input, V the maximum input and µ is typically 255. So
called A-law is given by
Page 4
JU (JIT) ECE ELECTRONICS COMMUNICATION ENGINEERING”
2020GC
The source decoder estimates xc by performing simply inverse mapping from the integer i as
follows
where (sgn x)g(x) describes the used compressor law in the above equation.
B. Differential Quantization
If the sequence {X(kTs)} is correlated, the variance of the difference X(kTs) - X((k-1)Ts) is
smaller than the original variance of X(kTs). Therefore it is beneficial to quantize the difference
instead of the original sequence to achieve lower MSE. In general a predictor uses a linear
combination of M previous values as follows
Page 5
JU (JIT) ECE ELECTRONICS COMMUNICATION ENGINEERING”
2020GC
TRANSMITTER
RECEIVER
Page 6
JU (JIT) ECE ELECTRONICS COMMUNICATION ENGINEERING”
2020GC
There are many possible algorithms to encode discrete source. Here is given an algorithm that
was first proposed by Shannon and which maps M-ary alphabet into binary digits. Let us assume
that the encoder input consists of blocks of N symbols and there are q(N) possible messages of
that length. Let p1,p2,…,pq(N) be the probabilities of these messages, and p1+p2+…+pq(N)=1, p1
> p2
>…> pq(N). Then the minimum average number of bits per symbol for these blocks is
Shannon proposes the following encoding for the blocks of N symbols. Let
Then the binary encoding for message mi is the binary expansion of Fi using up to ni bits. This
algorithm assigns shorter codes for messages of higher probability, which decreases the average
number of bits per symbol.
We can observe that idealized A/D operation, uniform or nonuniform quantization, is a simple
memoryless transformation. So it is enough to read input value and calculate the corresponding
output. Real A/D converters have many different properties, but very often idealized models will
do. In the receiver end an inverse D/A conversion is performed. Usually first the binary sequence
is mapped into quantized digital sequence and after that the sequence is filtered into an analog
signal. Hence, as we have presented source encoding and decoding steps, we can now assume
Page 7
JU (JIT) ECE ELECTRONICS COMMUNICATION ENGINEERING”
2020GC
that encoded binary sequence consists of '0' and '1' with equal probabilities or M-ary sequence
with each symbol equally probably. As we have this assumption, we can replace the actual
source encoder with a (pseudo) random binary sequence, if we are not particularly interested in
source encoding/decoding, sampling or quantization operations.
close all;
sig=1:4;
Symbols=[1 2 3 4];
dict = huffmandict(Symbols,P);
temp=dict;
end
disp(temp);
hcode= huffmanenco(sig,dict)
[3] '1'
Page 8
JU (JIT) ECE ELECTRONICS COMMUNICATION ENGINEERING”
2020GC
hcode =
0 0 1 0 1 1 0 0 0
dhsig =
1 2 3 4
Page 9
JU (JIT) ECE ELECTRONICS COMMUNICATION ENGINEERING”
2020GC
CHAPTER THREE
The key idea of FEC is to transmit enough redundant data to allow receiver to recover from
errors all by itself. No sender retransmission required. In a digital communication system, we
have to transmit more data via a noisy channel which results in vast number of errors. The
answer for this issue is channel encoding and decoding techniques which helps in error control
and in increasing the effectiveness and performance of communication systems. Channel codes
are used to add protection against errors in the channel. It can be seen as a way of increasing the
distance between transmitted alternatives, so that a receiver has a better chance of detecting the
correct one in a noisy channel.
Block codes
Cyclic codes
Reed-Solomon codes
Convolutional codes
Turbo codes, etc.
The structured redundancy added in the channel coding is often called parity or check sum.
Page 10
JU (JIT) ECE ELECTRONICS COMMUNICATION ENGINEERING”
2020GC
II. CONVOLUTION CODES: Encodes data in a stream, without breaking it into blocks,
creating code sequences.
Figure 2: Block coder with k information digits and appended parity check bits
The coding rate R is simply the ratio of data or information carrying bits to the overall block
length, k/n. The number of parity check (redundant) bits is therefore n – k. This block code is
usually described as a (n, k) code. An (n, k) block code is said to be linear if the vector sum of
two code words is a code word. The un coded k data bits be represented by the m vector: m=
(m , m , …, m ) and the corresponding code word be represented by the n-bit c vector: c= (c ,
1 2 k 1
c , …c , c , …, c , c ). Each parity bit consists of weighted modulo 2 sum of the data bits
2 k k+1 n-1 n
represented by Exclusive OR or modulo 2-addition. For K data bits and r = n-k redundant bits
the corresponding code word is given as:
Page 11
JU (JIT) ECE ELECTRONICS COMMUNICATION ENGINEERING”
2020GC
c1 m1
c2 m2
...
ck mk
c m p
1 1( k 1) m2 p2 ( k 1) ... mk pk ( k 1)
k 1
...
cn m1 p1n m2 p2 n ... mk pkn
C=mG
where m is the information code word block length, G is the generator matrix.
G = [Ik | P] k × n
where Pi = Remainder of [x n-k+i-1/g(x)] for i=1, 2, ..., k, and I is unit or identity matrix.
Figure 3: Operations of the generator matrix and the parity check matrix.
The parity check matrix H is used to detect errors in the received code by using the fact that C *
HT = 0 (null vector), let Received code vector x = c e be the received message where c is the
correct code and e is the error and Compute S = x * HT =( c e)* HT = c HT e HT = e HT.
If S is 0 then message is correct else there are errors in it, from common known error patterns the
correct message can be decoded.
Page 12
JU (JIT) ECE ELECTRONICS COMMUNICATION ENGINEERING”
2020GC
Suppose we want to code k = 4 information bits into a n = 7-bit code word, giving a coding rate
of 4/7. Code design is performed by using finite field algebra to achieve linear codes. We can
achieve this (7, 4) block code using 3 input exclusive or (EX - OR) gates to form the three even
parity check bits, P1, P2 and P3, from the 4 information carrying bits, I1...I4, as shown in Figure 4.
Simulation result
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%
clc;
clear all;
% Input Generator Matrix
g=input('Enter The Generator Matrix: ')
Page 13
JU (JIT) ECE ELECTRONICS COMMUNICATION ENGINEERING”
2020GC
% Code Word
r = input('Enter the Received Code Word:')
p = [g(:,n-k+2:n)];
h = [transpose(p),eye(n-k)];
disp('Hammimg Code')
ht = transpose(h)
disp('Syndrome of a Given Codeword is :')
s = rem(r*ht,2)
for i = 1:1:size(ht)
if(ht(i,1:3)==s)
r(i) = 1-r(i);
break;
end
Page 14
JU (JIT) ECE ELECTRONICS COMMUNICATION ENGINEERING”
2020GC
end
disp('The Error is in bit:')
i
disp('The Corrected Codeword is :')
r
******************** OUTPUT *******************
g=
1000101
0100111
0010110
0001011
G=
The Order of Linear block Code for given Generator Matrix is:
n=
k=
Page 15
JU (JIT) ECE ELECTRONICS COMMUNICATION ENGINEERING”
2020GC
c=
0000000
0001011
0010110
0011101
0100111
0101100
0110001
0111010
1000101
1001110
1010011
1011000
1100010
1101001
1110100
1111111
The Minimum Hamming Distance dmin for given Block Code is=
d_min =
Page 16
JU (JIT) ECE ELECTRONICS COMMUNICATION ENGINEERING”
2020GC
r=
1000100
Hammimg Code
ht =
101
111
110
011
100
010
001
s=
001
Page 17
JU (JIT) ECE ELECTRONICS COMMUNICATION ENGINEERING”
2020GC
i=
r=
1000101
The simulation below shows various values of the SNR and its corresponding BER of Hamming
codes. Consider a family of (n,k) linear block codes that have the following parameters.
Page 18
JU (JIT) ECE ELECTRONICS COMMUNICATION ENGINEERING”
2020GC
berf=[];
for i=1:10
b=0;
for j=1:50
msg=randi([0,1],500,k);
code=encode(msg,n,k,'hamming/binary');
t=0:0.1:10;
snr=0;
y=awgn(code,i);
y(find(y>0))=1;
y(find(y<0))=0;
msgop=decode(y,n,k,'hamming/binary');
[number,b1]=biterr(msgop,msg);
b=b+b1;
end
berf(i)=b/50;
end
semilogy(1:10,berf);
title('performance analysis in awgn for hamming codes');
xlabel('snr(db)');
ylabel('BER');
Page 19
JU (JIT) ECE ELECTRONICS COMMUNICATION ENGINEERING”
2020GC
Convolutional codes are denoted by (n, k, L), where L is code (or encoder) Memory depth
(number of register stages). Constraint length C=n(L+1) is defined as the number of encoded bits
a message bit can influence to. Convolutional encoder is a finite state machine (FSM) processing
information bits in a serial manner. Thus the generated code is a function of input and the state of
the FSM.
Page 20
JU (JIT) ECE ELECTRONICS COMMUNICATION ENGINEERING”
2020GC
A polynomial forming the generator polynomial should be at most K degree and specifies the
connections between the shift registers and the modulo-2 adders or EXOR gates. Two generator
polynomials are g1(x) =1+x2, g2(x) =1+x+x2 which give g1(x) = (101) and g2(x) = (111).
I. Tree diagram
The tree diagram helps in understanding the coding procedure of these type of codes.
Page 21
JU (JIT) ECE ELECTRONICS COMMUNICATION ENGINEERING”
2020GC
The encoded group of bits can be derived from the tree diagram. It makes the encoding
procedure more detailed and easier to comprehend. Each branch of the tree represents an input
symbol and the corresponding pair of binary symbols(output) is shown on the branch. An input 0
indicates the upper and 1 represents the lower branch.
Page 22
JU (JIT) ECE ELECTRONICS COMMUNICATION ENGINEERING”
2020GC
Substance of the furthest right (K-1) shift register stages characterize the states of the encoder.
Along these lines, the encoder in Fig. has four states. The move of an encoder starting with one
state then onto the next, as created by data bits. Another information bit causes a move starting
with one state then onto the next.
Page 23
JU (JIT) ECE ELECTRONICS COMMUNICATION ENGINEERING”
2020GC
Maximum likelihood decoding algorithm is complex to search all available paths because of end
to end calculation. Viterbi Algorithm performs maximum likelihood decoding by listening its
complexity dispensing the most unlikely trellis paths at every transmission stage. Viterbi
algorithm search trellis, accumulate distances, discard path with highest distance whenever they
“collide” and back-trace from the end. The Viterbi algorithm needs to keep track of one
surviving path per state in the trellis. For long code sequences this causes a memory problem. In
practice we only keep track of surviving paths in a window consisting of a certain number of
trellis steps. At the end of this window we enforce decisions on bits, based on the metric in the
latest decoding step.
If we do not detect ones and zeros before decoding our channel code using the Hamming
distance, we can use soft decoding. In the AWGN channel, this means comparing Euclidean
distances instead.
Page 24
JU (JIT) ECE ELECTRONICS COMMUNICATION ENGINEERING”
2020GC
The decoder makes a firm or hard decision whether a one or a zero was transmitted and provides
no other information for the decoder such as how reliable the decision is. Hence, its output is
only zero or one (the output is quantized only to two level) that are called “hard-bits”. Decoding
based on hard-bits is called the “hard-decision decoding”.
In Soft decision:
The demodulator provides the decoder with some side information together with the decision.
The side information provides the decoder with a measure of confidence for the decision. The
decoder outputs which are called soft-bits, are quantized to more than two levels. Decoding
based on soft-bits, is called the “soft-decision decoding”.
(a) Any state can be reached from only 2 possible previous state.
(b) Though we reach each state from 2 possible states, only one of the transition in valid. We can
find the transition which is more likely (based on the received coded bits) and ignore the other
transition.
(c) The errors in the received coded sequence are randomly distributed and the probability of
error is small.
Based on the above assumptions, the decoding scheme proceed as follows: Assume that there are
coded bits. Take two coded bits at a time for processing and compute Hamming distance, Branch
Metric, Path Metric and Survivor Path index for N/2+K-1 times.
System Model
Page 25
JU (JIT) ECE ELECTRONICS COMMUNICATION ENGINEERING”
2020GC
The simulation shows the bit error rate for BPSK modulation in AWGN using the convolutional
coding and Viterbi decoding is provided. Since 2 coded bits are required for transmission of each
data bit, the relation between coded bits to noise ratio Ec/No with bits to noise ratio Eb/No is
Ec/No = Eb/2No.
Simulation model
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%
%Encode five two-bit symbols using a rate 2/3 convolutional code
Page 26
JU (JIT) ECE ELECTRONICS COMMUNICATION ENGINEERING”
2020GC
Convolutional Coding and the associated hard decision Viterbi decoding Matlab code
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%
clear
N = 10^6 ;% number of bits or symbols
ref = [0 0 ; 0 1; 1 0 ; 1 1 ];
ipLUT = [ 0 0 0 0;...
0 0 0 0;...
1 1 0 0;...
0 0 1 1 ];
for yy = 1:length(Eb_N0_dB)
Page 27
JU (JIT) ECE ELECTRONICS COMMUNICATION ENGINEERING”
2020GC
% Transmitter
ip = rand(1,N)>0.5; % generating 0,1 with equal probability
% Noise addition
y = s + 10^(-Ec_N0_dB(yy)/20)*n; % additive white gaussian noise
% Viterbi decoding
pathMetric = zeros(4,1); % path metric
survivorPath_v = zeros(4,length(y)/2); % survivor path
for ii = 1:length(y)/2
r = cipHat(2*ii-1:2*ii); % taking 2 coded bits
Page 28
JU (JIT) ECE ELECTRONICS COMMUNICATION ENGINEERING”
2020GC
if (ii == 1) || (ii == 2)
else
% branch metric and path metric for state 0
bm1 = pathMetric(1,1) + hammingDist(1);
bm2 = pathMetric(2,1) + hammingDist(4);
[pathMetric_n(1,1) idx] = min([bm1,bm2]);
survivorPath(1,1) = idx;
Page 29
JU (JIT) ECE ELECTRONICS COMMUNICATION ENGINEERING”
2020GC
end
pathMetric = pathMetric_n;
survivorPath_v(:,ii) = survivorPath;
end
Page 30
JU (JIT) ECE ELECTRONICS COMMUNICATION ENGINEERING”
2020GC
close all
figure
semilogy(Eb_N0_dB,theoryBer,'bd-','LineWidth',2);
hold on
semilogy(Eb_N0_dB,simBer_Viterbi,'mp-','LineWidth',2);
axis([0 10 10^-5 0.5])
grid on
legend('theory - uncoded', 'simulation - Viterbi (rate-1/2, [7,5]_8)');
xlabel('Eb/No, dB');
ylabel('Bit Error Rate');
title('BER for BCC with Viterbi decoding for BPSK in AWGN');
Page 31
JU (JIT) ECE ELECTRONICS COMMUNICATION ENGINEERING”
2020GC
Figure 10: BER plot for BPSK modulation in AWGN channel with Binary Convolutional code
and hard decision Viterbi decoding.
Observations
For lower Eb/No regions, the error rate with Viterbi decoding is higher encoded bit error
rate. This is because, Viterbi decoder prefers the error to be randomly distributed for it
work effectively. At lower Eb/No values, there are more chances of multiple received
coded bits in errors, and the Viterbi algorithm is unable to recover.
There can be further optimizations like – using soft decision decoding, limiting the
traceback length etc.
Convolutional Coding and the associated soft decision Viterbi decoding System Model
.
Conditional probability distribution function (PDF) of if the coded bit is 1 is,
.
Euclidean distance
In the hard decision Viterbi decoding, based on the location of the received coded symbol, the
coded bit was estimated – if the received symbol is greater than zero, the received coded bit is 1;
if the received symbol is less than or equal to zero, the received coded bit is 0.
Page 32
JU (JIT) ECE ELECTRONICS COMMUNICATION ENGINEERING”
2020GC
In Soft decision decoding, rather than estimating the coded bit and finding the Hamming
distance, the distance between the received symbol and the probable transmitted symbol is found
out.
Euclidean distance if transmitted coded bit is 0 is,
.
Euclidean distance if transmitted coded bit is 1 is,
As the terms , , and are common in both the equations they can be ignored. The
simplified Euclidean distance is,
and
.
As the Viterbi algorithm takes two received coded bits at a time for processing, we need to find
the Euclidean distance from both the bits.
Simulation Model
The simulation model performs the following:
Generation of random BPSK modulated symbols +1’s and -1’s
convolutional encode them using rate -1/2, generator polynomial [7,5] octal code
Passing them through Additive White Gaussian Noise channel
Received soft bits and hard bits are passed to Viterbi decoder
Counting the number of errors from the output of Viterbi decoder
Repeating the same for multiple Eb/No value.
Convolutional Coding and the associated soft and hard decision Viterbi decoding Matlab
code
Page 33
JU (JIT) ECE ELECTRONICS COMMUNICATION ENGINEERING”
2020GC
%
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%
clear
N = 10^6 ;% number of bits or symbols
refHard = [0 0 ; 0 1; 1 0 ; 1 1 ];
refSoft = -1*[-1 -1; -1 1 ;1 -1; 1 1 ];
ipLUT = [ 0 0 0 0;...
0 0 0 0;...
1 1 0 0;...
0 0 1 1 ];
for yy = 1:length(Eb_N0_dB)
% Transmitter
ip = rand(1,N)>0.5; % generating 0,1 with equal probability
Page 34
JU (JIT) ECE ELECTRONICS COMMUNICATION ENGINEERING”
2020GC
cip = [cip1;cip2];
cip = cip(:).';
% Noise addition
y = s + 10^(-Ec_N0_dB(yy)/20)*n; % additive white gaussian noise
% receiver
cipHard = real(y)>0; % hard decision
cipSoft = real(y); % soft decision
% Viterbi decoding
pmHard = zeros(4,1); % hard path metric
svHard_v = zeros(4,length(y)/2); % hard survivor path
pmSoft = zeros(4,1); % soft path metric
svSoft_v = zeros(4,length(y)/2); % soft survivor path
for ii = 1:length(y)/2
rHard = cipHard(2*ii-1:2*ii); % taking 2 hard bits
rSoft = cipSoft(2*ii-1:2*ii); % taking 2 soft bits
Page 35
JU (JIT) ECE ELECTRONICS COMMUNICATION ENGINEERING”
2020GC
if (ii == 1) || (ii == 2)
Page 36
JU (JIT) ECE ELECTRONICS COMMUNICATION ENGINEERING”
2020GC
else
% branch metric and path metric for state 0
bm1Hard = pmHard(1,1) + hammingDist(1);
bm2Hard = pmHard(2,1) + hammingDist(4);
[pmHard_n(1,1) idx] = min([bm1Hard,bm2Hard]);
svHard(1,1) = idx;
bm1Soft = pmSoft(1,1) + euclideanDist(1);
bm2Soft = pmSoft(2,1) + euclideanDist(4);
[pmSoft_n(1,1) idx] = min([bm1Soft,bm2Soft]);
svSoft(1,1) = idx;
Page 37
JU (JIT) ECE ELECTRONICS COMMUNICATION ENGINEERING”
2020GC
end
pmHard = pmHard_n;
svHard_v(:,ii) = svHard;
pmSoft = pmSoft_n;
svSoft_v(:,ii) = svSoft;
end
Page 38
JU (JIT) ECE ELECTRONICS COMMUNICATION ENGINEERING”
2020GC
currHardState = prevHardState;
prevSoftState = svSoft_v(currSoftState,jj);
ipHatSoft_v(jj) = ipLUT(currSoftState,prevSoftState);
currSoftState = prevSoftState;
end
end
close all
figure
semilogy(Eb_N0_dB,theoryBer,'bd-','LineWidth',2);
hold on
semilogy(Eb_N0_dB,simBer_HardViterbi,'mp-','LineWidth',2);
semilogy(Eb_N0_dB,simBer_SoftViterbi,'cd-','LineWidth',2);
axis([0 10 10^-5 0.5])
grid on
legend('theory - uncoded', 'simulation - hard Viterbi', 'simulation - soft Viterbi');
xlabel('Eb/No, dB');
ylabel('Bit Error Rate');
title('BER for BCC with Viterbi decoding for BPSK in AWGN');
Page 39
JU (JIT) ECE ELECTRONICS COMMUNICATION ENGINEERING”
2020GC
Figure 11: BER plot for BPSK with AWGN in soft decision Viterbi decoding
Observation
When compared with hard decision decoding, soft decision decoding provides around
2dB of gain for bit error rate of 10-4.
Page 40
JU (JIT) ECE ELECTRONICS COMMUNICATION ENGINEERING”
2020GC
Page 41
JU (JIT) ECE ELECTRONICS COMMUNICATION ENGINEERING”
2020GC
Chapter four
Multiplexing
The term “Multiplexing” or “Muxing” is one kind of technique for combining multiple signals
like analog as well as digital into one signal over a channel or a shared medium. The aim is
to share a scarce resource. This technique is applicable in telecommunications as well as
computer networks. For instance, in telecommunications, one cable is used for carrying different
telephone calls. In the year 1870, the multiplexing technique is invented first in telegraphy, and
at present, it is extensively used in communications. The scientist “George Owen Squier” was
recognized the growth of multiplexing in telephony in the year 1910. The signal which is
multiplexed will be transmitted over a cable or channel and separates the channel into numerous
logic channels.
The multiplexing divides the capacity of the communication channel into several logical
channels, one for each message signal or data stream to be transferred.
A reverse process, known as demultiplexing, extracts the original channels on the receiver end.
Fig1 multiplexing
Page 42
JU (JIT) ECE ELECTRONICS COMMUNICATION ENGINEERING”
2020GC
Muxing (or) multiplexing can be defined as; it is a way of transmitting various signals over a
media or single line. A common kind of multiplexing merges a number of low-speed signals to
send over an only high-speed link, or it is used to transmit a medium as well as its link with the
number of devices. It provides both privacy & Efficiency. The entire process can be done using a
device namely MUX or multiplexer, and the main function of this device is to unite n-input lines
for generating a single output line. Thus, MUX has many inputs and single output.
A device is called DEMUX or demultiplexer is used at the receiving end which divides the signal
into its component signals. So, it has single input and number of outputs
Examples, include an analogue stereo audio cable, with one pair of wires for the left channel and
another for the right channel, and a multi-pair telephone cable, a switched star network such as a
telephone access network, a switched Ethernet network, and a mesh network.
Page 43
JU (JIT) ECE ELECTRONICS COMMUNICATION ENGINEERING”
2020GC
Only one cable reaches a customer's residential area, but the service provider can send multiple
television channels or signals simultaneously over that cable to all subscribers without
interference rceivers must tune to the appropriate frequency (channel) to access the desired
signal.
FDM is used for analog signal transmission. It does not need synchronization between the
transmitter and receiver. Here a large number of signals can be transmitted simultaneously. It
suffers the problem of cross talk, and intermodulation distortion may take place. FDM is used in
amplitude modulation (AM) and FM broadcasting, public telephone networks, and cable TV
network systems.
Page 44
JU (JIT) ECE ELECTRONICS COMMUNICATION ENGINEERING”
2020GC
FDM does not need synchronization between its transmitter and receiver for
proper operation.
Due to slow narrowband fading, only a single channel gets affected.
Disadvantages of FDM
Page 45
JU (JIT) ECE ELECTRONICS COMMUNICATION ENGINEERING”
2020GC
Advantages of WDM
Disadvantages of WDM
Scalability is a concern as optical line termination (OLT); optical line termination has to
have transmitter array with one transmitter for each optical network unit (ONU). Adding
a new ONU could be a problem unless transmitters were provisioned in advance. Each
ONU must have a wavelength-specific laser.
The cost of the system increases with addition of optical components.
Inefficiency in BW utilization, difficulty in wavelength tuning, and difficulty in cascaded
topology.
Page 46
JU (JIT) ECE ELECTRONICS COMMUNICATION ENGINEERING”
2020GC
transmitted on the same fiber or radio channel or other medium, and asynchronously
demultiplexed. Advantages over conventional techniques are that variable bandwidth is possible
(just as in statistical multiplexing), that the wide bandwidth allows poor signal-to-noise ratio
according to Shannon-Hartley theorem, and that multi-path propagation in wireless
communication can be combated by rake receivers. A significant application of CDMA is the
Global Positioning System (GPS)
Advantage of CDM
Disadvantages
It is a digital technique. In Frequency Division Multiplexing Technique, all signals operate at the
same time with different frequency, but in case of Time Division Multiplexing technique, all
Page 47
JU (JIT) ECE ELECTRONICS COMMUNICATION ENGINEERING”
2020GC
signals operate at the same frequency with different time. In Time Division Multiplexing
technique, the total time available in the channel is distributed among different users. Therefore,
each user is allocated with different time interval known as a Time slot at which data is to be
transmitted by the sender.
A user takes control of the channel for a fixed amount of time. In Time Division Multiplexing
technique, data is not transmitted simultaneously rather the data is transmitted one-by-one.
In TDM, the signal is transmitted in the form of frames. Frames contain a cycle of time
slots in which each frame contains one or more slots dedicated to each user.
It can be used to multiplex both digital and analog signals but mainly used to multiplex
digital signals.
Synchronous TDM
Asynchronous TDM
Synchronous TDM
If the device does not have any data, then the slot will remain empty. In Synchronous TDM,
signals are sent in the form of frames. Time slots are organized in the form of frames. If the
device does not have data for a particular time slot, then the empty slot will be transmitted.
The most popular Synchronous TDM are T-l multiplexing, ISDN multiplexing, and SONET
multiplexing. If there are n devices, then there are n slots.
The time slots are pre-assigned and fixed. This slot is even given if the source is not ready with
data at this time. In this case the slot is transmitted empty. It is used for multiplexing digitized
voice stream
Page 48
JU (JIT) ECE ELECTRONICS COMMUNICATION ENGINEERING”
2020GC
Disadvantages
The channel capacity cannot be fully utilized when some source do not want to
send the data.
The capacity of the transmission link must be higher than the total capacity of
input lines.
It is very complex to implement.
Asynchronous TDM
Asynchronous Time Division multiplexor accepts the incoming data streams and creates
a frame that contains only data with no empty slots. In Asynchronous TDM, each slot contains
an address part that identifies the source of the data.
The difference between Asynchronous TDM and Synchronous TDM is that many slots in
Synchronous TDM are unutilized, but in Asynchronous TDM, slots are fully utilized. This
leads to the smaller transmission time and efficient utilization of the capacity of the
Page 49
JU (JIT) ECE ELECTRONICS COMMUNICATION ENGINEERING”
2020GC
channel.
In Synchronous TDM, if there are n sending devices, then there are n time slots. In
Asynchronous TDM, if there are n sending devices, then there are m time slots where m
is less than n (men).
The number of slots in a frame depends on the statistical analysis of the number of
input lines. The slots are allocated dynamically depending on the speed of source or their ready
state. It dynamically allocates the time slots according to different input channel’s needs, thus
saving the channel capacity.
In the above diagram, there are 4 devices, but only two devices are sending the data, i.e., A
and C. Therefore, the data of A and C are only transmitted through the transmission line.
Disadvantages
Page 50
JU (JIT) ECE ELECTRONICS COMMUNICATION ENGINEERING”
2020GC
4.2 Demultiplexing
Demultiplexing (Demuxing) is a term relative to multiplexing. It is the reverse of the
multiplexing process. Demultiplex is a process reconverting a signal containing multiple analog
or digital signal streams back into the original separate and unrelated signals. Although
demultiplexing is the reverse of the multiplexing process, it is not the opposite of multiplexing.
The opposite of multiplexing is inverse multiplexing (iMuxing), which breaks one data stream
into several related data streams. Thus, the difference between demultiplexing and inverse
multiplexing is that the output streams of demultiplexing are unrelated, while the output streams
of inverse multiplexing are related.
In Communication System demultiplexer receives the output signals from the multiplexer and
converts them back to the original form at the receiver end. Multiplexing and demultiplexing are
the reverse process of each other and can be applied to many occasions. Demultiplexer (Demux)
is a device that performs the reverse process of multiplexer.
function [y]=TDM_nik(x)
% x contains all the signals to be multiplexed
% y is multiplexed signal
[r c]=size(x);
k=0;
% Multiplexing
for i=1:c
for j=1:r
k=k+1;
y(k)=x(j,i);
end
end
% Ploting
color='ybrgmkc';
Page 51
JU (JIT) ECE ELECTRONICS COMMUNICATION ENGINEERING”
2020GC
figure(1)
sig='x1';
for i=1:r
sig(2)=i+48;
j=mod(i,7)+1;
subplot(r,1,i)
stem(x(i,:),color(j),'linewidth',2)
title(sig)
ylabel('Amplitude')
grid
end
xlabel('Time')
t=1/r:1/r:c;
figure(2)
for i=1:r
j=mod(i,7)+1;
stem(t(i:r:r*c),y(i:r:r*c),color(j),'linewidth',2)
hold on
grid
end
hold off
title('Time Division Multiplexed Sequence')
xlabel('Time')
ylabel('Amplitude')
Page 52
JU (JIT) ECE ELECTRONICS COMMUNICATION ENGINEERING”
2020GC
Page 53
JU (JIT) ECE ELECTRONICS COMMUNICATION ENGINEERING”
2020GC
Page 54
JU (JIT) ECE ELECTRONICS COMMUNICATION ENGINEERING”
2020GC
subplot(3,1,1)
plot(m(i,:)) % modulating signal
xlabel('time index'); ylabel('amplitude'); title('modulating Signal from user');
subplot(3,1,2)
plot(y(i,:),'color',C{i}); % modulated signal
xlabel('time index'); ylabel('amplitude'); title('modulated Signal from user');
subplot(3,1,3)
plot(z(i,:),'color',C{i}); % demodulated signal
xlabel('time index'); ylabel('amplitude'); title('demodulated Signal from user at the base
station');
end
figure
plot(ch_op) % combination of all modulated signals passed through the channel
xlabel('time index'); ylabel('amplitude'); title('Signal after passing through the channel');
Page 55
JU (JIT) ECE ELECTRONICS COMMUNICATION ENGINEERING”
2020GC
Page 56
JU (JIT) ECE ELECTRONICS COMMUNICATION ENGINEERING”
2020GC
Chapter five
Digital Modulations
There are three basic types of modulation methods for transmission of digital signal. The
methods are based on three attributes of a sinusoidal signal, amplitude, frequency and phase. The
corresponding digital modulation methods are: amplitude shift keying (ASK), frequency shift
keying (FSK) and phase shift keying (PSK).
Binary Phase Shift Keying (BPSK) is a type of digital modulation technique in which we are
sending one bit per symbol i.e., ‘0’ or a ‘1’. Hence, the bit rate and symbol rate are the same.
Depending upon the message bit, we can have a phase shift of 0o or 180o with respect to a
reference carrier.
Page 57
JU (JIT) ECE ELECTRONICS COMMUNICATION ENGINEERING”
2020GC
Where ‘E’ is the symbol energy, ‘T’ is the symbol time period; f is the frequency of the carrier,
Using gram Schmidt orthogonalization we get a single orthonormal basis function, given as:
𝜓1 = √(2/𝑇)cos(𝜔𝑡)
First the NRZ encoder converts these digital bits into impulses to add a notion of time into them.
Then NRZ waveform is generated by up-sampling these impulses. Afterwards, multiplication
with the carrier (orthonormal basis function) is carried out to generate the modulated BPSK
waveform.
BPSK Demodulator
Page 58
JU (JIT) ECE ELECTRONICS COMMUNICATION ENGINEERING”
2020GC
carrier phase recovery is done and directly use the generated reference frequency at the receiver
cos(ωt).
In the demodulator the received signal is multiplied by a reference frequency generator
(assuming the PLL/Costas loop is present). The multiplied output is integrated over one bit
period using an integrator. A threshold detector makes a decision on each integrated bit based on
a threshold. Since an NRZ signaling format is used with equal amplitudes in positive and
negative direction, the threshold for this case would be ’0′.
The Matlab simulation code is given below. Here for the sake of simplicity, the bit rate is fixed
to 1 bit/s (i.e., T=1 second). It is also assumed that Phased Locked Loop (PLL) has already
achieved exact phase synchronization.
Page 59
JU (JIT) ECE ELECTRONICS COMMUNICATION ENGINEERING”
2020GC
Page 60
JU (JIT) ECE ELECTRONICS COMMUNICATION ENGINEERING”
2020GC
𝑦 = 𝑎𝑥 + 𝑛
Where, y is the received signal at the input of the BPSK receiver, x is the modulated signal
transmitted through the channel, ‘a’ is the channel amplitude scaling factor for the transmitted
signal usually assumed as unity. ‘n’ is the Additive Gaussian White Noise random variable with
zero mean and variance δ2 .
Page 61
JU (JIT) ECE ELECTRONICS COMMUNICATION ENGINEERING”
2020GC
For an AWGN channel, the noise variance in terms of noise power spectral density (No) is given
by
δ2 = No/2
For M-ARY modulation schemes like M-PSK including BPSK, the symbol energy is given by
E𝑠 = 𝑅𝑚. 𝑅𝑐. 𝐸𝑏
Where; E𝑠 = is symbol energy per modulated bit,
𝑅𝑚 = log 2 𝑀 (For BPSK M=2, QPSK M=4, 16 QAM M=16 etc..,)
𝑅𝑐 = is the code rate of the system if a coding scheme is used. 𝑅𝑐 = 1 Since no coding is used
𝑅𝑏 = is energy per information bit.
Assuming E𝑠 =1 for BPSK (Symbol energy normalized to 1) Eb/N0 can be represented as (using
above equations),
𝐸𝑏 E𝑠 E𝑠 1
= = =
No 𝑅𝑚. 𝑅𝑐. No 𝑅𝑚. 𝑅𝑐. 2δ2 2𝑅𝑚. 𝑅𝑐. δ2
From the above equation the noise variance for the given Eb/N0 can be calculated as
1
δ2 =
𝐸𝑏
2𝑅𝑚. 𝑅𝑐. No
For the channel model “randn” function in Matlab is used to generate the noise term. This
function generates noise with unit variance and zero mean. In order to generate a noise with
sigma for the given Eb/N0 ratio, use the above equation, findδ, and multiply the “randn”
generated noise with this sigma, add this final noise term with the transmitted signal to get the
received signal.
Simulation of BER vs. Eb/N0 for BPSK modulation over AWGN
Page 62
JU (JIT) ECE ELECTRONICS COMMUNICATION ENGINEERING”
2020GC
In Quadrature Phase Shift Keying (QPSK) two sinusoids (sin and cos functions) are taken as
basis functions for modulation. Modulation is achieved by varying the phase of the basis
functions depending on the message symbols. In QPSK, modulation is symbol based, where one
symbol contains 2 bits. The following equation outlines QPSK modulation technique.
2𝐸𝑠
S𝑖(t) = √( )cos[𝜔𝑐𝑡 + (2𝑛 − 1)𝜋/4] ; 𝑛 = 1,2,3,4
𝑇
This gives four possible phases: π/4, 3π/4, 5π/4, and 7π/4. The constellation diagram of QPSK
will show the constellation points lying on both x and y axes. This means that the QPSK
modulated signal will have an in-phase component (I) and also a quadrature component (Q).
A QPSK modulator can be implemented as follows. A de-multiplexer (or serial to parallel
converter) is used to separate odd and even bits from the generated information bits. Each of the
odd bits (quadrature arm) and even bits (in-phase arm) are converted to NRZ format in a parallel
manner. The signal on the in-phase arm is multiplied by cosine component and the signal on the
quadrature arm is multiplied by sine component. QPSK modulated signal is obtained by adding
the signal from both in phase and quadrature arm.
Page 63
JU (JIT) ECE ELECTRONICS COMMUNICATION ENGINEERING”
2020GC
QPSK Demodulation:
For QPSK demodulator, a coherent demodulator is taken as an example. In coherent detection
technique, the knowledge of the carrier frequency and phase must be known to the receiver. This
can be achieved by using a PLL (phase lock loop) at the receiver. A PLL essentially locks to the
incoming carrier frequency and tracks the variations in frequency and phase. For the following
simulation, a PLL is not used but instead we simply assume that the receiver is in perfect
synchronization. For demonstration purposes we simply assume that the carrier phase recovery is
done and simply use the generated reference frequencies at the receiver (cos(2πfct) and
(sin(2πftc)).
In the demodulator the received signal is multiplied by a reference frequency generator
(cos(2πfCt)) and (sin(2πfCt)) on separate arms (in-phase and quadrature arms). The multiplied
output on each arm is integrated over one bit period using an integrator. A threshold detector
makes a decision on each integrated bit based on a threshold. Finally the bits on the in-phase arm
(even bits) and on the quadrature arm (odd bits) are remapped to form the detected information
stream.
Page 64
JU (JIT) ECE ELECTRONICS COMMUNICATION ENGINEERING”
2020GC
Page 65
JU (JIT) ECE ELECTRONICS COMMUNICATION ENGINEERING”
2020GC
𝑦 = 𝑎𝑥 + 𝑛
Where, y is the received signal at the input of the QPSK receiver, x is the modulated signal
transmitted through the channel, ‘a’ is the channel amplitude scaling factor for the transmitted
signal usually assumed as unity. ‘n’ is the Additive Gaussian White Noise random variable with
zero mean and variance δ2 .
For an AWGN channel, the noise variance in terms of noise power spectral density (No) is given
by
δ2 = No/2
For M-ARY modulation schemes like M-PSK including QPSK, the symbol energy is given by
E𝑠 = 𝑅𝑚. 𝑅𝑐. 𝐸𝑏
Where; E𝑠 = is symbol energy per modulated bit,
𝑅𝑚 = log 2 𝑀 (For BPSK M=2, QPSK M=4, 16 QAM M=16 etc..,)
𝑅𝑐 = is the code rate of the system if a coding scheme is used. 𝑅𝑐 = 1 Since no coding is used
𝑅𝑏 = is energy per information bit.
Assuming E𝑠 =1 for QPSK (Symbol energy normalized to 1) Eb/N0 can be represented as (using
above equations),
𝐸𝑏 E𝑠 E𝑠 1
= = 2
=
No 𝑅𝑚. 𝑅𝑐. No 𝑅𝑚. 𝑅𝑐. 2δ 2𝑅𝑚. 𝑅𝑐. δ2
From the above equation the noise variance for the given Eb/N0 can be calculated as
1
δ2 =
𝐸𝑏
2𝑅𝑚. 𝑅𝑐. No
For the channel model “randn” function in Matlab is used to generate the noise term. This
function generates noise with unit variance and zero mean. In order to generate a noise with
standard deviation - σ for the given Eb/N0 ratio, use the above equation, find σ, multiply the
“randn” generated noise with this σ, add this final noise term with the transmitted signal to get
the received signal. For a /4 rotated QPSK system, since the modulated signal is in complex form
(due to sine and cosine basis functions), the noise should also be in complex form.
Page 66
JU (JIT) ECE ELECTRONICS COMMUNICATION ENGINEERING”
2020GC
Symbol Error Rate vs. SNR performance curve simulation for QPSK
Page 67
JU (JIT) ECE ELECTRONICS COMMUNICATION ENGINEERING”
2020GC
𝐸 = ∑ V 2 𝐼, 𝑖 + V 2 𝑄, 𝑖
𝑖=1
In 16-QAM, there are 16 signal points in the constellation that are equally divided into four
quadrants (each with four constellation points). Since the constellation is divided equally into
four quadrants, normalizing the energy in a single quadrant will simplify things.
Calculating the total energy in any one of the quadrants
𝐸 = (12 + 12 ) + (12 + 32 ) + (32 + 12 ) + (32 + 32 ) = 40
The average energy is Eavg=E/4=40/4=10 and the normalization factor will be
1 1
𝑁𝑜𝑟𝑚𝑓𝑎𝑐𝑡𝑜𝑟 = =
√𝐸𝑎𝑣𝑔 √10
The values in the LUT (where the reference constellation is stored) are normalized by the above
mentioned normalization factor and then the 16-QAM signal is generated.
Page 68
JU (JIT) ECE ELECTRONICS COMMUNICATION ENGINEERING”
2020GC
The simulation model for M-QAM modulation is given in the next figure. The receiver uses
Euclidean distance as a metric to decide on the received symbols.
2
𝐸𝑢𝑐𝑙𝑖𝑑𝑒𝑎𝑛𝑑𝑖𝑠𝑡𝑎𝑛𝑐𝑒𝑠 = √(𝑟𝐼 − 𝐼𝑟𝑒𝑓𝐼 )2 + (𝑟𝑄 − 𝑄𝑟𝑒𝑓𝑄 )
Page 69
JU (JIT) ECE ELECTRONICS COMMUNICATION ENGINEERING”
2020GC
1 3𝑘𝐸𝑏
𝑝𝑠 ≤ 1 − [1 − 2 (1 − ) . 𝑄 (√ )]2
√𝑀 (𝑀 − 1)𝑁𝑜
Page 70
JU (JIT) ECE ELECTRONICS COMMUNICATION ENGINEERING”
2020GC
Mathematically,
𝜓(𝑡) = 𝐴𝐶 𝑐𝑜𝑠𝜔𝐻 𝑡 If d(t)=logic 1
𝜓(𝑡) = 𝐴𝐶 𝑐𝑜𝑠𝜔𝐻 𝑡 If d(t)=logic 0
BFSK Modulator
From the mathematical model of binary FSK (BFSK), it’s clear that, BFSK can be generated
using two ASK modulators with inverted baseband and two carriers with frequencies fH and fL
Two ASK signals must have the same bandwidth in order to generate a proper binary FSK
signal.
Page 71
JU (JIT) ECE ELECTRONICS COMMUNICATION ENGINEERING”
2020GC
FSK signal can be detected using both coherent and non-coherent arrangements. As the binary
FSK signal is generated using two carrier frequencies, the coherent detector consists of two
correlators that are individually turned to two different carrier frequencies to represent symbol 1
and 0. A correlator is the combination of a multiplier followed by an integrator (LPF). The same
BFSK signal is multiplied by two different carrier signals and the passed separately through the
LPF.
The outputs of the LPF must be inverted type, i.e., if one is upper going, the other must be
lower going. Next, the outputs are fed to the decision deice which is essentially a comparator. If
the output produced in the upper path is more than the output produced in the lower path, the
magnitude comparator will decide in favor of symbol 1. Similarly, if the output of the upper path
is less than that of the lower path, the comparator will decide in favor of symbol 0.
Page 72
JU (JIT) ECE ELECTRONICS COMMUNICATION ENGINEERING”
2020GC
Page 73
JU (JIT) ECE ELECTRONICS COMMUNICATION ENGINEERING”
2020GC
Matlab code
Page 74
JU (JIT) ECE ELECTRONICS COMMUNICATION ENGINEERING”
2020GC
for index=1:size(b,2)
if b(index)==1
NRZ_out=[NRZ_out ones(1,200)*Vp];
elseif b(index)==0
NRZ_out=[NRZ_out ones(1,200)*(-Vp)];
end
end
Page 75
JU (JIT) ECE ELECTRONICS COMMUNICATION ENGINEERING”
2020GC
Page 76
JU (JIT) ECE ELECTRONICS COMMUNICATION ENGINEERING”
2020GC
Page 77
JU (JIT) ECE ELECTRONICS COMMUNICATION ENGINEERING”
2020GC
clc;
clear all;
close all;
data=[0 1 0 1 1 1 0 0 1 1]; % information
%Number_of_bit=1024;
%data=randint(Number_of_bit,1);
figure(1)
stem(data, 'linewidth',3), grid on;
title(' Information before Transmitting ');
axis([ 0 11 0 1.5]);
data_NZR=2*data-1; % Data Represented at NZR form for QPSK modulation
s_p_data=reshape(data_NZR,2,length(data)/2); % S/P convertion of data
br=10.^6; %Let us transmission bit rate 1000000
f=br; % minimum carrier frequency
T=1/br; % bit duration
t=T/99:T/99:T; % Time vector for one bit information
% QPSK modulation
y=[];
y_in=[];
y_qd=[];
for(i=1:length(data)/2)
y1=s_p_data(1,i)*cos(2*pi*f*t); % inphase component
y2=s_p_data(2,i)*sin(2*pi*f*t) ;% Quadrature component
y_in=[y_in y1]; % inphase signal vector
y_qd=[y_qd y2]; %quadrature signal vector
y=[y y1+y2]; % modulated signal vector
end
Tx_sig=y; % transmitting signal after modulation
tt=T/99:T/99:(T*length(data))/2;
figure(2)
subplot(3,1,1);
Page 78
JU (JIT) ECE ELECTRONICS COMMUNICATION ENGINEERING”
2020GC
Page 79
JU (JIT) ECE ELECTRONICS COMMUNICATION ENGINEERING”
2020GC
Page 80
JU (JIT) ECE ELECTRONICS COMMUNICATION ENGINEERING”
2020GC
Page 81
JU (JIT) ECE ELECTRONICS COMMUNICATION ENGINEERING”
2020GC
Page 82
JU (JIT) ECE ELECTRONICS COMMUNICATION ENGINEERING”
2020GC
Page 83
JU (JIT) ECE ELECTRONICS COMMUNICATION ENGINEERING”
2020GC
symErrTheory = 2*(1-1/sqrt(M))*erfc(sqrt(3/2*k*EbN0lin/(M-1)));
%---------------Plotting commands-----------------------
figure(2);
semilogy(EbN0dB,symErrTheory,'r-');hold on;
semilogy(EbN0dB,symErrSimulated,'b*');
legend('16QAM-Theory','16QAM-Simulated');
xlabel('Eb/N0(dB)');
ylabel('Symbol Error Rate (Ps)');
grid on;
F) FSK Modulation and demodulation
%>>>>>>>>> MATLAB code for binary FSK modulation and de-modulation >>>>>>>%
clc;
clear all;
close all;
x=[ 1 0 0 1 1 0 1]; % Binary Information
bp=.000001; % bit period
disp(' Binary information at Trans mitter :');
disp(x);
% representation of transmitting binary information as digital signal
bit=[];
for n=1:1:length(x)
if x(n)==1;
se=ones(1,100);
else x(n)==0;
se=zeros(1,100);
end
bit=[bit se];
end
t1=bp/100:bp/100:100*length(x)*(bp/100);
subplot(3,1,1);
plot(t1,bit,'lineWidth',2.5);grid on;
Page 84
JU (JIT) ECE ELECTRONICS COMMUNICATION ENGINEERING”
2020GC
Page 85
JU (JIT) ECE ELECTRONICS COMMUNICATION ENGINEERING”
2020GC
Page 86
JU (JIT) ECE ELECTRONICS COMMUNICATION ENGINEERING”
2020GC
ASK
%>>>>>>>>> MATLAB code for binary ASK modulation and de-modulation >>>>>>>%
clc;
clear all;
close all;
x=[ 1 0 0 1 1 0 1]; % Binary Information
bp=.000001; % bit period
disp(' Binary information at Trans mitter :');
disp(x);
%XX representation of transmitting binary information as digital signal XXX
bit=[];
for n=1:1:length(x)
if x(n)==1;
se=ones(1,100);
else x(n)==0;
se=zeros(1,100);
end
bit=[bit se];
end
t1=bp/100:bp/100:100*length(x)*(bp/100);
subplot(3,1,1);
plot(t1,bit,'lineWidth',2.5);grid on;
axis([ 0 bp*length(x) -.5 1.5]);
ylabel('amplitude(volt)');
xlabel(' time(sec)');
title('transmitting information as digital signal');
Page 87
JU (JIT) ECE ELECTRONICS COMMUNICATION ENGINEERING”
2020GC
Page 88
JU (JIT) ECE ELECTRONICS COMMUNICATION ENGINEERING”
2020GC
z=trapz(t4,mm) % intregation
zz=round((2*z/bp))
if(zz>7.5) % logic level = (A1+A2)/2=7.5
a=1;
else
a=0;
end
mn=[mn a];
end
disp(' Binary information at Reciver :');
disp(mn);
%XXXXX Representation of binary information as digital signal which achived
%after ASK demodulation
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
bit=[];
for n=1:length(mn);
if mn(n)==1;
se=ones(1,100);
else mn(n)==0;
se=zeros(1,100);
end
bit=[bit se];
end
t4=bp/100:bp/100:100*length(mn)*(bp/100);
subplot(3,1,3)
plot(t4,bit,'LineWidth',2.5);grid on;
axis([ 0 bp*length(mn) -.5 1.5]);
ylabel('amplitude(volt)');
xlabel(' time(sec)');
title('recived information as digital signal after binary ASK demodulation');
Page 89
JU (JIT) ECE ELECTRONICS COMMUNICATION ENGINEERING”
2020GC
Page 90
JU (JIT) ECE ELECTRONICS COMMUNICATION ENGINEERING”
2020GC
Page 91
JU (JIT) ECE ELECTRONICS COMMUNICATION ENGINEERING”
2020GC
zz1=round(2*z1/bp)
zz2= round(2*z2/bp)
if(zz1>A/2) % logic lavel= (0+A)/2 or (A+0)/2 or 2.5 ( in this case)
a=1;
else(zz2>A/2)
a=0;
end
mn=[mn a];
end
disp(' Binary information at Reciver :');
disp(mn);
%XXXXX Representation of binary information as digital signal which achived
%after demodulation
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
X
bit=[];
for n=1:length(mn);
if mn(n)==1;
se=ones(1,100);
else mn(n)==0;
se=zeros(1,100);
end
bit=[bit se];
end
t4=bp/100:bp/100:100*length(mn)*(bp/100);
subplot(3,1,3)
plot(t4,bit,'LineWidth',2.5);grid on;
axis([ 0 bp*length(mn) -.5 1.5]);
ylabel('amplitude(volt)');
xlabel(' time(sec)');
title('recived information as digital signal after binary FSK demodulation');
Page 92
JU (JIT) ECE ELECTRONICS COMMUNICATION ENGINEERING”
2020GC
ASK
%>>>>>>>>> MATLAB code for binary ASK modulation and de-modulation >>>>>>>%
clc;
clear all;
close all;
x=[ 1 0 0 1 1 0 1]; % Binary Information
bp=.000001; % bit period
disp(' Binary information at Trans mitter :');
disp(x);
%XX representation of transmitting binary information as digital signal XXX
bit=[];
for n=1:1:length(x)
if x(n)==1;
se=ones(1,100);
else x(n)==0;
se=zeros(1,100);
end
bit=[bit se];
end
t1=bp/100:bp/100:100*length(x)*(bp/100);
subplot(3,1,1);
plot(t1,bit,'lineWidth',2.5);grid on;
axis([ 0 bp*length(x) -.5 1.5]);
ylabel('amplitude(volt)');
xlabel(' time(sec)');
title('transmitting information as digital signal');
% Binary-ASK modulation %
A1=10; % Amplitude of carrier signal for information 1
A2=5; % Amplitude of carrier signal for information 0
br=1/bp; % bit rate
Page 93
JU (JIT) ECE ELECTRONICS COMMUNICATION ENGINEERING”
2020GC
Page 94
JU (JIT) ECE ELECTRONICS COMMUNICATION ENGINEERING”
2020GC
end
mn=[mn a];
end
disp(' Binary information at Reciver :');
disp(mn);
% Representation of binary information as digital signal which achived
%after ASK demodulation
bit=[];
for n=1:length(mn);
if mn(n)==1;
se=ones(1,100);
else mn(n)==0;
se=zeros(1,100);
end
bit=[bit se];
end
t4=bp/100:bp/100:100*length(mn)*(bp/100);
subplot(3,1,3)
plot(t4,bit,'LineWidth',2.5);grid on;
axis([ 0 bp*length(mn) -.5 1.5]);
ylabel('amplitude(volt)');
xlabel(' time(sec)');
title('recived information as digital signal after binary ASK demodulation');
Page 95
JU (JIT) ECE ELECTRONICS COMMUNICATION ENGINEERING”
2020GC
plotHandle=plot(EbN0dB,log10(BPSK),char(colors(index)));
set(plotHandle,'LineWidth',1.5);
hold on;
index=index+1;
%M-PSK
m=2:1:5;
M=2.^m;
for i=M,
k=log2(i);
berErr = 1/k*erfc(sqrt(EbN0lin*k)*sin(pi/i));
plotHandle=plot(EbN0dB,log10(berErr),char(colors(index)));
set(plotHandle,'LineWidth',1.5);
index=index+1;
end
%Binary DPSK
Pb = 0.5*exp(-EbN0lin);
plotHandle = plot(EbN0dB,log10(Pb),char(colors(index)));
set(plotHandle,'LineWidth',1.5);
index=index+1;
%Differential QPSK
a=sqrt(2*EbN0lin*(1-sqrt(1/2)));
b=sqrt(2*EbN0lin*(1+sqrt(1/2)));
Pb = marcumq(a,b,1)-1/2.*besseli(0,a.*b).*exp(-1/2*(a.^2+b.^2));
plotHandle = plot(EbN0dB,log10(Pb),char(colors(index)));
set(plotHandle,'LineWidth',1.5);
index=index+1;
%M-QAM
m=2:2:6;
M=2.^m;
for i=M,
k=log2(i);
Page 96
JU (JIT) ECE ELECTRONICS COMMUNICATION ENGINEERING”
2020GC
berErr = 2/k*(1-1/sqrt(i))*erfc(sqrt(3*EbN0lin*k/(2*(i-1))));
plotHandle=plot(EbN0dB,log10(berErr),char(colors(index)));
set(plotHandle,'LineWidth',1.5);
index=index+1;
end
legend('BPSK','QPSK','8-PSK','16-PSK','32-PSK','D-BPSK','D-QPSK','4-QAM','16-QAM','64-
QAM');
axis([-4 24 -8 0]);
set(gca,'XTick',-4:2:24); %re-name axis accordingly
ylabel('Probability of BER Error - log10(Pb)');
xlabel('Eb/N0 (dB)');
title('Probability of BER Error log10(Pb) Vs Eb/N0');
grid on;
Page 97
JU (JIT) ECE ELECTRONICS COMMUNICATION ENGINEERING”
2020GC
CHAPTER six
Frequency-Hopped Spread-Spectrum
In this chapter we discuss frequency-hopped spread-spectrum. Frequency-hopped spread-
spectrum works by pseudorandomly changing the center frequency of the carrier over a set of
frequencies. The sequence of frequencies used is called the frequency hopping pattern.
Frequency hopping communication system is a typical spectrum communication system, it is in
military communication, mobile communication, computer wireless data transmission and
wireless LAN and other fields have a very wide range of applications, has become the current
short wave communication is one of the important development directions.
Spread spectrum communication has very strong anti-interference ability and security, first
appeared in the military field. In recent years, spread spectrum communication is also widely
used in the field of civil. There are two ways of Spread Spectrum Communication System those
are:
Page 98
JU (JIT) ECE ELECTRONICS COMMUNICATION ENGINEERING”
2020GC
In the information theory, the channel capacity formula which is this is the Shannon’s capacity
formula. C is the channel capacity (limit speed data transmission) W is the signal bandwidth and
SNR is the signal to noise ratio.
𝐶 = 𝑊 log 2 (1 + 𝑆𝑁𝑅)
The formula shows that the signal to noise ratio and the signal bandwidth can be the same as the
transmission rate can be changed. We can improve the signal bandwidth to reduce the signal to
noise ratio requirements, thus enhancing the ability to resist interference. By expanding the
signal bandwidth, the ability to resist interference is also improved. As mentioned above, spread
spectrum communication through the expansion of signal bandwidth, in exchange for a strong
anti-interference ability, which is the biggest characteristic of the spread spectrum
communication.
One of the important parameters of spread spectrum communication is spread spectrum gain,
which reflects the system's ability to resist interference. It is a measure to improve the SNR.
𝑆𝑁𝑅𝑜𝑢𝑡 𝑅𝑆 𝐵𝑠
𝐺 = = =
𝑆𝑁𝑅𝑖𝑛 𝑅𝑑 𝐵𝑑
Frequency hopping is to control the frequency synthesizer by using the pseudo code sequence to
form the frequency synthesizer. The transmitted information code and the pseudo random
sequence mode two (or the waveform multiplication) constitute the hopping instruction (i.e., the
frequency hopping pattern), and by which the transmission frequency is randomly selected.
Page 99
JU (JIT) ECE ELECTRONICS COMMUNICATION ENGINEERING”
2020GC
The simplified block diagram of the frequency hopping communication system is shown in
Figure 1. After modulation, the sender's information code sequence and the pseudo random
sequence are controlled by different frequency hopping pattern. At the receiving end, the signal
and noise received by the filter is sent to the mixer. The receiver's local oscillator signal is a
frequency hopping signal, the same as the transmission end is the same, the frequency of the two
frequency synthesizer is relatively, but the corresponding frequency has a frequency difference,
just as the receiver of the intermediate frequency. As long as the sender and receiver of the
pseudo-random code synchronization, it can make both the frequency hopping frequency
synthesizer and the frequency synthesizer to generate the frequency synchronization, after
mixing, you can get a constant frequency signal, and then the signal demodulation, you can
recover the transmitted information. In the case of interference signal, the frequency of the
frequency synthesizer is not related to the frequency of the frequency synthesizer. Therefore, it
cannot enter into the intermediate frequency channel, which cannot interfere with the formation
of the frequency hopping system.
Page 100
JU (JIT) ECE ELECTRONICS COMMUNICATION ENGINEERING”
2020GC
Part in the MATLAB simulation procedures can be broadly divided into the majority of 6,
respectively, the main function, sending module, receiver module, AWNG channel, Walsh
function and error counters. In this chapter, a simple simulation is made on the source code of a
frequency hopping communication, and the time domain waveform and spectrum of the signal
are analyzed. Procedures are mainly composed of the following steps: first, through the rand
function to generate a data signal carrier and a fixed frequency carrier signal, and then the two
BPSK modulation, the modulation output is modulated signal BPSK. Frequency signal spread is
generated by the stitch function. We choose 6 kinds of frequency (we consider 6 kinds of jump
frequency to meet the requirements of the working process and the effect of frequency hopping).
Finally, signal BPSK and modulated signal spread frequency hopping modulation, frequency
hopping spread spectrum signal.
Simulation Result
The original bit sequence is a randomly generated binary sequence as the data signal to be
transmitted. After BPSK modulation, the BPSK modulated signal is obtained.
Page 101
JU (JIT) ECE ELECTRONICS COMMUNICATION ENGINEERING”
2020GC
Spread signal with 6 frequencies is a randomly generated FM signal. There are six kinds of
frequency in the picture, frequency hopped spread spectrum signal is the output signal after
frequency hopping modulation.
The bandwidth is broadened, and the frequency components are increased and the frequency
components are increased, so that the receiver is not aware of the original data. Generally the
frequency hopping spread spectrum modelling and simulation using Matlab code and result are:
Page 102
JU (JIT) ECE ELECTRONICS COMMUNICATION ENGINEERING”
2020GC
Page 103
JU (JIT) ECE ELECTRONICS COMMUNICATION ENGINEERING”
2020GC
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%
% Using matlab 2018a may the code is incompatable for
% matlab below 2018a because in matlab 2018a the function
% randint is incompatable so its compatable by using randi implace of
% randint in 2018a
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%
% Frequency Hopping Spread Spectrum
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
%%%%%%%%%%%%%%%%%%%%%%%%
clc
clear
Page 104
JU (JIT) ECE ELECTRONICS COMMUNICATION ENGINEERING”
2020GC
Page 105
JU (JIT) ECE ELECTRONICS COMMUNICATION ENGINEERING”
2020GC
t3=[0:2*pi/29:2*pi];
t4=[0:2*pi/39:2*pi];
t5=[0:2*pi/59:2*pi];
t6=[0:2*pi/119:2*pi];
c1=cos(t1);
c1=[c1 c1 c1 c1 c1 c1 c1 c1 c1 c1 c1 c1];
c2=cos(t2);
c2=[c2 c2 c2 c2 c2 c2];
c3=cos(t3);
c3=[c3 c3 c3 c3];
c4=cos(t4);
c4=[c4 c4 c4];
c5=cos(t5);
c5=[c5 c5];
c6=cos(t6);
Page 106
JU (JIT) ECE ELECTRONICS COMMUNICATION ENGINEERING”
2020GC
case(6)
spread_signal=[spread_signal c6];
end
end
subplot(4,1,3)
plot([1:3000],spread_signal);
axis([-100 3100 -1.5 1.5]);
title('\bf\it Spread Signal with 6 frequencies');
Page 107
JU (JIT) ECE ELECTRONICS COMMUNICATION ENGINEERING”
2020GC
Page 108
JU (JIT) ECE ELECTRONICS COMMUNICATION ENGINEERING”
2020GC
Chapter seven
MuLTIPLE ACCESS
Multiple access is the way of allowing many mobile users to share simultaneously a finite
amount of radio spectrum. So, Multiplexing deals with allocation/accommodation of users
on the available resource. As the spectrum is limited, so the sharing is required to increase the
capacity of cell or over a geographical area by allowing the available bandwidth to be used at the
same time by different users.
A cellular system divides any given area into cells where a mobile unit in each cell
communicates with a base station. So, it is possible to talk and listen simultaneously, and this
effect, called duplexing, is generally required in wireless telephone systems. The main aim in the
cellular system design is to be able to increase the capacity of the channel, i.e., to handle as many
calls as possible in a given bandwidth with a sufficient level of quality of service.
These techniques can be grouped as narrowband and wideband systems, depending upon how the
available bandwidth is allocated to the users. In a narrowband multiple access system, the
available radio spectrum is divided into a large number of narrowband channels. And in
wideband systems, the transmission bandwidth of a single channel is much larger than the
Page 109
JU (JIT) ECE ELECTRONICS COMMUNICATION ENGINEERING”
2020GC
coherence bandwidth of the channel. So, a large number of transmitters are allowed to transmit
on the same channel. Particularly for 4G-LTE OFDM is used, is a special case of Frequency
Division Multiplexing.
Page 110
JU (JIT) ECE ELECTRONICS COMMUNICATION ENGINEERING”
2020GC
let us consider the simple case of BPSK (in phase carrier modulation) then the transmitted signal
become:
Where
g0(t) : energy-normalized impulse response of the Pulse Shaper.
. PTX : transmitted power
fP: carrier frequency
φ(i): instantaneous phase
Code Carrier
generator generator
Page 111
JU (JIT) ECE ELECTRONICS COMMUNICATION ENGINEERING”
2020GC
low cross correlation with the other codes. CDMA system capacity is thus typically limited by
the interference from other users, rather than by thermal noise.
Where
Δf : frequency spacing between adjacent users
c(i) : FDMA code assigned to user i
Transmitter of FDMA
Code Carrier
generator generator
Page 112
JU (JIT) ECE ELECTRONICS COMMUNICATION ENGINEERING”
2020GC
In FDM, the given bandwidth is subdivided among a set of carriers. There is no relationship
between the carrier frequencies in FDM. If the carriers are harmonics, integral multiples of
fundamental component then they become orthogonal. In this technique, the given resource
(bandwidth) is shared among individual modulated data sources. So is a multicarrier modulation
technique, which employs several carriers, within the allocated bandwidth, to convey the
information from source to destination. Each carrier may employ one of the several available
digital modulation techniques (BPSK, QPSK, QAM etc..,), effective for communication over
channels with frequency selective fading (different frequency components of the signal
experience different fading), it mitigates the problem by converting the entire frequency selective
fading channel into small flat fading channels that is easier to combat by employing simple error
correction and equalization schemes.
Page 113
JU (JIT) ECE ELECTRONICS COMMUNICATION ENGINEERING”
2020GC
Step II:
Determine the modulation format that we wish to use. An OFDM signal can be
constructed using anyone of the following digital modulation techniques namely BPSK, QPSK,
QAM etc.., in our design we used the simplest modulation technique that is BPSK.
Step III:
Determine the constellation mapper and serial to parallel convertor, depending on
the number of sub-carriers (N), that takes the serial stream of input bits and outputs N parallel
streams (indexed from 0 to N-1). These parallel streams are individually converted into the
required digital modulation format (BPSK, QPSK, QAM etc..,). Let’s call this output S0, S1, SN.
The conversion of parallel data (D) into the digitally modulated data (S) is usually achieved by a
constellation mapper, which is essentially a look up table (LUT).
Step IV:
Then use the N size IFFT/FFT, the Fourier transform breaks a signal into different
frequency bins by multiplying the signal with a series of sinusoids. This essentially translates the
signal from time domain to frequency domain. And depending on specifications specify the
length of the cyclic prefix in terms of its duration. At transmitter we have X(0), X(1)....X(N-1)
Symbols. Serial to parallel convertor also known as demultiplexing (DEMUX) is used at
transmitter to load to the symbols onto the subcarrier. Then take N pt. IFFT of these symbols to
generate transmit samples. Now add the cyclic prefix (CP) of defined length at the start of the
samples. Finally, the resultant output from the N parallel arms are summed up together to
produce the OFDM signal. the transmitted signal after IFFT transform is
X(t)= 1/N∑k xk e j2π k Δft
Where
Δf=1/NT
Δf = sub carrier spacing
T = Signal Period
NT = OFDM symbol period
Xn = nth frequency domain complex symbol, n=0,1,2….N-1.
Page 114
JU (JIT) ECE ELECTRONICS COMMUNICATION ENGINEERING”
2020GC
Step V:
Then using parallel to serial convertor transmit through the designed channel, in our case
AWGN channel is used.
OFDM signal=c(t)= ∑n sne j2π nft
Page 115
JU (JIT) ECE ELECTRONICS COMMUNICATION ENGINEERING”
2020GC
Page 116
JU (JIT) ECE ELECTRONICS COMMUNICATION ENGINEERING”
2020GC
%-----------------Transmitter--------------------
s=2*round(rand(1,Nst))-1; %Generating Random Data with BPSK modulation
%IFFT block
Page 117
JU (JIT) ECE ELECTRONICS COMMUNICATION ENGINEERING”
2020GC
R_Freq=r_Time([(2:Nst/2+1) (Nst/2+13:Nst+12)]);
%BPSK demodulation / Constellation Demapper.Force +ve value --> 1, -ve value --> -1
R_Freq(R_Freq>0) = +1;
R_Freq(R_Freq<0) = -1;
s_cap=R_Freq;
numErrors = sum(abs(s_cap-s)/2); %Count number of errors
%Accumulate bit errors for all symbols transmitted
errors(i)=errors(i)+numErrors;
end
theoreticalBER(i)=(1/2)*erfc(sqrt(10.^(EbN0dB(i)/10))); %Same as BER for BPSK
over AWGN
end
simulatedBER = errors/(nSym*Nst);
plot(EbN0dB,log10(simulatedBER),'r-o');
hold on;
plot(EbN0dB,log10(theoreticalBER),'k*');
grid on;
title('BER Vs EbNodB for OFDM with BPSK modulation over AWGN');
xlabel('Eb/N0 (dB)');ylabel('BER');legend('simulated','theoretical');
Simulation Result
Page 118
JU (JIT) ECE ELECTRONICS COMMUNICATION ENGINEERING”
2020GC
BER is widely used as performance measurement tool, it tells number of bits destroyed while the
data is travelling from source to the destination, AWGN (Additive White Gaussian Noise) is
used as transmission channel. From the simulated result above, it can be seen that the OFDM-
BPSK modulation has no advantage over a normal BPSK system in AWGN.
Page 119
JU (JIT) ECE ELECTRONICS COMMUNICATION ENGINEERING”
2020GC
Chapter Eight
Channel Model
Channel is the most important issue for digital communication system. In this section, it has
described the modeling and simulation result for different channels namely: AWGN and Fading
channels which is divided in to Rayleigh and Rician as following:
Page 120
JU (JIT) ECE ELECTRONICS COMMUNICATION ENGINEERING”
2020GC
An AWGN channel can be used for imitation noise and its capacity can express in equation
below
1 𝑃
𝐶 = log(1 + )
2 𝑁
The theoretical BER of BPSK is well known and can be compared with the simulated results for
specific energy contrast ratios denoted as γ𝑏 =Eb/No. Pb, the probability of bit error for BPSK in
AWGN, is given by the relation:
1
𝑃𝑏 =2erfc(√γ𝑏 ) where γ𝑏 = Eb/No
In the study of communication systems, the classical (ideal) additive white Gaussian noise
(AWGN) channel, with statistically independent Gaussian noise samples corrupting data samples
free of inter-symbol interference (ISI), is the usual starting point for understanding basic
performance relationships.
Page 121
JU (JIT) ECE ELECTRONICS COMMUNICATION ENGINEERING”
2020GC
waitbar((((count-1)*max_run)+run_time-1)/(length(SNRdB)*max_run));
Error=0;
for k=1:num_bit %Decision device taking hard decision and deciding error
if ((Y(k)>0 && data(k)==0)||(Y(k)<0 && data(k)==1))
Error=Error+1;
end
end
Page 122
JU (JIT) ECE ELECTRONICS COMMUNICATION ENGINEERING”
2020GC
hold off
As shown in figure above, the BER performance of simulation result is closely identical to
theoretical BER.
Rayleigh and Rician fading channels are useful models of real-world phenomena in wireless
communications. These phenomena include multipath scattering effects, time dispersion, and
Doppler shifts that arises from relative motion between the transmitter and receiver. Note that a
Page 123
JU (JIT) ECE ELECTRONICS COMMUNICATION ENGINEERING”
2020GC
digital communication system involving a fading channel usually requires components that
compensate for the fading response. Typical approach to compensate for fading include:
In a heavily built -up urban or where there is non-line-of-sight communication between the
transmitter and receiver, the objects in the environment attenuate, reflect, refract, and diffract
the signal before it arrives at the receiver. This propagation environment is known as Rayleigh
fading, and the Rayleigh distribution model is a specialized stochastic fading model for this
type of fading environment. The channel fading depends on moving speed of the receiver
and/or transmitter. The amplitude gain of this fading channel is characterized by the
Rayleigh distribution. When there are different signal paths among the receiver and transmitter,
A Rayleigh constrains the total signal at the recipient and can change the probability
intensity Function of Rayleigh fading channel.
1 Ῡ𝑏
𝑃𝑏 = [1 − √ ]
2 1 + Ῡ𝑏
Page 124
JU (JIT) ECE ELECTRONICS COMMUNICATION ENGINEERING”
2020GC
Page 125
JU (JIT) ECE ELECTRONICS COMMUNICATION ENGINEERING”
2020GC
close all
figure
semilogy(Eb_N0_dB,theoryBer,'bp-','LineWidth',2);
hold on
semilogy(Eb_N0_dB,simBer,'mx-','LineWidth',2);
axis([-3 35 10^-5 0.5])
grid on
legend('Rayleigh-Theory', 'Rayleigh-Simulation');
xlabel('Eb/No, dB');
ylabel('Bit Error Rate');
title('BER for BPSK modulation in Rayleigh channel');
The code below plots a faded signal’s power (versus sample number). The code also illustrates
the syntax of the filter and rayleighchan functions and the state retention of the channel object.
Notice from the output that NumSamplesProcessed equals the number of elements in the signal.
c = rayleighchan(1/10000,100);
sig = 1i*ones(2000,1);
Page 126
JU (JIT) ECE ELECTRONICS COMMUNICATION ENGINEERING”
2020GC
y = filter(c,sig);
c
plot(20*log10(abs(y)))
xlabel('Sample Number');
ylabel('Power of Faded Signal');
title('Power of a Faded signal in Rayleigh Channel');
c=
ChannelType: 'Rayleigh'
InputSamplePeriod: 1.0000e-04
DopplerSpectrum: [1x1 doppler.jakes]
MaxDopplerShift: 100
PathDelays: 0
AvgPathGaindB: 0
NormalizePathGains: 1
StoreHistory: 0
StorePathGains: 0
PathGains: 0.0994 - 0.1056i
ChannelFilterDelay: 0
ResetBeforeFiltering: 1
NumSamplesProcessed: 2000
Page 127
JU (JIT) ECE ELECTRONICS COMMUNICATION ENGINEERING”
2020GC
When there is line-of-sight, direct path is normally the strongest component goes into deeper
fade compared to the multipath components. This kind of signal is approximated by Rician
distribution. As the dominating component run into more fade the signal characteristic goes from
Rician to Rayleigh distribution.
Page 128
JU (JIT) ECE ELECTRONICS COMMUNICATION ENGINEERING”
2020GC
The followings are the plots which depicts Rician channel impulse response, baseband IQ vector
without channel, baseband IQ vector with Rician channel and channel response with baseband
IQ vector consisting all ones in the packet.
Page 129
JU (JIT) ECE ELECTRONICS COMMUNICATION ENGINEERING”
2020GC
Page 130
JU (JIT) ECE ELECTRONICS COMMUNICATION ENGINEERING”
2020GC
In a digital transmission, BER is the number of bits with errors divided by the total number of
bits that have been transmitted, received or processed over a given time period. That is:
𝑁𝑢𝑚𝑏𝑒𝑟𝑜𝑓𝑏𝑖𝑡𝑠𝑤𝑖𝑡ℎ𝑒𝑟𝑟𝑜𝑟
𝐵𝐸𝑅 =
𝑡𝑜𝑡𝑎𝑙𝑛𝑢𝑚𝑏𝑒𝑟𝑜𝑓𝑏𝑖𝑡𝑠𝑠𝑒𝑛𝑡
Bit error rate is a key parameter that is used in assessing the systems performance that transmits
digital data from one location to another. When data is transmitted over a data link, there is a
possibility of errors being introduced into the system. As a result, it is necessary to assess the
performance of the system, and BER provides an ideal way in which this can be achieved. BER
assesses performance of a system including the transmitter, receiver and the medium between the
two. The bit-error rate is the main performance parameter of a digital communication system.
Page 131
JU (JIT) ECE ELECTRONICS COMMUNICATION ENGINEERING”
2020GC
The performance of channel can be evaluated from bit error rate (BER) versus signal to noise
ratio (SNR) curve.
Conclusion
Generally, the growing of demand for the huge data transmission made the digital
communication systems increasingly attractive, greatest of communications have become digital
due to the advantages of digital communication over analog communication. In these projects we
mainly use Huffman as source coding, convolutional encoder and Viterbi decoder as channel
encoder and decoder, multiplexer, modulator (mainly BPSK), Frequency Hopping Spread
Spectrum as frequency spread, OFDM as multiple access and AWGN as wireless channel. For
each of digital communication system components we investigate their perspectives performance
analysis mainly in terms of BER.
Page 132
JU (JIT) ECE ELECTRONICS COMMUNICATION ENGINEERING”
2020GC
Page 133
JU (JIT) ECE ELECTRONICS COMMUNICATION ENGINEERING”
2020GC
Page 134
JU (JIT) ECE ELECTRONICS COMMUNICATION ENGINEERING”