# Connexions

You are here: Home » Content » Intro to Digital Signal Processing » Design of Linear-Phase FIR Filters by DFT-Based Interpolation

### Lenses

What is a lens?

#### Definition of a lens

##### Lenses

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

##### What is in a lens?

Lens makers point to 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 member, a community, or a respected organization.

##### What are tags?

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

#### Affiliated with (What does "Affiliated with" mean?)

This content is either by members of the organizations listed or about topics related to the organizations listed. Click each link to see a list of all content affiliated with the organization.
• Rice Digital Scholarship

This collection is included in aLens by: Digital Scholarship at Rice University

Click the "Rice Digital Scholarship" link to see all content affiliated with them.

### Recently Viewed

This feature requires Javascript to be enabled.

Inside Collection (Course):

Course by: Robert Nowak. E-mail the author

# Design of Linear-Phase FIR Filters by DFT-Based Interpolation

Module by: Ivan Selesnick. E-mail the author

Summary: (Blank Abstract)

## DESIGN OF FIR FILTERS BY DFT-BASED INTERPOLATION

One approach to the design of FIR filters is to ask that Aω A ω pass through a specified set of values. If the number of specified interpolation points is the same as the number of filter parameters, then the filter is totally determined by the interpolation conditions, and the filter can be found by solving a system of linear equations. When the interpolation points are equally spaced between 0 and 2π 2 , then this interpolation problem can be solved very efficiently using the DFT.

To derive the DFT solution to the interpolation problem, recall the formula relating the samples of the frequency response to the DFT. In the case we are interested here, the number of samples is to be the same as the length of the filter ( L=N L N ).

H2πNk=n=0N1hnej2πNnk= DFT N hn H 2 N k n 0 N 1 h n 2 N n k DFT N h n
(1)

### Types I and II

Recall the relation between Aω A ω and H f ω H f ω for a Type I and II filter, to obtain

A2πNk=H2πNkejM2πNk= DFT N hn W N M k A 2 N k H 2 N k M 2 N k DFT N h n W N M k
(2)
Now we can related the NN-point DFT of hn h n to the samples of Aω A ω : DFT N hn=A2πNk W N M k DFT N h n A 2 N k W N M k Finally, we can solve for the filter coefficients hn h n .
hn= DFT N -1A2πNk W N M k h n DFT N A 2 N k W N M k
(3)
Therefore, if the values A2πNk A 2 N k are specified, we can then obtain the filter coefficients hn h n that satisfies the interpolation conditions by using the inverse DFT. It is important to note however, that the specified values A2πNk A 2 N k must possess the appropriate symmetry in order for the result of the inverse DFT to be a real Type I or II FIR filter.

### Types III and IV

For Type III and IV filters, we have

A2πNk=(j)H2πNkejM2πNk=(j) DFT N hn W N M k A 2 N k H 2 N k M 2 N k DFT N h n W N M k
(4)
Then we can related the NN-point DFT of hn h n to the samples of Aω A ω : DFT N hn=jA2πNk W N M k DFT N h n A 2 N k W N M k Solving for the filter coefficients hn h n gives:
hn= DFT N -1jA2πNk W N M k h n DFT N A 2 N k W N M k
(5)

## EXAMPLE: DFT-INTERPOLATION (TYPE I)

The following Matlab code fragment illustrates how to use this approach to design a length 11 Type I FIR filter for which A2πNk=11100000011T  ,   (0kN1) and (N=11)    k 0 k N 1 N 11 A 2 N k 1 1 1 0 0 0 0 0 0 1 1 .



>> N = 11;
>> M = (N-1)/2;
>> Ak = [1 1 1 0 0 0 0 0 0 1 1};   % samples of A(w)
>> k = 0:N-1;
>> W = exp(j*2*pi/N);
>> h = ifft(Ak.*W.^(-M*k));
>> h'

ans =

0.0694 - 0.0000i
-0.0540 - 0.0000i
-0.1094 + 0.0000i
0.0474 + 0.0000i
0.3194 + 0.0000i
0.4545 + 0.0000i
0.3194 + 0.0000i
0.0474 + 0.0000i
-0.1094 + 0.0000i
-0.0540 - 0.0000i
0.0694 - 0.0000i



Observe that the filter coefficients h are real and symmetric; that a Type I filter is obtained as desired. The plot of Aω A ω for this filter illustrates the interpolation points.



L = 512;
H = fft([h zeros(1,L-N)]);
W = exp(j*2*pi/L);
k = 0:L-1;
A = H .* W.^(M*k);
A = real(A);
w = k*2*pi/L;
plot(w/pi,A,2*[0:N-1]/N,Ak,'o')
xlabel('\omega/\pi')
title('A(\omega)')



An exercise for the student: develop this DFT-based interpolation approach for Type II, III, and IV FIR filters. Modify the Matlab code above for each case.

## SUMMARY: IMPULSE AND AMP RESPONSE

For an NN-point linear-phase FIR filter hn h n , we summarize:

1. The formulas for evaluating the amplitude response Aω A ω at LL equally spaced points from 0 to 2π 2 ( LN L N ).
2. The formulas for the DFT-based interpolation design of hn h n .
TYPE I and II:
A2πLk= DFT L hn 0 L - N W L M k A 2 L k DFT L h n 0 L - N W L M k
(6)
hn= DFT N -1A2πNk W N M k h n DFT N A 2 N k W N M k
(7)
TYPE III and IV:
A2πLk=(j) DFT L hn 0 L - N W L M k A 2 L k DFT L h n 0 L - N W L M k
(8)
hn= DFT N -1jA2πNk W N M k h n DFT N A 2 N k W N M k
(9)

## Content actions

PDF | EPUB (?)

### What is an EPUB file?

EPUB is an electronic book format that can be read on a variety of mobile devices.

PDF | EPUB (?)

### What is an EPUB file?

EPUB is an electronic book format that can be read on a variety of mobile devices.

#### Collection to:

My Favorites (?)

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

| A lens I own (?)

#### Definition of a lens

##### Lenses

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

##### What is in a lens?

Lens makers point to 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 member, a community, or a respected organization.

##### What are tags?

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

#### Module to:

My Favorites (?)

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

| A lens I own (?)

#### Definition of a lens

##### Lenses

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

##### What is in a lens?

Lens makers point to 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 member, a community, or a respected organization.

##### What are tags?

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