0% found this document useful (0 votes)
254 views

Unit 1

The document outlines the modules covered in a digital signal processing course, including signals and waveforms, frequency transformations, FIR filters, IIR filters, and multirate signal processing. It then provides details on module 1, covering continuous and discrete time signals, sampling theory, analog to digital conversion, aliasing, and the Nyquist sampling theorem.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
254 views

Unit 1

The document outlines the modules covered in a digital signal processing course, including signals and waveforms, frequency transformations, FIR filters, IIR filters, and multirate signal processing. It then provides details on module 1, covering continuous and discrete time signals, sampling theory, analog to digital conversion, aliasing, and the Nyquist sampling theorem.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 175

18ECC204J DIGITAL SIGNAL

PROCESSING- WEEK 2
Syllabus Overview
• Learning Unit / Module 1: Signals and Waveforms
• Learning Unit / Module 2: Frequency
Transformations
• Learning Unit / Module 3: FIR Filters

• Learning Unit / Module 4: IIR Filters

• Learning Unit / Module 5: Multirate signal Processing


Learning Unit / Module 1: Signals and
Waveforms
❑ Basic Elements of DSP , Advantages and applications of DSP
❑ Continuous Time vs Discrete time signals , Continuous valued vs discrete valued signals.
❑ Concepts of frequency in analog signals , Continuous and discrete time sinusoidal signals ,
❑ Sampling of analog signals Sampling theorem
❑ Aliasing Quantization of continuous amplitude signals,
❑ Analog to digital conversion Sample and hold, Quantization and coding
❑ Oversampling A/D converters , Digital to analog conversion Sample and hold
❑ Oversampling D/A converters, Quantization noise
❑ Errors due to truncation,Probability of error
❑ Errors due to rounding
Block Diagram of DSP
Illustration of Aliasing Effects
A/D & D/A Conversion
Analog to Digital (A/D) Conversion
• Most signals of practical interest are analog in nature
Examples: Voice, Video, RADAR signals, Transducer/Sensor
output, Biological signals etc

• So in order to utilize those benefits, we need to convert our


analog signals into digital

• This process is called A/D conversion


Analog to Digital Conversion
A/D conversion can be viewed as a three step process
Analog to Digital Conversion
A/D conversion can be viewed as a three step process
Analog to Digital Conversion
Sample & Hold (Sampler)

• Analog signal is continuous in time and continuous


in amplitude.

• It means that it carries infinite information of time


and infinite information of amplitude.

• Analog (continuous-time) signal has some value


defined at every time instant, so it has infinite
number of sample points.
Analog to Digital Conversion
Sample & Hold (Sampler)

• It is impossible to digitize an infinite number of points.

• The infinite points cannot be processed by the digital


signal (DS) processor or computer, since they require an
infinite amount of memory and infinite amount of
processing power for computations.

• Sampling is the process to reduce the time information


or sample points.
Analog to Digital Conversion
Sample & Hold (Sampler)

• The first essential step in analog-to-digital (A/D) conversion


is to sample an analog signal.

• This step is performed by a sample and hold circuit, which


samples at regular intervals called sampling intervals.

• Sampling can take samples at a fixed time interval.

• The length of the sampling interval is the same as the


sampling period, and the reciprocal of the sampling period is
the sampling frequency fs.
Analog to Digital Conversion
Sample & Hold (Sampler)

• After a brief acquisition time, during which a sample is


acquired, the sample and hold circuit holds the sample steady
for the remainder of the sampling interval.
• The hold time is needed to allow time for an A/D converter to
generate a digital code that best corresponds to the analog
sample.
• If x(t) is the input to the sampler, the output is x(nT), where T
is called the sampling interval or sampling period.
• After the sampling, the signal is called “discrete time
continuous signal” which is discrete in time and continuous
in amplitude.
Analog to Digital Conversion
Sample & Hold (Sampler)
Analog to Digital Conversion
Sample & Hold (Sampler)
Figure below shows an analog (continuous-time)
signal (solid line) defined at every point over the
time axis (horizontal line) and amplitude axis
(vertical line).
Hence, the analog signal contains an infinite
number of points.
Analog to Digital Conversion
Sample & Hold (Sampler)
• Each sample maintains its voltage level during
the sampling interval 𝑻 to give the ADC
enough time to convert it.
• This process is called sample and hold.
Nyquist–Shannon Sampling Theorem

The sampling theorem guarantees that an analogue signal can be


perfectly recovered as long as the sampling rate is at least twice
as large as the highest-frequency component of the analogue
signal to be sampled.
Nyquist–Shannon Sampling Theorem
Nyquist–Shannon Sampling Theorem

Examples
Nyquist–Shannon Sampling Theorem
Example: For the following analog signal,
find the Nyquist sampling rate, also
determine the digital signal frequency
and the digital signal
Nyquist–Shannon Sampling Theorem
Example: Find the sampling frequency of the following signal.

So sampling frequency should be


Nyquist–Shannon Sampling Theorem
Exercise

Determine the Nyquist sampling rate of a


signal
x(t) = 3sin(5000πt + 17o)
Aliasing
Aliasing
How many hertz can the human eye see?

• Most don't notice unless it is under 50 or 60 Hz.

• Generally, people notice when the frame-rate is less than the refresh
rate of the display.

• Depending on the type of CRT, you couldn't see flicker at 30 Hz or


you could still see it at 120 Hz.
Aliasing
• When the minimum sampling rate is not respected, distortion called
aliasing occurs.

• Aliasing causes high frequency signals to appear as lower frequency


signals.

• To be sure aliasing will not occur, sampling is always preceded by low pass
filtering.

• The low pass filter, called the anti-aliasing filter, removes all frequencies
above half the selected sampling rate.
Aliasing
• Figure illustrates sampling a 40 Hz sinusoid
• The sampling interval between sample points is T
= 0.01 second, and the sampling rate is thus fs =
100 Hz.
• The sampling theorem condition is satisfied
Aliasing
• Figure illustrates sampling a 90 Hz sinusoid
• The sampling interval between sample points is T
= 0.01 second, and the sampling rate is thus fs =
100 Hz.
• The sampling theorem condition is not satisfied
Aliasing
Sampling Effect in Time Domain

