How to filter out a nearby frequency

Setup: Sensor A measures noise, with most of the signal existing at 0.5 Hz and

3-4 Hz. Sensor B also measures noise, with some signal at 0.5 Hz and most at 3-4 Hz. The goal is to use the signal from Sensor A to cancel out the signal from Sensor B in real time. The 3-4 Hz signal matches almost exactly, so cancellation is not hard. However, the 0.5 Hz signals differ on the two sensors, so I won't bother doing the cancellation. The phase is important because if there is a mismatch, I will get incomplete cancellation.

What I want to do is filter out the 0.5 Hz signal from sensor A while minimally distorting or phase shifting the signal at 3-4Hz. It seems like if I use a high order high pass filter, then the phase is messed up in the passband, so that won't work. Another idea was to use a subtractive low pass filter, and then use a phase shifter to make the phase at least a multiple of 180 deg to the original signal. The 0.5 Hz signal has a fairly long coherence time, like 10+ oscillations worth, so I don't think it will be a big deal if I'm off by 1 or 1/2 periods.

I don't understand higher order filters and group delay stuff that well, so I don't know if what I am saying makes sense or is correct.

My questions are: Any other good ways to solve this problem? What type of filter to use? I was going to use Butterworth. Is the best cutoff frequency actually below 0.5 Hz, so that both signals are on the cutoff slope? That seems to give the best attenuation ratio. However, the phase varies rapidly in this region.

Reply to
alan
Loading thread data ...

This looks like a classic task for the adaptive filter. You need to make the filter so it will minimize the mean difference between A and B. Adaptive filters are the vast topic; the keywords are "LMS", "Wiener filter" and "Kalman filter". The analog realization would probably be impractical; the adaptive filters are usually made in the digital domain. For the frequencies that low, it can be done with a microcontroller.

Vladimir Vassilevsky DSP and Mixed Signal Consultant

formatting link

Reply to
Vladimir Vassilevsky

What if you put both signals through identical high-pass filters that strip out most of the information at 0.5 Hz? The phase shift for the signals you want to cancel would then be the same.

--
John
Reply to
John O'Flaherty

It sounds like you want a notch in one filter at the 0.5Hz with a phase shift that is matched to the filter on the other channel. Is there any reason you can't use two filters that are the same? A pair of filters can match phases fairly well.

Since the frequency you are working at is quite low, things like commutation filters are worth considering. They have the advantage that their center frequency is set by a clock input and not component values.

I don't think anyone else has said it so let me be first with "use a PIC"

A microcontroller with an ADC can implement filters that are very hard to do with analog circuits. You can make large numbers of poles in even a fairly simple micro.

Reply to
MooseFET

Thanks for the replies. I should have mentioned that Sensor B measures signals at all kinds of frequencies, and that there only exists noise at

3-4 Hz and 0.5 Hz, of which Sensor A reads the 3-4Hz noise correctly and 0.5Hz noise incorrectly. Sensor B is used in a feedback loop, so I can't go around changing it's output signal otherwise.

I would also prefer to keep the solution analog and simple, i.e. something I could do in a day and without buying other digital stuff. Thanks for the ideas for digital solutions, though. I'll have to look at them some time in the future.

Reply to
alan

Define 'all kinds of frequencies'. What is the passband of the signals of interest?

Are sensor A and B identical (including their inputs)? Why do you say 'Sensor A reads .... incorrectly'?

If he two sensors aren't producing the same output at the frequency you want to cancel, you are going to have to characterize this difference in order to use the one signal to cancel the other one out.

--
Paul Hovnanian     mailto:Paul@Hovnanian.com
------------------------------------------------------------------
Opinions stated herein are the sole property of the author. Standard
disclaimers apply. All rights reserved. For external use only. If
irritation, rash or swelling occurs, discontinue use immediately
and consult a physician. Void where prohibited.
Reply to
Paul Hovnanian P.E.

0-300 Hz

no

Why do you say

Because what it measures at that frequency doesn't match what sensor B sees.

I already decided to give up cancelling out the 0.5 Hz signal. They aren't really correlated. That's why I want to filter it out of sensor A.

Reply to
alan

Alan,

I had a similar problem at essentially the same frequencies, I ended up using a Butterworth filter for a simple analogue solution with minimal phase difference. If you're still following this thread, post a message here and we can discuss this further.

--
Nemo
Reply to
Nemo

ElectronDepot website is not affiliated with any of the manufacturers or service providers discussed here. All logos and trade names are the property of their respective owners.