How to grab a peak value.. but not an outlier?

TheWaterboy

Lifetime Supporting Member + Moderator
Join Date
May 2006
Location
-27.9679796,153.419016
Posts
1,924
I have an analog flow signal that fluctuates with many peaks and valleys. Occasionally due to valve changes a peak value (or several) will be way outside the mean value and I need to ignore those. How do I capture a peak value that is not too far outside the average value?

Actual average value is not what I need, I need the peak within ~ 10% of the average over last 24 hours as its more reflective of real process conditions.

How can I do that filtering in a Logix PLC?
 
Does this peak detection need to occur in a rolling 24 hour period or is there a full rest as midnight, for example? That doesn't change the base logic. the rolling 24 hour thing just adds some additional checking and record keeping.

I assume that you already have an average that you are happy with. Since you define your window relative to the average you will need that.

You have already pretty well defined your requirements. A peak, by definition, is the highest detected value. So:

GRT(Input, Peak) MOV(Input, Peak)

However, you also don't want to consider values some percentage above the average. This would be:

CMP(Input < (Average*(1+(WindowPerc/100)))

Combine them to get:

GRT(Input, Peak) CMP(Input < (Average*(1+(WindowPerc/100))) MOV(Input, Peak)

Keith
 
Well now, that looks right, and quite simple. Reset the peak first thing in the morning and that should do it. I'll run that today and see how it behaves. Thanks.
 

Similar Topics

Good afternoon good people of the PLCtalk.net forum, We are doing some work for a customer where we will be converting their existing PLC-5/40...
Replies
3
Views
1,397
Hello, I am currently using RSLogix 5000 version 20 with a Keyence CV-X300 camera and controller. The camera controller sends data to...
Replies
1
Views
976
Hi, I am fairly new to programming PLCs and HMIs. I have been tasked with converting a Panelview Standard application (Panel Builder 32) to...
Replies
2
Views
1,604
Imagine I have a tag called Apple with a description "Red fruit". I want to show "Red Fruit" as a string on my screen. Can I get that...
Replies
4
Views
1,477
Hello all- I have a unique challenge using a customers Direct logic 06 PLC. This customer has a DC motor operating at 10 RPM which is turning a...
Replies
1
Views
136
Back
Top Bottom