Re: Getting started




Gert Baars wrote:
> Hello,
>
> In order to start with DSP I want to learn how to design FIR filters.
> I have read that the procedure includes an inverse Fourier
> transformation from H(w) to h(n) of a filter. (I seem to remember the
> h(n) coefficients could be found by summing of terms but forgot the
> details) Can I find documents about such methods without having to buy
> expensive books.

You might, althouh I don't know of any such documents on the web.

If you are serious about learning DSP, check out

Lyons: "Understanding Digital Signal Processing"
Prentice-Hall, 2004.

> I already have made a moving-average FIR filter which works fine so also
> my platform works fine. Now I would like to know the methods of how to
> transform an H(w) (frequency domain) response of LPF,BPF and LPF to the
> coefficients (h0,h1....hn).
>
> Please let me know if you know how to obtain this information.

Hmmmm... I don't remember if Rick Lyons did include the window
method for FIR filter design in his book; if not, I can only
point to some higher-level textbook, so I don't.

You don't mention what method you use to design your filters.
I assume you have not implemented your own Remez exchange routine,
so here goes the method of windows that needs no IFFT:

The filter specification for a Low-Pass (LP) filter consists of
a number of parmeters:

- The pass-band cut-off frequenct fp
- The stop-band cut-off frequency fs
- The allowed ripple in the pass band
- The allowed gain in the stop-band

Note that for the window method, you have little control of
the latter two parameters. It is basically a matter of trial
and error to see which filters meet the spec.

Now, the transition band is the frequency interval <fp,fs>
where the frequency response is undefined. The rule of thumb
is that you need to be able to "squeeze" the main lobe of the
window function into this bandwidth. Since the width of the
main lobe is a function of the length of the window, you
compute the number of coefficents from the width of the transition
band. The actual formula for doing this, is empirical and varies
from window to window. Again, I have only seen these formulas
in the higher-level textbooks.

Now that you have decided on a filter length, you define the
"ideal filter" as

H(f) = 1 0 <= f < (fp+fs)/2
0 (fp+fs) < f <= 1/2

where the frequency f is normalized with respect to the sampling
frequency. This frequency-domain transfer function has a time-
domain impulse response that can be computed analytically, hence
you do not need to compute the IFFT.

Once you know the analytical expression for the time-domain
impulse response (it is of the type sin(2pi f)/(2pi f))
you just compute as many coefficients you need (as you found
from the transition band) and multiply each coefficient by the
corresponding window coefficient.

And voila, there's your filter.

Next, how to find HP and BP FIR filters from an LP prototype.

The easiest way to find a HP filter, is to design an LP
prototype of the same bandwidth, and do a frequency shift so
it is centered around f=1/2 instead of f=0. This is basically
a matter of switching the sign of every other coefficient,
but where you need to pay attention to preserving certain
symmetries.

You could do something similar for BP filters, where you
design the LP prototype with half the bandwidth of your
BP filter, and shifts the filter to be centered around some
center frequency fc by means of a mixer.

A somewhat more general approach is to first design a "wideband
LP" prototype, that covers the band [0, fpu], and then subtract
the band [0,fpl], where fpu and fpl are the upper and lower
cut-off frequencies for the pass band.

Rune

.



Relevant Pages

  • Re: I recommend this analysis of Dembskis "No Free Lunch"
    ... Dembski has written a number of books defending Intelligent Design. ... The best-known of his arguments is the "Explanatory Filter", which is, ...
    (talk.origins)
  • RE: Record Form
    ... NOT have the 'data entry' property set to yes, then it should display all the ... records displayed) is a filter. ... Look down at the navigation buttons and see how many ... form in design mode and, on the data tab of the properties window, check the ...
    (microsoft.public.access.gettingstarted)
  • Re: [OT] but funny - windows explorer cant search in html files
    ... If a user asks you why Windows search doesn't get hits on files they ... suggested that you should send them to the Windows design documentation. ... I didn't install anything called a filter. ... you installed something called a "Google Desktop Search Plugin". ...
    (comp.lang.java.advocacy)
  • RE: Record Form
    ... "Rhianne" wrote: ... records displayed) is a filter. ... Look down at the navigation buttons and see how many ... form in design mode and, on the data tab of the properties window, check the ...
    (microsoft.public.access.gettingstarted)
  • RE: Record Form
    ... "Rhianne" wrote: ... records displayed) is a filter. ... Look down at the navigation buttons and see how many ... form in design mode and, on the data tab of the properties window, check the ...
    (microsoft.public.access.gettingstarted)