Skip to content

Latest commit

 

History

History
37 lines (23 loc) · 3.24 KB

File metadata and controls

37 lines (23 loc) · 3.24 KB

Signal-Processing-DTFT-and-Convolution

This project is about designing generalized MATLAB codes that perform discrete convolution and discrete-time Fourier transform (DTFT) to audio and voice signals. Signal-processing MATLAB functions like “conv”, “filter”, and “fir1” are used to manipulate the input voice signal with different filters and study the output spectrum.

1. Discrete Convolution

The discrete convolution deals with 2 discrete-time signals in the manner shown in equation 1. Convolutions are basically multiply-and-accumulate (MAC) operations, where one of the 2 signals is flipped around the y-axis, then is moved towards the other signal in steps. At each step, corresponding samples are multiplied and the output sample is produced by summing those products. The length of the resulted output will be the sum of the 2 signals’ lengths minus one as shown in equation 2.

discrete_conv

  • Here's a video that explains the operation of discrete convolution: Discrete time convolution
  • The matlab implementation of the discrete convolution can be found here: my_conv.m

2. Discrete-Time Fourier Transform

The discrete-time Fourier transform follows equation 3. The code is implemented by using 2 for loops, the 1st loop is to go over each n and do the multiplication of the input x with the complex component, and the 2nd loop is to go over each Ω and accumulate the products. Ω represents the digital filter defined in equation 4.

discrete_time_fourier_transform

  • The matlab implementation of the discrete-time Fourier Transform can be found here: my_dtft.m

3. Simulation & Results:

  • (A) Convolution: "PartA_convolution.m"
    This code is used to perform a simple convolution on 2 signals.

    conv_example

  • (B) DTFT & implementing a low-pass filter: "PartB_DTFT.m"
    This code takes an audio file & performs DTFT to observe the frequency spectrum of this audio file. Then, by using low-pass filters, the high-frequency components are filtered out.

    dtft_filter

  • For More info, Check the project report: "Report"


References:

EE210 Lecture Notes & Material:
https://drive.google.com/drive/folders/1UaLbYzHEQJgwkm-EXSBJfqVmOckCmXtj?usp=sharing