Main Content

Detect Anomalies

Detect abnormal signal behavior in time series using tools such as matrix profiling algorithms and specialized deep learning models that identify deviations from normal behavior

Anomaly detection in time series is the process of identifying signal abnormalities by thoroughly characterizing normal behavior and detecting deviations from that behavior. Anomaly detection techniques can include pattern matching using matrix profiling and distance methods, and one-class deep learning and machine learning models.

You can create anomaly-detection algorithms without incorporating knowledge of physics-based dynamics modes or failure modes or signatures. You can train anomaly detectors using only normal data. You therefore need only a relatively small amount of anomalous data, just for testing.

The Predictive Maintenance Toolbox™ provides a suite of deep learning models designed especially for subsequence anomaly detection in time series. You can use these models without an extensive background in deep learning. These models do require Deep Learning Toolbox™.

The toolbox also includes a suite of distance-based tools that perform pattern-matching within signals and with specified subsequences. The algorithms for these tools are designed to be very fast, and are compatible with GPUs for even faster performance with large amounts of data.

Functions

expand all

Anomaly Detector Model Creation

tcnADCreate anomaly detector model that uses TCN network to detect anomalies (Since R2025a)
deepantADCreate anomaly detector model that uses CNN network to detect anomalies (Since R2025a)
usADCreate anomaly detector model that uses unsupervised dual-encoder network to detect anomalies in time series (Since R2025a)
vaelstmADCreate anomaly detector model that combines variational autoencoder (VAE) and long short-term memory (LSTM) networks to detect anomalies in time series (Since R2025a)

Anomaly Detection Workflow Functions

trainTrain anomaly detector and obtain detection threshold (Since R2025a)
detectDetect anomalies in time series using trained detector model (Since R2025a)
plotPlot detected anomalies and anomaly scores in time series (Since R2025a)
plotHistogramPlot histogram of anomaly scores and detection threshold (Since R2025a)
updateDetectorUpdate settings of a trained anomaly detector and recompute detection threshold (Since R2025a)

Anomaly Detection Objects

TcnDetectorDetect anomalies in time series using TCN network (Since R2025a)
DeepantDetectorDetect anomalies in time series using deep-learning-based forecasting approach (Since R2025a)
UsadDetectorDetect time series anomalies using unsupervised dual-encoder network (Since R2025a)
VaelstmDetectorDetect anomalies in time series using combined variational autoencoder (VAE) and long short-term memory (LSTM) networks (Since R2025a)
similarityDistanceCompute distance profile between query and time series subsequences (Since R2024b)
distanceProfileCompute distance profile between query subsequence and all other subsequences of a time series (Since R2024b)
matrixProfileCompute matrix profile of between all pairs of subsequences in a multivariable time series (Since R2024b)
findDiscordFind the locations of top discords from the matrix profile of a time series (Since R2024b)
findMotifFind the locations of top motif pairs from the matrix profile of a time series (Since R2025a)

Topics