Continue to Site

Welcome to EDAboard.com

Welcome to our site! EDAboard.com is an international Electronics Discussion Forum focused on EDA software, circuits, schematics, books, theory, papers, asic, pld, 8051, DSP, Network, RF, Analog Design, PCB, Service Manuals... and a whole lot more! To participate you need to register. Registration is free. Click here to register now.

FIR Filter limitations (or not) ?

Status
Not open for further replies.

rover8898

Newbie level 6
Joined
Nov 25, 2005
Messages
11
Helped
0
Reputation
0
Reaction score
0
Trophy points
1,281
Activity points
1,468
Hello,

I am quite new to the field of digital FIR filters (I always worked with the old-fashionned analog ones, but I digress).
There is an important aspect to FIR filters that eludes me:
A low pass digital FIR filter filters out all frequencies in the stopband (to the set attenuation). This is quite obvious. Now what remains unclear to me is that if the digital filter can only recover sucessfully frequencies up to Fs/2 (Fs=sampling frequency), in order to either filter them if they lie in the stopband or let them pass if they lie in the passband, does it (the digital FIR filter) also filter out frequencies above Fs/2 (since they lie in the stopband)? Or, are the frequency components of above Fs/2 of the input signal not filtered, but rather emulate something akin to "noise". Basically, if a digital FIR lowpass filter can only filter out frequencies up to Fs/2, it would imply that an a simple [20dB/dec lowpass analog filter] would be able to filter frequencies that a [-100dB FIR lowpass filter with Fs/Fc=1.1] would not be able to. This seems quite odd as all litterature indicates that digital FIR filters far out-perform analog filters. Also, if digital filters (lp, hp, bp, bs) have a severe limitation to their upper-frequency-of-proper-operation, it would mean that all digital filters require an analog lowpass filter at their input that can be tunned on the fly w.r.t Fs, as to remove the frequency components above Fs/2 prior to the digital filtering. This seems highly unlikely.
What am I not undestanding properly?

Thanks in advance,
-Roger


P.S I also posted this question in the "elementary electronics questions" forum.
I apologize for any incovenience this may have caused. (Unbeknownst to me at the time was the existence of a better suited forum for my question)
 

Dear Rover,

I'll try to explain your doubts:

First the frequency responce of the FIR filter is periodic with period FS this is a result of the sampling process /periodic property of the DTFT or DFT. It means that the frequency response is simetrical in FS/2, so the frequency responce is considered up to FS/2 . FS/2 is called Niquisty frequency. Here comes you doubt: what happens to frequencies above FS/2 ?

The answer is based on if there were frequencies higher than FS/2 aliasing would occur. So the signal to be filtered must have no frequencies above FS/2 , It is band limited usualy by an antialiasing filter prior to the digital processing, the FS (sampling frequency) is part of the design, you must choose Fs suitable for the specification at hand .


The second doubt is about the antialiasing filter. Actually in theory it can be an analog filter, but what happens in practice is called multirating, the DSP have limitation in speed what require a careful choosing of the sampling frequency. In contrast the higher the sampling frequency more relaxed is the constrains in filter specifications, so in practice you sample a signal with a high sampling frequency to minimize aliasing, pass to a digital antialiasing filter, downsample the signal ( decimation) process the signal in DSP, upsample the signal ( interpolation) and pass it to a antimage filter. In order to understand this issue you need to study multirate signal processing theory.

I hope have helped.
 

Hello,

>The second doubt is about the antialiasing filter. Actually in theory it can be an
>analog filter, but what happens in practice is called multirating, the DSP have
>limitation in speed what require a careful choosing of the sampling frequency. In
>contrast the higher the sampling frequency more relaxed is the constrains in
>filter specifications, so in practice you sample a signal with a high sampling
>frequency to minimize aliasing, pass to a digital antialiasing filter, downsample
>the signal ( decimation) process the signal in DSP, upsample the signal (
>interpolation) and pass it to a antimage filter. In order to understand this issue
>you need to study multirate signal processing theory.


