lecture1
TRANSCRIPT
Digital Signal Processing, © 2010 Robi Polikar, Rowan University
Lecture 1
Introduction
ECE 09.351.01
Digital Signal processing
Polikar
© 2010, All Rights Reserved, Robi Polikar.
No part of this presentation may be used without explicit written permission. Such permission will be given – upon request – for noncommercial educational purposes only. Limited permission is hereby granted, however, to post or distribute this presentation if you agree to all of the following:
1. you do so for noncommercial educational purposes;2. the entire presentation is kept together as a whole,
including this entire notice.3. you include the following link/reference on your site:
Robi Polikar, http://engineering.rowan.edu/~polikar.
Digital Signal Processing, © 2010 Robi Polikar, Rowan University
Digital Signal Processing
This week in DSP
Getting to know each other
Introduction
What is DSP?
Signals
Is this yet another class testing our endurance on abstract math? (…Yes!)
What good is this miserable subject? Why do I care?
• Real world applications
Components of a typical DSP system
A practical exercise
DSP Spring’10 at a glance
On Friday prerequisite review for take home due Monday
M
RP Robi Polikar – All Rights Reserved © 2004 – 2010.
S.K. Mitra Digital Signal Processing, Wiley, © 2006.
Photo / diagram credits
Digital Signal Processing, © 2010 Robi Polikar, Rowan University
What is DSP?
Digital Signal Processing:
Mathematical and algorithmic manipulation of discretized and
quantized or naturally digital signals in order to extract the most
relevant and pertinent information that is carried by the signal.
DSP SystemSignal to be
processed
Processed
signal
• What is a signal?
• What is a system?
• What is processing?
Digital Signal Processing, © 2010 Robi Polikar, Rowan University
Signals
M
RP
RP
RP
Digital Signal Processing, © 2010 Robi Polikar, Rowan University
Signals
Signals can be characterized in several ways: Continuous time signals vs. discrete time signals
• Temperature in this class at any given time – financial market data
Continuous valued signals vs. digital signals• Amount of current drawn by a device – average SAT scores of a school over years
– Continuous time and continuous valued : Analog signal
– Continuous time and discrete valued: Quantized signal
– Discrete time and continuous valued: Sampled signal
– Discrete time and discrete values: Digital signal
Real valued signals vs. complex valued signals• Resident use electric power – industrial use reactive power
Single channel signals vs. multichannel signals• Blood pressure signal – 128 channel EEG
Deterministic vs. random signal: • Test signals, power line – Recorded audio or noise (corrupted signal)
One-dimensional vs. two dimensional vs. multidimensional signals• Speech – image – video
(temperature)
(population)(daily aver. wind speed)
(CD audio, annual enrollment)
Digital Signal Processing, © 2010 Robi Polikar, Rowan University
Signals
Analog Digital
Sampled QuantizedM
Digital Signal Processing, © 2010 Robi Polikar, Rowan University
Signals
Formally speaking, any physical quantity that is represented as a
function of an independent variable is called a signal.
Independent variable can be time, frequency, space, etc.
Every signal carries information. However, not all of that information
is typically of interest to the end-user. The goal of signal processing is
to extract the useful information from the signal.
The part of the signal that is not useful is called noise.
Noise need not be “noisy.” Any part of the signal we are not interested is by
definition noise.
• If you are listening to a recording of two people talking, and you are really interested in
what only one of them saying, the other person’s speech is – as far as you are
concerned – noise!
• Though, often, noise is noisy! 60 Hz noise is very common (though not very
interesting, nor very challenging to clean)
Digital Signal Processing, © 2010 Robi Polikar, Rowan University
Signal Processing
200 400 600 800 1000 1200 1400 1600 1800-0.4
-0.3
-0.2
-0.1
0
0.1
0.2
0.3
0.4
0.5
0.6
Noisy signal
500 1000 1500 2000
-0.2
0
0.2
0.4
0.6
0.8
Cleaned signal
Time, ms
RP
Digital Signal Processing, © 2010 Robi Polikar, Rowan University
Signals & Sinusoids
Formally speaking, any physical quantity that is represented as a
function of an independent variable is called a signal.
Independent variable can be time, frequency, space, etc.
Sinusoids play a very important role in signal processing, because
They are easy to generate
They are easy to work with – their mathematical properties are well known
Most importantly: All signals can be represented as a sum of sinusoids
• Fourier transforms – more about this later.
In continuous time:
)sin()( tAty
Amplitude Angular frequency
(radians/sec)
Phase
(radians)
Digital Signal Processing, © 2010 Robi Polikar, Rowan University
A continuous time domain sinusoid is a periodic signal
Angular frequency: A different measure of rate of change in the signal, easier to use with sinusoidal signals, represented in radians/second.
Analog frequency (f – measured in Hertz, 1/sec), the period T (measured in seconds), and the angular frequency Ω are related to each other by
Phase: The number of degrees –in radians – the sinusoid is shifted from its origin.
If the sinusoid is shifted by tθ seconds, then the phase is
Sinusoids
(period)
)()( Ttyty
Period: The time after which the signal repeats itself:
Frequency: Inverse of period
(phase)
tθ
T
Digital Signal Processing, © 2010 Robi Polikar, Rowan University
Discrete-Time Signals
A discrete-time signal, commonly referred to as a sequence, is only
defined at discrete time instances, where t is defined to take integer
values only.
Discrete-time signals may also be written as a sequence of numbers
inside braces:
n indicates discrete time, in integer intervals, the bold-face denotes time t=0.
Discrete time signals are often generated from continuous time signals
by sampling which can roughly be interpreted as quantizing the
independent variable (time)
},9.2,7.3,2.0,1.1,,2.0,{]}[{
2.2nx
,2,1,0,1,2,)()()(
ntxnTxnxsnTts
Ts=Sampling interval / period
fs = 1/Ts = sampling frequency
Digital Signal Processing, © 2010 Robi Polikar, Rowan University
Sampling
Think of sampling as a switch, that stays closed for an infinitesimally
small amount of time. It takes samples from the continuous time
signal
Ts
RP
Digital Signal Processing, © 2010 Robi Polikar, Rowan University
Sampling
Since we naturally interpret the signals in the continuous time domain,
we also need to convert the discrete time signals back to continuous
time D/A conversion
A fundamental question: how close should the samples be to each
other so that a continuous time signal can be uniquely reconstructed
from a discrete time signal How to choose Ts, the sampling period?
Digital Signal Processing, © 2010 Robi Polikar, Rowan University
Ponder!
What Ts is small
enough?
And what happens
if Ts is not chosen
small enough?
RP
Digital Signal Processing, © 2010 Robi Polikar, Rowan University
Systems
Not your typical systems: airline system, security system, irrigation
system, etc. are of no interest to us
For our purposes, a DSP system is one that can mathematically
manipulate (e.g., change, record, transmit, play, transform) digital
signals
Furthermore, we are not interested in processing analog signals either,
even tough most signals in nature are analog signals
DSP SystemAnalog
signal
Processed
analog signalADC DAC
Digital
signal
Digital
signal
RP
Digital Signal Processing, © 2010 Robi Polikar, Rowan University
Components of a
DSP System
DSP System
(Digital Filter)
Analog
signal
Processed
analog signalQuantizer D/A
Digital
signal
Analog
LPF
Digital
signal
Quantized
signalAnalog
signal
Sampled
signal
HOLD
Sampler
Binary
Converter
Discrete
signal
A/D Converter
Band-limiting
Filter
D/A Converter
RP
Digital Signal Processing, © 2010 Robi Polikar, Rowan University
Components of a
DSP System
Digital Signal Processing, © 2010 Robi Polikar, Rowan University
Components of a
DSP System
Digital Signal Processing, © 2010 Robi Polikar, Rowan University
Another Example
Analog Signal Output of sample & hold
Output of A/D Converter (quantized binary) Output of Digital Processor (binary)
Output of D/A Converter (analog) Output of LPF - Analog Signal
M
Digital Signal Processing, © 2010 Robi Polikar, Rowan University
Analog – to – Digital –
to – Analog …?
Why not just process the signals in continuous time domain? Isn’t it just a waste of time,
money and resources to convert to digital and back to analog…?
Why DSP? We digitally process the signals in discrete domain, because it is
More flexible , more accurate, higher performance, easier to mass produce
Easier to design
• System characteristics can easily be changed by programming
• Any level of accuracy can be obtained by use of appropriate number of bits.
More deterministic and reproducible – less sensitive to component values, etc.
Many things that cannot be done using analog processors can be done digitally
• Allows multiplexing, time sharing, multichannel processing, adaptive filtering
• Easy to cascade, no loading /drift effects, signals can be stored indefinitely w/o loss
• Allows processing of very low frequency signals (or any arbitrary transfer function), which requires
unpractical component values in analog world
On the other hand, it can be
Slower, sampling issues (current max 100GS/sec, more typical 1 GS/s)
More expensive, increased system complexity, consumes more power.
Yet, the advantages far outweigh the disadvantages Today, most continuous time signals
are in fact processed in discrete time using digital signal processors
Digital Signal Processing, © 2010 Robi Polikar, Rowan University
Processing
So what is processing…? What kind of processing do we do?
This depends on the application
Communication – Modulation and demodulation
Signal security – Encryption and decryption
Multiplexing and demultiplexing – Sending many signals through common channel
Data Compression – Reduce space/computation required to store/process data
Signal denoising – Filtering for noise reduction
Speaker / system identification
Audio processing – Signal enhancement, equalization
Image processing – Image denoising, enhancement, watermarking, reconstruction
Data analysis and feature extraction – Recognize structure in data
Frequency / spectral analysis – Alternate approach to time domain analysis
Signal generation – TOUCH-TONE® dialing.
Each can be expressed as a mathematical operation performed on the signal. DSP, is then the system that performs this operation.
Digital Signal Processing, © 2010 Robi Polikar, Rowan University
Filtering
By far the most commonly used DSP operation
Filtering refers to deliberately changing the frequency content of the signal,
typically, by removing certain frequencies from the signals
For denoising applications, the (frequency) filter removes those frequencies in the
signal that correspond to noise
In communications applications, filtering is used to focus to that part of the
spectrum that is of interest, that is, the part that carries the information.
Typically we have the following types of filters
Lowpass (LPF) – removes high frequencies, and retains (passes) low frequencies
Highpass (HPF) – removes low frequencies, and retains high frequencies
Bandpass (BPF) – retains an interval of frequencies within a band, removes others
Bandstop(BSF) – removes an interval of frequencies within a band, retains others
Notch filter – removes a specific frequency
Digital Signal Processing, © 2010 Robi Polikar, Rowan University
Filtering
An Example
t=0:0.0001:0.1;x1=sin(2*pi*50*t);T=linspace(0, 100, 1001);subplot(4,1,1)plot(T, x1)axis([0 100 -1 1])ylabel('50 Hz')subplot(4,1,2)x2=sin(2*pi*110*t);plot(T, x2)axis([0 100 -1 1])ylabel('110 Hz')subplot(4,1,3)x3=sin(2*pi*210*t);plot(T, x3)axis([0 100 -1 1])ylabel('210 Hz')y=x1+x2+x3;subplot(4,1,4)plot(T, y)axis([0 100 -2 2])ylabel('Combined')xlabel('Time, ms')
0 10 20 30 40 50 60 70 80 90 100-1
0
1
50 H
z
0 10 20 30 40 50 60 70 80 90 100-1
0
1
110 H
z
0 10 20 30 40 50 60 70 80 90 100-1
0
1
210 H
z
0 10 20 30 40 50 60 70 80 90 100-2
0
2
Com
bin
ed
Time, ms
Sampling freq.: 10000 samples/s
RP
Digital Signal Processing, © 2010 Robi Polikar, Rowan University
Frequency Spectrum
Y=abs(fft(y));F=linspace(0, 5000, 500);plot(F, Y(1:500))gridY=Y/abs(max(Y));plot(F, Y(1:500))gridxlabel('Frequency, Hz')ylabel(‘Normalized Magnitude')title('Frequency Spectrum')
50 100 150 200 2500
0.2
0.4
0.6
0.8
1
Frequency, Hz
No
rma
lzie
d M
ag
nit
ud
e
Frequency Spectrum
0 1000 2000 3000 4000 50000
0.2
0.4
0.6
0.8
1
Frequency, Hz
No
rma
lzie
d M
ag
nit
ud
e
Frequency Spectrum
RP
Digital Signal Processing, © 2010 Robi Polikar, Rowan University
Filtering
80 Hz 150 Hz
110 Hz 80 Hz 150 Hz
50 Hz 110 Hz 210 Hz
M
Digital Signal Processing, © 2010 Robi Polikar, Rowan University
Touch-Tone Dialing
Dual-tone multifrequency (DTMF) signals
1000 Hz
1200 Hz
600 - 700 Hz
1600 - 1700 Hz M
Digital Signal Processing, © 2010 Robi Polikar, Rowan University
About DSP…
Is this another one of those classes that tests our endurance on abstract
math torture…?
Indeed! Here is an example…
Digital Signal Processing, © 2010 Robi Polikar, Rowan University
About DSP
…and here is another one…well, actually it is simpler then it appears.
Digital Signal Processing, © 2010 Robi Polikar, Rowan University
So What Good Is This?
The real world applications of DSP is innumerous
Signal analysis, noise reduction /removal : biological signals - such as ECG, EEG,
blood pressure - NDE signals, such as ultrasound, eddy current, magnetic flux,
oceanographic data, seismic data, financial data - such as stock prices as a time
series data - , audio signal processing, echo cancellation
Communications – analog communications, such as amplitude modulation,
frequency modulation, quadrature amplitude modulation, phase shift keying, phase
locked loops, digital and wireless transmission – CDMA (code division multiple
access) / TDMA (time division multiple access), time division multiplexing,
frequency division multiplexing, internet protocol
Data encryption, watermarking, fingerprint analysis, speech recognition, biometrics
Image processing and reconstruction, MRI, PET, CT scans
Signal generation, electronic music synthesis
And many many many more….
Digital Signal Processing, © 2010 Robi Polikar, Rowan University
Digital Signal Processing (3)
ECE 09.351
Spring 2010
Class Homepage: engineering.rowan.edu/~polikar/ECE351
Instructor: Dr. Robi Polikar
Office& Phone: 136 Rowan, 256-5372 (voice-mail available)
Office Hours: Mondays 1500 – 1630, or by appointment, or according to open
door policy: you may come at any time if and when the office door is open
E-mail: [email protected]
Class Meeting: Monday 1215 – 1330 (239), Wednesday 0845-1000 (237) Friday 1050 – 1330 204/206 Lab
Required Text: Digital Signal Processing 3/e, Mitra, McGraw Hill, 2006
Reference Texts: Digital Signal Processing. Hayes, Schaum’s Outline Series, 1999.
Digital Signal Processing using MATLAB, Ingle and Proakis, Thomson, 2007.
Signal Processing First, McClellan, Schafer and Yoder, Prentice Hall, 2004
Digital Signal Processing Using Matlab, Ingle and Proakis, PWS, 2002.
Digital Signal Processing, © 2010 Robi Polikar, Rowan University
DSP At a Glance
• Introduction, Components of a DSP System, DSP Applications, Concepts of
Frequency and Filtering
•Signals and Systems
• Commonly used signals in DSP – unit step and impulse, sinusoids, complex
exponentials, classification of signals, periodicity, energy vs. power signals
• Discrete time systems – classification of discrete systems (linearity, causality, time invariance,
memory, stability), characterization of LTI systems – impulse response, convolution,difference
equations, finite and infinite impulse response (FIR/IIR) systems
•Representation of Signals in Frequency Domain
• Concept of spectrum / frequency
• Frequency representation of continuous time signals - Fourier series and Fourier transform (review)
• Sampling theorem – aliasing, Nyquist criterion, interpretation of spectrum in discrete time domain
• Frequency representation of discrete time signals
• Discrete time Fourier transform (DTFT) ,
• Discrete Fourier transform (DFT) and Fast Fourier transform (FFT),
• Properties of and relationships between various Fourier transforms,
• Concepts of circular shift and convolution, decimation and interpolation of discrete signals.
•The z-transform
•Definition and properties
• Relation to DTFT/DFT
• Concepts of zeros and poles of a system, region of convergence (ROC) of z-transform
• Inverse z-transform (to be covered in CC Module - Complex Systems)
Digital Signal Processing, © 2010 Robi Polikar, Rowan University
DSP At a Glance
• Linear Time Invariant (LTI) Systems in Transform Domain
• Concept of filtering – revisited, lowpass, bandpass and highpass filters
• The frequency response and transfer function of a system
• Types of transfer functions
• FIR filters, ideal filters, linear phase filters, zero locations of linear phase FIR filters,
• IIR filters, pole and zero locations of IIR filters, all pass filters, comb filters
• Stability issues for IIR filters
•Filter Design and Implementation
• Digital filter specifications, selection of filter type, estimation of filter order
• FIR filter design using windows
• IIR filter design using bilinear transformation
• Analog filter design – Butterworth, Chebyshev, Elliptic, Bessel filters
• Spectral transformations for designing a filter with new characteristics based on a previously
designed filter
•Filter Structures
• FIR filter structures – direct and cascade form
• IIR filter structures, Lattice form
•Finite Wordlength Effects
• Analog to digital and digital to analog conversion
• Number representations – fixed point and floating point numbers
• Quantization of fixed and floating point numbers, coefficient quantization
• Quantization noise analysis, Overflow effects
Practical Issues and Advanced Topics (time permitting)
DSPSignals
Sinusoids &
Exponentials
Impulse, step,
rectangular
Phasors
Frequency
Characterization
Time domain
representation
Representation in
frequency domain
Spectrum
Power / Energy Periodicity Cont. / Discrete
Convolution
Regular / Circular
Sampling
Nyquist Thm.
CFT
Transforms
ZPoles & Zeros
ROC
DFTDTFT FFT
(LTI) Systems
Discrete LTI
Systems
Classification
Impulse Resp.
Linearity
Time Inv.
Causality Memory
Stability
Time Domain Rep.
Diff. Equation
Ideal vs. Practical
Freq. Domain Rep.
Filtering
LPF HPF BPF BSF APF Notch
FIR / IIR
Filter Design
FIR IIR
Windows
Linear Phase
Specs
Bilinear. Tran.
Butterworth
Chebychev
Elliptic
Stability
Filter Structure
FIR IIR
Direct
Cascade
Lattice
Transfer Func.
Frequency Res.
Quantization
Finite
Worldlength
A/D D/A
Number Rep.
Fixed/Floating
Quantization
Noise
Overflow
Effects
Advanced Topics
Random Signal Analysis
Multirate Signal Proc.
Time Frequency Analysis
Adaptive Signal Process.
Digital Signal Processing, © 2010 Robi Polikar, Rowan University
What did we Learn today?
What is DSP: Signals and systems for processing signals
Components of a DSP system
Sampling: Ponder! – How often shall we take samples? What happens
if we do not take samples fast enough?
Filtering: The main function of DSP systems – remove unwanted
components of the signal by manipulating its frequency content
Applications of DSP: Virtually unlimited…It is all around you!
Digital Signal Processing, © 2010 Robi Polikar, Rowan University
Will I actually Learn Something
of Useful in This Class?
Of course! You will learn digital signal processing through filtering!
Semester exercise:
Download the noisy signal from the class webpage. Play around with it through
out the semester as we learn new filtering techniques
Design an appropriate filter to clean the high frequency noise in the signal.
At the end of the semester, we will play everyone’s signal and determine which one
sounds best (names will only be known to the instructor during the competition).
All designs will be graded and best ones will be awarded bonus points.
Rules:
You must work on your own
You must develop your own filter. You will be asked to explain your design, and
provide full disclosure including your code.
We may increase the complexity of the project by changing the noisy signal later in
the semester.
Digital Signal Processing, © 2010 Robi Polikar, Rowan University
For Friday & Next Monday
Friday – Review & prerequisite quiz
The review will include continuous time signals and systems, complex numbers,
phasor notation, etc. however we will not have time review the entire background
material – Make sure that you go over the topics listed on the class webpage.
• Also see Math and Matlab Review files on class web page.
Monday – Jan 25 (Dr. Polikar at NSF - Guest Lecture)
Look at the sample concept maps provided later in this presentation.
Prepare a concept map of your current DSP knowledge. Yes, your DSP knowledge
at this time is very limited. This will be used to compare a concept map to be
prepared at the end of the semester to show you your progress this semester.
Concept maps should only include concepts you know! Do NOT use topic names
from tentative contents lists, unless you are very familiar with that topic!
Take home prereq quiz due class time – Quiz will be graded!
Read Chapter 1 & 2 of your book, and play around with the software that comes
with it. Please Take reading assignments seriously. Quizzes may be given on these.
Don’t forget to ponder about sampling.
Digital Signal Processing, © 2010 Robi Polikar, Rowan University
Concept Maps
Concept maps are tools for organizing and representing knowledge1
Concept maps include “concepts” which are connected by lines to form “propositions”. The
lines are labeled to specify the relationship between the concepts.
They are typically represented in a hierarchical fashion, with more general concepts at the
top / center, and more specific, less general ones at the the bottom or extremities.
The hierarchy depends on some context in which the knowledge is applied, such as with
respect to a specific question.
Cross links may connect concepts that are at different geographical locations of the map.
Such links represent the multidisciplinary nature of the topic and the creative thinking
ability of the person preparing the map.
Creating concept maps is not very easy, and requires some amount of familiarity with the
technique as well as the context. No concept map is ever final, as it can be continually
improved. One should be careful however, against frivolously creating concepts and/or
links between them (which result in invalid propositions).
Concept maps provide a very powerful mechanism for presenting the relationships between
concepts as well as the preparer level of understanding of these concepts.
1. J.D. Novak, http://cmap.coginst.ufw.edu/info
Digital Signal Processing, © 2010 Robi Polikar, Rowan University
Sample Concept Maps
(Not Complete)
What is a plant?
Conce
pts Cross link
Links
Link
labels
Digital Signal Processing, © 2010 Robi Polikar, Rowan University
Sample
Concept Maps
Digital Signal Processing, © 2010 Robi Polikar, Rowan University
Sample
Concept Maps