Docsity

Discrete Fourier Transform-Digital Signal Processing-Assignment, Exercises of Digital Signal Processing

Partial preview of the text

Download Discrete Fourier Transform-Digital Signal Processing-Assignment and more Exercises Digital Signal Processing in PDF only on Docsity!

Introduction: In this lab session, we will write MATLAB programs to compute DFTs of discrete time signals. We will also write programs to shift DFTs. Besides these, programs for computation of IDFTs of transformed signals will be executed. Finally, we will write programs to calculate the circular convolution of two discrete time signals. I. Discrete Fourier Transform (DFT) 1. MATLAB can be used to find the DFT of discrete signals. The DFT of a real signal could be imaginary. Write a MATLAB program calculates the DFT of the signal x(n)={1,2,3.4,5,6,7,8}. Hint: Use ffi MATLAB function. Also plot graphs for real, imaginary, absolute value and phase of the calculated DFT. Q1) Explain the operation of this program. 2. Write a MATLAB program that calculates the absolute value of the DFT for the signal y(n) = cos(2m x 0.1 x n). Try shifting the obtained DFT. Hint: Use fjishift MATLAB function. Q2) Explain the operation of the MATLAB command fftshift. Q3) By inspecting the spectrum, determine the frequency of the sinusoidal signal 3. Write a MATLAB program that calculates the absolute value of the DFT of the signal = c0s(2X 0.05 Xn) + cos(2n X0.1 Xn) + cos(2HX 0.2 Xn). Q4) By inspecting the spectrum, determine the frequencies of the sinusoidal signals. 4. Write a MATLAB function that that calculates the DFT of its input. Note: do not use the {# MATLAB command in this function. Name this program as dft.m. The function may have the following syntax: function y = dft(x) II. Inverse Discrete Fourier Transform (IDFT) 5. MATLAB can be used to find the IDFT of transformed signals. The IDFT of a real signal could be imaginary. Write a MATLAB program that calculates the IDFT of the signal x/n)={1,2.3,4,5,6,7.8}. [lint: Use ifff MATLAB function. docsity.com