Anda di halaman 1dari 20

Unit 5

SAMPLING AND QUANTIZATION

Claude Elwood Shannon (April 30, 1916 – February 24, 2001) was an
American mathematician, electrical engineer, and cryptographer known as "the father
of information theory". Shannon is noted for having founded information theory with a
landmark paper, A Mathematical Theory of Communication, that he published in 1948.
5.1 Introduction

With rapid advancement in data acquisition technology (i.e. analog-to-digital


and digital-to-analog converters) and the explosive introduction of micro-
computers, selected complex linear and nonlinear functions currently implemented
with analog circuitry are being alternately implemented with sample data systems.
Though more costly than their analog counterpart, these sampled data systems
feature programmability. Additionally, many of the algorithms employed are a
result of developments made in the area of signal processing and are in some cases
capable of functions unrealizable by current analog techniques. With increased
usage a proportional demand has evolved to understand the theoretical basis
required in interfacing these sampled data-systems to the analog world. Digital
hardware, including computers, take actions in discrete steps. So they can deal with
discrete time signals, but they cannot directly handle the continuous-time signals
that are prevalent in the physical world. This chapter is about the interface between
these two worlds, one continuous, the other discrete. A discrete-time signal is
constructed by sampling a continuous-time signal, and a continuous-time signal is
reconstructed by interpolating a discrete-time signal.

5.2 Signals and its Types

What is a Signal?

A signal is a way of conveying information. Gestures, semaphores, images, sound,


all can be signals.

Technically - a function of time, space, or another observation variable that


conveys information
Types of signals

Signals are represented mathematically as a function of one or more independent


variables. We classify signals as being either continuous-time ( functions of a real
valued variables) or discrete-time (functions of an integer-valued variable)

Continuous Time Signal


Discrete Time Signal
a. Continuous Time Signal
If the independent variable (t) is continuous, then the corresponding signal is continuous time
signal.

Fig .5.1 Continuous time signal

b. Discrete Time Signal

If the independent variable (t) takes on only discrete values, for example t = ±1, ±2, ±3, ...
Fig 5.2 Discrete Time Signal

5.3 Sampling

The signals we use in the real world, such as our voices, are called "analog" signals. To process
these signals in computers, we need to convert the signals to "digital" form. While an analog
signal is continuous in both time and amplitude, a digital signal is discrete in both time and
amplitude. To convert a signal from continuous time to discrete time, a process called sampling
is used. The value of the signal is measured at certain intervals in time. Each measurement is
referred to as a sample. How many samples are necessary to ensure we are preserving the
information contained in the signal? If the signal contains high frequency components, we will
need to sample at a higher rate to avoid losing information that is in the signal. In general, to
preserve the full information in the signal, it is necessary to sample at twice the maximum
frequency of the signal.

Sampling theorem

The sampling theorem by C.E. Shannon in 1949 places restrictions on the frequency content of the time
function signal, f(t), and can be simply stated as follows: In order to recover the signal function f(t) exactly,
it is necessary to sample f(t) at a rate greater than twice its highest frequency component.
Handwritten notes about sampling

Sampling Techniques

There are three types of sampling techniques as:

a. Ideal sampling or Instantaneous sampling or Impulse sampling


b. Natural sampling
c. Flat top sampling

a. Ideal sampling

The concept of ‘instantaneous’ sampling is more of a mathematical abstraction as no practical


sampling device can actually generate truly instantaneous samples (a sampling pulse should have
non-zero energy).Hence this type of sampling is not applied for practical purposes.

b. Natural sampling

In the analogue-to-digital conversion process an analogue waveform is sampled to form a series


of pulses whose amplitude is the amplitude of the sampled waveform at the time the sample was
taken. In natural sampling the pulse amplitude takes the shape of the analogue waveform for the
period of the sampling pulse as shown in figure.

Fig .Natural Sampling

C.Flat Top sampling:


After an analogue waveform is sampled in the analogue-to-digital conversion process, the
continuous analogue waveform is converted into a series of pulses whose amplitude is equal to
the amplitude of the analogue signal at the start of the sampling process. Since the sampled
pulses have uniform amplitude, the process is called flat top sampling as shown in figure.
Fig Flat Top sampling

We can see that due to the flat-top pulses, the spectrum of the sampled signal is distorted. The
narrower the pulse width, the less distortion. The original signal may be obtained by using a low-
pass filter with a characteristic which inverts the distortion.