Example of Aliasing in the time


domain of various sinusoidal
signals ranging from 10 kHz to 80
kHz with a sampling frequency
Fs = 40 kHz.
Time &• There
Frequency Domains
are two complementary signal descriptions.
• Signals seen as projected onto time or frequency domains.
Signal & Spectrum
Frequency Range of Analog & Digital Signals

• For analog signals, the frequency range is from -∞ Hz to ∞ Hz

• For digital signals, the frequency range is from 0 Hz to Fs/2


Hz
Sampling Effect in Frequency Domain

• Sampling causes images of a signal’s spectrum to appear at


every multiple of the sampling frequency fs.

• For a signal with frequency f, the sampled spectrum has


frequency components at kfs ± f
Anti Aliasing Filter
• A signal with no frequency component above a certain
maximum frequency is known as a band-limited signal.

• In our case we want to have a signal band-limited to ½ Fs.

• Some times higher frequency components (both harmonics


and noise) are added to the analog signal (practical signals are
not band-limited).

• In order to keep analog signal band-limited, we need a filter,


usually a low pass that stops all frequencies above ½ Fs.

• This is called an “Anti-Aliasing” filter.


Anti Aliasing Filter
• Anti-aliasing filters are analog filters.

• They process the signal before it is sampled.

• In most cases, they are also low-pass filters unless band-pass


sampling techniques are used.
Under Sampling
• If the sampling rate is lower than the required
Nyquist rate, that is fS < 2W, it is called under
sampling.

• In under sampling images of high frequency


signals erroneously appear in the baseband (or
Nyquist range) due to aliasing.
Sampling of Band Limited Signals
Signals whose frequencies are restricted to a
narrow band of high frequencies can be sampled
at a rate similar to twice the Bandwidth (BW)
instead of twice the maximum frequency.

Fs ≥ BW
Sampling of Band Limited Signals
• While this under-sampling is normally avoided, it
can be exploited.
• For example, in the case of band limited signals all
of the important signal characteristics can be
deduced from the copy of the spectrum that appears
in the baseband through sampling.
• Depending on the relationship between the signal
frequencies and the sampling rate, spectral inversion
may cause the shape of the spectrum in the baseband
to be inverted from the true spectrum of the signal.
Sampling of Band Limited Signals
Figure: Signal recovered
From Nyquist range are
Base band versions of the
Original signal. Sampling rate is
Important to make sure no aliasing
and spectral inversion occurs.

(a) Fs = 80 kHz, signal spectrum


is Inverted in the baseband.

(b) Fs = 100 kHz, the lowest


Frequencies In the signal alias
to the highest frequencies.

(c) Fs = 120 kHz, No spectral


Inversion occurs.
Over Sampling
• Oversampling is defined as sampling above the minimum
Nyquist rate, that is, fS > 2fmax.

• Oversampling is useful because it creates space in the spectrum


that can reduce the demands on the analog anti-aliasing filter.
Over Sampling
In the example below, 2x oversampling means that a low order analog filter is

adequate to keep important signal information intact after sampling.
• After sampling, higher order digital filter can be used to extract the information.
Over •Sampling
The ideal filter has a flat pass-band and the cut-off is
very sharp, since the cut-off frequency of this filter is
half of that of the sampling frequency, the resulting
replicated spectrum of the sampled signal do not
overlap each other. Thus no aliasing occurs.
• Practical low-pass filters cannot achieve the ideal
characteristics.
• Firstly, this would mean that we have to sample the
filtered signals at a rate that is higher than the
Nyquist rate to compensate for the transition band of
the filter
Spectra of Sampled signals

Figure: Signal ‘s Spectra


(i) Over sampled
(ii) Nyquest Rate
(iii) Under Sampled
Sampling Low Pass Signals
Exercise
Exercise-1: If the 20 kHz signal is under-sampled at 30 kHz, find the aliased
frequency of the signal.

Exercise-2: A voice signal is sampled at 8000 samples per second.


i. What is the time between samples?
ii. What is the maximum frequency that will be recovered from the signal?

Exercise-3: An analog Electromyogram (EMG) signal contains useful


frequencies up to 3000 Hz.
i. Determine the minimum required sampling rate to avoid aliasing.
ii. Suppose that we sample this signal at a rate of 6500 samples/s. what is
the highest frequency that can be represented uniquely at this sampling
rate?
Analog to Digital Conversion
Quantizer

• After the sampling, the discrete time continuous signal still


carry infinite information (can take any value) in terms of
amplitude.

• Quantization is the process to reduce infinite information of


the amplitude.

• Quantizer do the conversion of discrete time continuous


valued signal into a discrete-time discrete-value signal.

• The value of each signal sample is represented by a value


selected from a finite set of possible values.
Analog to Digital Conversion
Quantizer

• The A/D converter chooses a quantization level for each


analog sample.

• Number of levels of quantizer is equal to L = 2N

• An N-bit converter chooses among 2N possible


quantization levels.

• So 3 bit converter has 8 quantization levels, and 4 bit


converter has 8 quantization levels.
Analog to Digital Conversion
The quantization step size or resolution is calculated as:
Δ = Q = R/2N
where
R is the full scale range of the analog signal (i.e. Ymax - Ymin)
N is the number of bits used by the converter

• Resolution of a quantizer is the distance between two successive


quantization levels
• More quantization levels, a better resolution!
• What's the downside of more quantization levels?

The strength of the signal compared to that of the quantization errors


is measured by dynamic range and signal-to-noise ratio.
Analog to Digital Conversion
4-bit Quantizer
Analog to Digital Conversion
4-bit Quantizer
Quantization Error
• The error caused by representing a continuous-valued signal
(infinite set) by a finite set of discrete-valued levels.

• The larger the number of quantization levels, the smaller the


quantization errors.

• The quantization error is calculated as the difference between


the quantized level and the true sample level.

• Most quantization errors are limited in size to half a


quantization step Q or Δ .
Quantization Error
• Suppose a quantizer operation given by Q(.) is performed on
continuous-valued samples x[n] is given by Q(x[n]), then the
quantization error is given by
Analog to Digital Conversion
• Lets consider the signal which is to be quantized.

