Jump to content

Aggregating only desired values for a Signal over periodic times

Brian Crandall

Recommended Posts

  • Seeq Team


There are many use cases where the user wants to do an aggregation over a periodic time frame, but only include certain values.  Examples abound: for cement calculate the average daily clinker production only when the kiln is running, for biotech pharma the standard deviation of dissolved oxygen only when the batch is running, etc.  Here our user is looking into equipment reliability for compressors.  She wants to calculate the average daily compressor power to examine its performance over time. 


1. Add the signal into Seeq.

20190912_Aggregating only desired values 1.png

2. Use the 'Periodic Condition'  or 'Formula' Tool to add a condition for days.  This doesn't have to be days, it can be any arbitrary time, but it is usually periodic in nature.  To use a custom periodic Condition, consider using the periods() function.  For example to do this for days, the formula is:


As an example, to change this to 5-minute time periods the formula is:


Here are how the days and statistics in the Capsule Pane look for her:

20190912_Aggregating only desired values 2.png

3. Find only the desired values to be used in the aggregate (e.g. Average) statistic.  From the values in the Capsule Pane she sees that the average compressor powers results are too low.  This is because all the time when the compressor was OFF, near 0, are included in this calculation.   She wants to only include times when the compressor is running because that will provide a true picture of how much energy is going into the equipment - and can indicate potential problems.

To do this, she creates a 'Value Search' for times to include in this calculation, in this case when the Compressor is ON or > 0.5kW.

20190912_Aggregating only desired values 3.png

4. Create a new signal to only have values *within* the 'Compressor ON' condition.  Use the aptly named 'within' function in the 'Formula' Tool.  Notice how the resulting Signal in the bottom lane only has values within the 'Compressor ON' condition.  Now she can use this because all those 0's that were causing the time-weighted Average to be low... are now gone.

20190912_Aggregating only desired values 4.png

5. Examine the resulting statistical values.  She now sees that the calculations are correct and can use this resulting 'Compressor Power only when ON' Signal in other calculations using 'Signal from Condition', 'Scorecard Metric', and other Seeq Tools!

20190912_Aggregating only desired values 5.png

  • Like 3
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
  • Create New...