5.4 Quantization (Handwritten notes)

5.5 Logarithmic Companding

The word Companding is a combination of Compressing and Expanding, which means that it
does both.

Companding = Compression + Expansion

This is a non-linear technique used to compresses the data at the transmitter and expands the
same data at the receiver. The effects of noise and crosstalk are reduced by using this technique.

There are two types of Companding techniques. They are –

 A-law Companding Technique


 µ-law Companding Technique

A-Law

European countries practice A-Law companding. The mathematical expression for A-law
compression in continuous domain (PDF) is given as:

where:
x is the input signal

sgn(x) is the sign of the input signal

|x| is the absolute value of x

A = 87.6 is the compression parameter defined by Consultative Committee for International


Telephony and Telegraphy (CCITT) G.711

The corresponding A-law expansion equation (PDF) is:

where:

y is the companded signal

sgn(y) is the sign of the companded signal

|y| is the absolute value of y

A = 87.6 is the compression parameter defined by CCITT

µ-law

The µ-law companding technique is deployed in North America and Japan. The analog version
of µ-law (PDF) is given as:

where:
x is the input signal

y is the companded signal

sgn(x) is the sign of the input signal

sgn(y) is the sign of the companded signal

|x| is the absolute value of x

|y| is the absolute value of y

µ = 255 is the compression parameter defined by CCITT G.711

Figure: Compression curves for different values of compression parameters in (a) µ law (b) A
law.

5.6 Pulse Modulation

Introduction of Pulse Modulation

Pulse modulation may be used to transmit information, such as continuous speech or data. It is a
system in which continuous waveforms are sampled at regular intervals. Information regarding
the signal is transmitted only at the sampling times, together with any synchronizing pulses that
may be required. At the receiving end, the original waveforms may be reconstituted from the
information regarding the samples, if these are taken frequently enough.

The pulse modulation techniques can be classified into two main types:
(i) pulse amplitude modulation (PAM) and
(ii) pulse time modulation (PTM).

PTM can be further divided into

 pulse width modulation (PWM) and


 pulse position modulation (PPM).

Out of these techniques, PAM is frequently used whereas PTM is very rarely used.

5.6.1 Pulse Amplitude Modulation


Pulse Amplitude Modulation (PAM) is an analog modulating scheme in which amplitude of
the pulse is varied in accordance with the instantaneous level of the modulating signal.

In the pulse amplitude modulation, the message signal is sampled at regular periodic or time
intervals and this each sample is made proportional to the magnitude of the message signal.
These sample pulses can be transmitted directly using wired media or we can use a carrier signal
for transmitting through wireless. There are two types of sampling techniques for transmitting
messages using pulse amplitude modulation, they are

 FLAT TOP PAM: The amplitude of each pulse is directly proportional to instantaneous
modulating signal amplitude at the time of pulse occurrence and then keeps the amplitude
of the pulse for the rest of the half cycle.
 Natural PAM: The amplitude of each pulse is directly proportional to the instantaneous
modulating signal amplitude at the time of pulse occurrence and then follows the
amplitude of the modulating signal for the rest of the half cycle

Generation

 One of the simplest ways to sample or discrete an analog signal is to mix a sine wave
message signal non-linearly with a low duty cycle rectangular wave (a pulse) using a
class D amplifier.
 The amplifier is held in cut off state by a dc base bias circuit working between + V cc and
−Vcc. The analog signal is fed at the emitter. The dc bias is adjusted such that even at the
maximum negative amplitude of sine wave the amplifier remains cut off.
 The amplifier is allowed to switch ON when the base is driven positive by the large
amplitude pulses at the base input. This will happen when base voltage is larger than the
analog voltage at emitter by at least V BE.
 Now, for a silicon transistor, VBE~ 0.7V, hence the transistor will conduct only when the
base voltages, which is the sum of biasing voltage and the pulse amplitude is greater than
the emitter voltage (analog input) by at least 0.7V.
 The ON condition caused by the pulse given to base combined with the instantaneous
level of the signal at the emitter will produce a pulsed voltage at the collector. This pulse
amplitude is proportional to the level of the input analog signal at the emitter at that
instant.

Demodulation of PAM signal

A simple low pass filter (LPF) shown in Figure can work as a PAM demodulator. A low
pass filter is basically an integrator. It filters out the high frequency sampling pulses of the
rectangular wave generator.

