Jump to content

Recommended Posts

  • Seeq Team
Posted (edited)

Monitoring sensor data is crucial for ensuring optimal performance and product quality. While it is common to focus on limit excursions, it is equally important to monitor for unusual variability in the sensor (signal) data, particularly if the variation negatively impacts product quality, production rate, or energy consumption. Variability is inherent in process data due to a variety of factors and can never be fully eliminated. Anomalous (unusual, excessive) variation can sometimes be eliminated via process control, design, equipment, instrumentation, raw material or procedural changes. 

Identifying unusual variability is challenging because of the nature of time series data from industrial operation; expected variability from signal to signal can be different. The purpose of this Tips & Tricks is to demonstrate three Formula methods for identifying time periods of excessive variability: 

  • Percent Difference - Parameters not dependent on signal scale, thus more easily applied to many signals.
  • Standard Deviation (over moving time window) - More applicable for detecting sustained, unusual variation. Parameters depend on signal scale and variation time windows of concern, thus not easily applied to many signals. 
  • Running Delta - Simplest method but parameters depend on signal scale, thus not easily applied to many signals. 

These methods are demonstrated below.

1. Percent Difference 

The percent difference formula requires 3 input parameters to be specified by the user, and monitors the percentage difference between the raw signal and its smoothed representation. Dividing the difference by the smoothed signal value converts the difference to a percentage. The degree of smoothing should be selected based on the nature of the unusual variability the user wants to flag. This method enables signals on vastly different scales and in different contexts to be more easily monitored with generic parameter settings. 

image.png

 

Formula Text for Unusual High Variability (Percent Difference Method)

// Step 1: Define parameters
$percent_tolerance = 1.5 // percent; percent differences above this percent will be captured as capsules
$smoothing_period = 1min // the degree of smoothing to apply to the signal
$combine_events_duration = 1h // combine (merge) capsules that are closer than this duration

// Step 2: Smooth the signal
$smoothed_signal_representation = $signal.agileFilter($smoothing_period)

// Step 3: Find the percent difference of the signal to its smoothed representation
$percent_difference_signal = 100*(abs($signal - $smoothed_signal_representation)/$smoothed_signal_representation)

// Step 4: Create the condition for when the percent difference is greater than the tolerance
$outliers_condition = $percent_difference_signal > $percent_tolerance

// Step 5: Combine (merge) capsules (events) that are closer than the combine_events_duration
$outliers_condition_merged = $outliers_condition.merge($combine_events_duration)

// Output
return $outliers_condition_merged

 

The formula above was applied to the Pressure Signal below, identifying the pink capsules as excessive variability:

image.png

 

2. Standard Deviation

The standard deviation formula requires 3 input parameters to be specified by the user, and monitors for rolling window standard deviations greater than the user specified tolerance. This method focuses more on sustained variation over the user specified time window ($period), where the other 2 methods are more looking at instantaneous variability. This method is slightly more complex than the other 2 methods. A drawback of this method is that the input parameters will often have to be modified on a signal by signal basis for accurate detection.

image.png

 

Formula Text for Unusual High Variability (Standard Deviation Method)

// Step 1: Define parameters
$stddev_tolerance = 0.1 // standard deviations; standard deviations above this value will be captured as capsules
$period = periods(15min, 15min) // 15 minute capsule occurring every 15 minutes
                                                      // every capsule introduces and removes a 15 minute window, creating a staggering effect
$combine_events_duration = 1h // combine (merge) capsules that are closer than this duration

// Step 2: Calculate a signal for the rolling standard deviation
$rolling_stddev_signal = $signal.aggregate(stddev(), $period, endKey())

// Step 3: Create the condition for when the running standard deviation is greater than the tolerance
$outliers_condition = $rolling_stddev_signal > $stddev_tolerance

// Step 4: Combine (merge) capsules (events) that are closer than the combine_events_duration
$outliers_condition_merged = $outliers_condition.merge($combine_events_duration)

// Output
return $outliers_condition_merged

 

The formula above was applied to the Pressure Signal below, identifying the pink capsules as excessive variability:

image.png

 

3. Running Delta

The running delta formula requires 2 input parameters to be specified by the user, and monitors for sample to sample delta values (absolute) greater than the user specified tolerance. This is the simplest of the 3 methods but a drawback is that the tolerance value will often have to be modified on a signal by signal basis for accurate detection. 

image.png

 

Formula Text for Unusual High Variability (Running Delta Method)

// Step 1: Define parameters
$delta_tolerance = 0.5 // absolute signal deltas above this value will be captured as capsules
$combine_events_duration = 1h // combine (merge) capsules that are closer than this duration

// Step 2: Calculate the running delta signal
$running_delta_signal = $signal.runningDelta().abs()

// Step 3: Create the condition for when the running delta is greater than the tolerance
$outliers_condition = $running_delta_signal > $delta_tolerance

// Step 4: Combine (merge) capsules (events) that are closer than the combine_events_duration
$outliers_condition_merged = $outliers_condition.merge($combine_events_duration)

// Output
return $outliers_condition_merged

 

The formula above was applied to the Pressure Signal below, identifying the pink capsules as excessive variability:

image.png

 

Summary

The methods above can be used to proactively identify unusual variability. The Percent Difference method is the only method of the three that is not dependent on the signal's scale, meaning it can be much more easily applied in bulk to many signals.

Whatever method is used, it is important for the user to iterate and observe the effects of modifying the defined parameters, until the desired variability or outliers are reliably detected.

Once time periods of excessive variability have been identified, those time periods can easily be removed (see Data Cleansing Tips: Using the .remove() and .within() Formula Functions) to cleanse the signal prior to additional analysis. The excessive variability time periods (events) can be assessed individually for further analysis, such as finding how often the signals are showing erratic behavior, which could indicate mechanical, sensor, or other process issues.

 

 

 

Edited by John Cox
adding text of formulas (in addition to screenshots)

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...