Searching \ for '[EE] Need to LP filter an input signal compensatin' in subject line. ()
Make payments with PayPal - it's fast, free and secure! Help us get a faster server
FAQ page: www.piclist.com/techref/logic/dsps.htm?key=filter
Search entire site for: 'Need to LP filter an input signal compensatin'.

Exact match. Not showing close matches.
PICList Thread
'[EE] Need to LP filter an input signal compensatin'
2011\12\12@140313 by Electron

flavicon
face

Hello,
I have to get the *exact* timing (30ns resolution) of some low frequency (<250Hz) pulses
via an input capture module, however I'd like to filter the signal coming in, as it will
contain a lot of high frequency noise, but filtering via a capacitor introduces a phase
delay, which I can't even compensate (by frequency) as the phase delay changes with input
signal amplitude.

What is the way You'd approach this problem? I thought about using a zener to clip the
signal and thus work on a known amplitude, but I suspect it will introduce errors too.

On the software side, I could make sure that the input stays high for enough time, but
it's pretty overkill, and I'd like to keep it as last option. If it could be done [EE]
then it would be better!

With kind regards,
Mario

2011\12\12@142334 by Herbert Graf

picon face
On Mon, 2011-12-12 at 20:03 +0100, Electron wrote:
> Hello,
> I have to get the *exact* timing (30ns resolution) of some low frequency (<250Hz) pulses
> via an input capture module, however I'd like to filter the signal coming in, as it will
> contain a lot of high frequency noise, but filtering via a capacitor introduces a phase
> delay, which I can't even compensate (by frequency) as the phase delay changes with input
> signal amplitude.
>
> What is the way You'd approach this problem? I thought about using a zener to clip the
> signal and thus work on a known amplitude, but I suspect it will introduce errors too.
>
> On the software side, I could make sure that the input stays high for enough time, but
> it's pretty overkill, and I'd like to keep it as last option. If it could be done [EE]
> then it would be better!

Filter in software?

TTYL

2011\12\12@145415 by RussellMc

face picon face
> I have to get the *exact* timing (30ns resolution) of some low frequency (<250Hz) pulses
> via an input capture module, however I'd like to filter the signal coming in, as it will
> contain a lot of high frequency noise, but filtering via a capacitor introduces a phase
> delay, which I can't even compensate (by frequency) as the phase delay changes with input
> signal amplitude.
>
> What is the way You'd approach this problem? I thought about using a zener to clip the
> signal and thus work on a known amplitude, but I suspect it will introduce errors too.

The classic "Bessel" transfer function produces a filter with
maximally flat group delay / maximally linear phase delay (just as
Butterworth = maximally flat and Chebychev is maximum initial cuttoff
rate ).

       http://en.wikipedia.org/wiki/Bessel_filter
       en.wikipedia.org/wiki/Group_delay_and_phase_delay
       http://www.radiolab.com.au/DesignFile/DN004.pdf                maybe

You can implement Bessel filters using building block ICs or "roll
your own" with opamps + RC or implement them in software.

Digikey all Bessel building blocks here    http://bit.ly/DigikeyBessel

Or see eg http://datasheets.maxim-ic.com/en/ds/MAX7401-MAX7405.pdf



Russell McMaho

2011\12\12@151956 by Dwayne Reid

flavicon
face
Hi there, Mario.

Have a look at something called a "lock-in amplifier".  A brief overview can be found on WikipediA <http://en.wikipedia.org/wiki/Lock-in_amplifier>

dwayne

At 12:03 PM 12/12/2011, Electron wrote:

{Quote hidden}

-- Dwayne Reid   <spam_OUTdwaynerTakeThisOuTspamplanet.eon.net>
Trinity Electronics Systems Ltd    Edmonton, AB, CANADA
(780) 489-3199 voice          (780) 487-6397 fax
http://www.trinity-electronics.com
Custom Electronics Design and Manufacturing

2011\12\12@160604 by RussellMc

face picon face
> Dwayne Reid <.....dwaynerKILLspamspam@spam@planet.eon.net> wrote:
> Hi there, Mario.
> Have a look at something called a "lock-in amplifier".  A brief
> overview can be found on WikipediA
> <http://en.wikipedia.org/wiki/Lock-in_amplifier>

