You are on page 1of 38

1

CE804 Digital Signal Processing


Lecture 1
Course overview
Introduction
Lecture 1 DSP
Lecture 1 DSP 2
Lecture 1
Course overview
Instructor: Dr Palaniappan Ramaswamy(Dr Palani)
Tel: 01206-872773
Email: palani {@essex.ac.uk}
Room: 5B.527 (Computing building, please make an
appointment, unless urgent)
Webpage: http://courses.essex.ac.uk/ce/ce804/
3
Lecture 1
Time table
Lectures: Weeks 2-4, 6-8, 10
Monday, 4 6 pm: room 5B.330
Progress test: Weeks 5, 9, Monday, 4-6 pm, room 5B.330
Labs:
Weeks 3, 5, 7, 10: Friday, 3 - 5 pm, CES Computer Lab 5
MATLAB software will be used in the labs
Note: timetable is subject to change!
Lecture 1 DSP
4
Assessment
Coursework = 40%
Final examination (2 hour) = 60%
Assignment (20%): deadline on December 8, 2011, mid-day
Progress test (10% each): Weeks 5, 9 (no lecture on these weeks)
Assignment submission is online (i.e. electronic)
Note: plagiarism and cheating are serious offences!
Lecture 1
Lecture 1 DSP
5
Books
Any book on DSP!
Suggestions:
PALANIAPPAN, R., Biological Signal Analysis, BookBoon Press, 2010. Free download at
http://bookboon.com/uk/student/it/introduction-to-biological-signal-analysis
MITRA, S.K., Digital Signal Processing: A Practical Approach, 3rd edition, McGraw-Hill,
2006.
IFEACHOR, E., JERVIS, B.W., Digital Signal Processing: A Practical Approach, 2nd
Edition, Prentice Hall, ISBN: 0201596199, 2001.
Some reading material will also be given in class (when appropriate).
Reading material
Lecture 1 DSP
6
Lecture 1
Other stuff
Students are expected to:
Attend all lectures and be on time
Attend all labs on time
Read all the required material prior to lecture/lab
Not to chat unnecessarily during lectures or labs
Bring a scientific calculator to all lectures, labs, test
Check the webpage frequently for announcements
Lecture/lab changes/cancellation (if any) will be announced on web
and email sent to CE804 alias
Students should interrupt during the lecture if they are in doubt
Lecture 1 DSP
Summary and Learning Outcomes
Summary
The aim of this module is to provide students with an understanding of
the fundamentals, architectures and implementations of digital signal
processing using MATLAB
Learning outcomes
- understand the basic principles of digital signals
- describe, apply and evaluate typical signal conditioning approaches
- understand and apply spectral estimation using Fourier methods
- understand and design digital filters
- implement digital signal processing methods for real-world applications
7 Lecture 1 DSP
8
Syllabus
Introduction to signal analysis
Discrete-time signals and systems
Signal conditioning
Fourier analysis and spectral estimation
Digital filtering basics
Z-transform and transfer function
Digital filter structures
Digital filter design
Signal processing applications
(note: lectures may not be in exact order as above)
Lecture 1 DSP
9
Lecture 1
Introduction
In this lecture, well learn the fundamental
concepts on signals and an introduction to a
few specific signals
Lecture 1 DSP
10
Signals
What is a signal?
A signal is a function of independent variables
such as time, distance, position, temperature,
pressure, etc.
Most signals are generated naturally but a
signal can also be generated artificially using
a computer
Can be in any number of dimensions (1D, 2D
or 3D)
Lecture 1 DSP
11
Signals (cont)
1D/2D/3D signals
1D signal=f(x); x=time, distance, etc.
2D signal=f(x,y); x,y=spatial positions
3D signal=f(x,y,z); x,y,z=spatial positions
Time series
1D signals with amplitude, pressure,
intensity, etc. as a function of time, f(t)
2D/3D signals
Example: images as functions of 2 or 3
spatial coordinates
Lecture 1 DSP
12
Biological signals
What are biological
signals?
Biological signals are
time series signals
generated by some
biological mechanism
Represented as small
amplitudes of voltages
(or other units) as a
function of time
Some examples are
shown on the table
Generated/
caused by
Name
Heart Electrocardiogram
(ECG)
Brain Electroencephalogram
(EEG)
Muscle Electromyogram
(EMG)
Blood
pressure
changes
Arterial Blood
Pressure (ABP)
Blood
oxygen level
Oxygen Saturation
(SpO
2
)
Lecture 1 DSP
13
Examples of biological signals
EEG
Oscillating electrical potentials recorded from the
scalp surface
Very small in amplitude (V range)
Generated by neuronal activations in the brain
Evoked potentials a specific type of EEG evoked
during a stimulus like visual, auditory, etc
ECG
Electrical potentials recorded from the chest
(mainly), arms, legs
Generated by electrical activity of the heart,
which results in heart pumping blood
EMG
Electrical potentials recorded from the skin
Generated by skeletal muscle activity
ABP
Pressure recorded on the upper arm (units-
mmHg)
Generated by changes in blood pressure
0 100 200 300 400 500 600 700
-2.5
-2
-1.5
-1
-0.5
0
0.5
1
1.5
Sampling points
A
m
p
l i t u
d
e
(
m
i c
r
o
V
)
EEG signal
0 100 200 300 400 500 600 700
-3
-2.5
-2
-1.5
-1
-0.5
0
0.5
1
Sampling points
A
m
p
l i t u
d
e
(
m
i c
r
o
V
)
EMG signal
ECG pictures from S.K.Mitra, DSP 3e
Lecture 1 DSP
14
Examples of biological signals (cont)
Figure from Biolectrical Signal
Processing in Cardiac and
Neurological Applications, L.
Sornmo and P. Laguna
Multimodal
signals
Sometimes, more
than one type of
signal are
recorded but each
signal would
require different
analysis technique
Lecture 1 DSP
15
Speech and Musical sound signal
Speech and sounds are
recorded as air pressure
changes as a function of
time
Speech
Note the amplitude and
time span of each word
Musical sound
Cello: Attack, steady
state, decay
Bass drum: Attack, decay
Cello: Pseudo-periodic
Bass drum: Aperiodic
Pictures from S.K.Mitra, DSP 3e
I like digital signal processing
Cello Bass drum
Lecture 1 DSP
16
Image and video signals
Images
light intensity as a function of 2D
coordinates
Black and white or grey scale images
(I=0-255)
Colour images: I=red(0-255),
green(0-255), blue(0-255)
Video
Sequence of images, called frames
Is a function of 3 variables = 2 spatial
coordinates and time
Pictures/audio/visual from S.K.Mitra, DSP 3e
Lecture 1 DSP
17
Seismic signals
Elastic waves generated by
ground movements from
earthquake, volcanic eruption or
underground explosion
Earth body propagation
P waves - faster
S waves slower
P and S waves are studied
in 3D
Horizontal: north-south
Horizontal: east-west
Vertical
Another wave: surface wave
not so important
Pictures S.K.Mitra, DSP 3e
Lecture 1 DSP
18
Signal analysis
Signals carry information
A signal which does not carry information or carries
information not desired is known as noise/noisy signal
Aim of signal analysis
Extract useful information carried by the signal to suit
the application
Methods
The methods for signal analysis will depend on the
type of the signal and nature of the information being
carried by the signal
There are some common methodologies and some
specific ones for specific signals
Lecture 1 DSP
19
Classification of signals
Signals can be classified into various types by
Nature of the independent variables
Value of the function defining the signals
Examples:
Discrete/continuous function
Discrete/continuous independent variable
Real/complex valued function
Scalar (single channel)/Vector (multi-channels)
Single/Multi-trial (repeated recordings)
Dimensionality based on the number of independent
variables (1D/2D/3D)
Deterministic/random
Periodic/aperiodic
Even/odd
Many more.
Lecture 1 DSP
20
Classification - Discrete/continuous signals
Normally, the independent variable is time
Continuous time signal
Time is continuous
Defined at every instant of time
Discrete time signal
Time is discrete
Defined at discrete instants of time - it is a sequence of
numbers
Four classifications based on time/amplitude -
continuous/discrete:
Analogue, digital, sampled, quantised boxcar
Lecture 1 DSP
21
Classification - Discrete/continuous signals (cont)
Analogue signal
Continuous time signal with continuous amplitude, eg. music
stored on cassette tape
Digital signal
Discrete time signal with discrete valued amplitudes
represented by a finite number of digits, eg. music stored on
hard disk
Sampled data signal
Discrete time signal with continuous valued amplitudes (i.e.
amplitude can take any value)
Digital signal is thus quantised sampled data signal
Quantised boxcar signal
Continuous time signal with discrete valued amplitudes
Lecture 1 DSP
22
Classification - Discrete/continuous signals (cont)
Amplitude- continuous
Time-continuous
Amplitude- continuous
Time-discrete
Amplitude- discrete
Time-discrete
Amplitude- discrete
Time-continuous
Figures from S.K.Mitra, DSP 3e
Lecture 1 DSP
23
Random vs deterministic signal
Deterministic signal
A signal that can be predicted using some methods like a
mathematical expression or look-up table
Easier to analyse
Random (stochastic)
A signal that is generated randomly and cannot be predicted ahead
of time
Most biological signals fall in this category
More difficult to analyse
Lecture 1 DSP
24
1D time series some mathematical notations
A 1D time series
y=f(t) for continuous independent variable
time
y=f(n) for discrete independent variable n
Every value of f(n) is called a sample
Discrete-time signal can be generated by
sampling a parent continuous-time signal at
uniform intervals of time
Then, discrete variable n can be normalised
to assume integer values as a representation
of t.
Lecture 1 DSP
25
2D image/video some mathematical notations
2D images
I=f(x,y), where I is the intensity of red, green and blue (RGB)
colours in a certain range (normally 0-255)
x and y are the co-ordinates of the pixel
Example, f(1,1)={255,255,255} would mean that the pixel at (1,1)
is white
2D videos
Videos are simply sequences of images (known as frames)
I=f(x,y,t), where I is the intensity of red, green and blue colours
Since we are dealing with discrete-time videos, we would have
I=f(x,y,n)
Example, f(7,8,10)={0,0,0} would mean that the pixel at (7,8)
during discrete time (i.e. frame number), n=10 is black.
Black and white images/videos
The intensity would be grey level values (normally in the range 0-
255) instead of RGB values
Lecture 1 DSP
26
Classification period/aperiodic
Periodic
Continuous time-signal is
periodic if it exhibits
periodicity, i.e. x(t+T)=x(t),
-<t< where T=period of
the signal
The smallest value of T is
called the fundamental
period, T
0
A periodic signal has a
definite pattern that repeats
over and over with a
repetition period of T
0
For discrete-time signals,
x(n+N
0
)=x(n),-<n<
A signal, which does not
have a repetitive pattern is
aperiodic
Figures from Digital Signal Processing,
S.Salivahanan, Vallavaraj,
C.Gnanapriya
Periodic signal (discrete-time)
Periodic signal (continuous-time)
Lecture 1 DSP
27
Singular functions
Singular functions
Important non-periodic signals
Delta/unit-impulse function is the most basic and all other singular
functions can be derived from it
Unit impulse functions
Unit step functions
Unit ramp functions
Unit pulse function
}


