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.
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.
- 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
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.
- The matlab implementation of the discrete-time Fourier Transform can be found here: my_dtft.m
-
(A) Convolution: "PartA_convolution.m"
This code is used to perform a simple convolution on 2 signals.
-
(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.
- For More info, Check the project report: "Report"
EE210 Lecture Notes & Material:
https://drive.google.com/drive/folders/1UaLbYzHEQJgwkm-EXSBJfqVmOckCmXtj?usp=sharing