🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

7 total messages Started by J.Cassidy - Optometry Thu, 15 Nov 1990 12:15
Digital Filters
#1113
Author: J.Cassidy - Optometry
Date: Thu, 15 Nov 1990 12:15
29 lines
1503 bytes
I have a really interesting application for digital filtering
using a DSP chip, but I am having some difficulty understanding
the derrivations for a filter's tap coefficients.

I understand that the expression of a FIR filter is:

b0*a[n] + b1*a[n-1] + b2*a[n-2] + etc...

where b[0] to b[n] are the tap coefficients and assume they
are what determine the performance of the filter.  But how
to I generate b[n], given that I have the filter parameters
such as filter type (butterworth/bandpass), lowpass cutoff
frequency, highpass cutoff frequency, etc.

I have been searching for this algorithm/program for a while
now.  Most application notes that I see show the filter 
algorithm and the values of b[n], but never show how they
derrived the values of b[n], given the filter's parameters.

Any help would be greatly appreciated!

Jim C.

=========================================================================
Jim Cassidy                           optadm7@watserv1.waterloo.{edu,cdn}
University of Waterloo                optadm7@watserv1.uwaterloo.ca
200 University Ave.                   VE3RTS
Waterloo, Ontario, Canada N2L 3G1     (519) 885-1211 ext. 6240
Re: Digital Filters
#1114
Author: Vance Maverick
Date: Thu, 15 Nov 1990 19:25
25 lines
1578 bytes
> 
> [in effect] How do I design an FIR filter?
> 

This is an incredibly general question, the answers to which fill books.
 So the first answer is, look at Jackson, or Oppenheim and Schafer, or
one of the other standard textbooks.  Meanwhile, though, there's a
fairly intuitive technique (if you believe in the Fourier transform)
which allows you to design an FIR filter from a spectral specification.

(1) Pick a filter length M.  There are several considerations:
	-- longer filter -> better frequency resolution
	-- longer filter -> longer compute time, higher group delay.

(2) Fill in the magnitude frequency response you want.  This needs to be
even (i.e. H(k) = H(M-k)) if you want real filter coefficients.

(3) Take the inverse DFT of this frequency response.  (For small enough
M, the FFT isn't a big saving; just do the dumb DFT, using a real
instead of a complex sinusoid, since you know the result will be real
anyway.) Voila', the coefficients.

(4) If you want to be slick, rotate the array to put small coefficients
at the end.
Re: Digital Filters
#1115
Author: Joe Buck
Date: Thu, 15 Nov 1990 20:33
28 lines
1755 bytes
In article <1990Nov15.121559.11290@watserv1.waterloo.edu>, optadm7@watserv1.waterloo.edu (J.Cassidy - Optometry) writes:
> I have a really interesting application for digital filtering
> using a DSP chip, but I am having some difficulty understanding
> the derrivations for a filter's tap coefficients.

> I understand that the expression of a FIR filter is:

> b0*a[n] + b1*a[n-1] + b2*a[n-2] + etc...

> where b[0] to b[n] are the tap coefficients and assume they
> are what determine the performance of the filter.  But how
> to I generate b[n], given that I have the filter parameters
> such as filter type (butterworth/bandpass), lowpass cutoff
> frequency, highpass cutoff frequency, etc.

A Butterworth filter is an IIR filter, so you can't represent it
using an IIR filter.  There are several design techniques for FIR
filters given a specification of cutoff frequencies and other
parameters; the best (in most cases) is the Parks-McClellan
algorithm for designing optimal FIR filters.

Find the book "Programs for digital signal processing" (I think
that's the title) published by IEEE Press (I think you can also
get a tape) for many DSP programs written in spaghetti Fortran.

--
Joe Buck
jbuck@galileo.berkeley.edu	 {uunet,ucbvax}!galileo.berkeley.edu!jbuck	
Re: Digital Filters
#1121
Author: Jim Belesiu
Date: Thu, 15 Nov 1990 22:28
13 lines
1086 bytes
Check out "Programs for Digital Signal Processing" by the IEEE press at your
university library.  It contains some of the classical methods (and FORTRAN 
source code) for designing FIR filters.

Another source for designing FIR filters is the classic "Digital Signal
Processing" by Oppenheim and Schafer.

A more current source is "Digital Filter Design" by Parks and Burrus.  The 
appendix contains FORTRAN source code for a couple of FIR filter designs.

But the easiest method to generate FIR filters is to use a commercial package.
MATLAB with the signal processing toolbook is a good one that comes to mind
(but certainly not the only one!).  
Re: Digital Filters
#1122
Author: Dave Mc Mahan
Date: Fri, 16 Nov 1990 05:42
49 lines
2828 bytes
 In a previous article, optadm7@watserv1.waterloo.edu (J.Cassidy - Optometry) writes:
