Filtering of Displacement Transducer - Page 1
Forum section: electronics / projects

author: geo_leeman
author_rank: Regular Contributor
timestamp: July 31, 2016, 08:26:51 pm
content: Hey folks,I'm working on a signal conditioner for a displacement transducer (think LVDT) and have a question on the best practice for filtering. The sensor will be monitoring a system that will at times experience sliding and the jerky motion that goes along with it. I'm buffering the transducer, providing a way to DC offset the signal for later use (such as in a control loop), and gaining up the signal for digitizing and recording. We'll be recording at 100-1000Hz. I want to have a selectable filter stage in there to cut any high frequency cruft riding along, say ~200Hz and ~500Hz filter options. RCs have such soft knees it seems like a poor choice. Am I better off going with an active op-amp based filter? I'd love to use one of the fancy filter on a chip parts, but my signal is +/- 12VDC. Thanks for any ideas!

author: Marco
author_rank: Super Contributor
timestamp: July 31, 2016, 08:29:02 pm
content: Can't you do it digitally?

author: geo_leeman
author_rank: Regular Contributor
timestamp: July 31, 2016, 08:30:11 pm
content: I'd like to have something pre-digitization that will help with any aliasing and keep the signal clean as it will be fed back into a servo control loop eventually.

author: ConKbot
author_rank: Super Contributor
timestamp: August 01, 2016, 01:31:07 am
content: Definitely push up your sampling rate if you can. If your signal of interest is 0-500hz, and you're sampling at 2ksps, and want 30db of attenuation at Fs/2 you need 30db/octave attenuation or more, so you're looking at 5+ poles. If you sample at 32ksps, you have 5 octaves between aliasing and your signal of interest, so a simple 6db/octave 1 pole RC filter has you covered. After acquiring, decimate for enhanced dynamic range if you care to, and perform low pass filtering digitally.

author: geo_leeman
author_rank: Regular Contributor
timestamp: August 02, 2016, 01:15:27 am
content: Well - it's a bit trickier than that. Since they are measuring a real system that is stick-slipping, the signal and frequency content is widely varied. Currently there is NO anti-alias filtering going on, they just record and look at the data. Here's an example time-series with time in seconds on the x. Sometimes their step functions are much sharper than that. I'm also concerned about keeping noise out of the control loop.

author: Marco
author_rank: Super Contributor
timestamp: August 02, 2016, 02:32:43 am
content: You seem to want non-linear filtering then. Which just makes digital even more of a win.You can build non-linearity into analog filters for fast shock response without too much ringing, but it's easier digitally.

author: geo_leeman
author_rank: Regular Contributor
timestamp: August 02, 2016, 02:37:47 am
content: Are you talking about filtering post going though the ADC?

author: Marco
author_rank: Super Contributor
timestamp: August 02, 2016, 03:06:11 am
content: Yes, obviously you'd have to sample at quite high frequencies before the digital filtering. Up till now you've only mentioned 100s of Hz filters, so presumably a couple 10s of kHz sampling frequency should be plenty? (Use a sigma delta ADC for relaxed anti-aliasing filtering requirements.)

author: geo_leeman
author_rank: Regular Contributor
timestamp: August 02, 2016, 11:30:40 am
content: Digital filtering will not work in this setting. This particular system has an analog servo control loop. The recording sessions last for ~12 hours at times, so recording everything (16-channels at 24-bits) very fast just isn't possible.

author: Kleinstein
author_rank: Super Contributor
timestamp: August 02, 2016, 12:16:23 pm
content: The sampling frequency of the ADC and the speed of recording the data are different things. Its a good Idea to let the ADC sample rather fast, do digital filtering and than reduce the data rate to the lower rate (e.g. 500 Hz) that is needed to represent the needed data. At 1 k SPS it's possible to record a days worth of data.So in the simple case a sigma delta converter can do that job, so the filtering / decimation is done in the ADC.With the data shown, there is also the option to do some online compression, even if not that efficient. This might reduce the data rate by something like a factor of 2 to 10, without any loss.

author: Marco
author_rank: Super Contributor
timestamp: August 02, 2016, 12:57:20 pm
content: I thought the control loop wasn't done yet?If you are that opposed to digital solutions checkthis non-linear Sallen Key filterout. It's based onthis BB application note for a first order non-linear filter, note that unlike in that note the thresholds where the non-linearity kicks in can not be adjusted. It would become too complex a circuit, showing the limitation of analog filtering.I'd use a SAR ADC to digitize it so the fast step response of the filter is preserved if you absolutely want to use a low sampling rate at the ADC. It will give you a better idea of the real signal, despite aliasing.PS. it seems to me the BB filter is functionally equivalent to the one from the EET article, but more elegant.

author: geo_leeman
author_rank: Regular Contributor
timestamp: August 02, 2016, 01:07:31 pm
content: Quote from: Marco on August 02, 2016, 12:57:20 pmIt's a long story to tell, but the main points are this is an operational legacy system that I'm working on slowly making better as I can, but major changes like reconfiguring their A2D setup are out of the question for the time being. That Sallen Key filter looks pretty promising for this application. As I said, currently there is no filtering, so almost anything will be an improvement I think. There will be substantial testing though.Ideally this would all be way oversampled and the filtering and control loop done in LabView - but thats more of a complete redesign than can be done for now.