Skip to content

matlab/matlab-agentic-toolkit / skills-catalog/control-systems/matlab-extract-rotating-machinery-features

matlab-extract-rotating-machinery-features

Verified

Extract features from signals collected on rotating machinery components, including motors, pumps, fans, gears, bearings, and shafts. Signals can include vibration, electrical, or environmental sensor measurements. Use when developing and deploying condition monitoring and fault detection applications for rotating machinery, including industrial machines, electrical vehicles, internal combustion engines, turbines, and drive trains.

FileKindSize
SKILL.mdskill md12.7 KB
manifest.yamlconfig563 B
references/bearings.mdmarkdown6.9 KB
references/gears.mdmarkdown6.2 KB
references/spectral.mdmarkdown4.9 KB
references/tsa.mdmarkdown5.2 KB
references/vibration.mdmarkdown2.4 KB

references/tsa.md

View on GitHub
---
name: time-synchronous-averaging
description: "Apply time-synchronous averaging to time series data and extract periodic or residual components of the signals. Use when processing data from rotating machinery where the rotation speed (rpm) can be used to resample and clean the data before feature extraction."
---

# Time-Synchronous Averaging

Apply time-synchronous averaging (TSA) to rotating machinery vibration signals to average out non-periodic components and isolate signal content that is periodic with shaft rotation. TSA is the recommended preprocessing step before extracting gear and shaft features.

## When to Use

- Processing vibration data from rotating machinery where a tachometer signal or RPM profile is available.
- Isolating periodic (gear mesh, shaft) components from noise before feature extraction.
- Extracting the residual or difference signal to expose fault-related content.

## When NOT to Use

- When no tachometer or RPM information is available to define the rotation phase.
- When the rotation speed is highly variable (apply order tracking `ordertrack` first).

## Workflow

- If a tachometer signal is available, estimate the RPM with `tachorpm`.
- Compute the time-synchronous average with `tsa`.
- Extract the regular signal (`tsaregular`), difference signal (`tsadifference`), or residual signal (`tsaresidual`) to isolate fault-related content.

## API Reference

The signatures below are the ones needed for this workflow. A common mistake is calling the `tsa*` residual/difference/regular functions with just `(signal, fs)` — they also require the rotational speed and an order list. Follow the syntax exactly; consult the linked documentation for name-value arguments not shown here.

**Pulse times vs. tachometer waveform — read this first.** `tachorpm` takes a *raw tachometer pulse waveform* (the sampled voltage trace of the tach channel) and detects the pulses in it. It does **not** take a list of pulse *times*. `tsa`, by contrast, takes pulse *times* directly as its `tp` argument. So: **if you already have pulse times, pass them straight to `tsa` and do not call `tachorpm`.** Only call `tachorpm` when you have a raw tach channel and need to recover rpm/pulse locations from it.

### Time-Synchronous Data Processing

- **`tachorpm`** (Signal Processing Toolbox, R2016b) — extract an RPM signal from a raw tachometer **pulse waveform**.
  - `[rpm,t,tp] = tachorpm(x,Fs)` — `x` the sampled tach voltage trace (a waveform, **not** pulse times), `Fs` sample rate; returns the rpm profile, its time vector, and detected pulse locations `tp`.
  - Name-value: `PulsesPerRev` (default 1) — note the spelling (`PulsesPerRev`, not `PulsesPerRevolution`), `StateLevels`, `OutputFs`, `FitType`.
  - **Do not call this on a vector of pulse times** — it will report "no pulses detected". Pulse times go directly into `tsa`.
  - Docs: <https://www.mathworks.com/help/signal/ref/tachorpm.html>

- **`tsa`** (Signal Processing Toolbox, R2017b) — time-synchronous signal average.
  - `ta = tsa(x,fs,tp)` — `x` signal vector, `fs` sample rate, `tp` **pulse times** (scalar or vector). Pass a timetable `xt` in place of `(x,fs)`: `tsa(xt,tp)`.
  - `[ta,t,p,rpm] = tsa(___)` also returns sample times, phase, and the constant rotational speed.
  - Name-value: `Method` (`"linear"`|`"spline"`|`"pchip"`|`"fft"`), `NumRotations`, `PulsesPerRotation`, `ResampleFactor`.
  - Docs: <https://www.mathworks.com/help/signal/ref/tsa.html>

