introduction to digital signal processingpds/lect01.pdf · 2012-10-23 · p.a. lynn and w. fuerst...
Post on 20-May-2020
31 Views
Preview:
TRANSCRIPT
Introduction to Digital Signal Processing
John Chiverton
Digital Signal Processing (1502432)School of Information Technology
Mae Fah Luang University
June 9th 2009
Lecture Contents
Course FormatCourse Outline
Digital Signal ProcessingWhat is Digital Signal Processing?PhasePhasors and Complex Numbers
A Typical Digial Signal Processing System
SummaryLecture summary
Outline
Course FormatCourse Outline
Digital Signal ProcessingWhat is Digital Signal Processing?PhasePhasors and Complex Numbers
A Typical Digial Signal Processing System
SummaryLecture summary
Objectives
After finishing the course students should be able to
I Demonstrate knowledge of digital signal processingtechniques;
I Solve and analyze digital signal processing problems;
I Design systems using knowledge obtained from the course;
I Apply knowledge to other related topics.
Course Description
I Time-varying signals
I Z-transformation
I Discrete Fourier Transformation
I Fourier Analysis for Time-varying signals
I Digital filter design
I Random signals
I Power spectrum estimation
Assessment
1. Reports 30%2. Project/ presentation 10%3. Midterm examination 30%4. Final examination 30%
Course Content
Period Topic8-14 June Introduction15-21 June Discrete time domain analysis22-28 June Discrete frequency domain analysis (Fourier)29-5 July Discrete frequency domain analysis (Z-Transform)6-12 July Design of non-recursive digital filters13-19 July Design of recursive digital filters20-26 July Implementation of discrete-time systems27-2 Aug. Review material & Applications3-9 Aug. Mid-Term Examinations10-16 Aug. Discrete and Fast Fourier Transforms (DFT, FFT)17-23 Aug. Sampling and reconstruction of signals24-30 Aug. Random signals review31-6 Sept. Linear prediction and optimum linear filters7-13 Sept. Adaptive Filters14-20. Sept. Applications21-27 Sept. Revision and review28> Sept. Examinations
Text Books
Primary Texts:
P.A. Lynn and W. Fuerst Introductory Digital Signal Processing John Wiley
J.G. Proakis and D. G.Manolakis
Digital Signal Processing Principles,Algorithms and Applications
Pearson Ed-ucation
Other:
E.C. Ifeacher and B.W.Jervis
Digital Signal Processing A PracticalApproach
Addison-Wesley
J. Van de Vegte Fundamentals of Digital Signal Pro-cessing
Prentice Hall
Outline
Course FormatCourse Outline
Digital Signal ProcessingWhat is Digital Signal Processing?PhasePhasors and Complex Numbers
A Typical Digial Signal Processing System
SummaryLecture summary
What is Digital Signal Processing?
Techniques include (e.g. )
I Filtering
I Frequency domaintechniques (i.e. Fourier)
I Time domain techniques
I Random signals
I Predication andEstimation (e.g. timeseries estimation)
Example Applications
I Audio processing
I Communication systems
I Image processing
I Video processing
I Data compression
I Vehicle control
I Financial engineering
What is a Signal?
A simple example.
-1.50
-1.00
-0.50
0.00
0.50
1.00
1.50
0.000 0.002 0.004 0.006 0.008 0.010
y (a
rbitr
ary
ampl
itude
uni
ts)
x (seconds)
A simple signal: sinusoidal wave (sine wave)
What is a Signal?
Can contain information for
I Communication
I Storage
I Calculation
-1.50
-1.00
-0.50
0.00
0.50
1.00
1.50
0.000 0.002 0.004 0.006 0.008 0.010
y (a
rbitr
ary
ampl
itude
uni
ts)
x (seconds)
A simple signal: sinusoidal wave (sine wave)
Example of What is a Signal?
Information is carried inthe
I amplitude, “a”;
I period, “T”;
I frequency, “f = 1/T”;
I and phase, “φ”.
Equation for a sine wave:
y(x) = a sin(2πfx+ φ)
where “x” is time in secondsfor this example. Amplitude“a = 1” controls the heightof the wave.
-1.50
-1.00
-0.50
0.00
0.50
1.00
1.50
0.000 0.002 0.004 0.006 0.008 0.010
y (a
rbitr
ary
ampl
itude
uni
ts)
x (seconds)
A simple signal: sinusoidal wave (sine wave)
period
ampl
itude
Frequency and Period
Equation for a sine wave:
y(x) = a sin(2πfx+ φ)
I f is the frequency
I Measured in Hertz orHz
I Here period,T = 0.002s
I f = 1/T Hz, thereforef = 1/0.002 = 500Hz. -1.50
-1.00
-0.50
0.00
0.50
1.00
1.50
0.000 0.002 0.004 0.006 0.008 0.010
y (a
rbitr
ary
ampl
itude
uni
ts)
x (seconds)
A simple signal: sinusoidal wave (sine wave)
period
ampl
itude
Phase
Equation for a sine wave:
y(x) = a sin(2πfx+ φ)
I φ is the phase
I Here φ = 0
Therefore here,
y(x) = y(x, φ = 0) = a sin(2πfx).
-1.50
-1.00
-0.50
0.00
0.50
1.00
1.50
0.000 0.002 0.004 0.006 0.008 0.010
y (a
rbitr
ary
ampl
itude
uni
ts)
x (seconds)
A simple signal: sinusoidal wave (sine wave)
period
ampl
itude
Phase examples
-1.50
-1.00
-0.50
0.00
0.50
1.00
1.50
-0.004 -0.003 -0.002 -0.001 0.000 0.001 0.002 0.003
y (a
rbitr
ary
ampl
itude
uni
ts)
x (seconds)
phase angle=-0.5× 2π
phase shift
complete cycle
-1.50
-1.00
-0.50
0.00
0.50
1.00
1.50
-0.004 -0.003 -0.002 -0.001 0.000 0.001 0.002 0.003
y (a
rbitr
ary
ampl
itude
uni
ts)
x (seconds)
phase angle=-0.4× 2π
phase shift
complete cycle
-1.50
-1.00
-0.50
0.00
0.50
1.00
1.50
-0.004 -0.003 -0.002 -0.001 0.000 0.001 0.002 0.003
y (a
rbitr
ary
ampl
itude
uni
ts)
x (seconds)
phase angle=-0.3× 2π
phase shift
complete cycle
-1.50
-1.00
-0.50
0.00
0.50
1.00
1.50
-0.004 -0.003 -0.002 -0.001 0.000 0.001 0.002 0.003
y (a
rbitr
ary
ampl
itude
uni
ts)
x (seconds)
phase angle=-0.2× 2π
phase shift
complete cycle
Phase examples cont’d
-1.50
-1.00
-0.50
0.00
0.50
1.00
1.50
-0.004 -0.003 -0.002 -0.001 0.000 0.001 0.002 0.003
y (a
rbitr
ary
ampl
itude
uni
ts)
x (seconds)
phase angle=-0.1× 2π
phase shift
complete cycle
-1.50
-1.00
-0.50
0.00
0.50
1.00
1.50
-0.004 -0.003 -0.002 -0.001 0.000 0.001 0.002 0.003
y (a
rbitr
ary
ampl
itude
uni
ts)
x (seconds)
phase angle=0.1× 2π
phase shift
complete cycle
-1.50
-1.00
-0.50
0.00
0.50
1.00
1.50
-0.004 -0.003 -0.002 -0.001 0.000 0.001 0.002 0.003
y (a
rbitr
ary
ampl
itude
uni
ts)
x (seconds)
phase angle=0.2× 2π
phase shift
complete cycle
-1.50
-1.00
-0.50
0.00
0.50
1.00
1.50
-0.004 -0.003 -0.002 -0.001 0.000 0.001 0.002 0.003
y (a
rbitr
ary
ampl
itude
uni
ts)
x (seconds)
phase angle=0.3× 2π
phase shift
complete cycle
Cosine Vs Sine
Cosine and Sine functions areequivalent except for a phaseshift (1/4×period).
I cos(2πfx) = sin(2πfx+ φ) where φ = π/2.
I sin(2πfx) = cos(2πfx+ φ) where φ = −π/2.
Angular Frequency
I Frequency, f = 1/T
I Angular frequency,ω = 2πf
I 1 period or cycle = 2πradians
y(x) = sin(2πfx+ φ)
= sin(ωx+ φ)
-1.50
-1.00
-0.50
0.00
0.50
1.00
1.50
0Pi 1Pi 2Pi 3Pi 4Pi 5Pi 6Pi 7Pi 8Pi 9Pi 10Pi
y(x)
ω x (seconds)
Angular Frequency
I Frequency, f = 1/T
I Angular frequency,ω = 2πf
I 1 period or cycle = 2πradians
y(x) = sin(2πfx+ φ)
= sin(ωx+ φ)
-1.50
-1.00
-0.50
0.00
0.50
1.00
1.50
0.000 0.001 0.002 0.003 0.004 0.005 0.006 0.007 0.008 0.009 0.010
y(x)
x (seconds)
Phasor Representation
A cosine (or sine) wave:
y(x) = a cos(ωx+ φ)
can be represented as a phasor.A phasor is a complex number:
z = x+jy = a(cos(φ)+j sin(φ))
where x is known as the real partor Re(z) = x and y is known asthe imaginery part or Im(z) = y.
x and y can be calculated withx = a cos(φ) and y = a sin(φ).
Also remember j =√−1.
Argand or Phasor Diagram:
-1.5j
-1.0j
-0.5j
0.0j
0.5j
1.0j
1.5j
-1.5 -1.0 -0.5 0.0 0.5 1.0 1.5
Real axis
Imag
iner
y ax
is
a
x
y
ω rad/s rotation
φ
Complex Numbers
The square root of minus oneis not defined so a symbol, j isused (sometimes i):
j =√−1.
Powers:
I j2 = −1I j3 = −jI j−1 = 1/j = −j
If z = x+ jy (rectangularform) then alternativerepresentations are:
I Polar form: z = a∠φ
I Exponential form:z = a exp(jφ)
where a =√x2 + y2 and
φ = tan−1(y/x).
Properties of Complex Numbers
If z = x+ jy, z1 = x1 + jy1 and z2 = x2 + jy2 then
I Addition:z1 + z2 = x1 + x2 + j(y1 + y2)
I Subtraction:z1 − z2 = x1 − x2 + j(y1 − y2)
I Multiplication:z1z2 = a1a2∠(φ1 + φ2)
I Division:z1/z2 = a1/a2∠(φ1 − φ2)
I Reciprocal: 1/z = 1/a∠(−φ)
I Square root:√z =√a∠(φ/2)
I Complex conjugate:z∗ = x− jy = a∠− φ
The polar form simplifies some operations such as multiplication and division of
complex numbers.
Phasor Representation
Euler’s identity:exp(jφ) = cos(φ) + j sin(φ)
Therefore
I cos(φ) = Re(exp(jφ)) −→ or the real part, x
I sin(φ) = Im(exp(jφ)) −→ or the imaginary part, y
Recall the cosine wave:y(x) = cos(ωx+ φ)
which can be written as:
y(x) = Re(a exp(j(ωx+ φ))) = Re(a exp(jωx) exp(jφ))
= Re(A exp(jωx))
where A is the phasor representation of y(x) given by
A = a exp(jφ) = a∠(φ).
Complex Exponentials, Sines and Cosines
Given
I y1(x) = b exp(jωx) = b cos(ωx) + jb sin(ωx)
I y2(x) = b exp(−jωx) = b cos(ωx) + jb sin(−ωx)as
I cos(−ωx) = cos(ωx) (even function)I sin(−ωx) = − sin(ωx) (odd function)
Theny1(x) + y2(x) = 2b cos(ωx).
So thatb cos(ωx) =
a
2exp(jωx) +
a
2exp(−jωx).
A similar approach can be used to derive a sine function.
Outline
Course FormatCourse Outline
Digital Signal ProcessingWhat is Digital Signal Processing?PhasePhasors and Complex Numbers
A Typical Digial Signal Processing System
SummaryLecture summary
A Typical Digital Signal Processing System
Digital SignalProcessor
Analog to DigitalConverter
ConverterDigital to Analog
Analog Input
Analog OutputAnalog Filter
Analog Filter
Output
InputI Input Analog Filter
(antialiasing):Limits frequency range
I Analog to Digital ConverterConverts signal to digital
samples
I Digital Signal ProcessorStorage, Communication and
or Calculations
I Digital to Analog ConverterConvert to continuous signal
I Output Analog FilterRemoves sharp transitions
Analog to Digital Converter (ADC)
I Real world is typically analog (continuous)
I Digital signal approximates analog signal with discretequantised samples
I ADC converts an analog signal to a digital signalI Signal is digitised in two ways:
I Signal is sampled at a sampling rate or frequency: Informationis collected about the signal at regular intervals.
I The continuous or analog signal is then quantised: i.e. put intodigital form, where only a finite set of numbers are represented.
Quantisation using Truncation
I Signal can be quantised using e.g. truncation where numbersfollowing specified position are removed.
I Examples:I 5.7 truncated to integer is 5I 5.11 truncated to 1 decimal place is 5.1
I Negative numbers are truncated in the same way (notedifferent to the common floor function in matlab), e.g.
I -5.78 truncated to integer is -5I -5.135 truncated to 2 decimal places is -5.13
Truncation Quantisation examples
I Errors can be seen between the sampled and the sampled andquantized signals.
Quantisation using Rounding
I Rounding can be a quantization method associated withsmaller errors, e.g.
I 5.7 rounded to nearest integer is 6I 5.11 rounded to 1 decimal place is 5.1I -5.78 rounded to nearest integer is -6I -5.135 rounded to 2 decimal places is -5.14
Rounding Quantisation examples
I Errors can be seen between the sampled and the sampled andquantized signals.
Sampling
I Sampling also affects the quality of the digitised signal.
I Higher sampling rate reduces error and enables betterrepresentation of the original analog signal in digital form.
Sampling examples
Sampling examples cont’d
Input Analog Filter: Antialiasing Filter
I Analog to Digital Converter (ADC) requires signal below aparticular frequency (Nyquist Frequency)
I ∴ Limit frequency range to below Nyquist frequency (fs/2)before Analog to Digital Conversion.
mag
nitu
de
high0 low
100%
sf /2 sf
frequencysampling
frequencycut−off
71%
frequencies
I Otherwise next stageproduces frequency errors(i.e. aliasing)
I Sampling produces copiesof signal at multiples ofsampling frequency
I Aliasing occurs whencopies of signal overlapeach other
Digital Signal Processor
I After digitisation (with the ADC) digital signal processing maythen be performed on the digitised signal.
I Simple exampleI Averaging filter:
y[n] =x[n] + x[n− 1] + ...+ x[n− k + 1]
k
for window width k = 3
y[n] =x[n] + x[n− 1] + x[n− 2]
3
where x[n] is an input value at sample time n and y[n] is anoutput at sample time n
[x n] [y n]
FilterAveraging
Averaging Filter Examples
Window width k controls the response of the filter. If k is too low,there is little benefit on output signal.
Averaging Filter Examples cont’d
Window width k controls the response of the filter. If k is toohigh, the filter removes all of the output signal.
Outline
Course FormatCourse Outline
Digital Signal ProcessingWhat is Digital Signal Processing?PhasePhasors and Complex Numbers
A Typical Digial Signal Processing System
SummaryLecture summary
What have we covered today?
I Course content
I Definition of digital signal processing
I Description of phase
I Cosine and Sine functions
I Complex numbers and alternative representations
I A typical digital signal processing system
top related