Each pulse gets integrated, the amplitude of the integrated output being proportional to
the input pulse amplitude. The capacitor will get charged at every pulse output and will keep on
supplying this charged voltage at the output during the off time of the pulse.

This restores the fidelity of the message. The only precaution to be observed is to ensure
that the LPF has a flat frequency response over the entire base band frequency range and
provides sufficient attenuation at the pulse rate frequency.
Applications

It is used in Ethernet communication


It is used as an electronic driver for LED Lightning
It is used in many microcontrollers for generating the control signals

Advantages

Transmitter and receiver are easy to construct


PAM can generate other pulse modulation signals and can carry the message at the same
time

Disadvantages

Bandwidth should be large for transmission


Noise is high
More power is required for transmission

5.6.2 Pulse Time Modulation (PTM)

In PTM, the sampling of original analog signal is done at fixed intervals just as in case of
PAM, but the output of PTM circuit results into pulses which have either variable duration or
variable position on time axis with respect to the sampling instant.

Fig. a shows the analog signal s(t). In Fig. b, the pulse width modulation (PWM) or pulse
length modulation (PLM) is shown. In this case, the analog signal is sampled at a constant time
interval (T) by rectangular pulses. When s(t) = 0, the pulse width of modulated pulse is equal to
that of unmodulated pulse T0. At other amplitudes of the signal s(t), the width of the pulse
changes and is proportional to the amplitude of analogsignal s(t).

In this case, the modulation appears in the timing of the trailing edge of the pulse. The
amplitude of rectangular pulse is constant.
Pulse Position Modulation (PPM) technique is shown in Fig. c. The amplitude and width
of the pulse remains constant in case of PPM. Here, the pulse is delayed with respect to the
sampling instant. The change in delay is proportional to the amplitude of the signal s(t).

Generation of PWM

 A circuit generating PWM using this principle is shown in Fig. . Here we use a triangular
wave instead of ramp. It can be easily generated by integrating a square wave from a
generator.
 The triangular wave is added to the signal S (t). This addition signal is fed to the
comparator’s non-inverting input and the dc reference level to the inverting terminal.
The output gives the PWM signal.

Demodulation of PWM

 For PWM demodulation, put a ramp at the +ve edge which will stop at the arrival of –ve
egde.
 The ramp will attain different heights in each cycle since the widths are different and the
heights attained are directly proportional to the pulse width and in turn the amplitude of
the message signal.
 This is then passed through a low pass filter where it will follow the envelop i.e. the
message signal, which produces the demodulated signal at the output.

Fig Demodulation of PWM

Advantages of PWM

 Noise is less than PAM


 Separation of signal and noise is very easy

Disadvantages of PWM

 More power is required


 Large bandwidth is required

Applications of PWM

 Motor control
 PWM is used in asynchronous transmission over noisy channel
 used in brightness control applications
Generation of PPM from PWM

 PWM signal shown in Fig. b is first differentiated by R1-C1. The differentiator gives both
positive and negative going pulses.
 The positive pulses at the differentiator output are eliminated by diode D1, and then
given to the trigger input of MMV.
 The differentiated output is shown in Fig. c. The pulse width of the MMV output is
determined by the values of Rand C. Output at pin No. 3 is a PPM signal. The signal is
shown in Fig. d.

Demodulation of PPM

 For PPM demodulation, ramp is used which starts at the +ve edge of the one pulse and
stops at the +ve edge of the next pulse.
 Thus the height of the generated ramp is determined by the delay between the pulses
which indirectly follows the amplitude of the modulating signal.
 This is then passed through a low pass filter which filters the envelop information as the
demodulated signal.
Fig Demodulation of (b) PPM

Advantages of PPM

 Noise interference is less than PAM


 Separation of signal and noise is very easy

Disadvantages of PPM

 Synchronization between transmitter and receiver is required


 More power is required
 Large bandwidth is required

Applications of PPM

 Synchronous communication of analog pulses


 Telecommunications

Comparison of PAM, PWM, and PPM

Sr. No. Parameter PAM PWM PPM