- **`tsaresidual`** (Predictive Maintenance Toolbox, R2018b) — residual signal of a TSA signal (removes shaft/gear-mesh orders and their harmonics).
  - `Y = tsaresidual(X,fs,rpm,orderList)` — `X` TSA signal vector, `fs` sample rate, `rpm` shaft speed (positive scalar), `orderList` orders to filter out. Pass a TSA timetable `XT` in place of `(X,fs)`: `tsaresidual(XT,rpm,orderList)`. **Requires `rpm` and `orderList` — not just `(signal,fs)`.**
  - `[Y,S] = tsaresidual(___)` also returns the amplitude spectrum.
  - Name-value: `NumHarmonics` (default 2), `NumRotations`, `Domain` (`'order'` default | `'frequency'`).
  - Docs: <https://www.mathworks.com/help/predmaint/ref/tsaresidual.html>

- **`tsadifference`** (Predictive Maintenance Toolbox, R2018b) — difference signal of a TSA signal.
  - `Y = tsadifference(X,fs,rpm,orderList)` — same argument pattern as `tsaresidual` (timetable form: `tsadifference(XT,rpm,orderList)`); `[Y,S] = tsadifference(___)` also returns the amplitude spectrum.
  - Name-value: `NumHarmonics`, `NumSidebands` (default 1), `NumRotations`, `Domain`.
  - Docs: <https://www.mathworks.com/help/predmaint/ref/tsadifference.html>

- **`tsaregular`** (Predictive Maintenance Toolbox, R2018b) — regular signal of a TSA signal (retains specified orders).
  - `Y = tsaregular(X,fs,rpm,orderList)` — same argument pattern (timetable form: `tsaregular(XT,rpm,orderList)`); here `orderList` is the orders to *retain*. `[Y,S] = tsaregular(___)` also returns the amplitude spectrum.
  - Name-value: `NumHarmonics`, `NumSidebands` (default 0), `NumRotations`, `Domain`.
  - Docs: <https://www.mathworks.com/help/predmaint/ref/tsaregular.html>

### Reference Examples
- [Vibration Analysis of Rotating Machinery](https://www.mathworks.com/help/signal/ug/vibration-analysis-of-rotating-machinery.html)

----

Copyright 2026 The MathWorks, Inc.

writing-skillsobra/superpowersUse when creating new skills, editing existing skills, or verifying skills work before deploymentStars: 322kUpdated Claude CodeCodexVerifiedInstall
xlsxanthropics/skillsUse this skill any time a spreadsheet file is the primary input or output. This means any task where the user wants to: open, read, edit, or fix an existing .xlsx, .xlsm, .xltx, .csv, or .tsv file (e.g., adding columns, computing formulas, formatting, charting, cleaning messy data); create a new spreadsheet from scratch or from other data sources; or convert between tabular file formats. Trigger especially when the user references a spreadsheet file by name or path — even casually (like "the xlsx in my downloads") — and wants something done to it or produced from it. Also trigger for cleaning or restructuring messy tabular data files (malformed rows, misplaced headers, junk data) into proper spreadsheets. The deliverable must be a spreadsheet file. Do NOT trigger when the primary deliverable is a Word document, HTML report, standalone Python script, database pipeline, or Google Sheets API integration, even if tabular data is involved.Stars: 198kUpdated Claude CodeCodexVerifiedInstall
shipping-and-launchaddyosmani/agent-skillsPrepares production launches. Use when preparing to deploy to production, or when asking what needs to be in place before shipping. Use when you need a pre-launch checklist, when setting up monitoring, when planning a staged rollout, or when you need a rollback strategy.Stars: 119kUpdated Claude CodeCodexVerifiedInstall
childhoodthedotmack/claude-memBabysit a shipped release after merge, publication, or deployment. Verify published packages, production behavior, installed plugins, and late CI or user reports until the observation window is clean; use babysit for PR readiness before release.Stars: 118kUpdated Claude CodeCodexVerifiedInstall