Skip to content Skip to navigation

Connexions

You are here: Home » Content » FIR Filter Design using MATLAB

Navigation

Recently Viewed

This feature requires Javascript to be enabled.

FIR Filter Design using MATLAB

Module by: Hyeokho Choi. E-mail the author

User rating (How does the rating system work?)
Ratings

Ratings allow you to judge the quality of modules. If other users have ranked the module then its average rating is displayed below. Ratings are calculated on a scale from one star (Poor) to five stars (Excellent).

How to rate a module

Hover over the star that corresponds to the rating you wish to assign. Click on the star to add your rating. Your rating should be based on the quality of the content. You must have an account and be logged in to rate content.

:
(0 ratings)

Summary: This module explains the MATLAB commands for FIR filter design.

FIR Filter Design Using MATLAB

Design by windowing

The MATLAB function fir1() designs conventional lowpass, highpass, bandpass, and bandstop linear-phase FIR filters based on the windowing method. The command


	    
	    b = fir1(N,Wn)     
	    
	  

returns in vector b the impulse response of a lowpass filter of order N. The cut-off frequency Wn must be between 0 and 1 with 1 corresponding to the half sampling rate.

The command


	    
	    b = fir1(N,Wn,'high')
	    
	  

returns the impulse response of a highpass filter of order N with normalized cutoff frequency Wn.

Similarly, b = fir1(N,Wn,'stop') with Wn a two-element vector designating the stopband designs a bandstop filter.

Without explicit specification, the Hamming window is employed in the design. Other windowing functions can be used by specifying the windowing function as an extra argument of the function. For example, Blackman window can be used instead by the command b = fir1(N, Wn, blackman(N)).

Parks-McClellan FIR filter design

The MATLAB command


	    
	    b = remez(N,F,A)
	    
	  

returns the impulse response of the length N+1 linear phase FIR filter of order N designed by Parks-McClellan algorithm. F is a vector of frequency band edges in ascending order between 0 and 1 with 1 corresponding to the half sampling rate. A is a real vector of the same size as F which specifies the desired amplitude of the frequency response of the points (F(k),A(k)) and (F(k+1),A(k+1)) for odd k. For odd k, the bands between F(k+1) and F(k+2) is considered as transition bands.

Content actions

Give Feedback:

E-mail the module author | Rate module ( How does the rating system work?)

Rating system

Ratings

Ratings allow you to judge the quality of modules. If other users have ranked the module then its average rating is displayed below. Ratings are calculated on a scale from one star (Poor) to five stars (Excellent).

How to rate a module

Hover over the star that corresponds to the rating you wish to assign. Click on the star to add your rating. Your rating should be based on the quality of the content. You must have an account and be logged in to rate content.

(0 ratings)

Download:

Add module to:

My Favorites (?)

'My Favorites' is a special kind of lens which you can use to bookmark modules and collections directly in Connexions. 'My Favorites' can only be seen by you, and collections saved in 'My Favorites' can remember the last module you were on. You need a Connexions account to use 'My Favorites'.

| A lens (?)

Definition of a lens

Lenses

A lens is a custom view of Connexions content. You can think of it as a fancy kind of list that will let you see Connexions through the eyes of organizations and people you trust.

What is in a lens?

Lens makers point to Connexions materials (modules and collections), creating a guide that includes their own comments and descriptive tags about the content.

Who can create a lens?

Any individual Connexions member, a community, or a respected organization.

What are tags? tag icon

Tags are descriptors added by lens makers to help label content, attaching a vocabulary that is meaningful in the context of the lens.

| External bookmarks