You are on page 1of 48

Digital Signal Processing

Course Code :  30102545 


Credit Hours :3
Prerequisite :30107341
Instructor Information

 
Name Anwar ALflayyeh
Office No. B17 F4
Tel (Ext)
E-mail Anwar@bau.edu.jo
Office Hours 11:00-12:00 STT
Class Times Building Day Start Time End Time Room No.
  Online Sunday 10:00 AM 11:00PM Online
Tuesday
Thursday
Course description Introduction to DSP. Discrete signals
and systems. Z-transform. Modeling and implementation of
discrete time systems. Time and frequency domain analysis of
signal processors. Design and analysis of finite impulse
response filters (FIR). Design and analysis of infinite impulse
response filters (IIR). Digital filter networks. Digital equalizers.
The DFT and FFT algorithms. DSP algorithms and applications

Course Title; Digital Signal Processing


Credit Hour(3-0)
Textbook: Textbook Title

Image of the textbook Cover


COURSE OBJECTIVES
The main objectives of the course are:
Introduce and discuss digital signal processing systems
Study of discrete time signals and systems
Manipulate discrete time signals and systems using transform methods
Develop the capabilities of students to perform signals and systems analysis using
computers
Analysis and design of digital IIR and FIR filters.
COURSE SYLLABUS

Week Course Topic


Week 1 Introduction to Digital Signal & Image Processing
Week 2 Analog to Digital & Digital to Analog Conversion
Week 3 Digital Signals
Week 4 Difference Equation & Diagrams
Week 5 Convolution & Correlation
Week 6 The z-Transforms & Stability
Week 7 Discrete Fourier Transform & Frequency Response
Week 8 Mid Term Exam
Week 9 Discrete Fourier Analysis & Signal Spectrum
Week 10 Finite Impulse Response Filter Design
Week 11 Infinite Impulse Response Filter Design
Week 12 Hardware and Software for Digital Signal Processors
Week 13 Adaptive Filters & Applications
Week 14 Multi-rate Signal Processing
Week 15 Fundamentals of Image Processing
Sinusoidal Sequence
The sinusoidal functions take the form

x[n] = Asin(nW + q) or x[n] = Acos(nW + q) for all n with real A.

where W is a digital frequency in radians and q is a phase shift.


Sinusoidal Sequence
Example: plot of x[n] = 3sin(nπ/8)
Phase Shifting a Digital Sinusoid
Example: Plot the following signals

x1[n] = sin(n2π/9)

x2[n] = sin(n2π/9 - 3π/5)

9
Periodicity of Digital Sinusoidal Sequence

• Compared to analog counterpart, digital sine and cosine signals


are not always periodic sequences.

• These functions are periodic only when 2p/W is a ratio of


integers N/M.

• When 2p/W = N/M, N is the number of samples in the digital


period, and M is the number of analog cycles that elapse while N
samples are collected.

• An analog frequency f in Hz is related to its corresponding digital


frequency W in radians through the equation
Periodicity of Digital Sinusoidal Sequence

Example: Repeating and non-repeating digital sinusoids.


Periodicity of Digital Sinusoidal Sequence

Example: A digital signal is defined as x[n] = cos(2n)


• Is this a digital sequence periodic?
• Find the first eight elements in the sequence.

Solution
W = 2,
2p/W = π, this number is irrational and cannot be expressed in term of ratio of two
integers. Therefore this digital sequence is not periodic.
13
14
15
16
17
Periodicity of Digital Sinusoidal Sequence

Example: A digital signal is defined as x[n] = cos(n4π/5)


• Is this a digital sequence periodic?
• Find the first eight elements in the sequence.

Solution
W = 4π/5,
2p/W = 5/2, this number is rational and can be expressed in term of ratio of two
integers N/M. Therefore this digital sequence is periodic. Where N = 5 means
sequence repeats every 5 samples, and M = 2 means these 5 samples are
collected over 2 complete cycles of the analog signal being sampled.
Notation for Digital Signals
• A stream of digital codes is presented to a digital signal processor for
processing.

• It is not convenient, however, to represent a digital signal using these


codes.

• Instead, it is more helpful to represent it using the quantization levels


for each sample.

• A digital signal x is given the notation x[n] to indicate that it has values
only where samples are taken.

• The integer n marks the number of the sample, taken at the time t =
nTS, where TS is the sampling interval.
19
Notation for Digital Signals
• A digital signal x[n] may be modified by time shifts and
resampling.

For Example
• Signal x[n-2], shifts x[n] two steps to the right
• Signal x[n+3], shifts x[n] three steps to the left
• Signal x[2n], selects every other sample from x[n]
• Signal x[3n], selects every third sample

20
Notation for Digital Signals
Example: Find the Following:

a) x[0] = 0.25
b) x[5] = 0.5

