Help with Filtering

Tim Ganz

Member
Join Date
Dec 2010
Location
Dallas, Texas
Posts
686
I have a question on filtering. I am working with a center winder that is ran by a compact logix brick processor and the program is filtering a laser sensr like this

Expression Local:3:I.Ch0Data/40+(Diameter_Input_Filtered*39/40

Destination Diameter_Input_Filtered

Can someone help me understand how this works? I am really struggling and math is not my strongest subject.
 
Write it out and look. You basically have:

Output = Input/40 + (Output * 39/40)

That is just a slightly strange form of an averager, without having to devote a bunch of memory locations.
It integrates every scan, but might never actually converge.

Just being lazy and dropping that into Excel, even after 250 scans with a raw input of 20, it only hits 19.9661.
 
There is nothing strange about the filter. It is a low pass IIR fillter.
Y(n)=A*Y(n-1)+B*X(n)
Where A=0..1 and B=1-A
If you want smooth the data even more then make A bigger. Right now A is 39/40. Try 0.99 and B=0.01
There is a lot information about IIR low pass filters on the web. One can calculate A and B in terms of a response time constant or cut off frequency.
 
Here's another .

FV=FV+C(NV-FV)
Where:
FV= Filtered value
C= constant (range 0-1) The smaller the number the more dampening.
NV= New Value
 
I have a question on filtering. I am working with a center winder that is ran by a compact logix brick processor and the program is filtering a laser sensr like this

Expression Local:3:I.Ch0Data/40+(Diameter_Input_Filtered*39/40

Destination Diameter_Input_Filtered

Can someone help me understand how this works? I am really struggling and math is not my strongest subject.

What type of laser sensor? Is it a "noisy" signal, or a "noisy" medium which the laser is sensing? There are some great laser sensors out there which I have personally used in high noise environments(material being sensed and high freq.) for dynamic height control. They filter the "environment's noise" for you!
 
I've attached a spreadsheet which graphically shows these 2 filters that they are mentioning.
I put in process change and noise amplitude.
I set the sample as twice the time so a small step will be seen for unfiltered.

Playing with the constants on the filters always helped me.
 
Thank you all for trying but it looks like i am in over my head with this one. This is some of my first plc work and i thought i would try to fix the problem but it will have to wait till the plc guru is back from vacation.
 
In your expression provided:

Local:3:I.Ch0Data/40+(Diameter_Input_Filtered*39/40

To make MORE filtering (and slower response) then Increase 39 and 40 by 1 at a time. The number at the '39' position will always be 1 less than the number at the '40' positions.

So for twice the filtering you could change it to:

Local:3:I.Ch0Data/80+(Diameter_Input_Filtered*79/80

And, as was being pointed out, more filtering will decrease the effect of noise and very short terms stuff but will make it slower to react to longer term changes.
 

Similar Topics

Application: Read in pulses from a volumetric flowmeter via a high-speed counter card to display flowrate i.e. cc/sec. Present Configuration...
Replies
8
Views
6,954
HOW to communicate with OPTIX and Mitsubishi's Q Series PLC?? PLEASE HELP ME
Replies
0
Views
1
I'm fairly new to Rockwell software, I've had some basic training in the past but nothing too advanced. My company and I use Reliable products for...
Replies
9
Views
237
Hi all I need help on this As in my project used Schneider TM241 controller. Now I want to communicate Elite energy meter with controller by...
Replies
3
Views
148
Hi all, I am having issues accessing my Cimplicity software - the site code changed after re-install and I am no longer able to attain a new key...
Replies
10
Views
156
Back
Top Bottom