In the figure, we can see that there is a difference between


the original signal (Blue Line) and the quantized signal
(Red Lines). This is the error produced while quantization
Analog to Digital Conversion
Quantization error can be reduced, however, if
the number of quantization levels is increased as
illustrated in the figure
Analog to Digital Conversion
Quantization of unipolar data (maximum error =
full step)
Analog to Digital Conversion
Quantization of unipolar data (maximum error =
half step)
AnalogExample:
to Digital Conversion
Analog pressures are recorded using a pressure
transducer as voltages between 0 and 3 V. The signal must be
quantized using a 3-bit digital code. Indicate how the analog
voltages will be covered to digital values.

The quantization step size is


Q = 3 V/23 = 0.375 V

The half of quantization step is


0.1875 V
Analog to Digital Conversion
Quantization of bipolar data (maximum error =
half step)
Three-bit A/D Conversion
Dynamic Range

Signal-to-Quantization-Noise Ratio
• Provides the ratio of the signal power to the
quantization noise (or quantization error)

• Mathematically,

where
• P = Power of the signal ‘x’ (before quantization)
x
• P = Power of the error signal ‘x ’
q q
Analog to Digital Conversion
Digital-to-Analog (D/A) Conversion
Block Diagram of D/A Conversion
Digital-to-Analog (D/A) Conversion
• Once digital signal processing is complete,
digital-to-analog (D/A) conversion must occur.
• This process begins by converting each digital code into
an analog voltage that is proportional in size to the
number represented by the code.
• This voltage is held steady through zero order hold until
the next code is available, one sampling interval later.
• This creates a staircase-like signal that contains
frequencies above W Hz.
• These signals are removed with a smoothing analog low
pass filter, the last step in D/A conversion.
Digital-to-Analog (D/A) Conversion
• In the frequency domain, the high frequency elements present in the
zero order hold signal appear as images, copies of the original signal
spectrum situated around integer multiples of the sampling
frequency.

• The smoothing analog filter removes these images and so is given the
name of Anti-Imaging Filter.

• Only the frequencies in the baseband, between 0 and fS/2 Hz, remain.
Digital-to-Analog (D/A) Conversion
Three bit D/A Conversion
Comparing Signals in the A/D & D/A Chain
Comparing Signals in the A/D & D/A Chain
Summary
Summary
Review Questions
a. What is Aliasing
b. Compare undersampling and oversampling
ANSWERS Sampling Low Pass Signals
References:

• https://wiki.seg.org/wiki/Frequency_aliasing
• https://sciencing.com/calculate-alias-frequency-8619254.html#:
~:text=Aliasing%20is%20an%20undesired%20effect,of%20a%
20much%20higher%20frequency.
• National Instruments; Bandwidth, Sample Rate, and Nyquist
Theorem; Sep 6, 2006
• Sound on Sound: Q. What is 'Aliasing' and What's the Cause of
It?
18ECC204J DIGITAL SIGNAL
PROCESSING – WEEK 1
Syllabus Overview
• Learning Unit / Module 1: Signals and Waveforms
• Learning Unit / Module 2: Frequency Transformations

• Learning Unit / Module 3: FIR Filters

• Learning Unit / Module 4: IIR Filters

• Learning Unit / Module 5: Multirate signal Processing


Lab Experiments
Lab 1.a) Generation of basic signals
b) Unit step, ramp and impulse
Lab 2: Continuous and discrete time
Lab 3: a) Study of sampling theorem
b) Aliasing effects
Lab 4: a) Linear convolution
b) Circular convolution
Lab 5: a) Autocorrelation and cross correlation
b) Spectrum analysis using DFT
Lab 6: a) Efficient computation of DFT using FFT
b) Computation of IDFT
Lab7: a) Design of digital FIR Low Pass and High Pass filter using rectangular window
b) Design of digital FIR Band Pass and Band Stop filter using rectangular window
Lab8: a) Design of digital FIR Low Pass and High Pass filter using Hanning and Hamming
window
b) Design of digital FIR Band Pass and Band Stop filter using Hanning and Hamming
window
Lab 9: Design of digital FIR filter using frequency sampling method
Lab10: a) Design of analog Butterworth filter
b) Design of analog Chebyshev filter
Lab 11: a) Design of digital Butterworth filter using impulse invariance method
b) Design of digital Butterworth filter using bilinear transformation
Lab12: a) Design of digital Chebyshev filter using impulse invariance method
b) Design of digital Chebyshev filter using bilinear transformation
Lab 13: a) Interpolation
b) Effect of interpolation in frequency domain
Lab 14: a) Decimation
b) Effect of decimation in frequency domain
Lab 15: a) Design of anti-aliasing filter
b) Design of anti-imaging filter
Learning Unit / Module 1: Signals and
Waveforms
❑ Basic Elements of DSP , Advantages and applications of DSP
❑ Continuous Time vs Discrete time signals , Continuous valued vs discrete valued
signals.
❑ Concepts of frequency in analog signals , Continuous and discrete time sinusoidal
signals ,
❑ Sampling of analog signals Sampling theorem
❑ Aliasing Quantization of continuous amplitude signals,
❑ Analog to digital conversion Sample and hold, Quantization and coding
❑ Oversampling A/D converters , Digital to analog conversion Sample and hold
❑ Oversampling D/A converters, Quantization noise
❑ Errors due to truncation IDFT, Probability of error
Data Vs Signal
• Data – information formatted in human/machine readable
form
– • examples: voice, music, image, file
• Signal – electric or electromagnetic representation of data
– • transmission media work by conducting energy along a physical
path; thus, to be transmitted, data must be turned into energy in
the form of electro-magnetic signals
• Transmission – communication of data through
propagation and processing of signals
What is a Signal?
• A signal is a pattern of variation of some form
• Signals are variables that carry information

Examples of signal include:


• Electrical signals
– Voltages and currents in a circuit
• Acoustic signals
– Acoustic pressure (sound) over time
• Mechanical signals
– Velocity of a car over time
• Video signals
– Intensity level of a pixel (camera, video) over time
How is a Signal Represented?
• Mathematically, signals are represented as a function of one or
more independent variables.
• Example : signals that are a function of a single variable: time

f(t)

t
Data Transmission System
Example : Analog Signal vs Digital Signal
What is Digital Signal Processing?
• DSP
• Process of representing signals in a discrete mathematical
sequence of numbers and analyzing, modifying, and extracting
the information contained in the signal by carrying out
algorithmic operations and processing on the signal.
What is a Digital Signal Processing System?

– Digital: Operating by the use of discrete signals to represent data in the form
of numbers.
– Signal: A signal is anything that carries some information. It’s a physical
quantity that conveys data and varies with time, space, or any other
independent variable. It can be in the time/frequency domain. It can be
one-dimensional or two-dimensional.
– Processing: The performing of operations on any data in accordance with
some protocol or instruction is known as processing.
– System: A system is a physical entity that is responsible for the processing. It
has the necessary hardware to perform the required arithmetic or logical
operations on a signal.

– Putting all these together, we can get a definition for DSP.


DSP Applications
• Audio signal processing
• Audio compression
• Digital image processing
• Video compression
• Speech processing, speech recognition
• Digital communications, digital synthesizers, radar, sonar, financial signal
processing, seismology and biomedicine.
• Specific examples include speech coding and transmission in digital mobile
phones, weather forecasting, economic forecasting, seismic data processing, analysis and
control of industrial processes, medical imaging such as CAT scans
and MRI, MP3 compression, computer graphics, image manipulation, audio
crossovers and equalization, and audio effects units.
DSP Applications- Example
Telecommunication
a. Speech Processing
For echo cancellation.
Digital audio synthesis.
Equalization – Think about tuning your radio
Speech recognition and analysis.
for bass and treble).
Filtering – Removing unwanted signals using b. Medicine
specially designed filters like the Infinite X-rays, ECGs, EEGs.
Impulse Response Filter (IIR). c. Signal filtering
Multiplexing and repeating signals. Noise removal and shaping of signal spectrums.
Instrumentation and Control d. Military
In designing Phase Locked Logic (PLL). Sonar and navigation.
Noise reduction circuits. Analysis after tracking in radars.
Compression of signals, Function generators. e. Consumer electronics
Digital Image Processing Music players
Compression of an image- Enhancement, Professional music turntables
reconstruction, and restoration of an image.
Analysis or face detection (like Snapchat).
Basic Elements of Digital Signal Processing System

• Both the input signal and the output signal are in analog
form.
• Digital signal processing provides an alternative method
for processing the analog signal.
• To perform the processing digitally, there is a need for an
interface between the analog signal and the digital
processor.
Block Diagram of DSP
DSP System – Operation
• The first step is to get an electrical signal. The transducer (in this case, a microphone) converts sound
into an electrical signal.
• Once you have an analog electrical signal, we pass it through an operational amplifier (Op-Amp) to
condition the analog signal.
• The anti-aliasing filter is an essential step in the conversion of analog to a digital signal. It is a
low-pass filter. Meaning, it allows frequencies up to a certain threshold to pass. It attenuates all
frequencies above this threshold. These unwanted frequencies make it difficult to sample an analog
signal.
• The next stage is a simple analog-to-digital converter (ADC). This unit takes in analog signals and
outputs a stream of binary digits.
• The heart of the system is the digital signal processor. These days we use CMOS chips (even ULSI) to
make digital signal processors. In fact, modern processors, like the Cortex M4 have DSP units built
inside the SoC. These processor units have high-speed, high data throughputs, and dedicated
instruction sets.
DSP System – Operation (Cont’d)
• The next stages are sort of the opposite of the stages preceding the
digital signal processor.
• The digital-to-analog converter does what its name implies. It’s
necessary for the slew rate of the DAC to match the acquisition rate
of the ADC.
• The smoothing filter is another low-pass filter that smoothes the
output by removing unwanted high-frequency components.
• The last op-amp is just an amplifier.
• The output transducer is a speaker in our case. You can use anything
else according to your requirements.
DSP System – Operation (Cont’d)
• The study of the digital representation of signals is known as
digital signal processing.
• It converts all the real world signals into digital form with the
aid of an Analog to Digital Converter.
• On completion of the processing, the digital signal is converted
back to Analog form using Digital to Analog Converter.
Advantages of DSP
• High level of accuracy.
• The filters designed in DSP have firm control over output
accuracy as compared to analog filters.
• Easy Upgradations, Implementation of algorithms
– The reconfiguration in an analog system is very much tough because the
entire hardware and its component will have to be changed. On the
contrary, a DSP reconfiguration is much more comfortable as only the
code, or the DSP program needs to be flashed after making the changes
according to the requirements.
• The interface types offered by DSP are many like UART, 12C,
and others. This helps in interfacing other ICs with the DSP.
Advantages of DSP (Cont’d)
• The combination of DSP interfaced with FPGA helps in designing the
protocol stack of the whole wireless system like WiMAX, LTE, etc. In this
type of architecture, as per the latency requirements, few of the modules
are ported on FPGA and the other few on DSP.
• Implementation in digital is much more cost effective than its analog
counterpart.
• Repeatability
– The digital system in DSP can be easily cascaded without any problems in loading.
– Digital circuits can be easily reproduced in huge quantities cost effectively.
• Accessible transportation is possible because digital signals can be
processed offline.
Advantages of DSP system (Cont’d)
• A digital signal processing system enjoys many benefits over an analog signal processing system.
Some of these advantages are briefly outlined below:
• Less overall noise
– Since the signals are digital and inherently possess a low probability of getting mixed with unwanted signals, the
entire system benefits. Thus, DSPs don’t really have as much noise to deal with comparatively.
• Error detection and correction is possible in DSPs
– Again, the presence of digital signal means we have access to many error detection and correction features. For
example, we can use parity generation and correction as a detection and correction tool.
• Data storage is easier
– Yet again, an advantage because of digital signals. You know how easy it is to store digital data, right? We can
choose from a wide plethora of digital memories. However, analog data needs to be stored in tapes and stuff like
that. It’s harder to transport and recreate with 100% fidelity.
• Encryption
– Digital signals are easy to encrypt. So this one counts as a win for the entire DSP system too.
• Easier to process
– Digital signals can easily undergo mathematical changes as compared to their analog counterparts.
Advantages of DSP system (Cont’d)
• More data transmission
– Time-division multiplexing is a great tool available for digital systems to transmit more data
over unit time and over a single communication path.
• Higher component tolerance in DSP
– The components like resistors, capacitors, and inductors have a certain threshold in terms of
temperature. Outside this threshold, as the temperature increases, they might start behaving
erratically.
– These components are not present in a digital system. Moreover, digital systems can increase
their accuracy with concepts like floating-point arithmetic.
• Easier to modify
– To modify an analog processing system, you need to change components, test, and verify the
changes. With digital processing systems, you just need to change a few commands or alter a
few lines of code.
• DSP systems can work on frequencies of a broader range
– There are some natural frequencies, like seismic frequencies that detect earthquakes. These
signals have very low frequencies. Traditional analog signals might not even detect these
signals. However, digital signal processing systems are adept at picking up even the tiniest of
Disadvantages of a DSP(Cont’d)
• When using DSP, there is a need for using anti-aliasing filter before
ADC as well as using a reconstruction filter after DAC . Due to the
use of this extra two modules viz. ADC and DAC, the complexity of
DSP based hardware increases.
• DSP processes the signal at high speed and comprises of more top
internal hardware resources. Because of this DSP dissipates higher
power as compared to analog signal processing. Analog signal
processing includes passive components that consume lower energy.
• Each DSP has a different hardware architecture and software
instructions. Due to this, only highly skilled engineers can program
the device. Proper training on DSP is required for programming for
various applications.
Disadvantages of a DSP(Cont’d)
• One needs to cautiously use the IC as per hardware and
software requirements as most of the DSP chip is very
expensive.
• Only in a synchronized communication system, the detection of
digital signals is possible but it not so in the case of analog
systems.
• Higher bandwidth is required for digital communication than
analog for transmission of the same information.
Disadvantages of a DSP (Cont’d)
• Complexity
– As we saw in the block diagram above, there are a lot of elements preceding and following a
Digital Signal Processor. Stuff like filters and converters add to the complexity of a system.
• Power
– A digital signal processor is made up of transistors. Transistors consume more power since they
are active components. A typical digital signal processor may contain millions of transistors.
This increases the power that the system consumes.
• Learning curve and design time
– Learning the ins and outs of Digital Signal processing involves a steep learning curve. Setting up
digital processing systems thus takes time. And if not pre-equipped with the right knowledge
and tools, teams can spend a lot of time in setting up.
• Loss of information
– Quantization of data that is below certain Hz causes a loss in data according to the
Rate-Distortion Theory.
• Cost
– For small systems, DSP is an expensive endeavor. Costing more than necessary.
Continuous Time signals:

