1

I am reading out the movement of a motor arm using a Hall sensor and a magnet pair. The hall sensor measures the distance between the sensor and the magnet. The motor arm is being moved with a band-limited Gaussian white-noise signal (0-300 Hz). Due to the movement being very small, the stimulus being a white-noise, and the inherent noise of the Hall sensor, I have a terrible Signal to Noise Ratio. I am trying to improve the SNR by filtering. But the problem is that, the frequencies in the sensor output in the absence of any movement of the motor (baseline noise, in blue) hugely overlap with the frequencies of the actual movement (0-600 Hz) and noise (stimulus, in orange).

The figure below shows the generated white-noise signal that I use to actuate the motor (in black). Grey background marks the presence of a movement stimulus to the motor arm (this signal is in orange in rest of the figures). Notice the 0 baseline outside the grey region in subplot 1. The subplot below it shows the unfiltered hall sensor output. Notice the high baseline noise in the absence of any actual movement. So, this "baseline noise" is the inherent noise of the Hall sensor.

Generated signal and hall sensor output

Without filtering, the baseline and stimulus are indistinguishable. Raw data from Hall sensor

But, the powers are slightly different for frequencies below 150 Hz. But the noise and the signal have the same power after 150 Hz. I do need better SNR in this range.

PSD of unfiltered baseline noise and stimulus with noise

I tried filtering the signal with 10th order Butterworth with cut-off at 600 Hz (Because I need 300 Hz to be represented properly). I can now distinguish baseline from stimulus but SNR is still very bad, as visible in the PSD.

Filtered Hall sensor output PSD of filtered baseline noise and stimulus with noise

I want to use the noise in the baseline to denoise the stimulus. How should I do it?

  • can you stimulate the sensor using a single frequency?

    For example, start at 1 Hz, perform a synchronous demodulation, extract the amplitude and phase. Then repeat at 2 Hz, and on and on until you have an adequate frequency response.

    – Ben Feb 19 '24 at 15:45
  • Actually, I am using this as a stimulus delivery system to study a biological sensor in an insect. The hall sensor is my readout of the actual movement delivered. Using band-limited white noise is an established technique to study the properties of biological sensors. Because, one is constrained by time to record the response to discrete sinusoidal stimuli. I want to analyze the response of the biological sensor to the white-noise stimuli. – chinmayeelm Feb 19 '24 at 17:25
  • 1
    Just to clarify, you have a section where you have noise only, and a section where you have noise and unknown signal? And then do you only need a denoised signal, or do you need a clean PSD as well? – Baddioes Feb 19 '24 at 18:36
  • @chinmayeelm Are there technicals reasons why you can't do a frequency sweep and use synchronous demodulation ? You'll be able to reject the noise more easily. – Ben Feb 20 '24 at 02:49
  • 1
    @Ben Good suggestion. I have done a frequency sweep and analyzed the data to some extent. The output is much cleaner there and the analysis is much simpler. I will look up synchronous demodulation (thanks for the bonus tip). But my goal is to compare the white-noise analysis with other ways of characterizing a biological sensor. So, I need to analyze the white-noise noisy data as well. – chinmayeelm Feb 20 '24 at 03:10
  • @Baddioes Yes. There is a section of only noise and a section noise+unknown signal. I have added a new plot in the beginning to make this clearer. I need a denoised signal. I don't care so much about clean PSD. – chinmayeelm Feb 20 '24 at 03:13
  • White noise analysis can work in theory, but you're gonna be quickly limited by the resolution of your ADC and the noise amplitude. With synchronous demodulation, you can extract signals that are buried in the noise. – Ben Feb 20 '24 at 03:15
  • I found this presentation, it's really helpful

    https://ethz.ch/content/dam/ethz/special-interest/mavt/dynamic-systems-n-control/idsc-dam/Lectures/Signals-and-Systems/Lectures/Fall2018/Lecture11_sigsys.pdf

    – Ben Feb 20 '24 at 03:19
  • Thanks for the resource. Are you suggesting that I do this to characterize the Hall sensor and use the frequency response to denoise the signal? – chinmayeelm Feb 20 '24 at 03:35
  • Sorry to again ask for clarification, but just want to make sure I'm not giving bad advice. Your desired signal is low-pass filtered white Gaussian noise, and this is embedded in wideband additive white Gaussian noise, correct? – Baddioes Feb 20 '24 at 19:00
  • The only thing I can deduce from your plot is that the transfer function seems to have a low-pass behavior. – Ben Feb 21 '24 at 02:26
  • 1
    "Actually, I am using this as a stimulus delivery system to study a biological sensor in an insect." So your ultimate goal is to get a mathematical model of the actuator itself, independent of the sensor, and denoising the sensor data is just a means to an end? If this is the case, edit the first paragraph of your question or add a new one to make it clear what you really want to do. – TimWescott Feb 23 '24 at 15:58

