Calculating the passband ripple of a filter

This is the place for any magazine-related discussions that don't fit in any of the column discussion boards below.
Post Reply
tbenner_forums
Posts: 4
Joined: Sun Jun 20, 2010 4:30 pm
Contact:

Calculating the passband ripple of a filter

Post by tbenner_forums »

I've created a hardware lowpass filter using an LM348 op-amp and would like to measure the amount of passband ripple, or noise being generated by my filter, compared to an unfiltered signal. Here is how I am thinking of doing it:

> Collect two channels of data, one channel is unfiltered and the other is filtered through my filter.
> Since my filter will have gain/attenuation at different frequencies, I believe I would have to normalize the filtered and unfiltered signals.
> Subtract the two normalized signals.
> Convert back to the unfiltered voltage range. This would give me the amount of noise over time. Average to get a single value.

Would this be a sound strategy, or is there a better way of finding the passband ripple?
There could be some problems with this approach, in that the filter could have some delay, or phase offset.

Thanks

[Tim]
Robert Reed
Posts: 2277
Joined: Wed Nov 24, 2004 1:01 am
Location: ASHTABULA,OHIO
Contact:

Re: Calculating the passband ripple of a filter

Post by Robert Reed »

Do you own a sweep generator and scope? Barring that, you could sweep it manually while noting amplitude vs. frequency, and plotting such. Albeit, a little slower but just as accurate.
Since you mention LM348, I assume you are working below 1 MHz and any function generator would suffice.
User avatar
MrAl
Posts: 3862
Joined: Fri Jan 11, 2002 1:01 am
Location: NewJersey
Contact:

Re: Calculating the passband ripple of a filter

Post by MrAl »

Hello there,


I think what you are looking for is the maximum amplitude of the ripple, in the passband only, expressed in db.
In other words, within the passband you find the frequency that produces the highest amplitude response and the frequency that produces the lowest amplitude response, then subtract their amplitudes (all in db). That will give you the passband ripple in db.
For example, say you design a filter to work within 100Hz to 500Hz, the passband. You would sweep the frequency from 100 to 500 and note the max amplitude and the min amplitude, both expressed in db. Lets say you get 6db for the max and 2db for the min. Subtracting, we would get 4db as the passband ripple.
Note that it is quite important to stay within the passband or else the reading can be way off.

Another definition of passband ripple however gives:
10*log((1+a)^2/(1-a)^2)
where a is the deviation above and below the ideal response, and the log function is log base 10.

Still yet another definition would give the measurements in plus and minus value, such as
pass band ripple: +/- 1.5db
or even two different values: +1db, -2db


Perhaps you can tell us what you will be using this measurement for. If you dont want to tell us, then you can set up a known filter type in a simulator with the kind of response you are looking for and 'measure' that and compare it to its theoretical value, making sure you get the same answer. Once done, you will have the technique down that you need to measure your quantity so you can then do your unknown filter.

Image
LEDs vs Bulbs, LEDs are winning.
tbenner_forums
Posts: 4
Joined: Sun Jun 20, 2010 4:30 pm
Contact:

Re: Calculating the passband ripple of a filter

Post by tbenner_forums »

Let me describe a bit more about the filter. It is a lowpass butterworth filter using a flattest amplitude response, with a cutoff frequency of around 50Hz. We collect force data from load cells on subjects, so want as little noise being introduced by the filter as possible. We use a 16 bit A/D board to collect the data, so I'd want to convert the noise into the equivalent number of A/D bits(hopefully under 1).
The common mode rejection ratio of the LM348 is around 90db, but I believe what I want is the SNR. I was thinking the passband ripple and SNR was about the same, but from the above description it does not sound like it. I'm not concerned with phase shifts and any delay is small enough not to worry about. So ideally I would like the SNR of the signal coming out of the filter to be the same as the raw signal without filtering, which won't be the case. So I'd like to be able to put a number on the SNR so I know how much noise the filter is introducing into the signal.
Given that the filter is not unity gain, I can't directly compare the signals, which is why I believe normalization of both signals is required before comparison. Once I have the difference between the two normalized signals, I would convert the difference back to the raw voltage range which I could then convert to an A/D number of bits for noise(again, hopefully under 1!).
I just want to be sure my technique is sound before doing it. Is there a simpler/better way to measure the SNR of an active filter?

Thanks for the responses.

[Tim]
User avatar
MrAl
Posts: 3862
Joined: Fri Jan 11, 2002 1:01 am
Location: NewJersey
Contact:

Re: Calculating the passband ripple of a filter

Post by MrAl »

I posted an image a bit late in my last post, so here it is again while i read your last post...

Image


Oh yes, a Butterworth should be very flat in the passband if done right.

So you want to measure signal to noise ratio SNR so you can adjust the measurements, or at least try to determine the validity of the readings and possibly establish some error margin.

I have a few more questions because i dont understand your system completely yet...

It sounds like you are using an amplifier/filter to boost the signal voltage, or is it just a filter with passband gain =1 ?

If you can measure the raw signal to use for comparison, then why cant you use that signal alone without a filter? In other words, if you consider it valid enough to use to measure noise (a more difficult thing to do) then why isnt it valid enough to use as the actual data sample?

Did you consider using a very low noise op amp, or do you expect the main source of the noise to come from the measurement process itself?

Have you yet considered doing a 'bang bang' calibration on the system, where you excite the system input with accurate known levels of excitation and then log the response (noise or not) in some memory and then interpolate later with actual real world measurements? For example, if you bang the system with a 10.00 excitation and you get a 10.10 output, then you assume that later when you get a real world measurement of 10.10 it is actually closer to 10.00. You'd have to decide if this kind of calibration is possible, as with amplifier noise it may be repeatable.
Alternately, keep banging it with the same accurate excitation and collect a range of measurements, then calculate the mean. Step the excitation level and do the same for a number of levels.
LEDs vs Bulbs, LEDs are winning.
Post Reply

Who is online

Users browsing this forum: No registered users and 1 guest