• A signal of continuous amplitude is called continuous signal or


analog signal. Continuous signal has some value at every instant
of time.
Example: Signals in an Electrical Circuit
R

vs + i vc
- C

• The signals vc and vs are patterns of variation over time

Step (signal) vs at t=1


vs, vc

RC = 1
First order (exponential) response
for vc

• Note, we could also have considered the voltage across the resistor or the
current as signals
Continuous Time signals:

• Examples:
• Sine wave, cosine wave, triangular wave etc. similarly some
electrical signals derived from physical quantities like
temperature, pressure, sound etc. are also an examples of
continuous signals.
Mathematical expression:
Mathematically a continuous signal can be expressed as,
x(t)=A sin(wt)

•For every fix value of t, x(t) is periodic in nature.


•If the frequency (1/t) is increased then the rate of oscillation
also changes.
Discrete Time signals:

• Discrete time signal:


• In this case the value of signal is specified only at specific time.
So signal represented at “discrete interval of time” is called as
discrete time of signal.
• The discrete time signal is generated from continuous time
signal by using the sampling operation. This process is shown in
figure below.
Example
• Consider a continuous analog signal as shown in
figure
• a). This signal is continuous in nature from
–infinity to +infinity.
• The sampling pulses are shown in figure
• b). These are train of pulses. Here the samples
are taken with Ts as sampling time.
• Figure c) shows the discrete time signal

• For signal shown in figure a), the expression is


x(t)=A cos (wt)
• And for signal shown in fig c) , the expression is
x(t)= A cos (wn)
Continuous & Discrete-Time Signals
• Continuous-Time Signals x(t)
• Most signals in the real world are continuous time, as the scale
is infinitesimally fine.
• Eg. voltage, velocity,
t
• Denote by x(t), where the time interval may be bounded (finite)
or infinite
• Discrete-Time Signals
• Some real world and many digital signals are discrete time, as
they are sampled x[n]
• E.g. pixels, daily stock price (anything that a digital computer
processes)
• Denote by x[n], where n is an integer value that varies
discretely n

• Sampled continuous signal


• x[n] =x(nk) – k is sample time
Continuous valued or discrete valued signals:
• Continuous valued signals:
• If the variation in the amplitude of signal is continuous then, it is
called continuous valued signal. Such signals may be continuous or
discrete in nature. Following figure shows the examples of
continuous valued signals.
• Discrete valued signals:
• If the variation in the amplitude of signal is not continuous but the
signal has certain discrete amplitude levels then such signal is called
as discrete valued signal. Such signal may be again continuous or
discrete in nature as shown in figure below.
Continuous-valued Signals

• Continuous-valued Signals
• If a signal takes on all possible values on a finite or an infinite
range, it is said to be a continuous-valued signals
• If a signal takes on values from a finite set of finite set of
possible values, it is said to be a discrete-valued signals
Basic Parts of Analog to Digital Convertor
What is a System?
• Systems process input signals to produce output signals

• Examples:
– A circuit involving a capacitor can be viewed as a system that transforms the
source voltage (signal) to the voltage (signal) across the capacitor
– A CD player takes the signal on the CD and transforms it into a signal sent to
the loud speaker
– A communication system is generally composed of three sub-systems, the
transmitter, the channel and the receiver. The channel typically attenuates and
adds noise to the transmitted signal which must be processed by the receiver
How is a System Represented?
• A system takes a signal as an input and transforms it into
another signal
Input signal Output signal
System
x(t) y(t)