21
Notation for Digital Signals
Example: Find the Following:

a) x[0] = 0.25
b) x[5] = 0.5
c) x[n-1]

Signal x[n-1] is found by shifting


the sample values of signal x[n] by
1 steps towards right.

22
Notation for Digital Signals
Example: Find the Following:

a) x[0] = 0.25
b) x[5] = 0.5
c) x[n-1]
d) x[n-2]

Signal x[n-2] is found by shifting


the sample values of signal x[n] by
2 steps towards right.

23
Notation for Digital Signals
Example: Find the Following:

a) x[0] = 0.25
b) x[5] = 0.5
c) x[n-1]
d) x[n-2]
e) x[2n]

Signal x[2n] selects alternate


sample from the signal x[n].

24
Notation for Digital Signals
Example: Find the Following:

a) x[0] = 0.25
b) x[5] = 0.5
c) x[n-1]
d) x[n-2]
e) x[2n]
f) x[3n]

Signal x[3n] selects every third


sample from the signal x[n].

25
Composite Functions
• They are the combinations of basic functions.

• This give flexibility in defining digital signals.

• To evaluate a composite function, each basic function (such as


unit impulse, unit step, power, sinusoidal etc) is constructed
first, then the basic signals are multiplied, added or subtracted,
as required.

26
Composite Functions
•Example:
  Draw a signal x[n] = u[n]u[3-n]

The signal can also be expressed as a


sum of Impulse functions.

27
Composite Functions
Example: Draw a signal x[n] = e-2nu[n]
• First draw two basic signals (e-2n, u[n]) and then multiply as shown in the figure.
• The u[n] has the effect of turning on the other function at n = 0.
• The u[n] is zero for n < 0, so x[n] is also for n < 0.
• The u[n] has a value of 1 for n ≥ 0, so x[n] is the same as e-2n for n ≥ 0.

28
Composite Functions
Example: Draw a signal x[n] = 3sin(nπ/5 - 1)u[n]
First draw two basic signals and then multiply as shown in the
figure.

29
Composite Functions
Example: Draw a signal x[n] = 0.5e-0.2nsin(nπ/9)u[n]
First draw three basic signals and then multiply to get the resultant damped
sinusoid signal as shown in the figure.

× =

30
Two-Dimensional Digital Signals
• Digital images are two-dimensional digital signals.

• A digital image contains multiple rows and columns of pixels.

• Each pixel is assigned a color, and the combined effect of the colors
of all the pixels is the desired image.

• For a gray scale image, each pixel is assigned a gray scale level that
records the shading for that pixel.

• For an N-bit gray scale image, 2N different shades are possible.

• Thus, 256 shades of gray are used in an 8-bit system.


31
Two-Dimensional Digital Signals
• The total number of bits needed to represent a digital image
depends on the number of pixels and the number of bits
assigned to each pixel. Specifically,

Total Number of Bits = (# Rows)(# Columns)(# Bits per Pixel)

32
Two-Dimensional Digital Signals
Gray Scale Values for 8-bit Digital Image

16 × 16 × 256 Digital Gray Scale Image

33
Generation of Digital Signals
Example:

Solution
a)

34
Generation of Digital Signals
b) The first five sample values for part (1) are calculated and
plotted in the Figure.

35
Generation of Digital Signals
b) The first eight sample values for part (2) are calculated and
plotted in the Figure.

36
Linear System

• A linear system is illustrated in the figure.


• The linear system obeys the superposition principle.
• 𝑦1(𝑛) is the system output using an input 𝑥1(𝑛)
• 𝑦2(𝑛) the system output with an input 𝑥2(𝑛)

37
Linear System

• The Linear system output due to the weighted sum inputs


∝𝑥1(𝑛) + 𝛽𝑥2(𝑛) is equal to the same weighted sum of the
individual outputs obtained from their corresponding inputs,
that is, 𝑦(𝑛) = ∝𝑦1(𝑛) + 𝛽𝑦2(𝑛), where ∝ and 𝛽 are constants.

38
Linear System

Example: A digital amplifier is represented by 𝑦(𝑛) = 10𝑥(𝑛), the


input is multiplied by 10 to generate the output.

39
Linear System

40
Linear System

41
Time-Invariant System

A time-invariant system is illustrated in the figure.

42
Time-Invariant System

43
Time-Invariant System

Example: Determine whether the linear system y(𝑛) = 2𝑥(𝑛) − 5


is time invariant.

44
Time-Invariant System

45
Time-Invariant System

Example: Determine whether the linear system y(𝑛) = 2𝑥(3𝑛) is


time invariant.

The system is not time invariant.

46
Causal System

47
Causal System

Example: Determine whether the following systems are causal or not.

Solution

1) Causal
2) Non-causal

48

You might also like