= = = 1 ) ( ; 0 , 0 ) ( dt t t t o o 0
0
, 0
, 1
{ ) (
=
=
=
n
n
n o
0
0
, 1
, 0
{ ) (
>
<
=
t
t
t u
0
0
, 1
, 0
{ ) (
>
<
=
n
n
n u
0
0
,
, 0
{ ) (
>
<
=
t
t
t
t r
0
0
,
, 0
{ ) (
>
<
=
n
n
n
n r
|
.
|

\
|
|
.
|

\
|
+ = H
2
1
2
1
) ( t u t u t
Figures from Digital
Signal Processing,
S.Salivahanan,
Vallavaraj,
C.Gnanapriya
Lecture 1 DSP
28
Classification even/odd
Even signal
Signal exhibit symmetry
in the time domain
x(t)=x(-t) or x(n)=x(-n)
Odd signal
Signal exhibit anti-
symmetry in the time
domain
x(t)=-x(-t) or x(n)=-x(-n)
A signal can be expressed as a sum of its even
and odd components
x(t)=x
even
(t)+x
odd
(t)
where x
even
(t)=1/2[x(t)+x(-t)], x
odd
(t)=1/2[x(t)-x(-t)]
Lecture 1 DSP
29 29
Classification conjugate symmetry
A sequence x[n] is called a conjugate-symmetric sequence
if x[n]=x*[-n]
Similarly, sequence x[n] is called conjugate-antisymmetric
sequence if x[n]=-x*[-n]
Any complex sequence can be expressed as a sum of its
conjugate symmetric part and conjugate anti-symmetric
part
where
Lecture 1 DSP
30 30 30
Classification conjugate symmetry, an example
Consider a length-7 sequence for -3 s n s 3:
Its conjugate sequence is then given by
Time reversed version:
Lecture 1 DSP
31 31 31 31
Classification conjugate symmetry, an example (cont.)
Therefore
Similarly
You can verify that
Lecture 1 DSP
32
Filtering
In DSP, we normally consider filtering in
terms of frequency
A filter
Passes certain frequency components with
minimal distortion and blocks nearly all other
frequency components
Passband range of allowed frequencies
Stopband range of blocked frequencies
Lecture 1 DSP
33
What is frequency?
Frequency measures the
periodicity (i.e.
repetitiveness)
No of cycles per second
It is measured in Hz
= 1/fundamental period (s)
In the figure, there are 4
fundamental cycles in 0.5 s
1 cycle per 0.125 s
So, Freq=1/0.125 = 8 Hz
y
t (s)
0.5
Lecture 1 DSP
34
Filtering (cont.)
Low-pass filter (LPF)
Passes all low-
frequency components
below the cut-off
frequency, f
c
and
blocks all higher
frequency components
above f
c
Eg.: Consider a
combination of 3
sinusoidal signals, 2
Hz, 5 Hz and 11 Hz.
The final output
signals after LPF at
f
c
=8 Hz and f
c
=3 Hz
are shown.
%MATLAB codes
f=2, fs=256;
for i=1:1000,
y(i)=sin(2*pi*i*(f/fs));
end
plot(y);
axis([0 1000 -1.5 1.5]);
0 200 400 600 800 1000
-1.5
-1
-0.5
0
0.5
1
1.5
0 200 400 600 800 1000
-1.5
-1
-0.5
0
0.5
1
1.5
0 200 400 600 800 1000
-1.5
-1
-0.5
0
0.5
1
1.5
0 200 400 600 800 1000
-3
-2
-1
0
1
2
3
+
+
=
Combined signal
LPF, f
c
=8 Hz
0 200 400 600 800 1000
-3
-2
-1
0
1
2
3
LPF, f
c
=3 Hz
0 200 400 600 800 1000
-1.5
-1
-0.5
0
0.5
1
1.5
Only 2 Hz signal
remains
Only 2 Hz and 5 Hz
signals remain
Lecture 1 DSP
35
Filtering (cont.)
High-pass filter (HPF)
Passes all high-frequency
components above the
cut-off frequency, f
c
and
blocks all lower
frequency components
below f
c
Eg.: Consider the same
combination of 3
sinusoidal signals, 2 Hz,
5 Hz and 11 Hz.
The final output signals
after HPF at fc=3 Hz and
fc=8 Hz are shown.
0 200 400 600 800 1000
-3
-2
-1
0
1
2
3
0 200 400 600 800 1000
-1.5
-1
-0.5
0
0.5
1
1.5
0 200 400 600 800 1000
-1.5
-1
-0.5
0
0.5
1
1.5
0 200 400 600 800 1000
-1.5
-1
-0.5
0
0.5
1
1.5
0 200 400 600 800 1000
-3
-2
-1
0
1
2
3
+
+
=
Combined signal
HPF, f
c
=8 Hz HPF, f
c
=3 Hz
0 200 400 600 800 1000
-1.5
-1
-0.5
0
0.5
1
1.5
Only 5 Hz and 11 Hz
signals remain
Only 11 Hz signal
remains
Lecture 1 DSP
36
Filtering (cont.)
Band-pass filter (HPF)
Passes all frequency
components between edge
passband frequencies,
f
p1
<freq
(allow)
<f
p2
and blocks
all frequencies below and
above edge stopband
frequencies, freq
(block)
<f
s1
;
freq
(block)>
f
s2
Eg.: Consider the same
combination of 3 sinusoidal
signals, 2 Hz, 5 Hz and 11
Hz.
The final output signal after
BPF at f
p1
=4 Hz, f
p2
=6 Hz,
f
s1
=3 Hz, f
s2
=7 Hz is shown
0 200 400 600 800 1000
-1.5
-1
-0.5
0
0.5
1
1.5
0 200 400 600 800 1000
-1.5
-1
-0.5
0
0.5
1
1.5
0 200 400 600 800 1000
-1.5
-1
-0.5
0
0.5
1
1.5
0 200 400 600 800 1000
-3
-2
-1
0
1
2
3
+
+
=
Combined signal
BPF
0 200 400 600 800 1000
-1.5
-1
-0.5
0
0.5
1
1.5
Only 5 Hz signal
remains
Lecture 1 DSP
37
Filtering (cont.)
Band-stop filter (BSF)
Passes all frequency
components lower and higher
than edge passband
frequencies, freq
(allow)
<f
p1
;
freq
(allow)>
f
p2
and blocks all
frequencies between
f
s1
<freq
(block)
<f
s2
Eg.: Consider the same
combination of 3 sinusoidal
signals, 2 Hz, 5 Hz and 11
Hz.
The final output signal after
BSF at f
p1
=4 Hz, f
p2
=6 Hz,
f
s1
=3 Hz, f
s2
=7 Hz is shown
0 200 400 600 800 1000
-1.5
-1
-0.5
0
0.5
1
1.5
0 200 400 600 800 1000
-1.5
-1
-0.5
0
0.5
1
1.5
0 200 400 600 800 1000
-1.5
-1
-0.5
0
0.5
1
1.5
0 200 400 600 800 1000
-3
-2
-1
0
1
2
3
+
+
=
Combined signal
BPF
0 200 400 600 800 1000
-1.5
-1
-0.5
0
0.5
1
1.5
5 Hz signal is
filtered out, only
2 Hz and 11 Hz
signals remain
Lecture 1 DSP
38
Study guide (Lecture 1)
From this weeks lecture, you should
know
The common types of signals
The different classifications of signals
Basic concepts of filtering
Computation of period, frequency
End of lecture 1
Lecture 1 DSP

You might also like