Skip to content Skip to navigation

Connexions

You are here: Home » Content » Frequency Sampling Design Method for FIR filters

Navigation

Recently Viewed

This feature requires Javascript to be enabled.

Frequency Sampling Design Method for FIR filters

Module by: Douglas L. Jones. 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)

Note: Your browser may not currently support MathML. See our browser support page for additional details. You can always view the correct math in the PDF version.

Given a desired frequency response, the frequency sampling design method designs a filter with a frequency response exactly equal to the desired response at a particular set of frequencies ω k ω k .

Procedure

k,k=o1N1: H d ω k =n=0M1hn- ω k n k k o 1 N 1 H d ω k n M 1 0 h n ω k n (1)

Note:

Desired Response must incluce linear phase shift (if linear phase is desired)

Exercise 1

What is H d ω H d ω for an ideal lowpass filter, cotoff at ω c ω c ?

Solution

-ωM12if- ω c ω ω c 0if-πω<- ω c ω c <ωπ ω M 1 2 ω c ω ω c 0 ω ω c ω c ω

Note:

This set of linear equations can be written in matrix form
H d ω k =n=0M1hn- ω k n H d ω k n M 1 0 h n ω k n (2)
H d ω 0 H d ω 1 H d ω N - 1 =- ω 0 0- ω 0 1- ω 0 M1- ω 1 0- ω 1 1- ω 1 M1- ω M - 1 0- ω M - 1 1- ω M - 1 M1h0h1hM1 H d ω 0 H d ω 1 H d ω N - 1 ω 0 0 ω 0 1 ω 0 M 1 ω 1 0 ω 1 1 ω 1 M 1 ω M - 1 0 ω M - 1 1 ω M - 1 M 1 h 0 h 1 h M 1 (3)

or Hd=Wh H d W h So

h=W-1Hd h W H d (4)

Note:

W W is a square matrix for N=M N M , and invertible as long as ω i ω j +2πl ω i ω j 2 l , ij i j

Important Special Case

What if the frequencies are equally spaced between 00 and 2π 2 , i.e. ω k =2πkM+α ω k 2 k M α

Then H d ω k =n=0M1hn-2πknM-αn=n=0M1hn-αn-2πknM= DFT! H d ω k n M 1 0 h n 2 k n M α n n M 1 0 h n α n 2 k n M DFT! so hn-αn=1Mk=0M1 H d ω k +2πnkM h n α n 1 M k M 1 0 H d ω k 2 n k M or hn=αnMk=0M1 H d ω k 2πnkM=αnIDFT H d ω k h n α n M k M 1 0 H d ω k 2 n k M α n IDFT H d ω k

Important Special Case #2

hn h n symmetric, linear phase, and has real coefficients. Since hn=hMn h n h M n 1 , there are only M2 M 2 degrees of freedom, and only M2 M 2 linear equations are required.

H ω k =n=0M1hn- ω k n=n=0M21hn- ω k n+- ω k Mn1if M even n=0M32+hn- ω k n+- ω k Mn1hM12- ω k M12if M odd =- ω k M122n=0M21hncos ω k M12nif M even - ω k M122n=0M32hncos ω k M12n+hM12if M odd H ω k n M 1 0 h n ω k n n M 2 1 0 h n ω k n ω k M n 1 M even n M 3 2 0 h n ω k n ω k M n 1 h M 1 2 ω k M 1 2 M odd ω k M 1 2 2 n M 2 1 0 h n ω k M 1 2 n M even ω k M 1 2 2 n M 3 2 0 h n ω k M 1 2 n h M 1 2 M odd (5)

Removing linear phase from both sides yields A ω k =2n=0M21hncos ω k M12nif M even 2n=0M32hncos ω k M12n+hM12if M odd A ω k 2 n M 2 1 0 h n ω k M 1 2 n M even 2 n M 3 2 0 h n ω k M 1 2 n h M 1 2 M odd Due to symmetry of response for real coefficients, only M2 M 2 ω k ω k on ω0π ω 0 need be specified, with the frequencies - ω k ω k thereby being implicitly defined also. Thus we have M2 M 2 real-valued simultaneous linear equations to solve for hn h n .

Special Case 2a

hn h n symmetric, odd length, linear phase, real coefficients, and ω k ω k equally spaced: k,0kM1: ω k =nπkM k 0 k M 1 ω k n k M

hn=IDFT H d ω k =1Mk=0M1A ω k -2πkMM122πnkM=1Mk=0M1Ak2πkMnM12 h n IDFT H d ω k 1 M k M 1 0 A ω k 2 k M M 1 2 2 n k M 1 M k M 1 0 A k 2 k M n M 1 2 (6)

To yield real coefficients, Aω A ω mus be symmetric Aω=A-ωAk=AMk A ω A ω A k A M k

hn=1MA0+k=1M12Ak2πkMnM12+-2πknM12=1MA0+2k=1M12Akcos2πkMnM12=1MA0+2k=1M12Ak-1kcos2πkMn+12 h n 1 M A 0 k M 1 2 1 A k 2 k M n M 1 2 2 k n M 1 2 1 M A 0 2 k M 1 2 1 A k 2 k M n M 1 2 1 M A 0 2 k M 1 2 1 A k 1 k 2 k M n 1 2 (7)

Simlar equations exist for even lengths, anti-symmetric, and α=12 α 1 2 filter forms.

Comments on frequency-sampled design

This method is simple conceptually and very efficient for equally spaced samples, since hn h n can be computed using the IDFT.

Hω H ω for a frequency sampled design goes exactly through the sample points, but it may be very far off from the desired response for ω ω k ω ω k . This is the main problem with frequency sampled design.

Possible solution to this problem: specify more frequency samples than degrees of freedom, and minimize the total error in the frequency response at all of these samples.

Extended frequency sample design

For the samples H ω k H ω k where 0kM1 0 k M 1 and N>M N M , find hn h n , where 0nM1 0 n M 1 minimizing H d ω k H ω k H d ω k H ω k

For l l norm, this becomes a linear programming problem (standard packages availble!)

Here we will consider the l2 2 l norm.

To minimize the l2 2 l norm; that is, n=0N1| H d ω k H ω k | n N 1 0 H d ω k H ω k , we have an overdetermined set of linear equations: - ω 0 0- ω 0 M1- ω N - 1 0- ω N - 1 M1h= H d ω 0 H d ω 1 H d ω N - 1 ω 0 0 ω 0 M 1 ω N - 1 0 ω N - 1 M 1 h H d ω 0 H d ω 1 H d ω N - 1 or Wh=Hd W h H d

The minimum error norm solution is well known to be h=W¯W-1W¯Hd h W W W H d ; W¯W-1W¯ W W W is well known as the pseudo-inverse matrix.

Note:

Extended frequency sampled design discourages radical behavior of the frequency response between samples for sufficiently closely spaced samples. However, the actual frequency response may no longer pass exactly through any of the H d ω k H d ω k .

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