Not a member?

# Discussion Groups | Comp.DSP | decimation filter problems

There are 4 messages in this thread.

You are currently looking at messages 1 to .

Is this discussion worth a thumbs up?

0

# decimation filter problems - fyzkydmn - 2011-03-30 12:54:00

```Hi,

I have 2 questions about decimation filter for a SD ADC. Firstly, how is
the relationship between SNR and stopband attenuation for decimation
filter. For example if I have 14 bits output of the decimation filter,
SNR=(6.02*N+1.76) db, so will I choose stopband attenuation >86 db for
decimation filter?

Secondly, if my input is 100 khz sinus, when I'm designing decimation
filter will I choose pass band frequency of 200khz=Nyquist freq. or 100
khz?

I'm very confused, if you help me, I'll be very appriciated, thanks.

```
______________________________

# Re: decimation filter problems - Jerry Avins - 2011-03-30 13:49:00

```What is the reason for decimating? Why not simply sample more slowly?

Jerry
--
Engineering is the art of making what you want from things you can get.
```
______________________________

# Re: decimation filter problems - Tim Wescott - 2011-03-30 13:52:00

```On 03/30/2011 09:54 AM, fyzkydmn wrote:
> Hi,
>
> I have 2 questions about decimation filter for a SD ADC.

"SD"?  There are more abbreviations, Horatio, than ever imagin'd in your
philosophy.  It's best to spell them out unless you're really sure that
_everyone_ knows what they mean.

> Firstly, how is
> the relationship between SNR and stopband attenuation for decimation
> filter.

Very weak.  Or do you mean the relationship between SNR and required
stop band?

> For example if I have 14 bits output of the decimation filter,
> SNR=(6.02*N+1.76) db, so will I choose stopband attenuation>86 db for
> decimation filter?

Probably, but you seem to be backing into the problem.  Shouldn't you
function, and go forward from there?

> Secondly, if my input is 100 khz sinus, when I'm designing decimation
> filter will I choose pass band frequency of 200khz=Nyquist freq. or 100
> khz?

http://www.wescottdesign.com/articles/Sampling/sampling.pdf.

Second, if your input is known to be a 100kHz sine wave, for ever and
more, then your ultimate bandwidth can be 0, because that's the
bandwidth of a perfect, never-ending sine wave.  Somehow, I don't think
that's what you really meant.

> I'm very confused, if you help me, I'll be very appriciated, thanks.

Well, I'm confused too.  Possibly because you jumped into the middle of
your problem and asked the wrong question.  Tell us what you want to
achieve, and what you have, and we'll try to help you get there.

--

Tim Wescott
Wescott Design Services
http://www.wescottdesign.com

Do you need to implement control loops in software?
"Applied Control Theory for Embedded Systems" was written for you.
See details at http://www.wescottdesign.com/actfes/actfes.html
```
______________________________

# Re: decimation filter problems - Fred Marshall - 2011-03-30 15:20:00

```On 3/30/2011 9:54 AM, fyzkydmn wrote:
> Hi,
>
> I have 2 questions about decimation filter for a SD ADC. Firstly, how is
> the relationship between SNR and stopband attenuation for decimation
> filter. For example if I have 14 bits output of the decimation filter,
> SNR=(6.02*N+1.76) db, so will I choose stopband attenuation>86 db for
> decimation filter?

***No.  The SNR determined by quantization will be real enough.  And,
attenuation is attenuation - so you may wish to improve the SNR by
filtering and that's fine.  But a 20dB stopband attenuation will reduce
all of the signal/noise in the stopband by 20dB.

Assuming that the input SNR is a function of .... whatever .... then the
filter will do two things:
1) pass things in the passband .. so think of the SNR of the components
that are in the passband (only).
2) reduce things in the stopband.

So, if you have a signal in the intended passband and noise everywhere
and you use a filter that lowpasses to half of the original bandwidth,
let's say with infinite attenuation, then you will have removed half the
noise completely.  So, it's easy to figure the new SNR coming out of the
filter.  Noise goes as the sqrt of the bandwidth so it will be reduced
here by sqrt(2).  And, it doesn't matter what level it is except for
quantization effects.  The reduction is the reduction.

>
> Secondly, if my input is 100 khz sinus, when I'm designing decimation
> filter will I choose pass band frequency of 200khz=Nyquist freq. or 100
> khz?

You didn't say what the input sample rate is..... that's rather critical.
You didn't say what the decimation factor is .... that's rather critical.

Let's say that the sample rate is 1MHz.
Let's say that you want to decimate by 4 to 250kHz.
That means that the signal content should be below 125kHz per Nyquist.
You have a signal of 100kHz and, without any modulation, 250kHz sample
rate should be OK.

So, you would apply a lowpass filter with cutoff between 100kHz and
125kHz.  Say 115kHz.
Then you can decimate by 4.

You would surely not choose a lowpass filter with cutoff (-3dB point?)
right at the signal frequency of 100kHz.

You would surely not choose a lowpass filter with cutoff of 200kHz if a
sample rate of 500kHz or less is what you have in mind at the output.

Note that I'm assuming that there is at least a bit of margin between
the sample rate and 2X the signal frequency(ies).  So, when you decimate
you need to preserve that condition.

Fred
```
______________________________