Lock in amplifiers can be excellent, but note (from the Wikipedia page)

         Recovering signals at low signal-to-noise ratios requires a strong,
         clean reference signal the same frequency as the received signal.
         This is not the case in many experiments, so the instrument can
         recover signals buried in the noise only in a limited set of
circumstances.

It's uncertain from information supplied so far by Mario whether his
situation matches that requirement.
General (Wikipedia):

  A lock-in amplifier (also known as a phase-sensitive detector) is a
type of amplifier that can extract a signal with a known carrier wave
from an extremely noisy environment (the signal-to-noise ratio can be
-60 dB or even less[citation needed]). It is essentially a homodyne
with an extremely low pass filter (making it very narrow band).
Lock-in amplifiers use mixing, through a frequency mixer, to convert
the signal's phase and amplitude to a DC—actually a time-varying
low-frequency—voltage signal.

Information only - lock in amplifiers were used by the "Blow Fly
position detector" that I mentioned a few weeks ago*. There there is a
strong reference signal (the excitation field) that the received
signals can be compared against.


    Russell McMahon

____________________

* Using miniature sensor coils for simultaneous measurement of
orientation and position of small, fast-moving animals
         http://iwi.eldoc.ub.rug.nl/FILES/root/1998/JNeurscMethSchilstra/1998JNeurosciMethSchilstra.pdf

BLOWFLY FLIGHT AND OPTIC FLOW
           jeb.biologists.org/content/202/11/1491.full.pdf
________________________________

2011\12\12@174453 by Sean Breheny

face picon face
Hi Mario,

It is not possible to perform filtering without delay - however, what
you CAN do is make the delay predictable and then compensate for it.

In a linear filter, the delay does not depend on the signal amplitude
(maybe you were referring to feeding the output of the filter into a
digital gate?). It DOES, in general, depend on the signal frequency.
However, there is a class of filters called "linear phase" which have
a constant delay over frequency and so they do not distort signals
within their passband.

FIR discrete-time filters can be designed to be exactly linear phase
(this includes the method of recording the signal, taking an FFT,
multiplying by the desired frequency response, and then inverting the
FFT). IIR discrete-time filters (performed in real-time) and
continuous time filters cannot be perfectly linear phase but there is
an approximate design method which produces a Bessel filter (as Russel
pointed out here). This is the continuous-time filter type which has
the least possible amount of variation in its delay over frequency,
but still accomplishes some required filtering.

It would help greatly if you could more fully describe what you are doing.

Sean



On Mon, Dec 12, 2011 at 2:03 PM, Electron <electron2k4spamKILLspaminfinito.it> wrote:
{Quote hidden}

>

2011\12\12@175249 by Sean Breheny

face picon face
Russell,

I think that Elliptical filters are the ones with maximum initial
cutoff rate. Chebychev's method yields the minimum *peak* error
between the prototype "brick wall" filter and the actual transfer
function. This results in an equi-ripple output.

Filter design is a subset of polynomial approximation and there is
some sense of a "conservation of error" between a function and the
closest polynomial approximation of a given order. Butterworth, as you
say, concentrates all of the error in the "skirt" or roll-off region
in order to minimize the error in the pass and stop bands (i.e., no
ripple).

Elliptical minimizes the error in the beginning of the roll-off at the
cost of ripple in other places and, in addition, the ripple varies in
amplitude among the peaks and valleys. Chebychev minimizes the overall
maximum error - thus spreading it out over the entire transfer
function.

I have probably missed something in this description, which is pulled
from my DSP and linear systems classes of 10 years ago.

It always amazes me that this stuff is so very hidden from most
engineers. It used to drive me crazy that all these weird words were
thrown around (Butterworth, Chebychev) with no explanation of their
relation to the filters that they designate.

Sean


On Mon, Dec 12, 2011 at 2:48 PM, RussellMc <.....apptechnzKILLspamspam.....gmail.com> wrote:
{Quote hidden}

>

2011\12\13@043448 by Electron

flavicon
face

The input frequency although low is unpredictable, so I guess this won't work. :(

However, I just learnt about lock-in amplifiers :D which I will remember in the future. :)


At 22.05 2011.12.12, you wrote:
{Quote hidden}

>

2011\12\13@043448 by Electron

flavicon
face

Dear Sean,

At 23.44 2011.12.12, you wrote:
>Hi Mario,
>
>It is not possible to perform filtering without delay - however, what
>you CAN do is make the delay predictable and then compensate for it.

