Main Content

Detect and Diagnose Faults

Train statistical, machine learning, and deep learning models for condition monitoring and anomaly detection. Use distance and matrix profiling to detect anomalies from machine data

Condition monitoring includes discriminating between faulty and healthy states (fault detection) or, when a fault state is present, determining the source of the fault (fault diagnosis). To design an algorithm for condition monitoring, you use condition indicators extracted from system data to train a decision model that can analyze test data to determine the current system state.

When designing your algorithm, you might test different fault detection and diagnosis models using different condition indicators. Thus, this step in the design process is likely iterative with the step of extracting condition indicators, as you try different indicators, different combinations of indicators, and different decision models.

An alternate approach to condition monitoring is to evaluate the raw data or derived condition indicators for patterns that are known to indicate healthy behavior. Deviations from these patterns, as expressed by distance measurements, can indicate anomalous behavior.

For an overview of the types of models you can use, see Decision Models for Fault Detection and Diagnosis.

Functions

expand all

similarityDistanceCompute distance profile between query and time series subsequences by evaluating z-normalized Euclidean distances (Since R2024b)
distanceProfileCompute distance profile between query subsequence and all other subsequences of a time series (Since R2024b)
matrixProfileCompute matrix profile of time series (Since R2024b)
findDiscordFind the locations of top discords from the matrix profile of a time series (Since R2024b)
pcaPrincipal component analysis of raw data
pcaresResiduals from principal component analysis
sequentialfsSequential feature selection using custom criterion
fscncaFeature selection using neighborhood component analysis for classification
tsnet-Distributed Stochastic Neighbor Embedding
ksdensityKernel smoothing function estimate for univariate and bivariate data
histfitHistogram with a distribution fit
coxphfitCox proportional hazards regression
ztestz-test
fitcsvmTrain support vector machine (SVM) classifier for one-class and binary classification
fitcecocFit multiclass models for support vector machines or other classifiers
fitcknnFit k-nearest neighbor classifier
fitclinearFit binary linear classifier to high-dimensional data
fitcnbTrain multiclass naive Bayes model
fitctreeFit binary decision tree for multiclass classification
fitckernelFit binary Gaussian kernel classifier using random feature expansion
kmeansk-means clustering
mleMaximum likelihood estimates
TreeBaggerEnsemble of bagged decision trees
nlarxEstimate parameters of nonlinear ARX model
ssestEstimate state-space model using time-domain or frequency-domain data
arxEstimate parameters of ARX, ARIX, AR, or ARI model
armaxEstimate parameters of ARMAX, ARIMAX, ARMA, or ARIMA model using time-domain data
arEstimate parameters when identifying AR model or ARI model for scalar time series
forecastForecast time-series values into future
translatecovTranslate parameter covariance across model transformation operations
controlchartShewhart control charts
controlrulesWestern Electric and Nelson control rules
cusumDetect small changes in mean using cumulative sum
findchangeptsFind abrupt changes in signal
findpeaksFind local maxima
pdistPairwise distance between pairs of observations
pdist2Pairwise distance between two sets of observations
mahalMahalanobis distance to reference samples
segmentSegment data and estimate models for each segment
meanDifferenceModelIdentify most degraded cell in serially connected lithium-ion battery pack (Since R2022b)
adjacentPairCorrelationModelIdentify worst cell relative to other cells in serially connected lithium-ion battery pack (Since R2023a)

Topics

Decision Models

Fault Diagnosis Using Model-Based Approach

Fault Detection Using System Identification

Multiclass Fault Detection

Fault Detection and Diagnosis Using Artificial Intelligence

Featured Examples