I looked up on the concept of multirate signal processing. Pretty clever for when one needs to interface several systems that operate at different Fs (Fs: sampling frequency) or when the relevant signal information is contained at very low frequencies w.r.t Fs; DSPing of the signal will require less calculations at a lower Fs.
However, despite there being a low-pass decimation (digital FIR) filter which doubles as an anti-aliasing filter (or perphaps that is its sole purpose; hmmm, will have to look into that) in multirate systems, this low-pass decimation (digital FIR) filter does not ABSOLUTELY 100% assure that there will be no aliasing present. I am obviously imagining a worst-case scenario were there are unforseen unwanted signals (perphaps higher order harmonics) that might have coupled themselves onto the desired analog input signal. If these parasitics are located beyond the Fs/2 (over)sampling frequency/2 that is used to retrieve the data samples prior to passing them through the low-pass decimation (digital FIR) filter and subsequently downsampling them, then there will aliasing.
However, an analog lowpass filter with a very high cuttoff frequency (ideally Fsmax/2 of the DSP/hardware), placed before the A/D conversion should do the trick. Thus, I am thinking that perphaps a broad analog filter is also used in tandem with the multirate signal processing scheme. It is the only certain method to prevent aliasing in my opinion. Is this accurate? If not, how is it possible that the multirate signal processing scheme can garantee that the bandwidth of the input signal does not exceed Fs/2 (as high as that may be)?

-Roger
 

It is common practice to put an analog bandpass or lowpass filter in front of the A/D converter to prevent unwanted aliasing.

After the signal is digitized, your DSP can do whatever sample rate conversions you need, but be sure to preceed each sample rate converter with a suitable filter to avoid aliasing during the conversion.
 

rover8898,

For most filter implementations, you are correct in assuming that you must remove all frequencies above Fs/2. Multirate filters or "undersampling techniques can be used to move the passband to a higher (aliased) frequency band. This aleviates the performance requirements of the aniti-aliasing filter, allowing a gentler slope, and therefore lower order anti-aliasing filter. However, you still need the anti-aliasing filter.
~
There is a technique for designing a filter that does not suffer from aliasing:
First, you design an analog prototype filter.
~
Then you transform the s domain poles into the z domain using the bilinear z transformation.
~
The transformed filter suffers from frequency distortion, since the entire frequency spectrum -infinity to + infinity is transformed into onto the unit circle of the z plane.
~
To counter this, the critical frequencies of the analog prototype are "pre-warped", so that when they are warped by the bilinear z transformation, they end up where you want them.
~
The resultant digital filter will have frequency response that is superior to the analog prototype filter, and does not suffer from aliasing.
~
Disadvantages are:
The frequency "warping" described above.
Time domain response of the analog prototype are not preserved.
Phase characteristics of the analog prototype are not preserved.
~
Google on "bilinear z transform", or go to any book on DSP for more information.
Regards,
Kral
 

I will try to explain in another way..

First u have the analog signal..

This is sampled and converted into a digital signal..( usually after passing through an antialiasing filter )

now at this point, the frequency content of the samples depends on the sampling frequency..

this means, if the sampling frequency is Fs, there is no frequency component higher than Fs/2.. even if the original analog signal had a greater bandwidth..

the higher greq components will be aliased in the below Fs/2 range..

so there actually is no frequency component higher than fs/2 in the sampled signal..

so no matter when u pass it through a FIR LP filter or HP etc.. its only the response from 0 to Fs/2 that matters...

- Rajan
 

Hello Rajan,

Few questions for you.

>so no matter when u pass it through a FIR LP filter or HP etc.. its only the response from 0 to >Fs/2 that matters...

Is it because both the response of the digital filter and the digital’s signal frequency spectrum are periodical about a period of Fs; so there is no *new information* to be had beyond [–Fs/2 to +Fs/2]?

Or is it because from a practical point of view, one cannot distinguish between [f1=Fs/2-dF] and [f2=Fs/2+dF], after the analog signal has been digitized ?


>the higher greq components will be aliased in the below Fs/2 range..
>so there actually is no frequency component higher than fs/2 in the sampled signal..

Actually, doesn’t a digital/sampled signal have an infinite spectrum (as stated above)?
Forgive me if I seem hard-headed, but I guess the problems I am having is with nomenclature rather than notions (but I may be completly off base :) ). I get the impression that when people say that there is “no frequency component higher than fs/2 in the sampled signal”, what they mean is “there is no *different* frequency component higher than fs/2 in the sampled signal”. Otherwise, we would have the original analog signal post digitization.
Reminder: An analog signal’s spectrum, when digitized, repeats at Fs intervals.

-Thanks
Roger
 

rover8898 said:
Hello,


