Updated on:
wto paĆș 05 00:16:51 CEST 2010
Home page of EDISP
(English) DIgital
Signal Processing course
winter 2009/10
Schedule
The lectures are on Tuesday, room 107,
14:15-16:00.
There are
lab exercises, 4 hours every second week, room 022 (basement).
Labs will be on Mondays, 8-12 , in
two subgroups of not more than 12 students.
For the
introductory lab (lab0) we met on 12 Oct, 9:15 room 022. You will be
able to register for subgroups then.
Next lab (lab1) will
be
- 19.10.2009 (8:15-12) for N subgroup,
- 26.10.2009 (8:15-12) for P subgroup
The lab schedule is preliminary now (see schedule.pdf).
After the Independence Day (11.11) "N" subgroup will have labs on weeks marked
as "N" in the official
elka calendar (and "P" on "P" weeks). First three labs are different....
Books
Book base
The course is based on selected chapters of the book:
A. V. Oppenheim, R. W. Schafer, Discrete-Time Signal Processing,
Prentice-Hall 1989 (or II ed, 1999; also acceptable previous editions
entitled Digital Signal Processing).
Other books
A free textbook covering some of the subjects can be found here: http://www.dspguide.com/pdfbook.htm
The book is slightly superficial, but it can be valuable
-
at least as a quick reference.
- Edmund Lai, Practical Digital Signal
Processing for Engineers and Technicians, Newnes (Elsevier), 2003
seems also a simple but thoroughly written book.
Additional books available in Poland:
- R.G. Lyons, Wprowadzenie do cyfrowego przetwarzania sygnałów
(WKiŁ 1999)
- Craig Marven, Gilian Ewers, Zarys cyfrowego przetwarzania sygnałów,
WKiŁ 1999 (simple, slightly too easy)
[en: A simple approach to digital signal processing, Wiley & Sons, 1996]
- Tomasz P. Zieliński, Od teorii do cyfrowego przetwarzania sygnałów,
WKiŁ 2002 (and next edition with slightly modified title)
Please remember:
- there are notation differences between lecture and "dspguide"
- The official book is Oppenheim & Schafer (though notation is
sometimes different too)
- no book is obligatory as it is hard to get O&S, and
other books do not cover the subject fully.
Probably the best choice is to buy a used copy of O&S.
It'll serve you for years, if you are interested in DSP. And it contains a lot of PROBLEMS to solve and learn!
Or you may prefer to buy/borrow a laboratory scriptbook for CYPS, which is in
Polish language (Cyfrowe Przetwarzanie Sygnałów, red. A Wojtkiewicz,
Wydawnictwa PW).
Lecture slides
(You may always expect hand-made corrections and inserts at the
lecture....)
Lecture number = week number in schedule.
- Lecture 1 slides:
newlect1.pdf but please don't read the
schedule there - use the schedule.pdf
- Lecture 2 slides:
newlect2.pdf
Convolution example: conv_exampl.jpg
- Lecture 3 slides:
newlect3.pdf
- Lecture 4 slides
newlect4.pdf
Windowing for DFT, DFT applications slides:
newlect5.pdf
- Lecture 5:
FFT from newlect4.pdf.
Convolution by FFT from newlect5.pdf
Instantaneous spectrum:
newlect6.pdf
Homework will be given this day!
- Lecture 6:(10.11)
Lecture "Linear difference equations" - last 3 slides from newlect2.pdf
and
Z-transform newlect7.pdf
Beginning of "Filters part I" newlect8.pdf
Homework (hand-written on paper, worth up to 2 points) is due at noon on
Friday, November 13th (room 453). You may submit it earlier
(preferably at the lecture).
- Lecture 7(17.11):
Review before test I - based on homework errors.
- Lecture 8(24.11):
newlect7.pdf and
Filters part
I:newlect8.pdf
- Lecture 9(1.12):
(++1) hour test I, 10pts worth: bring YOUR OWN notes (handwritten on paper or on printed
lecture slides). No books, no photocopies of other person
notes. Example test:test1_078a.pdf
- Lecture 10(8.12):
last slides of Filters part I
Filters part
II:newlect9.pdf
Filters part
IIInewlect10.pdf (and
maybe more...)
- Lecture 11(15.12): Digital signal processors:
lect12_dsp.pdf(and OHP foils to be
seen at the lecture)
Homework:(homew2_2008plus.pdf)
given today
- 22.12: no lecture ("Thursday")
- 29.12: Merry Christmas and Happy New Year
- Lecture 12 (5.1): 2D signal
processing lect13.pdf
Homework due today
- Lecture 13 (12.1): test II(
example test here) and signal processing
for data compression
- Lecture 14: (19.1) advanced techniques
including signal processing
for data compression
- Lecture 15: (26.1)Exam 0: pen, pencil, calculator and your own notes
plus lecture slides.
Copies of solutions for homeworks/tests/exams
are NOT allowed.
The exam covers ALL the course matter. There are "Problems" (longer)
and "Questions" (shorter), for total of 90 minutes.
Exam 0 is a "bonus" - if you fail you are still entitled to take Ex1
and Ex2 and no "bad" record remains.
Students who earned the "shortpath" grade may take the ex0 or ex1
without any risk - better grade counts
Old slides below - this marker will be moved with slide update
Exam 1 is scheduled for 2.02.2009, exam 2 for 9.02.2009.
Examples of final tests (historical)
Use them for study. Learn methods, not solutions.
One test. Another test.
There is no guarantee that the current test be identical ;-). It
will be similar (the lecture was similar), but I might also put
more focus on different subjects. The only base is the lecture content
(live one, not only the published slides ....).
The main rule: exam covers the whole course content (sampled),
including the T1(H1)+T2(H2) area and also the lectures after the
H2.
Lab info: example lab exercises
Disclaimer:
These are called "examples" to underline the fact that they are not
official. Some of them need review....
Openly speaking, they are exercise sets current at the
time of posting. I reserve the right to make some important
modifications before the actual lab, to give different sets to
different groups etc. (and I usually DO review the text before giving
it....).
- Lab 0: Introduction, Matlab
- Lab 1: Signals, systems, frequency
- Simple MATLAB usage: make a vector, plot x - y plot with proper
data on axes, make a simple m-function.
- DT signal as a sampled CT signal: plot sample values of a sin()
with a frequency of 1 kHz, sampled with 10 kHz (etc). Put x-axis
values as sample index, CT instant, ....
- Normalized frequency concept (e.g. What is the θ value in
the above example?)
Lab exercises: nlab1.pdf
- Lab 2: Spectral analysis (+ continuation of lab1)
- Impulse response of a system; initial conditions etc.
- DFT properties, effect of limited observation time (windowing)
- Spectrum of a rectangular impulse
Lab exercises: nlab2.pdf
- Lab 3: Instantaneous spectrum
Lab exercises: lab03.pdf
Example entry test:
- Calculate the Fourier spectrum of a rectangular window with
given length. Find the number of \{zero places|sidelobes\} and mainlobe width .
- Calculate the DFT of a signal consisting of exactly 4 periods of
a cosine, or 2 periods zero-padded to the length of 4 periods.
- Calculate the STFT (inst. spectrum) of a u(t)cos(0.2π n) for a
rectangular window of given length positioned at n=0, n=9, ....
- Lab 4: Filter design
Lab exercises: lab4.pdf
Example entry test:
- Location of two poles and two zeros is given. Calculate filter
frequency characteristics. (Hints: a) start from easy configurations,
e.g. zeros on the unit circle, double pole at z=0; b) First recall
which root configurations are possible for a real-coefficient
polynomial, then recall stability criterion for DT filter)
- A filter structure is given. Find all its properties: h(n),
H(z), poles/zeros, amplitude characteristics..... (for own exercises
- use all the lecture examples first)
- A filter is characterized by H(z) (given). Find the output
y(n) for
x(n)=sin(θ1n)+cos(θ2n)+1 (or
some other combination of different signals)
- Explain step-by-step design process of FIR filter by windowing
the ideal filter characteristics. Explain role of window (etc.).
- Lab 5: we don't do it (I'm just using old
numbering scheme with 7 labs....)
- Lab 6: Signal processors
Lab exercises: lab6.pdf
Old instructions below - this marker will be moved with updates
- Lab 7: Image processing
Lab exercises: lab7.pdf
Homework solutions
The solutions were prepared a year ago, the numbering
of problems is different now.
page 1
page 2
page 2A
page 3
page 4
page 5
page 6
page 7
page 8 - correction: ROC for
u[n]-u[n-n0] is whole plane, because signal duration is
finite; thus the denominator may be cancelled when you divide the
polynomials (try this!)
page 9 + some remarks:
here a
simple "manipulation type" solution for b) and c) is shown.
Other way
would be to calculate Inv. FT by integration over the passband - then
a student usually forgets :-) to take BOTH passbands - for positive and
negative frequencies:
so, for HP, -π to π-θb and +θb to
+π
or, for BP, -θc-θb to
-θc+θb and +θc-θb to
+θc+θb
page 10 - solution for the ex3 (old
2008/9 version, with unstable system due to c2=+0.81; with new version, c2=-0.81 and calculations are different)
Test2 solutions
page 1
page 2
page 3
page 4
page 5
For Ex4 - just do it with matlab and you'll see the plot. The simplest
way to do it by pencil was to use transformation from LP to HP, by
shifting LP in frequency by π which results in multiplication in
time by e-jπn=(-1)n. Be careful - this way
passband in LP of {-θb +θb} is
shifted to {π-θb π+θb}!
Look at the homework!!.
Exam 0 solutions
Past things archive (Attic)
Exam version A
Exam version B
- In both cases the signal was sampled correctly
(fs>2f)
- To calculate N0 it was enough to count no. of
samples in period (or divide fs over f). Answer was
10(A) or 6(B). For N0 samples in period,
θ0 was equal to 2π/N0.
- K-size DFT will have K discrete samples over <-π, +π)
(we include -π, and exclude +π , but
due to periodicity of spectrum it is only a
convention)
for a cosine, only two samples are non-zero: at k such that
θk=±θsignal. Form the
definition of θk you will see that this is
for k=±4 (this is the result of taking K=4N0).
- You may label frequency axis with
k=-K/2,....-1,0,1,...K/2 or with its periodic equivalent
K-K/2,....K-1,0,1,...K/2
to label with θ just use
the expression for θk.
-
- H(z)=Y(z)/X(z) is easily obtainable from the time equation. It
was
0.2(1+z-1)/(1-0.8z-1) [A]
-0.2(1-z-1)/(1+0.8z-1) [B]
- Zeros are roots of numerator: -1 [A] or +1 [B]
Poles are roots of denominator: +0.8 [A] or -0.8 [B]. They are
inside unit circle, so the system is stable (but I didn't
ask...)
- Example graph: - please
find a_0, b_0, b_1 by yourselves. If you are smart, you may save
one multiplication by 0.2 (this is left as exercise to you).
- For x(n)= shifted delta, (a limited energy signal)
you may take the impulse response
and shift it appropriately. To find h(n) it is easiest to split
H(z) into two fractions: (shown for [A], for [B] change some signs)
0.2(1/(1-0.8z-1)+z-1/(1-0.8z-1))
and lookup the inv.Z of 1/(1-0.8z-1) in the
table. The final result is a sum of two identical exponentials
shifted by 1 in time. Then, you shift h(n) to proper position....
- For x(n) = 1-(-1)n (a periodic signal) we see a DC
component and a periodic component exp(jπn) with frequency of
π. We find numerical values of
H(0)=(2 or 0) and H(π)= (0 or -2) by substituting exp(0) and exp(π) for z, and
finally
y(n)=H(0)-H(π)·(-1)n
- The response was symmetrical around its midpoint (n= 2 or
4). Thus, it was a repsonse of a zero-phase filter delayed by 2 or
4.
- phase is linear φ=-(2 or 4)θ
delay is constant and equal to (2 or 4)
- The response of filter is a rectangle modulated by
exp(jπn). Thus, the characteristics is a
sin(θL/2)/sin(θ), shifted to π. You may find the
mainlobe width, you may plot exactly zeros of A(θ) etc.
- Time resolution is proportional to time duration of window,
frequency resolution - to mainlobe width (which is prop. to 1/K
....).
Rectangular window has narrowest mainlobe possible, but high
sidelobes; so it is good for resolving signals close in frequency,
but without large difference in amplitudes.
Any other window will have wider mainlobe (so poorer resolution in
f).
-
There was nonlinearity introcuced by product of two samples (linear is
multiplication by a constant only).
Saying causal=yes because of BIBO was not enough; because FIR was
enough; if you call BIBO, you have to prove it by finding relation
between bound of input and output.
- LP filter with passband of π/4 (see the "lecture 17").
- Many shorter is better: by averaging we reduce the variance
of estimate. (variance is huuuuuge with single FFT)
- β (some call it α) controls the shape of window -
effectively the sidelobes level (high β - low sidelobes).
- Inv FT is calculated by summation when the spectrum is
discrete ([B], periodic signal) and by integration when the
spectrum is continuous ([A], limited energy signal).
- 3 buses are for opcode, data1 (signal), data2
(coefficient).
Any instruction with dual move uses all three,
e.g MAC instruction needs 2 data, so it is nice that we can load
data in the same cycle
in 56002 it can be coded as:
mac a,b x:(r0+),x0 y:(r4+),y0
- Trivial
- def: order of n^2, FFT: order of n log2(n)
- y(n) length is, maximally, (length of h(n))+(length of
x(n))-1. K=M+N-1. Here, we were asked to find M knowing K and
N. Answer is, as you may guess, M=K-(N-1)
- The clue is in word "maximally". It may happen that for
certain signal (e.g in the stopband....) the y(n) is shorter.....
dr inż. Jacek Misiurewicz
room 447 (GE)
Office hours: Tue 16:30-17:00 (or by e-mail appointment)
Institute of Electronic Systems
email:jmisiure@elka.pw.edu.pl
This page is "Continuously Expanding".///////////////////////