• In a very broad sense, a system can be represented as the ratio


of the output signal over the input signal
– That way, when we “multiply” the system by the input signal, we get
the output signal
– This concept will be firmed up in the coming weeks
Example: An Electrical Circuit System
R

vs + i vc
- C

• Simulink representation of the electrical circuit

vs, vc
vs(t) vc(t)

first order
system t
What is the difference between continuous-time and
discrete-time signals?
• A Continuous-Time Signal is defined for all values of time. X is
the dependent variable and t is the independent variable. When
there is an X(t) for every single value of t, it is continuous.
• For example, sinusoidal graphs which have the time limit of
infinity to negative infinity are clearly continuous-time signals.
Discrete Time signals
• A common misconception is that discrete and digital signals are
congruous but they are in fact very different.
• For discrete-time signals, time is discrete while the amplitude is
continuous.
• However, for digital signals both the amplitude and time are
discrete.
Review Questions
• What is DSP?
• What are the basic elements of DSP?

• Give the main advantages of DSP over ASP

• What is Anti-alising filter?

• Give the disadvantages of DSP


Answers
• DSP
– Process of representing signals in a discrete mathematical sequence of numbers and analyzing, modifying, and
extracting the information contained in the signal by carrying out algorithmic operations and processing on the
signal.
• Basic Elements of DSP
– Input,Anti-alising factor,ADC,Processor, DAC, Output
• Advantages of DSP
– Accuracy
– Repeatability
– Ease of Upgradations
– Implementation of Algorihtms
– Cheaper
– Less overall noise
– Error detection and correction is possible in DSPs
– Data storage is easier
– Easier to process
Answers
• Anti-alising Filter
– It is a low-pass filter. Meaning, it allows frequencies up to a certain threshold to
pass. It attenuates all frequencies above this threshold. These unwanted
frequencies make it difficult to sample an analog signal.
• Disadvantages of DSP
– the complexity of DSP based hardware increases.
– DSP dissipates higher power as compared to analog signal processing.
– Proper training on DSP is required for programming for various applications.
– DSP chip is very expensive.
– the detection of digital signals is possible but it not so in the case of analog systems.
– Higher bandwidth is required for digital communication
Frequency in Simple Frequency in Simple Analog
Signals
• rate of signal change with respect to time
• • change in a short span of time ⇒ high freq.
• • change over a long span of time ⇒ low freq.
• • signal does not change at all ⇒ zero freq.
• signal never completes a cycle T= ∞ ⇒ f=0, DC sig. •
• signal changes instantaneously ⇒ ∞ freq.
• Time Domain Plot – specifies signal amplitude at each instant of time
• • does NOT express explicitly signal’s phase and frequency
• Plot Frequency Domain Plot – specifies peak amplitude with respect to
freq. • phase CANNOT be shown in the frequency domain.
Concept of Frequency in Analog Signal
Signal Sampling
• To digitally analyze and manipulate an analog signal, it must be digitized
with an analog-to-digital converter (ADC).Sampling is usually carried out
in two stages, discretization and quantization.
• Discretization means that the signal is divided into equal intervals of time,
and each interval is represented by a single measurement of amplitude.
Quantization means each amplitude measurement is approximated by a
value from a finite set. Rounding real numbers to integers is an example.
• The Nyquist–Shannon sampling theorem states that a signal can be exactly
reconstructed from its samples if the sampling frequency is greater than
twice the highest frequency component in the signal. In practice, the
sampling frequency is often significantly higher than twice the Nyquist
frequency.
Signal Sampling
• Theoretical DSP analyses and derivations are typically
performed on discrete-time signal models with no amplitude
inaccuracies (quantization error), "created" by the abstract
process of sampling. Numerical methods require a quantized
signal, such as those produced by an ADC.
• The processed result might be a frequency spectrum or a set of
statistics. But often it is another quantized signal that is
converted back to analog form by a digital-to-analog
converter (DAC).
Signal Sampling (Contd)
• We can obtain a discrete-time signal by sampling a continuous-time
signal at equally spaced time instants, tn = nTs

– x[n] = x(nTs) -∞ < n < ∞


• The individual values x[n] are called the samples of the continuous
time signal, x(t).
• The fixed time interval between samples, Ts, is also expressed in
terms of a sampling rate fs (in samples per second) such that: fs = 1/
Ts samples/sec.
Signal Sampling – Example
Signal Sampling – Example

Sampling – Example
Signal Sampling- Example
Aliasing
• Aliasing is a common undesirable phenomenon that occurs
wherever digital signals are undergoing processing.
• It may be noticed it in audio signals or images.
When does aliasing occur?

• One of the first steps in digital signal processing is Sampling.


• Sampling is one of the most important steps in the long chain of
processes involved in the conversion of an analog signal into a
digital one.
• It involves multiplying a continuous-time signal with a discrete
set of inputs. The values are said to be ‘sampled’ at the instants
where the discrete signals exist.
Nyquist Rate
• If the sampling process meets specific criteria, this criterion is
Fs>=2Fm.
– That is, the sampling frequency should be equal to or greater than twice
the maximum frequency component of the continuous-time signal.
– When the sampling frequency is exactly equal to twice the maximum
frequency component, it is known as the Nyquist rate.
Sampling in DSP:.
sampling process in the time domain frequency domain equivalents on the right
Review Questions
• How is digital signal converted ?
• What is Sampling?

• What is meant by aliasing ?

• When do aliasing occur?

• What is Quantization?

• Define Sampling rate

• What is Anti-alising filter?


