# Removing cyclic noise from signal

I'm using a sensor with output that looks like the following figure.

The cyclic noise is common to ask measurements made by the sensor. Is there a way to remove the noise without negatively effecting higher frequencies.

We have attempted using a Fourier transform and then zeroing the frequencies around 6 Hz in Matlab, but that was ineffective.

• Why do you say the FFT method was ineffective? I'm looking at your third plot, and comparing the raw versus filtered data, it looks like you have completely removed the big noise. I would say that is very effective. Can you be more specific about what you don't like about the filtered value in the 3rd plot? Jun 5, 2017 at 1:31
• It is bad idea to use FFT for filtering. See dsp.stackexchange.com/questions/6220/… Aug 24, 2017 at 4:44

You must use notch-stop or band-stop filters.

There are different methods to implement them, But you could implement them easily using fdatool in MATLAB. After you designed the filter, filter your signal using filter function.

You indicated that the cyclic noise is a common aspect of the sensor's response. I would suggest reviewing the technical notes for the sensor. If the cyclic noise is a common malady of the sensor, I'm sure someone has a method for reducing/removing it.

There is a substantial number of papers on adaptive notch filters and a Google search will return many results. This is a common problem in applications like EKG monitors where power line noise couples into the acquisition electronics.

The essential idea is that you subtract out the tonal noise from the signal. The noise tonals vary over time because there is some drift in power line frequency but also people move, as well as persons vary, so the coupling varies . The adaptive filter accommodates the variation while a fixed notch filter is for a lack of a better term, is static

As already noted in two other answers a notch filter is often a sensible option to remove a specific tonal noise component from a measured signal.

There is however a trade off between the width of the notch filter and the suppression that can be achieved: narrow notch filters are deep and therefore have high suppression, while wide notch filters are relatively shallow and will have significantly less suppression. Effectively suppressing a strong tonal noise component requires high suppression and therefore accurate knowledge of the disturbance frequency.

This knowledge might not always be available or there might be significant variation in the disturbance frequency making the application of a notch filter ineffective. As mentioned by @Stanley Pawlukiewicz this uncertainty can be tackled by applying an adaptive notch filter. Although this can be made to work very well it might be overkill in specific applications.

Alternatively, assuming that frequency domain content below the disturbance frequency is not of interest, applying a high pass filter might also be an option. This however depends on the filter order you can get away with (e.g. due to acceptable phase distortion) and the ratio between the filter corner frequency and the disturbance frequency (which together with the slope of the filter determines the suppression at the disturbance frequency).