>I have a really interesting application for digital filtering
>using a DSP chip, but I am having some difficulty understanding
>the derrivations for a filter's tap coefficients.
>
>I understand that the expression of a FIR filter is:
>
>b0*a[n] + b1*a[n-1] + b2*a[n-2] + etc...
>
>where b[0] to b[n] are the tap coefficients and assume they
>are what determine the performance of the filter.  But how
>to I generate b[n], given that I have the filter parameters
>such as filter type (butterworth/bandpass), lowpass cutoff
>frequency, highpass cutoff frequency, etc.
>
>I have been searching for this algorithm/program for a while
>now.  Most application notes that I see show the filter 
>algorithm and the values of b[n], but never show how they
>derrived the values of b[n], given the filter's parameters.

You can simulate a butterworth filter design with an FIR filter, but it
is really an IIR filter type and is best suited for that type of filter.

To get the desired filter shape, I use MatLab.  I wrote a simple function
that does a inverse-DFT because MatLab didn't have one and the inverse-FFT
it comes with produces complex components that I would have to process anyway.
I then decide about how many taps I think it should take to do the filter I
want and make an amplitude response for that filter.  Since all the filters
I design need to have constant group delay (linear phase response) I don't
need to worry about taking the phase into account.  The IDFT routine I wrote
just assumes that I want linear phase.  I then make a vector with the desired
amplitude of the frequency spectrum I want, usually using a value of 1 for
passband frequencies and 0 for stop band frequencies.  I then use the IDFT
function to convert the frequency domain response to the time domain impulse
response that are the filter tap weights.  Do to the way the IDFT function
works, I have to swap the left half and right halves of the resulting time
domain response to obtain the tap weights in proper order.  It's not the
totally optimal design package and method, but it works for me!


>Jim C.
>Jim Cassidy                           optadm7@watserv1.waterloo.{edu,cdn}

   -dave

-- 
Dave McMahan                            mcmahan@netcom.uucp
					{apple,amdahl,claris}!netcom!mcmahan
Re: Digital Filters
#1125
Author: Bryan Hoog
Date: Sat, 17 Nov 1990 03:15
14 lines
1000 bytes
>
>(3) Take the inverse DFT of this frequency response.  (For small enough
>M, the FFT isn't a big saving; just do the dumb DFT, using a real
>instead of a complex sinusoid, since you know the result will be real
>anyway.) Voila', the coefficients.
>

   In a college DSP class (YEARS ago!), we used this method, and, then
 (I think; this is where my memory gets hazy) we weighted the resulting
 coefficients with a Hamming window.  I remember the teacher saying
 something like "A Hamming window usually works best", but couldn't explain
 what was so "magic" about the Hamming window for FIR filter design.

   -Bryan
Kaiser Window Design (was Digital Filters)
#1126
Author: steele Richard A. Steele
Date: Sat, 17 Nov 1990 21:01
31 lines
2094 bytes
In article <9360014@hplsla.HP.COM> bryanh@hplsla.HP.COM (Bryan Hoog) writes:
>
>   In a college DSP class (YEARS ago!), we used this method, and, then
> (I think; this is where my memory gets hazy) we weighted the resulting
> coefficients with a Hamming window.  I remember the teacher saying
> something like "A Hamming window usually works best", but couldn't explain
> what was so "magic" about the Hamming window for FIR filter design.
>
>   -Bryan

I've done something similar, except with a Kaiser window instead
of the Hamming; the effect is similar, as both methods are
quite easy to do.

See, for example, Oppenheim and Schafer "Discrete Time Signal
Processing" pages 444-462.

I believe the Parks-McClellan algorithm is more optimal, but it
is more difficult to implement (I think; my memory is fuzzing).

-------------------------------------------------------------------------------
Richard Steele          |  INTERNET : steele@ecn.purdue.edu
Electrical Engineering  |  BITNET   : steele%ecn.purdue.edu@purccvm
Purdue University       |  UUCP     : {purdue, pur-ee}!ecn.purdue.edu!steele
-------------------------------------------------------------------------------

-- 
-------------------------------------------------------------------------------
Richard Steele          |  INTERNET : steele@ecn.purdue.edu
Electrical Engineering  |  BITNET   : steele%ecn.purdue.edu@purccvm
Purdue University       |  UUCP     : {purdue, pur-ee}!ecn.purdue.edu!steele
Thread Navigation

This is a paginated view of messages in the thread with full content displayed inline.

Messages are displayed in chronological order, with the original post highlighted in green.

Use pagination controls to navigate through all messages in large threads.

Back to All Threads