References
• 1. John G. Proakis, Dimitris G. Manolakis, “Digital Signal
Processing, Principles, Algorithms and Applications”, Pearson
Education, 4th edition, 2014
• 2. Alan V. Oppenheim, Ronald W. Schafer, “Discrete-Time Signal
Processing”, Pearson Education, 1st edition, 2015
• 3. Sanjit Mitra, “Digital Signal Processing –A Computer Based
Approach”, McGraw Hill, India, 4th Edition, 2013.
• 4. Fredric J. Harris, “Multirate Signal Processing for Communication
Systems”,1st edition, Pearson Education, 2007
18ECC204J
DIGITAL SIGNAL PROCESSING
Unit 1_Signals and Waveforms_Part2
Syllabus Overview
• Learning Unit / Module 1: Signals and Waveforms
• Learning Unit / Module 2: Frequency Transformations

• Learning Unit / Module 3: FIR Filters

• Learning Unit / Module 4: IIR Filters

• Learning Unit / Module 5: Multirate signal Processing


Learning Unit / Module 1: Signals and
Waveforms
❑ Basic Elements of DSP , Advantages and applications of DSP
❑ Continuous Time vs Discrete time signals , Continuous valued vs discrete valued
signals.
❑ Concepts of frequency in analog signals , Continuous and discrete time sinusoidal
signals ,
❑ Sampling of analog signals Sampling theorem
❑ Aliasing Quantization of continuous amplitude signals,
❑ Analog to digital conversion Sample and hold, Quantization and coding
❑ Oversampling A/D converters ,Digital to analog conversion Sample and hold
❑ Oversampling D/A converters, Quantization noise
❑ Errors due to truncation IDFT, Probability of error
Topics Covered in this PPT_Unit 1_Part 2

❑ Analog to digital conversion Sample and hold,


Quantization and coding
❑ Oversampling A/D converters, Digital to analog
conversion Sample and hold
❑ Oversampling D/A converters, Quantization noise
❑ Errors due to truncation IDFT, Probability of error
Topic 1

Analog to Digital Conversion- Introduction


❑Recall that the process of converting a continuous-time (analog) signal to a digital
sequence that can be processed by a digital system requires that we quantize the sampled
values to a finite number of levels and represent each level by a number of bits.

The electronic device that performs this conversion from an analog signal to a digital

sequence is called an analog-to-digital (A/D) converter (ADC).

On the other hand, a digital-to-analog (D/A) converter (DAC) takes a digital sequence

and produces at its output a voltage or current proportional to the size of the digital word
applied to its input.
Analog to Digital Conversion- Sample and Hold
The sampling of an analog signal is performed by a sample-and-hold (S/H ) circuit. The sampled signal is

then quantized and converted to digital form.

Usually, the S/H is integrated into the A /D converter. The S/H is a digitally controlled analog circuit that

tracks the analog input signal during the sample mode, and then holds it fixed during the hold mode to the
instantaneous value of the signal at the time the system is switched from the sample mode to the hold
mode.

The goal of the S/H is to continuously sample the input signal and then to hold that value constant as long

as it takes for the A /D converter to obtain its digital representation. The use of an S/H allows the A /D
converter to operate more slowly compared to the time actually used to acquire the sample.

In the absence of a S/H, the input signal must not change by more than one-half of the quantization step

during the conversion, which may be an impractical constraint. Consequently, the S/H is crucial in
high-resolution (12 bits per sample or higher) digital conversion of signals that have large bandwidths (i.e., they
change very rapidly).
Block diagram of basic elements of an A/D Converter
Analog to Digital Conversion- Sample and Hold

An ideal S/H introduces no distortion in the conversion process and is accurately


modeled as an ideal sampler. However, time-related degradations such as errors in the


periodicity of the sampling process (“jitter”), nonlinear variations in the duration of the
sampling aperture, and changes in the voltage held during conversion (“droop”) do occur
in practical devices.

The A /D converter begins the conversion after it receives a convert command. The time

required to complete the conversion should be less than the duration of the hold mode o f
the S/H.

Further more, the sampling period T should be larger than the duration of the sample

mode and the hold mode.


Time domain response of an ideal S/H circuit
Topic 2 & 3

Quantization, Coding and Noise

The basic task o f the A /D converter is to convert a continuous range of input


amplitudes into a discrete set of digital code words. This conversion involves the
processes of quantization and coding. Quantization is a nonlinear and noninvertible
process that maps a given amplitude x(n) = x(nT) at time t = nT into an amplitude x,
taken from a finite set of values. where the signal amplitude range is divided into L
intervals,
Quantization Process and Example of a Midtread process
Example of a Midtread Quantizer
Example of a Midtread Quantizer

•The coding process in an A /D converter assigns a unique binary number to each quantization level. If we
have L levels, we need at least L different binary numbers. With a word length of b + 1 bits we can represent
distinct binary numbers. Hence we should have or, equivalently, .

•Then the step size or the resolution o f the A /D converter is given by

where R is the range o f the quantizer


Topic 4

Oversampling of A/D Converter


The basic idea in oversampling A /D converters is to increase the sampling rate o f the signal to the point

where a low-resolution quantizer suffices. By oversampling. we can reduce the dynamic range o f the
signal values between successive samples and thus reduce the resolution requirements on the quantizer.

As we have observed in the preceding section, the variance o f the quantization error in A /D conversion is

, where .Since the dynamic range of the signal, which is proportional to its standard
deviation .
Topic 4

Oversampling of A/D Converter

Hence for a given number o f bits, the power of the quantization noise is proportional to the variance of the

signal to be quantized. Consequently, for a given fixed SQNR , a reduction in the variance of the signal to
be quantized allow s us to reduce the number of bits in the quantizer.

The basic idea for reducing the dynamic range leads us to consider differential quantization. To illustrate

this point, let us evaluate the variance of the difference between two successive signal samples. Thus we
have
Contd.. .
Figure: Encoder and decoder for differential predictive signal quantizer
Contd.. . system.
Contd.. .
❑The use of the feedback loop around the quantizer as shown in Fig. is necessary
to avoid the accumulation o f quantization errors at the decoder. In this
configuration, the error

❑Thus the error in the reconstructed quantized signal xq(n) is equal to the quantization
error for the sample d(n). The decoder for DPCM that reconstructs the
signal from the quantized values is also shown in Fig.
Delta Modulation

❑The simplest form of differential predictive quantization is called delta modulation


(DM ).

