notch filter

TheWaterboy

Lifetime Supporting Member + Moderator
Join Date
May 2006
Location
-27.9679796,153.419016
Posts
1,924
I need to filter values from an analog input. Most of the time all the values are good but occasionally a bubble will go through the system and create a value that is not representative of the fluid being measured.
For the purposes of datalogging the high values of the day I don't really want to average those bogus values into the mix, I would rather ignore them.

As an example the values would be captured every 5 seconds like this

1,1,1,2,1,1,2,1,1,2,3,4,8,24,7,5,4,2,1,1,1,1,2,1,2,1,1,1,1.

Because it is a short duration event I know its bogus and want to ignore the values from 4 through 4. If the lasted longer than 1 minute or so than I would indeed use the high value as the real number. I other words I need to look backwards in time to see if the current value is reasonable.

How would I begin create a sliding filter or sieve like this in realtime?
 
If you really want to ignore the 'too high' values, I'd start a 60-second timer when the value is >4, and start putting those actual values in a 20-segment array while storing the last value <=4 wherever scada is looking. Then, if in less than one minute things return to normal, resume putting real values in the scada point. If the event is >1 minute, sound your alarm and resume putting real (and out of spec high) values where scada can see them. You will then have an array of one minute's worth of high out of spec values for reference, which can be automatically cleared at the start of the next event.
 
You don't want a notch filter.

One way to do this is to filter the data with a low pass filter but then limit or ignore all data points 3 above the smoothed data.

Another way is to limit the rate of change between readings. If the rate of change can be greater than 2 then limit the rate of change to 2 or just assume it is bad data and ignore it. It looks like during normal operation the data is changing between 1 and 2 which is a change of 1 at most.
 
If you really want to ignore the 'too high' values, I'd start a 60-second timer when the value is >4, and start putting those actual values in a 20-segment array while storing the last value <=4 wherever scada is looking.


How you can save 60 values to 20-segment array. Or are you saving value only every 3 seconds?

oh, values are captured every 5 seconds, so 12 segment would be enought? ;)
 
Last edited:

Similar Topics

Kindly, we have the following configuration fault on a Kinetix 5700 axis. It only appears when we go online on the Plc. We are just starting the...
Replies
0
Views
14
Using the CompactLogix 5370 and Kinetix 5500, I am in at the point in a project that I need to begin tuning servos. The configuration involves a...
Replies
1
Views
1,394
Hi, I need to use 3 filters in my s7300 PLC. These are Low Pass, High Pass, Notch, but there are in the library of STEP 7. I saw these filters in...
Replies
2
Views
6,424
When supplying variable frequency drives (vfd), should we install the line filter (emc) before the reactor (choke), or reactor before filter...
Replies
2
Views
187
Hi. I'd like to have a filter on an Alarm Summary page where I could pick which of the 3 groups I created I want to display on the screen. I...
Replies
3
Views
540
Back
Top Bottom