DC Module 1-4
DC Module 1-4
DIGITAL
COMMUNICATION
Sreenath Narayanan
Lecturer in ECE Dept.
SNPTC Kanhangad
Module I
Pulse And Pulse Code Modulation
MODEL OF A DIGITAL COMMUNICATION
SYSTEM
Source
• The source can be an analog signal. Example: A Sound signal
Input Transducer
• This is a transducer which takes a physical input and converts it to an
electrical signal (Example: microphone). This block also consists of
an analog to digital converter where a digital signal is needed for
further processes.
• A digital signal is generally represented by a binary sequence.
Source Encoder
• The source encoder compresses the data into minimum number of
bits. This process helps in effective utilization of the bandwidth. It
removes the redundant bits unnecessary excess bits, i.e. zeroes.
Channel Encoder
• The channel encoder, does the coding for error correction. During the
transmission of the signal, due to the noise in the channel, the signal
may get altered and hence to avoid this, the channel encoder adds
some redundant bits to the transmitted data. These are the error
correcting bits.
Digital Modulator
• The signal to be transmitted is modulated here by a carrier. The
signal is also converted to analog from the digital sequence, in order
to make it travel through the channel or medium.
Channel
• The channel or a medium, allows the analog signal to transmit from
the transmitter end to the receiver end.
Digital Demodulator
• This is the first step at the receiver end. The received signal is
demodulated as well as converted again from analog to digital. The
signal gets reconstructed here.
Channel Decoder
• The channel decoder, after detecting the sequence, does some error
corrections. The distortions which might occur during the
transmission, are corrected by adding some redundant bits. This
addition of bits helps in the complete recovery of the original signal.
Source Decoder
• The resultant signal is once again digitized by sampling and
quantizing so that the pure digital output is obtained without the loss
of information. The source decoder recreates the source output.
Output Transducer
• This is the last block which converts the signal into the original
physical form, which was at the input of the transmitter. It converts
the electrical signal into physical output (Example: loud speaker).
Output Signal
• This is the output which is produced after the whole
process. Example − The sound signal received.
Advantages of Digital Communication
Fig.2 : A zero-order holding circuit Fig.3 : the output of a Low Pass filter (LPF)
• For pulse amplitude modulated (PAM) signals, the demodulation is
done using a Holding circuit. Fig.1 shows the block diagram of a
PAM demodulator.
• In this method, the received PAM signal is allowed to pass through a
Holding circuit and a low pass filter (LPF) as shown in fig.1.
• Fig.2 illustrates a very simple holding circuit.
• Here the switch ‘S’ is closed after the arrival of the pulse and it is
opened at the end of the pulse.
• In this way, the capacitor C is charged to the pulse amplitude value
and it holds this value during the interval between the two pulses.
• Hence, the sampled values are held as shown in fig.3.
• fter this the holding circuit output is smoothened in Low Pass filter
as shown in fig.3.
Drawbacks
• Very large bandwidth required for transmission.
• Interference of noise is maximum.
Generation of PWM Signal
Disadvantages of PWM
• Due to the variable pulse width, the pulses have variable power
contents.
• Bandwidth required for the PWM communication is large as
compared to PAM.
Generation of PPM signal
• In PPM, the amplitude and width of the pulses is kept constant but
the position of each pulse is varied in accordance with the
amplitudes of the sampled values of the modulating signal.
• The position of the pulses is changed with respect to the position of
reference pulses.
• The PPM pulses can be generate from the PWM pulses as shown in
fig.2.
Fig.2 : PPM pulses generated from PWM signal
• Here, it may be noted that with increase in the modulating voltage the
PPM pulses shift further with respect to reference.
• The PWM pulses obtained at the comparator output are applied to a
monostable multivibrator.
• The monostable is negative edge triggered.
• Hence, corresponding to each trailing edge of PWM signal, the
monostable output goes high.
Fig.3: Waveforms
DISADVANTAGES
• Large Bandwidth required for
Transmission
• Rise in attenuation
• Quantizing and encoding circuits are
complex
APPLICATION
• In compact disk
• Digital telephony
• Digital audio applications
Basic Elements of PCM
• The transmitter section of a Pulse Code Modulator circuit consists of Sampling,
Quantizing and Encoding, which are performed in the analog-to-digital converter section.
• The low pass filter prior to sampling prevents aliasing of the message signal.
• The basic operations in the receiver section are regeneration of impaired signals,
decoding, and reconstruction of the quantized pulse train.
• Above fig. shows the block diagram of PCM which represents the basic elements of both
the transmitter and the receiver sections.
Low Pass Filter
• This filter eliminates the high frequency components present in the input analog signal
which is greater than the highest frequency of the message signal, to avoid aliasing of the
message signal.
Sampler
• This is the technique which helps to collect the sample data at instantaneous values of
message signal, so as to reconstruct the original signal.
• The sampling rate must be greater than twice the highest frequency component W of the
message signal, in accordance with the sampling theorem.
Quantizer
• Quantizing is a process of reducing the excessive bits and confining the data. The sampled
output when given to Quantizer, reduces the redundant bits and compresses the value.
Encoder
• The digitization of analog signal is done by the encoder.
• It designates each quantized level by a binary code.
• The sampling done here is the sample-and-hold process.
• These three sections LPF, Sampler, and Quantizer will act as an analog to digital
converter.
• Encoding minimizes the bandwidth used.
Regenerative Repeater
• This section increases the signal strength.
• The output of the channel also has one regenerative repeater circuit, to compensate the
signal loss and reconstruct the signal, and also to increase its strength.
Decoder
• The decoder circuit decodes the pulse coded waveform to reproduce the original signal.
• This circuit acts as the demodulator.
Reconstruction Filter
• After the digital-to-analog conversion is done by the regenerative circuit and the
decoder, a low-pass filter is employed, called as the reconstruction filter to get back the
original signal.
• Hence, the Pulse Code Modulator circuit digitizes the given analog signal, codes it and
samples it, and then transmits it in an analog form.
• This whole process is repeated in a reverse pattern to obtain the original signal.
Quantization
• The digitization of analog signals involves the rounding off of the values
which are approximately equal to the analog values.
• The method of sampling chooses a few points on the analog signal and
then these points are joined to round off the value to a near stabilized
value. Such a process is called as Quantization.
Quantizing an Analog Signal
• For the samples that are highly correlated, when encoded by PCM
technique, leave redundant information behind.
• To process this redundant information and to have a better output, it is a
wise decision to take a predicted sampled value, assumed from its
previous output and summarize them with the quantized values.
• Such a process is called as Differential PCM DPCM technique.
• Redundant Information in PCM
• Samples taken at 4Ts , 5Ts and 6Ts are encoded to same value of (110) so it is
redundant.
• Difference between samples taken at 9Ts and 10Ts is only due to last bit and
first two bits are redundant.
• If this redundancy is reduced, then overall bit rate will decrease and number
of bits required to transmit one sample will also be reduced.
• This type of digital pulse modulation technique is called as Differential Code
Modulation (DPCM).
Working Principle
• The differential pulse code modulation works on the principle of
prediction. The value of the present sample is predicted from the past
samples.
• The prediction may not be exact but it is very close to the actual sample
value.
• Fig. below shows the transmitter of DPCM system.
• The sampled signal is denoted by x(nTs) and predicted signal is denoted by
xˆ(nTs).
• The comparator finds out the difference between the actual sample value
x(nTs) and predicted sample value xˆ(nTs).
• This is known as prediction error and it is denoted by e(nTs).
• It can be defined as ,
• e(nTs) = x(nTs) – xˆ(nTs)……………………….(1)
• The predicted value is produced by using a prediction filter.
• The quantizer output signal gap eq(nTs) and previous prediction is added
and given as input to the prediction filter. This signal is called xq(nTs).
• This makes the prediction more and more close to the actual sampled
signal.
• We can observe that the quantized error signal eq(nTs) is very small and
can be encoded by using small number of bits.
• Thus number of bits per sample are reduced in DPCM.
• The quantizer output can be written as ,
• eq(nTs) = e(nTs) + q(nTs)………………………..(2)
• Here, q(nTs) is the quantization error.
• As shown in fig., the prediction filter input xq(nTs) is obtained by sum xˆ(nTs)
and quantizer output. i.e.,
• xq(nTs) = xˆ(nTs) + eq(nTs)……………………..(3)
• Substituting the value of eq(nTs) from eq.(2) in the above eq. (3) , we get,
• xq(nTs) = xˆ(nTs) + e(nTs) + q(nTs) ………………….(4)
• eq.(1) is written as,
• e(nTs) = x(nTs) – xˆ(nTs)
• ∴ e(nTs) + xˆ(nTs) = x(nTs)
• Therefore, substituing the value of e(nTs) + xˆ(nTs) from the above
equation into eq. (4), we get,
• xq(nTs) = x(nTs) + q(nTs) …………………..(5)
Reception of DPCM Signal
• Fig. below shows the block diagram of DPCM receiver.
• The decoder first reconstructs the quantized error signal from incoming
binary signal.
• The prediction filter output and quantized error signals are summed up to
give the quantized version of the original signal.
• Thus the signal at the receiver differs from actual signal by quantization
error q(nTs), which is introduced permanently in the reconstructed signal.
Advantages of DPCM
• As the difference between x(nTs) and xˆ(nTs) is being encoded and
transmitted by the DPCM technique, a small difference voltage is to be
quantized and encoded.
• This will require less number of quantization levels and hence less number
of bits to represent them.
• Thus signaling rate and bandwidth of a DPCM system will be less than
that of PCM.
Delta Modulation
• In PCM the signaling rate and transmission channel bandwidth are quite
large since it transmits all the bits which are used to code a sample. To
overcome this problem, Delta modulation is used.
Working Principle
• Delta modulation transmits only one bit per sample.
• Here, the present sample value is compared with the previous sample
value and this result whether the amplitude is increased or decreased is
transmitted.
• Input signal x(t) is approximated to step signal by the delta modulator. This
step size is kept fixed.
• The difference between the input signal x(t) and staircase approximated
signal is confined to two levels, i.e., +Δ and -Δ.
• Now, if the difference is positive, then approximated signal is increased by
one step, i.e., ‘Δ’. If the difference is negative, then approximated signal is
reduced by ‘Δ’ .
• When the step is reduced, ‘0’ is transmitted and if the step is increased, ‘1’
is transmitted.
• Hence, for each sample, only one binary bit is transmitted.
• Fig. below shows the analog signal x(t) and its staircase approximated
signal by the delta modulator.
Mathematical Expressions
• The error between the sampled value of x(t) and last approximated
sample is given as:
• Also if b (nTs) =+Δ then a binary ‘1’ is transmitted and if b (nTs) = -Δ then a
binary ‘0’ is transmitted
• Here Ts = sampling interval.
Transmitter
• Here the system consists of NRZ encoder along with product modulator
and carrier generator.
• The binary message signal is fed to the bipolar NRZ level encoder that
converts the Binary data input into equivalent bipolar NRZ sequence m(t).
• This bipolar NRZ signal is fed to the balanced modulator along with the
carrier wave.
• Thus, the binary signal modulates the carrier wave that generates a phase
shifted modulated signal termed as BPSK signal.
• The above figure shows phase reversal when the bit sequence gets changed
either from 1 to 0 or from 0 to 1.
• When the bit sequence changes from 0 to 1 then we noticed a positive
phase change whereas, when the bit sequence changes from 1 to 0 then a
negative change of phase is noticed.
Expression for BPSK
• Let us consider the carrier wave is given as
s(t) = A cos (2πfct)
• The peak of the carrier wave is represented as A.
• The power dissipated is given as,
•
• The phase shift ɸ is based on the time delay in between transmitter and
receiver.
• The signal is then fed to a square law device that provides
cos2(2πfct + ɸ) as its output.
• Here, only the carrier of the signal is taken into consideration thus the
amplitude is neglected.
• As we know,
• Or we can write,
• This signal is then given to the integrator and bit synchronizer unit.
• The signal is integrated over the 1-bit period by the integrator by making
use of bit synchronizer.
• It manages the bit duration. After a completed bit duration, synchronizer
closes S2 and the output of the integrator acts as input to the decision
device.
Advantages of Phase shift keying
• It allows more efficient transmission of radio frequency signal.
• Better noise immunity is noticed in the case of BPSK technique.
• Less bandwidth is utilized by the BPSK signal in comparison to BFSK
DISADVANTAGES
• More complex system
Minimum Shift Keying (MSK)
Block Diagram of MSK Transmitter
Minimum shift keying (MSK) is a special type of continuous phase-frequency shift
keying (CPFSK) with modulation index h=0.5.
Waveform of MSK
Block Diagram of MSK Receiver
Advantages
• The MSK signal has continuous phase
• MSK waveform does not have amplitude variations.
• Interchannel interference is reduced.
• Main lobe of MSK is wider than that of qpsk.
Disadvantages
• Generation and detection are complex.
• The bandwidth requirement of MSK is 1.5 fb.
Module III
Information Theory & Coding
INFORMATION CONTENT OF SYMBOL
• Eg.
INFORMATION RATE
• If the time rate at which source X emits symbols, is r (symbol s), the
information rate R of the source is given by
• R = rH(X) b/s
• Here R is information rate.
• H(X) is Entropy or average information and r is rate at which symbols are
generated.
• Information rater is represented in average number of bits of information
per second.
CHANNEL CAPACITY
• Block length: The number of bits ‘n’ after coding is called the block length of the
code.
• Code rate: The code rate ‘r’ is defined as the ratio of message bits (k) and the
encoder output bits (n). Hence,
• Hamming distance: The hamming distance (d) between the two code vectors is
equal to the number of elements in which they differ. Eg. Let X = 101 and Y = 110.
• Minimum hamming distance: The smallest hamming distance between the valid
code vectors is termed as the minimum hamming distance (dmin)
Shannon’s-Hartley Theorem
• Shannon’s theorem gives the capacity of a system in the presence of noise. (The capacity
C (b/s) of the AWGN (Additive White Gaussian Noise) channel)
• C = 𝐵𝑙𝑜𝑔2(1 + SNR) b/s
Or
• C = 𝐵𝑙𝑜𝑔2(1 + S/N) b/s
• Where C is the channel capacity in bits per second
• B is the bandwidth of the channel in hertz
• S is the average received signal power over the bandwidth
• N is the average noise or interference power over the bandwidth
• S/N is the signal-to-noise ratio (SNR) or the carrier-to-noise ratio (CNR)
• The shannon’s capacity theorem states that a communication system will transmit
information with the small probability of errors when the information rate R is less than
or equal to channel capacity C. i.e, R ≤ C.
• A converse of these theorem states that it is not possible to transmit the message
without error if R > C
• Thus the capacity theorem predicts essentially error free transmission over a noisy
channel.
Need for Coding
Coding Requirement
Shannon-Fano algorithm
• List the source symbols in order of decreasing probability
• Partition the set into two sets that are as close to equiprobables as
possible, and assign 0 to the upper set 1 to the lower set.
• Continue this process, ach time partitioning the sets with as nearly equal
probabilities
• as possible until further partitioning is not possible.
• Average codeword length L = 𝑚 𝑖=1 𝑃(𝑥𝑖 ) 𝑙𝑖
• Where 𝑙𝑖 is the code word length
• Eg. Codeword = 1001 then 𝑙𝑖 = 4
𝐻(𝑥)
• Code efficiency η =
𝐿
• An example of Shannon-Fano encoding is shown in Table given below.
• The table above shows the messages 𝑥1, 𝑥2, 𝑥3, 𝑥4 having probabilities
𝑃(𝑥1) = 0.5 , 𝑃(𝑥2) = 0.25 , 𝑃(𝑥3) = 0.125 , 𝑃(𝑥4) =0.125. Construct a
Shannon-Fano code for X, and calculate the efficiency of the code.
𝑥1 0.5 0 0 1
𝑥2 0.25 1 0 10 2
𝑥3 0.125 1 1 0 110 3
𝑥4 0.125 1 1 1 111 3
• when two or more nonconsecutive bits in the data unit have changed
• Burst error
• when two or more consecutive bits in the data unit have changed
ERROR DETECTION : PARITY BIT METHOD
• In this method one extra bit is sent along with the original bits to make number of
1s either even in case of even parity, or odd in case of odd parity.
• The sender while creating a frame counts the number of 1s in it.
• For example, if even parity is used and number of 1s is even then one bit with
value 0 is added. This way number of 1s remains even.
• If the number of 1s is odd, to make it even a bit with value 1 is added.
• The receiver simply counts the number of 1s in a frame. If the count of 1s is even
and even parity is used, the frame is considered to be not-corrupted and is
accepted. If the count of 1s is odd and odd parity is used, the frame is still not
corrupted.
• If a single bit flips in transit, the receiver can detect it by counting the number of
1s. But when more than one bits are error occurs, then it is very hard for the
receiver to detect the error.
ERROR DETECTION AND CORRECTION CODES :
CYCLIC REDUNDANCY CHECK (CRC)
• CRC is based on binary division. A sequence of redundant bits called CRC or
CRC remainder is appended at the end of a data unit such as byte.
• At the sender side, the data unit to be transmitted is divided by a predetermined
divisor (binary number) in order to obtain the remainder. This remainder is called
CRC.
• The CRC has one bit less than the divisor. It means that if CRC is of n bits,
divisor is of n+ 1 bit.
• The sender appends this CRC to the end of data unit such that the resulting data
unit becomes exactly divisible by predetermined divisor
• At the destination, the incoming data unit i.e. data + CRC is divided by the same
number (predetermined binary divisor).
• If the remainder after division is zero then there is no error in the data unit &
receiver accepts it.
• If remainder after division is not zero, it indicates that the data unit has been
damaged in transit and therefore it is rejected.
HAMMING CODE
Non-Systematic form of Hamming Code:
• In a non-systematic block code, it is not possible to identify message bits and
check bits. They are mixed in the block. The error detection and correction
capability of non-systematic hamming code can be explained below by an
example.
• Consider a data (message) block of 1 1 0 1. The hamming code adds three
parity bits to the message bits in such a way that both message bits (data bits)
and check bits (parity check bits) get mixed. The check bit locations are as
shown below.
• Here p1, p2 and p3represent the parity check bits to be added. D represents the
data (message) bits. Then we have
• The first parity bit, p1 provides even parity from a check of bit locations 3, 5
and 7. Here they are 1, 1 and 1 respectively. Hence p1 will therefore be 1 to
achieve even parity.
• The second parity bit, p2 checks locations 3, 6 and 7. Here they are 1, 0 and 1
respectively. Hence p2 will be 0 to achieve even parity.
• The third parity bit p3, checks locations 5, 6 and 7. Here they are 1, 0 and 1
respectively. Hence p3 will be 0 to achieve even parity.
• The resulting 7-bit code word generated is as below.
• Suppose that this code word is altered during transmission. Assume that location
5 changes from 1 to 0. Hence the received code word with error is given below.
• At the decoder, we have to evaluate the parity bits to determine where error
occurs. This is accomplished by assigning a 1 to any parity bit which is incorrect
and a 0 to the parity bit which is correct.
• We check p1 for locations 3, 5 and 7. Here they are 1, 0 and 1. For even
parity p1 should be 0, but we have received p1 as 1, which is incorrect. We
assign a 1 to p1.
• We check p2 for locations 3, 6 and 7. Here they are 1, 0 and 1 respectively.
For even parity p2 should be 0 and we have also received p2 as 0, which is
correct. We assign a 0 to p2.
• We check p3 for locations 5, 6 and 7. Here they are 0, 0 and 1 respectively.
For even parity p3 should be 1, but we have received p3 as 0, which is
incorrect. We assign a 1 to p3.
• The three assigned values result in the binary form of 1 0 1, which has a
decimal value of 5. This means that the bit location containing the error is
5. The decoder then change the 5th location bit from 0 to 1.
• • The hamming code is therefore capable of locating a single error. But it
fails if multiple errors occur in one data block.
CONVOLUTIONAL CODES
• Its main limitation is that if there are too many errors, the frames need to
be retransmitted.
• Requires large bandwidth
• It does not work with analog communication
INTERLEAVING
• It separates the codeword symbols in time.
• It transforms channel with memory to memoryless channel.
• It enables random error correcting codes in a burst noise channel.
• Interleaving is applied to coded message before transmission and
deinterleaving after reception.
• The burst of errors is spread out in time and are handled by decoder.
• Interleaver which shuffles code symbols over span of several block lengths is
known as block interleaver and one which shuffles over several constraint
lengths is known as convolutional interleaver.
• The span required in determined by burst duration. Figure depicts codewords
without and with interleaving.
• The 2 types of interleavers used in communications are Block, Convolutional
• Interleaving is frequently used in digital communication and storage
systems to improve the performance of forward error correcting codes.
BLOCK INTERLEAVER
• A block interleaver accepts coded symbols in blocks from encoder, shuffles
the symbols and then feeds the rearranged symbols to the data
modulator.
• The shuffling of block is accomplished by filling the columns of an M- row
by N - column ( M X N) array with encoded sequence.
• After the array is filled, these symbols are fed to the modulator one row at
a time and transmitted over the channel.
• At the receiver, the deinterleaver performs inverse operation, the symbols
are entered by rows and removed one column at a time.
• Example : As shown, 24 code symbols are place into the interleaver input.
The output sequence to the transmitter consists of code symbols removed
from array by rows.
• Block interleaver is further categorized into various subtypes such as
Matrix Interleaver, Helical Interleaver, Random Interleaver and Odd-Even
Interleaver.
CONVOLUTIONAL INTERLEAVER
• The code symbols are sequentially shifted into bank of "N" registers.
• Each successive register provides "J" symbols more storage than preceding
one.
• The zeroth register provides no storage.
• The new code symbol is shifted in while the oldest symbol is shifted out to
the modulator or transmitter.
Module IV
Transmission Techniques And Error Control
Data Transmission Methods
Simplex
• In simplex transmission mode, the communication between sender and
receiver occurs in only one direction (unidirectional).
• The sender can only send the data, and the receiver can only receive the
data. The receiver cannot reply to the sender.
• To take a keyboard / monitor relationship as an example, the keyboard can
only send the input to the monitor, and the monitor can only receive the input
and display it on the screen. The monitor cannot reply, or send any feedback,
to the keyboard.
Half Duplex
• The communication between sender and receiver occurs in both directions
(bi-directional) in half duplex transmission, but only one at a time.
• The sender and receiver can both send and receive the information, but only
one is allowed to send at any given time.
• For example, in walkie-talkies, the speakers at both ends can speak, but they
have to speak one by one. They cannot speak simultaneously.
Full Duplex
• In full duplex transmission mode, the communication between sender and
receiver can occur simultaneously.
• The sender and receiver can both transmit and receive at the same time.
• For example, in a telephone conversation, two people communicate, and
both are free to speak and listen at the same time.
Synchronous and Asynchronous Data Transmission
• In this transmission, the transmitter clock and the receiver clock are in
synchronization, therefore, they run at the same rate.
• It transmits block by block or frame by frame at a single time within fixed time
intervals. Furthermore, it does not have overhead with extra header and footer
bits.
• In brief, synchronous transmission is fast, efficient, reliable and allows a large
amount of data transferring.
• Some examples of synchronous transmission are chat rooms, video
conferencing, telephone conversations, etc.
Asynchronous Transmission
• Asynchronous Transmission, also called as start/stop transmission, sends
data from sender to receiver using flow control method.
• It does not use a clock to synchronize data between the source and the
destination.
• This transmission sends one character or 8 bits at a time.
• Before transmission each character it sends the start bit.
• After sending the character it sends the stop bit.
• With the character bits and start and stop bits, the total number of bits in
10 bits.
• In brief, it is a simple and cost-effective transmission method.
• Some examples of asynchronous transmission are Emails, television, and
radios
MULTIPLEXING TECHNIQUES
Key Terms
Public and private keys
• This is a pair of keys that have been selected so that if one is used for
encryption, the other is used for decryption.
• The exact transformations performed by the algorithm depend on the
public or private key that is provided as input.
Plain text
• Information that can be directly read by humans or a machine.
• It is the readable message or data that is fed into the encryption algorithm
as input.
Cipher
• A cipher is a cryptographic algorithm
Cipher text
• Cipher text is encrypted text transformed from plaintext using an
encryption algorithm.
• Cipher text can't be read until it has been converted into plaintext
(decrypted) with a key.
• The decryption cipher is an algorithm that transforms the cipher text back
into plaintext.
Encryption
• The process of converting plaintext to ciphertext
Decryption
• The process of reverting ciphertext to plaintext
RSA (Rivest–Shamir–Adleman) Algorithm
Digital Signature
• A digital signature is a mathematical technique used to validate the
authenticity and integrity of a message, software or digital document.