1 Type of Carrier Train of Pulses Train of Pulses Train of Pulses
Variable Characteristic of the
2 Amplitude Width Position
Pulsed Carrier
3 Bandwidth Requirement Low High High
4 Noise Immunity Low High High
Amplitude Width
5 Information Contained in Position Variations
Variations Variations
6 Power efficiency (SNR) Low Moderate High
Varies with Varies with
7 Transmitted Power amplitude of variation in Remains Constant
pulses width
Need to transmit
8 Not needed Not needed Necessary
synchronizing pulses
Sr. No. Parameter PAM PWM PPM
Bandwidth Bandwidth
Bandwidth depends
depends on the depends on the
9 Bandwidth depends on on the rise time of
width of the rise time of the
the pulse
pulse pulse
Instantaneous
Instantaneous
transmitter Instantaneous
transmitter
power varies transmitter power
power varies
10 Transmitter power with the remains constant
with the
amplitude and with the width of
amplitude of
width of the the pulses
the pulses
pulses
Complexity of generation and
11 Complex Easy Complex
detection
Similarity with other
12 Similar to AM Similar to FM Similar to PM
Modulation Systems

5.7 Pulse Code Modulation and Demodulation


Pulse code modulation is a method that is used to convert an analog signal into a digital
signal, so that modified analog signal can be transmitted through the digital communication
network. PCM is in binary form ,so there will be only two possible states high and low(0 and 1).

The Pulse Code Modulation process is done in three steps Sampling, Quantization, and
Coding. There are two specific types of pulse code modulations such as differential pulse code
modulation(DPCM) and adaptive differential pulse code modulation(ADPCM).

In Pulse Code Modulation, the message signal is represented by a sequence of coded pulses.
This message signal is achieved by representing the signal in discrete form in both time and
amplitude. Instead of a pulse train, PCM produces a series of numbers or digits, and hence this
process is called as digital. Each one of these digits, though in binary code, represent the
approximate amplitude of the signal sample at that instant.
Fig PCM Block diagram

Block diagram of PCM is given above. The source of continuous time message signal is passed
through a low pass filter and then sampling, Quantization, Encoding will be done.

5.7.1Basic Elements of PCM

There are three basic elements :

 A.Transmitter
 B.Channel
 C.Receiver

A.Transmitter

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.

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

Sampling is a process of measuring the amplitude of a continuous-time signal at discrete instants,


converts the continuous signal into a discrete signal. This technique 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.

Fig Analog and Sampled Signal

Quantizer

In quantization, an analog sample with an amplitude that converted into a digital sample
with an amplitude that takes one of a specific defined set of quantization values. Quantization is
done by dividing the range of possible values of the analog samples into some different levels,
and assigning the center value of each level to any sample in quantization interval. Quantization
approximates the analog sample values with the nearest quantization values. 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.

B.Channel

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.

C.Receiver

The basic operations in the receiver section are regeneration of impaired signals, decoding,
and reconstruction of the quantized pulse train.

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.

5.7.2 PCM types

PCM is of two types

Differential Pulse Code Modulation (DPCM)


Adaptive Differential Pulse Code Modulation (ADPCM).

 In DPCM only the difference between a sample and the previous value is encoded. The
difference will be much smaller than the total sample value so we need some bits for
getting same accuracy as in ordinary PCM. So that the required bit rate will also reduce.
For example, in 5 bit code 1 bit is for polarity and the remaining 4 bits for 16 quantum
levels.
 ADPCM is achieved by adapting the quantizing levels to analog signal characteristics.
We can estimate the values with preceding sample values. Error estimation is done as
same as in DPCM. In 32Kbps ADPCM method difference between predicted value and
sample value is coded with 4 bits, so that we’ll get 15 quantum levels. In this method data
rate is half of the conventional PCM.

5.7.3Advantages,Disadvantages and Applications


Advantages

 Analog signal can be transmitted over a high- speed digital communication system.
 Probability of occurring error will reduce by the use of appropriate coding methods.
 The PCM signal is more resistant to interference than normal signal.
 It is robust against noise and interference.

Disadvantages

 Overload appears when modulating signal changes between samplings, by an amount


greater than the size of the step.
 Large bandwidth is required for transmission.
 Noise and crosstalk leaves low but rises attenuation.

Applications

 It is used in digital audio recording, digitized video special effects, digital video, voice
mail.
 It is also used in Radio control units as transmitter and also receiver for remote controlled
cars, boats, planes.
 It is used in the satellite transmission system

5.8 Multiplexing (Handwritten notes)

Anda mungkin juga menyukai