2 Answers2

2

This would be a good application for using the Cross Spectral Density between the input and output. The Cross Spectral density (which is Coherence when normalized) provides the relative magnitude and phase for the system transfer function based on the correlated components between the input noise-like signal and the resulting output noise-like signal while attenuating the independent noise components present regardless of input. Please see these other posts for further explanation of this as well as further details in computing the CSD:

https://dsp.stackexchange.com/a/85712/21048

Intuitive explanation of coherence

The result will have best fidelity where the input signal has energy in the frequency domain, so for this purpose a white noise input is ideal. The stronger the input can be while still in the linear range of the system, the better the resulting estimate will be (in terms of SNR).

Dan Boschen
  • 50,942
  • 2
  • 57
  • 135
1

You can technically use a white noise stimulus to perform a system identification, I would not do it for the following reasons

  1. The white noise stimulus seems to have a lower amplitude than the baseline white noise, making it hard to distinguish what your actual stimulus is. Maybe you can increase the amplitude of your stimulus ?
  2. Even if you can increase the amplitude of the stimulus, you basically input a wideband signal and try to deduce the frequency response and transfer function. It's gonna be hard to identify the amplitude and phase at higher frequencies, especially if you have a 20 dB or 40 dB/decade rolloff. Even if you had an infinite-precision ADC, the high frequency signals will be buried in white noise.

I recommand performing a sine sweep for system identification. Basically, you input a sine with an amplitude that will not saturate your sensor or your ADC.

$ x = Asin(\omega t) $

Wait for the transient to die out, then measure the amplitude of the output signal, it should look like this $y = Bsin(\omega t + \phi)$

Perform a synchronous demodulation, to extract the gain and phase at that specific frequency. You can average multiple cycles to increase the SNR. This can be useful if you want to measure low amplitudes. If you see a resonance, I recommand that you take more data points around the resonance frequency as resonances can greatly impact the design a control loop.

Ben
  • 3,765
  • 1
  • 10
  • 17
  • Are you suggesting that I do this to characterize the Hall sensor and use the frequency response to denoise the signal? Or are you suggesting that I use frequency sweeps instead of white noise in my experiment? – chinmayeelm Feb 20 '24 at 14:01
  • He’s suggesting the latter. – Jdip Feb 20 '24 at 14:52
  • Yes, I would not use a white-noise approach to characterize a sensor or a system. I recommend a frequency sweep. You could also perform a step response if you want, but it's not gonna be as accurate as a frequency sweep. – Ben Feb 20 '24 at 15:15
  • My experiments are done. Cannot redo it. Also, I want to analyze the response of my biological sensor(a neuron) to white noise. The response (output of the neuron) looks very reliable even though the measurement of the stimulus is noisy. The stimulus itself is probably not so bad. Please suggest any suggestions you have to denoise this data. – chinmayeelm Feb 20 '24 at 17:23
  • 1
    I'm not sure you can extract something from what seems to be nothing. – Ben Feb 20 '24 at 17:50