0% found this document useful (0 votes)
92 views12 pages

The Islamic University of Gaza Faculty of Engineering Electrical Engineering Department Digital Signal Processing Lab EELE 4110

This document summarizes three exercises from a digital signal processing lab report. Exercise 1 explores finding the discrete-time Fourier transform (DTFT) and discrete Fourier transform (DFT) of a signal using MATLAB. Exercise 2 analyzes the frequency response of a high-pass filter. Exercise 3 examines the frequency response of a signal differentiated by two samples. Key steps included plotting signals, calculating transforms, and verifying Parseval's theorem. Code snippets and output figures are provided. The conclusion states the experiments were useful for learning digital signal processing concepts.

Uploaded by

sanabel
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
92 views12 pages

The Islamic University of Gaza Faculty of Engineering Electrical Engineering Department Digital Signal Processing Lab EELE 4110

This document summarizes three exercises from a digital signal processing lab report. Exercise 1 explores finding the discrete-time Fourier transform (DTFT) and discrete Fourier transform (DFT) of a signal using MATLAB. Exercise 2 analyzes the frequency response of a high-pass filter. Exercise 3 examines the frequency response of a signal differentiated by two samples. Key steps included plotting signals, calculating transforms, and verifying Parseval's theorem. Code snippets and output figures are provided. The conclusion states the experiments were useful for learning digital signal processing concepts.

Uploaded by

sanabel
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 12

The Islamic University of Gaza

Faculty of Engineering
Electrical Engineering Department
Digital Signal Processing Lab
EELE 4110

Prepared by:
Sanabel Nasser El-Haddad 220170536

Tasnim Deyab AL-Tatar 220171452

Submitted for:
Eng. Nada N. Awadallah

Gaza, Palestine

Nov 11, 2020


OBJECTIVE
 Learning how to find DTFS & DTFT using MATLAB.
 Learning how to plot magnitude and phase spectra.
 Calculating the power of the signal and verifying Parseval's theorem.
 Learning how to get and plot frequency response from difference equation.

Lab Exercises
Exercise (1)
I. Theoretical calculations:
𝜋 𝜋 1 3𝜋
𝑥(𝑛) = 2 + 2 × 𝑐𝑜𝑠 ( 𝑛) + 𝑐𝑜𝑠 ( 𝑛) + 𝑐𝑜𝑠 ( 𝑛)
4 2 2 4

1
𝑓1 = 𝑁1 = 8
8
1
𝑓2 = 𝑁2 = 4
4
3
𝑓3 = 𝑁3 = 8
8
𝑷𝒆𝒓𝒊𝒐𝒅 𝒐𝒇 𝒕𝒉𝒆 𝒔𝒊𝒈𝒏𝒂𝒍 → 𝑵 = 𝑳𝑪𝑴(𝟖, 𝟒, 𝟖) = 𝟖 𝒔𝒂𝒎𝒑𝒍𝒆

2𝜋 𝜋
𝜔𝑜 = =
𝑁 4
𝑖𝜔𝑜 −𝑖𝜔𝑜
𝑒 𝑖2𝜔𝑜 + 𝑒 −𝑖2𝜔𝑜 𝑒 𝑖3𝜔𝑜 + 𝑒 −𝑖3𝜔𝑜
𝑥(𝑛) = 2 + 𝑒 +𝑒 + +
2 4

𝐶𝑜 = 2 , 𝐶1 = 1 , 𝐶−1 = 𝐶7 = 1 , 𝐶2 = 0.5
𝐶−2 = 𝐶6 = 0.5, 𝐶3 = 0.25 𝐶−3 = 𝐶5 = 0.25
𝐶4 = 0

1
II. Simulated calculations using MATLAB:
1. Observing the fundamental period of the signal "By plotting"
 The code (Fig.1)

Fig.1 The code


 The result (Fig.2)

Fig.2 The result

