generate_test_signal
Generate synthetic vibration signals for bearing faults, gear faults, imbalance, or normal conditions, automatically save and register them for immediate use in analysis and diagnosis tools.
Instructions
Generate a synthetic test signal, save it, and load it into the repository.
The signal is written to data/signals/ with a timestamped filename and a
companion _metadata.json declaring sampling_rate and signal_unit='g'
(synthetic acceleration), then auto-registered in the repository — the
returned signal_id is immediately usable by every analysis, diagnosis,
and ISO severity tool with no manual steps.
Signal content: 'bearing_fault' = 10 Hz impacts modulating a 1 kHz
carrier; 'gear_fault' = 200 Hz mesh tone + harmonics; 'imbalance' =
25 Hz (1500 RPM) tone; 'normal' = broadband noise.
Args:
signal_type: Synthetic fault pattern to generate.
duration: Signal duration in seconds (10 s gives 0.1 Hz resolution).
sampling_rate: Sampling frequency in Hz.
noise_level: Additive white-noise amplitude.
random_seed: Seed for reproducible noise (None = non-deterministic).
ctx: MCP context.
Returns:
StoredSignalInfo of the auto-loaded signal (signal_id, declared
sampling_rate and unit 'g').
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| duration | No | ||
| noise_level | No | ||
| random_seed | No | ||
| signal_type | No | bearing_fault | |
| sampling_rate | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
| shape | Yes | Shape of the signal array | |
| filepath | Yes | Original file path | |
| signal_id | Yes | Unique identifier for the stored signal | |
| duration_s | No | Duration in seconds | |
| size_bytes | Yes | Approximate memory size in bytes | |
| num_samples | Yes | Number of samples | |
| signal_unit | No | DECLARED signal unit — from load_signal(signal_unit=...) or the companion _metadata.json ('signal_unit' field). Never guessed. None means undeclared: ISO severity verdicts will be refused until the unit is declared. | |
| sampling_rate | No | Sampling rate in Hz (must be positive when set) | |
| load_timestamp | Yes | ISO 8601 timestamp when signal was loaded | |
| source_metadata | No | Complete companion _metadata.json of the source file (rpm/shaft_speed, reference frequencies, ...). Empty when the file has no companion metadata. |