LabVIEW

cancel
Showing results for 
Search instead for 
Did you mean: 

Equi-Ripple LowPass PtByPt

Solved!
Go to solution

Hello guys,

 

I am using Equi-Ripple LowPass PtByPt to filter noise out of signal. Filter does its job, but the main signal value gets shifted when filter is applied.

This shift depends on the input values (# of taps, stop freq. and pass freq.). If any of the values changes, the main signal value also changes.

 

Have a look at the attached image (Filter 1) and you will notice that the unfiltered signal has a main value of 62 (with added sine and noise).

On the Filtered chart the signal is smoother, but the signal's main value is shifted to approx. 70,5.

 

I would appreciate if someone could explain why this is happening.

Also I am not sure what "# of taps" even is. Does this set the number of the last values to include into filter calculation?

0 Kudos
Message 1 of 6
(316 Views)

I'd appreciate if anyone could help.

 

BR, Jakob

0 Kudos
Message 2 of 6
(232 Views)
Solution
Accepted by topic author Jakob_Pin

Update:

 

I've solved my issue by using a different (proper) filter: Butterworth filter.

This one performs more smoother and without any shift.

 

BR, Jakob

Download All
Message 3 of 6
(201 Views)

Glad you figured out what you needed.  Mind talking through your thought process and findings in more detail?  Questions for consideration:

 

Why the choice of pt-by-pt filtering?

Why the original choice of Equi-Ripple?

What effect did different filter parameters have?   Which seemed to help?  Which hurt?  Which did some of each?

What led you to the choice of Butterworth?

What makes Butterworth "proper" for your application?

Exactly what do you mean about its "smoothness"?

 

I have an "ok" working understanding of various filter types, but my best learnings came from digging in to figure out why my bad choices were bad.  Maybe you can help future readers by giving them a walkthrough of your own case study?

 

 

-Kevin P

ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
0 Kudos
Message 4 of 6
(181 Views)

Hello Kevin,

 

My client wanted to have precise readings from a sensor, so the goal was to remove the noise from the signal (additionally to solving the root of the noise from the environment).

 

- Pt-by.pt was used because the data flow in program (where filter is needed) is based on pt-by-pt.

- I used Equi-Ripple because it is the only result in search under "Low-pass" phrase... Haha.

At one point I googled, and find out it is not what I was looking for.

- Then I played with filter that "Configure filter" dialog pops up to configure (currently I am not using dev PC)

Jakob_Pin_0-1739196126300.png

After testing Low-Pass configuration I found this is what I needed. But Since I am not a fan of big VIs with a lot of unknow processing underneath I looked inside and found out that it is working on Butterworth filter. So I took only this VI out of it and used it in Low-Pass mode.

 

If you look at my screenshot from last post, you will see that I wanted to read a signal out of sensor without high frequency noise (after FFT analysis I found 200 - 5k Hz noises). So the smoothness is a signal without that noise.

 

BR, Jakob

Message 5 of 6
(171 Views)

Thanks for the follow up.  I'll just add a few of my own thoughts for the sake of the aforementioned future readers.  This isn't gonna be deep filter theory, just seat-of-the-pants lessons from my own experience.  Also, I'm ONLY thinking about low-pass filtering for all the thoughts below.

 

1. Unless I know *exactly* why I should be choosing a different filter topology, I default to Butterworth.  It's been a long time since I thought I had a good reason to choose differently.

 

2. Amplitude response has usually been a key reason for that.  It's pretty flat where it should be and when needed, it's pretty easy to calculate exactly how much attenuation it causes to content at different frequencies.

    Integrity of the measured amplitude has happened to be the driving concern in the majority of my own hands-on work.  This isn't true everywhere all the time, but that's the road I've been down.

 

3. There's no free lunch when it comes to filter selection.  Different ones are designed to be especially good at certain response characteristics, but that will inevitably trade off against other characteristics they're worse at.  One of Butterworth's big tradeoffs for its flatness and simpliicity is its relatively shallow rolloff above the cutoff frequency.

 

4. Butterworth behavior can be easily implemented in hardware with just a resistor and a capacitor, often useful right at your DAQ terminals for anti-aliasing.

 

5. There's a lot more to filter design & selection than just this.  But odds are that if you're in a position where you have the responsibility to do some filtering but you aren't a particular expert in filter theory, some variety of Butterworth is A pretty safe place to start.

 

 

-Kevin P 

ALERT! LabVIEW's subscription-only policy came to an end (finally!). Unfortunately, pricing favors the captured and committed over new adopters -- so tread carefully.
Message 6 of 6
(155 Views)