filter does not ABSOLUTELY 100% assure that there will be no aliasing present. I am obviously imagining a worst-case scenario were there are unforseen unwanted signals (perphaps higher order harmonics) that might have coupled themselves onto the desired analog input signal. If these parasitics are located beyond the Fs/2 (over)sampling frequency/2 that is used to retrieve the data samples prior to passing them through the low-pass decimation (digital FIR) filter and subsequently downsampling them, then there will aliasing.
However, an analog lowpass filter with a very high cuttoff frequency (ideally Fsmax/2 of the DSP/hardware), placed before the A/D conversion should do the trick. Thus, I am thinking that perphaps a broad analog filter is also used in tandem with the multirate signal processing scheme. It is the only certain method to prevent aliasing in my opinion. Is this accurate? If not, how is it possible that the multirate signal processing scheme can garantee that the bandwidth of the input signal does not exceed Fs/2 (as high as that may be)?

-Roger

I am quite new on digital filters and DSP, I also have some doubts concerned with the subject, so I think this discussion has been very good, and I hope I can learn more from this.

In engineering we have to consider among other, some aspect: the problem at hand, specifications, the desired result, the availables tools, and the most important COST. When we discuss theory, we are leaded to forgeting some aspects, mostly the last one . What it has to do with the discussion:

First, In spite of the fact that we love math, in practical life we canot be sure 100% of nothing, because we dont live in a deterministic world, so what do we do ? we put in our project redudance, safety coeficients, safety margins and other stuff , in order to get confidence in the results, so as much as we are close to 100%, as much as the cost of the project increase.

When we are working with low frequency is pretty hard to build analog filters with a reasonable transition band. One of the greatest advantages of digital filters is dealing in low frequency and getting acurate transitions bands, this feature has a great contribution in biomedical advances, so for instance, how we should have a analog filter to prevent aliasing in low frequencies? How this filter would gonna work ? The DSP has the advantages of changing parameters with a simple changing in their algorithms, so why we should incorporate an analog filter in the input of DSP hardware before the A/D converter ? It wouldn't introduce constrains in the design ? Imagine that we are working in low frequency, with available A/D speeds , what should be the value of the sampling frequency ? How many times it should be possible with no lost in processing performance, considering the higher known and desired signal frequency ? With a very high sampling frequency what should be the probability of parasitics frequencies to cause aliasing ? woul be cost and size advantage to put an analog filter to play the antialiasing role in this context ?

Obviously that this considerations has other answers when working with high frequencies context, considering microstrip technologies and specific applications as for instance cell phones handsets, the use of an antialiasing filter before the DSPing is more cost efective if we use an microstrip analog filter ? What shoud be speed of processing if we try to use multirate processing ? It would be cost efective?

So, I think the magic of studying the theory is try to fit it on given applications. Sometimes we are lead to find an unique answer to a question, when the answer is just: It depends on the application. That was what I did in my first answer, I thoght in low frequencies, and probably that was what other pall did when we wrote that it is common practice to put an analog filter before the A/D converter, Probably he thought in high frequencies. Anyway, I can be wrong in this point of view, and if so I would appreciated if someone point me the way. But In my oppinion you should focus on applications and get the conclusion to each of these.
 

Hello

>So, I think the magic of studying the theory is try to fit it on given applications.
>Sometimes we are lead to find an unique answer to a question, when the answer
>is just: It depends on the application

You are quite rigth when you say it depends on the applications. Often, when we answer to questions, we subconsciously unintentionally imagine scenarios (high or low frequency ones) that the other readers do not see. In those scenarios, our answers are probably rigth and also probably apply.

So to make it application-specific, my situation would be as forth:
-Low frequencies
-My analog input signal's relevant's bandwidth would be from ~dc to ~100Hz (it is main strength lies in (~dc to 80Hz)
-My sampling frequency: as low as I can possibly make it; I was thinking 250Hz to 400Hz; need to reduce the amount of calculations of the uC
-I have the 60Hz (and its odd harmonics) power supply inteference on my signal, which should be filtered out

Would I need a low-pass analog filter pre-digitization ?

Thx
-Roger
 

Considering the range of frequency mentioned ~dc to ~100Hz and sampling frequency of 250Hz to 400Hz and since you have as interfence, harmonics of 60 Hz from power supply. Definetly,You will need an analog low pass filter.

In order to specify the filters constrain such as attenuation in the stop band wich include the first harmonic , you should consider the minimum voltage considered by A/D converter input.

In order to deal with 60 Hz interference, since it is within the band of interest, you must implement an adaptive filter acting as a noise canceler to filter the unwanted signal ( 60 hz interference) before the signal processing, the drawback is that it is gonna increase processing load, what aparently is not desired.
 

Status
Not open for further replies.

Similar threads

Part and Inventory Search

Welcome to EDABoard.com

Sponsor

Back
Top