18ecc204j - DSP - Week 1
18ecc204j - DSP - Week 1
18ecc204j - DSP - Week 1
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
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?
• 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
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
Continuous Time signals:
vs + i vc
- C
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)
• 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)
– 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
vs, vc
vs(t) vc(t)
first
order t
system
What is the difference between continuous-time and discrete-time signals?
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?