AI Layer Features

The three analyses on this page sit one level above the individual descriptors. Instead of producing a single physical quantity, they combine many features into a decision-ready result: a scalar deviation from a known-good baseline, a learned embedding vector, or a map of the modulation structure hidden in a stationary-looking signal.

AI Anomaly Score

The anomaly score answers a question that has no textbook formula: does this machine sound different from the machines I know are good? It does so without any labelled fault data — only recordings of normal behaviour are required.

The 14-dimensional feature vector

Each analysis frame is reduced to fourteen features, eight from the waveform and six from the spectrum of the same frame:

DomainFeatures
TimeRMS, Kurtosis, Crest Factor, Shape Factor, Impulse Factor, Margin Factor, Energy Entropy (8 sub-frames), Zero Crossing Rate
SpectrumSpectral Centroid, Spectral Spread, Spectral Flatness, Spectral Crest, Spectral Entropy, Spectral Rolloff

The definitions are exactly those of the corresponding stand-alone analyses, so a high score can always be traced back to an interpretable quantity. Any feature that cannot be evaluated on a frame (for example a ratio on a silent frame) contributes 0 rather than invalidating the whole vector.

Score definition

The baseline stores a mean and a standard deviation per dimension. A frame is scored by its normalized distance from that baseline — a diagonal Mahalanobis distance averaged over the dimensions:

zi = ( xi − μi ) / σi     score = √( (1/D) Σi zi² )

The normalization by the number of dimensions makes the score easy to read: a frame that sits exactly on the baseline scores 0, and a frame that deviates by exactly one standard deviation in every dimension scores exactly 1. A threshold of 3 therefore means “on average three sigma away from normal”, independent of how many features are used.

Each standard deviation is regularized to a small positive floor, so a feature that happens to be constant across the baseline recordings cannot blow the score up to infinity.

Baseline modes

Three ways of obtaining the baseline are supported, tried in this order:

ModeSet byUse
Loaded from fileBaselineStatsPathProduction use: the baseline was trained on a population of known-good units and is reused unchanged for every test.
Head of the recordingBaselineSecondsRun-in and endurance monitoring: the first seconds define “normal” and the rest of the recording is compared against them. Falls back to the whole file if the head segment yields fewer than eight frames.
Whole filedefaultExploration: find the relatively most unusual passages inside a single recording.

Whichever mode is active, setting BaselineExportPath writes the baseline statistics to a JSON file, so a baseline derived from a good unit can be captured once and reused later through BaselineStatsPath.

Train once on good units, then score every new recording good recordings 14 features / frame baseline μ, σ exported as JSON score curve + alarm threshold anomalous frame t

Outputs and alarm

The result is a score curve over time. Its single value is the 95th percentile of the score, which is far more stable than the maximum and works well as a pass / fail criterion. The annotation additionally reports the maximum score and the moment at which it occurred. An alarm is raised when any frame exceeds AnomalyThreshold, and it states how many frames exceeded it and where the worst one was.

Parameters

ParameterDefaultNotes
FrameSize2048Analysis frame in samples; values below 256 fall back to the default
Hop1024 (half the frame)Advance between frames
WindowHanningApplied before the FFT of the spectral features
BaselineStatsPath—JSON baseline to load; takes precedence over the other modes
BaselineSeconds0 (off)Use the first N seconds of the recording as the baseline
BaselineExportPath—Write the baseline in use to this JSON file
AnomalyThreshold3Score above which a frame counts as anomalous
A baseline is only valid for the operating condition it was recorded under. Comparing an idle recording against a full-load baseline will produce a high score that has nothing to do with machine health. Keep one baseline per operating point, or include the operating point in the test procedure.

AI Embedding (ONNX)

An embedding is a fixed-length vector produced by a pretrained neural network, in which acoustically similar recordings end up close together. It turns “does this sound like that” into a distance computation, and it lets a classifier be trained on a handful of examples instead of thousands.

Front end and model input

The analysis reuses the standardized Log-Mel front end with the training-domain scaling ln(mel + 0.01) fixed, computes the mel matrix for a channel and feeds it to the model given by OnnxModelPath. The first output of the model is flattened into the embedding vector.

signal → Log-Mel (ln scaling) → ONNX model → embedding vector (typically 128…2048 dimensions)