Note:
𝑥(𝑛) is periodic signal and it repeats its self every eight samples → 𝑁 = 8

2
2. Required to calculate
 Part (a)
 The code (Fig.3)

Fig.3 The code


 The result (Fig.4)

Fig.4 The result


 Part (b)
 The code (Fig.5)

Fig.5 The code


 The result (Fig.6)

Fig.6 The result

3
Note
Parseval's theorem is verified, power of signal = 6.625.
 Part (c)
 The code (Fig.7)

Fig.7 The code


 The result (Fig.8)

Fig.8 The result


Note:
∠𝐶𝑘 = 0° → 𝑇ℎ𝑎𝑡 𝑚𝑒𝑎𝑛𝑠 𝐶𝑘 𝑖𝑠 𝑎𝑏𝑠𝑜𝑢𝑙𝑜𝑡𝑙𝑦 𝑟𝑒𝑎𝑙

4
Exercise (2)
I. Theoretical calculations:
1
𝑦(𝑛) = [𝑥(𝑛 + 1) − 𝑥(𝑛 − 1)]
2
1
ℎ(𝑛) = [𝛿(𝑛 + 1) − 𝛿(𝑛 − 1)]
2
1
𝐻(𝜔) = [𝑒 𝑗𝜔 − 𝑒 −𝑗𝜔 ]
2
= 𝑗 × 𝑠𝑖𝑛(𝜔)
|𝐻(𝜔)| = |𝑠𝑖𝑛(𝜔)|
90° , 𝑠𝑖𝑛(𝜔) > 0
∠𝐻(𝜔) = { °
−90 , 𝑠𝑖𝑛(𝜔) < 0

II. Simulated calculations using MATLAB:


1. Plotting impulse time response
 The code (Fig.9)

Fig.9 The code

5
 The result (Fig.10)

Fig.10 The result


2. Plotting impulse frequency response
 The code (Fig.11)

Fig.11 The code

6
 The result (Fig.12)

Fig.12 The result

Exercise (3)
I. Theoretical calculations:
𝑦(𝑛) = 𝑥(𝑛) − 𝑥(𝑛 − 2)
ℎ(𝑛) = 𝛿(𝑛) − 𝛿(𝑛 − 2)
𝐻(𝜔) = 1 − 𝑒 −𝑗2𝜔
= 𝑒 −𝑗𝜔 × 2𝑗 × 𝑠𝑖𝑛(𝜔)
°
= 2 × 𝑒 𝑗(−𝜔+90 ) × 𝑠𝑖𝑛(𝜔)
|𝐻(𝜔)| = 2 × |𝑠𝑖𝑛(𝜔)|
−𝜔 + 90° , 𝑠𝑖𝑛(𝜔) > 0
∠𝐻(𝜔) = { °
−𝜔 − 90 , 𝑠𝑖𝑛(𝜔) < 0

7
II. Simulated calculations using MATLAB:
1. Plotting impulse time response
 The code (Fig.13)

Fig.13 The code


 The result (Fig.14)

Fig.14 The result

8
2. Plotting impulse time response
 First method "Without using 'freqz' function"
 The code (Fig.15)

Fig.15 The code


 The result (Fig.16)

Fig.16 The result

9
 Second method "Using 'freqz' function"
 The code (Fig.17)

Fig.17 The code


 The result (Fig.18)

Fig.18 The result


3. Plotting frequency response
𝑦(𝑛) = 𝑥(𝑛) ∗ ℎ(𝑛)
𝑥(𝑛) = 4 + sin(𝜋𝑛)
ℎ(𝑛) = 𝛿(𝑛) − 𝛿(𝑛 − 2)
𝑦(𝑛) = 4 × 𝛿(𝑛) − 4 × 𝛿(𝑛 − 1)

10
 The code (Fig.19)

Fig.19 The code


 The result (Fig.2)

Fig.20 The result


CONCLUSION
It was very useful and awesome experiment

11

You might also like