Forums

Filter a rectified waveform?

Started by steverk 4 years ago5 replieslatest reply 4 years ago811 views

What is the effect when filtering a waveform that has been rectified?  I have a sensor that produces an AC signal that will undergo both a LP filter and rectification. It would be desirable to limit the supply voltage to positive and also same range as the rest of the circuit (0-3.3v). The output of the sensor will primarily be used to establish a timestamp when it is present using a threshold, so there can be some distortion to the actual waveform; its not being sampled. So, I've thought of this filtering as very similar to using an analog Nyquist filter at the front end. The circuits are easiest when the signal is rectified first. But what will the result of analog filtering after the rectified signal?

[ - ]
Reply by omersayliFebruary 22, 2019

Hi,

Actually it depends on noise type but first rectification and then applying low pass filter is better for thresholding purposes, as I have understood from your telling. Think about it converting AC to DC, LP filtering after rectification removes 'ripples'. 

[ - ]
Reply by Rick LyonsFebruary 23, 2019

Hi steverak.

Here's a diagram to support what omersayli wrote.

full_94603.jpg

The bold black voltage curve labeled "Waveform with capacitor" is the voltage labeled "+V" in the above circuit.



[ - ]
Reply by dszaboFebruary 23, 2019

Rectification is a non-linear operation, so it can increase the bandwidth of the signal.  In fact, proper rectification requires very high polynomials, so you can assume that the rectified signal has a much higher bandwidth.  You can think of the low pass filter as a kind of weighted average.  So in plain terms, you are calculating the average magnitude of the signal.  I don’t think that there is anything specifically special about it, but it can be useful in some applications.  Note that you may want to consider using a fairly aggressive filter, or oversample, to avoid aliasing given the bandwidth of the rectified signal.

As an aside, the circuit diagram Mr Lyons has some unique properties relative to signal processing.  Specifically, the low pass filter created by the capacitor has a different cutoff frequency for charging vs discharging.  It provides a desirable effect for energy storage, but may mangle the signal a bit in signal processing applications.  it just depends on what your application is

[ - ]
Reply by steverkFebruary 23, 2019

Thanks for the input one this. A little more info may be needed. Its for a new project and I haven't determined yet if its necessary to sample the waveform then do some processing, or if I can get away with simple threshold determination. It's a piezo sensor that resonates at a nominal freq when stimulated, say 4.6khz for example. There may be some noise, electrical and  maybe some other, but all I want is to determine when it was stimulated by detecting when it it starts resonating. 

Being battery operated, and everything else working from 0-3.3v, providing a dual +/-V supply will be pretty inconvenient (and more cost). An op-amp circuit  as a "precision rectifier" will bring it all positive and analog band-pass filtering (LPF mentioned earlier just to simplify) so threshold detection can be more reliable.  Here's a truncated example of a sampling o-scope capture:

snip_60530.jpg

And a different sample that I experimented on with a digital LPF (can't remember what filter, just an example for illustration) that shows some low-freq and dc offset - thus wanting analog BPF instead of only LPF:

snip2_53287.jpg

While not yet sure if simple threshold detect is good enough to determine when it started resonating, I wanted to try it out to see if its workable.


[ - ]
Reply by omersayliMarch 1, 2019

Hi

Still you can apply rectify-Low pass filtering-Thresholding


You may need to collect data to determine the threshold value. Also low pass filter cut off frequency could be set according to the input data  and characteristics of piezo sensor.