Code Monkey home page Code Monkey logo

fir-filter's Introduction

FIR-filter

A moving average filter is one of the simplest and common filter in digital signal processing because it is the easiest to understand and use. Its optimality for a common task is such that it reduces random noise while retaining a sharp step response.

To perform the moving average filter on the given audio “Don_Giovanni_2.wav”for different values of N, where N represents the order of the filter (N = 3, 11 and 31),the step-wise approach used is given below:

  • Import the audio sound to the Matlab environment or workspace using ‘audioread’ function and take note of the audio properties. The sampling frequency, Fs, of the audio signal is 44100Hz and the total number of samples in the signal, N, is 858396
  • From the Fs, the Sample Interval, Ts was calculated, Ts = 1/Fs and the Frequency Interval, Fint = Fs/N.
  • The fft of the imported signal is computed and used to show the spectral content before filtering.
  • The moving average filter, which is an FIR filter is then designed using the “gausswin” function in matlab. The window size changes as a result of the value of the N given for analysis.
  • The “filter” function in matlab was used to filter the imported signal.
  • The spectral analysis of the output of the filtering was done in order to see the spectral effect before and after filtering.
  • The signals before and after filtering was also shown in the time domain.

Results

Time2

Spectrum2

re2Time

Spectrum of Filtered Signal

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.