| Author |
Message |
Guest
|
Posted:
Fri Dec 02, 2005 1:17 am Post subject:
Filter design. |
|
|
I have to design a simple low pass filter (for audio) to reject
frequencies beyond 3.6kHz. The design of the filter is quite simple.
However, I want to know what affect the sampling frequency of the audio
will have on such a filter design.
In other words, I can sample at 16kHz, filter the data and downsample
to 8kHz (which is finally the sampling rate I want) OR I can sample at
8kHz and filter the data. (This will save me precious MIPS, which I am
in great need of). I want to know what I am losing (if anything at all)
if I sample at 8kHz instead of 16kHz. Bear in mind that this is audio
(voice) data I am talking about, so I am not interested in frequencies
above say 3.8kHz.
Regards,
Tanmay. |
|
| Back to top |
|
 |
Fred Marshall
Guest
|
Posted:
Fri Dec 02, 2005 1:17 am Post subject:
Re: Filter design. |
|
|
<tanmay.zargar@gmail.com> wrote in message
news:1133479883.975943.33090@g47g2000cwa.googlegroups.com...
| Quote: | I have to design a simple low pass filter (for audio) to reject
frequencies beyond 3.6kHz. The design of the filter is quite simple.
However, I want to know what affect the sampling frequency of the audio
will have on such a filter design.
In other words, I can sample at 16kHz, filter the data and downsample
to 8kHz (which is finally the sampling rate I want) OR I can sample at
8kHz and filter the data. (This will save me precious MIPS, which I am
in great need of). I want to know what I am losing (if anything at all)
if I sample at 8kHz instead of 16kHz. Bear in mind that this is audio
(voice) data I am talking about, so I am not interested in frequencies
above say 3.8kHz.
|
Since you have to sample then it's necessary for the data to have bandwidth
effectively limited to below fs/2 - perhaps 0.4 fs before sampling.
Sampling at 16kHz may be one way without prefiltering the input - if the
bandwidth is effectively limited to less than 7kHz or so. Why do I doubt
that??
Sampling at 8kHz would require that the bandwidth is effectively limited and
certainly to less than 4kHz already. So, if the data is bandlimited in that
range to begin with, then you may not need a digital filter at all....
Fred |
|
| Back to top |
|
 |
Joerg
Guest
|
Posted:
Fri Dec 02, 2005 1:17 am Post subject:
Re: Filter design. |
|
|
Hello Fred,
| Quote: | Sampling at 8kHz would require that the bandwidth is effectively limited and
certainly to less than 4kHz already. So, if the data is bandlimited in that
range to begin with, then you may not need a digital filter at all....
|
However, one has to be careful about BW assumptions. Take the land-line
phone system for example. While it may be designed in a way that hardly
anything above 4kHz will make it across from one party to the other
there are local noises to be dealt with. Crackling due to poor contacts,
switching clicks and so on. Once these are being folded back into
baseband that can throw an algorithm in the digital domain off its
plinth. Then there is the hybrid. It will allow x amount of sidetone to
pass and will have limited filtering capabilities, meaning that the
spectrum originating from the local microphone may contain quite some
energy above 4kHz.
Regards, Joerg
http://www.analogconsultants.com |
|
| Back to top |
|
 |