The front-end parameters must match the convention the model was trained with. The defaults correspond to the widely used 25 ms / 10 ms, 64-band, 125…7500 Hz layout.

Input shape adaptation

Models declare their input differently — some expect frames first, some bands first, some carry a batch dimension, some leave dimensions dynamic. The analysis reads the shape declared by the model and fills it in: a dimension whose declared size equals the number of mel bands receives the bands, other fixed dimensions are kept as declared, and dynamic dimensions are filled from the back with the band count, then the frame count, then 1. If the model declares no shape at all, the tensor is built as [1, frames, mels].

Outputs and model handling

The embedding is displayed as a curve over the dimension index; its single value is the vector norm |v|, and the annotation states the dimensionality. Two vectors can then be compared by cosine similarity to find the nearest known sound.

No model file is shipped with the software. If OnnxModelPath is empty or the file does not exist, the analysis reports this and finishes without an error — the engine is ready and only waits for a model. Because the result is entirely determined by the model you supply, this entry carries no verification stars in the Insert catalogue.

Parameters

ParameterDefaultNotes
OnnxModelPathrequiredPath to the ONNX model file
NMels64Mel bands — must match the model's training convention
FrameMs25 msFrame length of the front end
HopMs10 msHop of the front end
FMin125 HzLower edge of the filter bank
FMax7500 HzUpper edge of the filter bank

Cyclic Spectral Coherence

Many machine faults are invisible in an ordinary spectrum because their signature is not a line but a modulation: a high-frequency resonance whose amplitude is switched on and off at a low repetition rate. Cyclic spectral analysis separates the two frequencies — the carrier that is being excited and the cyclic frequency at which it is modulated — and shows them on two independent axes.

Cyclic modulation coherence

The signal is transformed by a strongly overlapping short-time Fourier transform. For each carrier line f, the sequence of frame powers et = |Xt(f)|² is the envelope of that line over time. Removing its mean and transforming it along the frame axis gives the modulation content, normalized by the mean envelope so the result is a relative modulation depth rather than an absolute level:

CMC(f, α) = 2 · | DFTt( et − ē )(α) | / ( K · ē )

The factor 2 merges the positive and negative cyclic frequencies, so the value can be read directly as a modulation ratio. A stationary, unmodulated signal gives values close to 0; an amplitude modulated carrier produces a clear ridge at the modulation rate and weaker ridges at its harmonics.

Resolution and range

Because the modulation is observed at the frame rate of the short-time transform, the accessible cyclic frequency range and its resolution follow directly from the window and hop settings:

frame rate = fs / CscHop   αmax = frame rate / 2    Δα = frame rate / K

where K is the number of frames used, truncated to the largest power of two available so that the cyclic frequency grid is exact and no zero padding leakage occurs. This range comfortably covers the modulation rates of bearing and gear faults, which lie between a few hertz and a few hundred hertz. CscAlphaMaxHz can limit the displayed range further, which speeds up the analysis when only low modulation rates are of interest.

Reading the map

The result is a colormap with the cyclic frequency α on one axis and the carrier frequency f on the other:

The analysis also reports the cyclic frequency at which the coherence, averaged over all carrier lines, is highest — the dominant modulation rate of the recording. The first two cyclic bins are skipped in this search because they are dominated by slow level drift rather than by a genuine modulation.

Parameters

ParameterDefaultNotes
CscWindowSize256STFT window in samples; sets the carrier frequency resolution. Values below 32 fall back to the default
CscHop64 (a quarter of the window)Frame advance; sets the frame rate and therefore the maximum cyclic frequency
WindowHanningApplied before the FFT
CscAlphaMaxHz0 (= frame rate / 2)Upper limit of the displayed cyclic frequency range
The analysis needs a reasonably long recording: it requires at least eight usable frames, and the cyclic frequency resolution improves in proportion to the number of frames. A recording of several seconds is typical.

Applications

The anomaly score is a diagonal Mahalanobis distance over standard, individually interpretable features; the cyclic modulation coherence is the lightweight estimator of the cyclic spectral coherence family. Both are transparent by design: any elevated value can be traced back to the feature or to the carrier / cyclic frequency pair that caused it.

© 2026 Deepsona. All Rights Reserved.