Yup, that's my aim actually, as FIR filters don't exist into the [EE] world
and I don't want to implement one on the PIC, as I need the CPU power for
other tasks.


>In a linear filter, the delay does not depend on the signal amplitude
>(maybe you were referring to feeding the output of the filter into a
>digital gate?).

Yes the pulse is analog (of unpredictable amplitude and width, however
I am interested only in the riding edge), converted to digital via a
couple of NPN cascaded transistors (or a comparator, still haven't
decided), and fed into the IC pin.


>It DOES, in general, depend on the signal frequency.

Which I could compensate for, though, as I know when the previous pulse
has come, I can thus compute period and frequency, and correct the result
accordingly.


>However, there is a class of filters called "linear phase" which have
>a constant delay over frequency and so they do not distort signals
>within their passband.

I took a look at this:
http://en.wikipedia.org/wiki/Linear_filter

They seem to introduce a little phase error though, which is not OK as
I need to maintain the 30ns resolution and precision..


{Quote hidden}

Measuring when (exactly) I receive those analog pulses, just that. What
matters to me is the time resolution.

In the end it appears that the best solution for my problem may be to
capture the rising edge, then for, say, 1 uS, check that the input pin
remains high (no glitches).

Or simply, even better, shield the thing.. perhaps with LP filtering I'm
looking at the problem from the wrong perspective.

Cheers,
Mario


{Quote hidden}

>> -

2011\12\13@045643 by RussellMc

face picon face
> Measuring when (exactly) I receive those analog pulses, just that. What
> matters to me is the time resolution.
>
> In the end it appears that the best solution for my problem may be to
> capture the rising edge, then for, say, 1 uS, check that the input pin
> remains high (no glitches).
>
> Or simply, even better, shield the thing.. perhaps with LP filtering I'm
> looking at the problem from the wrong perspective.

Deep ending how you define best.
Lookup parameters for 4 pole Bessel low pass.
Implement it using transistors as emitter followers or opam sections.
Try it.
Be amazed.

Or buy a $5 IC from Digikey and try it.


Russell




{Quote hidden}

2011\12\13@085052 by Matt Bennett

flavicon
face
On Mon, December 12, 2011 1:03 pm, Electron wrote:
{Quote hidden}

A very important aspect to this problem that I don't see discussed so far,
is that the risetime of your signal and the bandwidth you let through are
completely related.  If the pulse is Gaussian shaped, the relationship
between risetime and bandwidth is B=0.35/Tr- so if you want a 30ns
risetime, the bandwidth of your input filter has to be greater than about
12MHz.  Less than that, and your measurement is not going to be very
repeatable. (in other words, if you put a signal with a 1 femtosecond rise
time into a 12 MHz low pass filter, the rise time would be about 30ns.)

Matt Bennett
Just outside of Austin, TX
30.51,-97.91

The views I express are my own, not that of my employer, a large
multinational corporation that you are familiar with

2011\12\13@085212 by Electron

flavicon
face

Thanks. I will first try the software route with minimal electronic components,
if I can get it to work well and use very little CPU power, that'll be, else
I'll take a look at Digikey catalog. :-)

In any case, I always learn new things in this list.

Cheers,
Mario


At 10.56 2011.12.13, you wrote:
{Quote hidden}

>

2011\12\13@111657 by Sean Breheny

face picon face
This is a very good point.

I think it is really important to understand the whole system end to
end. What is generating these pulses? Do you have any control over the
shape of the pulses? There are many techniques which allow filtering
of known pulse shapes without degrading the rise-time (such as matched
filtering and pulse coding)

Sean


On Tue, Dec 13, 2011 at 8:50 AM, Matt Bennett <RemoveMEmattpiclistTakeThisOuTspamhazmat.com> wrote:
{Quote hidden}

>

2011\12\13@122852 by Electron

flavicon
face

Yes, and since I have no control over the risetime, perhaps it's better I don't
touch the analogue signal at all (other than threshold detection), else I will
introduce errors of my own.

I am convinced now that first I have to implement the system, then I will see
if the noise is really a problem. If it is, I will first try good EMI practices
before getting into filter hell. :P

Thanks for the replies, in any case they taught a lot of things.


At 14.50 2011.12.13, you wrote:
{Quote hidden}

>

More... (looser matching)
- Last day of these posts
- In 2011 , 2012 only
- Today
- New search...