❑In DM , the quantizer is a simple 1-bit (two -level) quantizer and the predictor is a
first-order predictor. Basically, DM provides a staircase approximation o f the input
signal.

❑At every sampling instant, the sign o f the difference between the input sample x(n) and
its most recent staircase approximation is determined, and then the staircase signal is
updated by a step A in the direction o f the difference.
Delta Modulation system: Fig 1

From Fig. 1 we observe that

which is the discrete-time equivalent of an analog integrator. If a = 1, we have an ideal accum ulator
(integrator) whereas the choice a < 1 results in a “leaky integrator.”
Two Types of Quantization errors: Fig 2

❑The crosshatched areas in Fig.2 illustrate two types o f quantization error in DM , slope-overload distortion and
granular noise. Since the maximum slope A is limited by the step size, slope-overload distortion
can be avoided if .

❑ The granular noise occurs when the DM tracks a relatively flat (slowly changing) input signal. We note that
increasing reduces overload distortion but increases the granular noise, and vice versa.
Two Types of Quantization errors: Fig 3

Figure 3 shows an analog model that illustrates the basic principle for the practical implementation of a D M system. The
analog low pass filter is necessary for the rejection of out-of-band components in the frequency range between B and
Basic Elements of Oversampling A/D Converter: Fig 4
Contd…

❑If the interpolation factor is I = 256, the A /D converter output can be obtained by
averaging successive non-overlapping blocks of 128 bits. This averaging would result in a
digital signal with a range of values from zero to 256{b as 8 bits) at the Nyquist rate. The
averaging process also provides the required antialiasing filtering.

❑Oversampling A/D converters for voice-band (3-kH z) signals are currently fabricated as
integrated circuits. Typically, they operate at a 2-M H z sampling rate, downsample to 8
kH z, and provide 16-bit accuracy.
Topic 5

Digital to Analog Conversion


Signal reconstruction viewed as a filtering process- fig 5
Frequency response (Fig 6.a) impulse response
Frequency response of an ideal low-pass filter.

As shown in Fig, the ideal reconstruction filter is


an ideal low pass filter and its impulse response
extends for all time. Hence the filter is
non-causal and physically non-realizable.
Topic 6

Sample and Hold

• In practice, D /A conversion is usually performed by combining a D /A converter with a sample-and-hold (S/H )


and followed by a low pass (smoothing) filter, as shown.

• T he D /A converter accepts at its input, electrical signals that correspond to a binary word, and produces an
output voltage or current that is proportional to the value of the binary word.
Fig(a): Ideal D/A converter characteristic

The D/A converter accepts at its input, electrical signals that


correspond to a binary word, and produces an output voltage or
current that is proportional to the value of the binary word.
Ideally, its input-output characteristic is as shown for a 3-bit
bipolar signal.
Fig(b): typical deviations from ideal performance in practical
D/A converters

• The line connecting the dots is a straight line through the origin. In practical D /A converters, the line
connecting the dots may deviate from the ideal.

• Some of the typical deviations from ideal are offset errors, gain errors, and nonlinearities in the
input-output characteristic.
Contd…
❑An important parameter o f a D /A converter is its settling time, which is defined as the tim e required for
the output o f the D /A converter to reach and remain within a given fraction (usually, i^ LSB) of the final
value, after application o f the input code word.

❑Often, the application of the input code word results in a high-amplitude transient, called a “glitch.” This is
especially the case when two consecutive code words to the A /D differ by several bits.
Fig 7.a: Approximation of an analog signal by a staircase

Figure 7.a illustrates the approximation of the analog signal x(t) by a S/H. As shown, the
approximation, denoted as x(t), is basically a staircase function which takes the signal
sample from the D/A converter and holds it for T seconds. When the next sample arrives, it
jumps to the next value and holds it for T seconds, and so on.
Fig 7.b: impulse response of the S/H

This is illustrated in Fig. 7(b). The corresponding frequency response is


Fig 8: Frequency response Characteristics of the S/H
❑The magnitude and phase of H(F) are plotted in Figs. 8. For comparison,
the frequency response of the ideal interpolator is superimposed on the
magnitude characteristics.

❑It is apparent that the S/H does not possess a sharp cutoff frequency
response characteristic. This is due to a large extent to the sharp
transitions of its impulse response h(t).
Fig 9.a: Impulse Response

This impulse response is depicted in Fig. 9.a. The Fourier transform of h(t) yields the frequency response, which can
be expressed in the form
Linear Interpolation with delay

❑The first-order hold perform s signal reconstruction by computing the slope of the
straight line based on the current sample x(nT) and the past sample x(nT — T ) of
the signal. In effect, this technique linearly extrapolates or attempts to linearly predict
the next sample of the signal based on the samples x(nT) and x{n T - T). As a
consequence, the estimated signal waveform i(r) contains jumps at the sample points.

❑The jumps in x(t) can be avoided by providing a on e-sample delay in the


reconstruction process. Then successive sample points can be connected by straight
line segments.
Fig 10: Linear interpolation of x{t) with a 7-second delay.
Fig 11: Impulse response (a) and frequency response characteristics (b) and (c) for the
linear interpolator with delay.

The impulse response and frequency response characteristics of


this interpolation
filter are illustrated in Fig. 11.
Topic 7

Oversampling D/A converter


Topic 8

Quantization Errors
• To determine the effects o f quantization on the performance o f an A /D converter, we adopt a
statistical approach. The dependence of the quantization error on the characteristics of the input signal
and the nonlinear nature of the quantizer make a deterministic analysis intractable.

• In the statistical approach, we assume that the quantization error is random in nature. We model this
error as noise that is added to the original (unquantized) signal.

• If the input analog signal is within the range o f the quantizer, the quantization error is
bounded in magnitude and the resulting error is called granular noise. When the input falls outside
the range of the quantizer (clipping), becomes unbounded and results in overload noise.
• This type of noise can result in severe signed distortion when it occurs. Our only remedy is to scale the
input signal so that its dynamic range falls within the range of the quantizer. The following analysis is
based on the assumption that there is no overload noise.
Normalized Analog input
Mathematical Model of Quantization noise
Probability density function for the quantization error.

You might also like