Fred Marshall
Guest
|
Posted:
Fri Dec 02, 2005 7:26 am Post subject:
Re: Filter design. |
|
|
"Joerg" <notthisjoergsch@removethispacbell.net> wrote in message
news:j1Njf.21534$BZ5.14093@newssvr13.news.prodigy.com...
| Quote: | Hello Fred,
Sampling at 8kHz would require that the bandwidth is effectively limited
and certainly to less than 4kHz already. So, if the data is bandlimited
in that range to begin with, then you may not need a digital filter at
all....
However, one has to be careful about BW assumptions. Take the land-line
phone system for example. While it may be designed in a way that hardly
anything above 4kHz will make it across from one party to the other there
are local noises to be dealt with. Crackling due to poor contacts,
switching clicks and so on. Once these are being folded back into baseband
that can throw an algorithm in the digital domain off its plinth. Then
there is the hybrid. It will allow x amount of sidetone to pass and will
have limited filtering capabilities, meaning that the spectrum originating
from the local microphone may contain quite some energy above 4kHz.
|
Joerg,
Yes indeed! I didn't say anything about assuming the BW and perhaps should
have.
I also didn't comment on the OP's phrase "I am not interested in frequencies
above say 3.8kHz". Sometimes folks think the Nyquist criterion is about
"frequencies of interest" and not "frequencies present". Of course, it's
the latter - to your point.
What I did say was "effective bandwidth" and expected the reader to
understand this to mean: "the effective bandwidth that bandwidth such that
there is no appreciable energy outside". "Appreciable" means that you can
see it, measure it, sense it in the context of your application so that it
causes bad things to happen like aliasing - however you need to define or
measure it.
So, it may be that a real audio signal can be sampled at 10kHz without
prefiltering for some applications and that same signal may need
prefiltering to be sampled at 10kHz for some other applications. It depends
on how much out-of-band signal energy exists and how much its presence mucks
things up (or does not) with sampling.
Fred |
|
| Back to top |
|
 |
Joerg
Guest
|
Posted:
Fri Dec 02, 2005 7:57 am Post subject:
Re: Filter design. |
|
|
Hello Fred,
| Quote: | What I did say was "effective bandwidth" and expected the reader to
understand this to mean: "the effective bandwidth that bandwidth such that
there is no appreciable energy outside". "Appreciable" means that you can
see it, measure it, sense it in the context of your application so that it
causes bad things to happen like aliasing - however you need to define or
measure it.
|
With some sources you'd be ok. For example, when I analyze noise stuff
using a communications receiver I often also use a laptop to pluck apart
the spectrum. Since that receiver has crystal filters that drop down
from -6dB to -60dB over less than a 2:1 frequency ratio I usually forego
any pre-filtering. But even then the sound card needs to sample at more
than twice of Nyquist.
What always amazes me is folks who run things just a little bit above
Nyquist but then only spring for a leaky two-pole lowpass that has a
roll-off from here to the Klondike.
Regards, Joerg
http://www.analogconsultants.com |
|
| Back to top |
|
 |
Jon Harris
Guest
|
Posted:
Fri Dec 02, 2005 9:16 am Post subject:
Re: Filter design. |
|
|
"Fred Marshall" <fmarshallx@remove_the_x.acm.org> wrote in message
news:_MidnT_i4-sVPxLenZ2dnUVZ_tGdnZ2d@centurytel.net...
| Quote: |
So, it may be that a real audio signal can be sampled at 10kHz without
prefiltering for some applications and that same signal may need prefiltering
to be sampled at 10kHz for some other applications. It depends on how much
out-of-band signal energy exists and how much its presence mucks things up (or
does not) with sampling.
|
With a voice signal, it is mainly the consonants that have significant high
frequency energy. The aliasing that you get by not filtering that out typically
sounds like a little "grunginess" or "thickness" in the consonants. |
|
| Back to top |
|
 |
Vladimir Vassilevsky
Guest
|
Posted:
Sat Dec 03, 2005 7:52 am Post subject:
Re: Filter design. |
|
|
Jon Harris wrote:
| Quote: |
With a voice signal, it is mainly the consonants that have significant high
frequency energy. The aliasing that you get by not filtering that out typically
sounds like a little "grunginess" or "thickness" in the consonants.
|
Pretty much all of the voice energy is concentrated below 1kHz. The
unvoiced sounds may have some noise energy above 1kHz. However the good
assumption is that the average spectrum envelope of the voice falls at
12dB/oct above 1kHz. For the phone line quality, you can sample the
voice directly at 8kHz.
Vladimir Vassilevsky
DSP and Mixed Signal Design Consultant
http://www.abvolt.com |
|
| Back to top |
|
 |
|
|
|
|