faultDetect: Process detection

Description Usage Arguments Details Value Examples

Description

After the model builds, use it to detect if a single multivariate observation is beyond normal operating conditions.

Usage

1
faultDetect(threshold_object, observation, ...)

Arguments

threshold_object

An object of classes "threshold" and "pca" returned by the internal threshold() function.

observation

A single row of an xts data matrix to compare against the thresholds

...

Lazy dots for additional internal arguments

Details

This function takes in a threshold object returned by the threshold() function and a single observation as a matrix or xts row. Internally, the function multiplies the observation by the projection matrix returned within the threshold object, calculates the SPE and T2 process monitoring statistics for that observation, and compares these statistics against their corresponding threshold values to determine if the observation lies outside the expected boundaries. The function then returns a row vector of the SPE test statistic, a logical indicator marking if this statistic is beyond the threshold, the Hotelling's T2 statistic, and an indicator if this statistic is beyond the threshold. Observations with monitoring statistics beyond the calculated threshold are marked with a 1, while observations within normal operating conditions are marked with a 0. These threshold values are passed from the threshold() function through this function via a returned threshold object. This object will be used in higher function calls.

Value

A named 1 x 4 matrix with the following entries for the single row observation passed to this function:

Examples

1
2
3
4
5
6
7
data(normal_data)
data(fault_data)
normal_embed <- embed(scale_pca(normal = normal_data, fault = normal_data),2)
fault_embed <- embed(scale_pca(normal=normal_data,fault=fault_data),2)
model_pca <- PCA_model(data=normal_embed, kernel_num=5)
threshold_pca <- threshold(pca_object=model_pca)
fault_detection <- faultDetect(threshold_object = threshold_pca, observation =  fault_embed)

chengfeifan/monitor documentation built on May 14, 2019, 2:29 p.m.