Evaluate vibration severity according to ISO 20816-3 standard.
ISO 20816-3 defines vibration severity zones for rotating machinery based on
broadband RMS velocity measurements on non-rotating parts (bearings, housings).
**CRITICAL - LLM Inference Policy:**
- **NEVER infer fault type or severity from filename** (e.g., "OuterRaceFault_1.csv" does NOT mean outer race fault)
- **NEVER assume baseline/healthy from filename** (e.g., "baseline" does NOT guarantee Zone A)
- Treat ALL filenames as opaque identifiers
- Report ONLY the ISO zone returned by measurement, regardless of filename
- If filename suggests "baseline" but measurement shows Zone C/D, report Zone C/D
**DEFAULTS** (use if user doesn't specify):
- machine_group = 2 (medium-sized machines, most common)
- support_type = "rigid" (horizontal machines on foundations)
**Machine Group Selection Guide** (ask user if unsure):
- Group 1: Large machines (power >300 kW OR shaft height H >= 315 mm)
Examples: Large turbines, generators, compressors, large pumps
- Group 2: Medium machines (15-300 kW OR 160mm <= H < 315mm) [DEFAULT]
Examples: Industrial motors, fans, pumps, gearboxes
**Support Type Selection Guide** (ask user if unsure):
- "rigid": Machine on stiff foundation, horizontal orientation [DEFAULT]
Rule: Lowest natural frequency > 1.25 x main excitation frequency
Examples: Motors/pumps on concrete, horizontal compressors
- "flexible": Machine on soft supports, vertical, or large turbine-generator sets
Examples: Vertical pumps, machines on springs, large turbogenerators
**When to ask user**:
- If power/dimensions unknown -> use defaults (Group 2, rigid)
- If clearly large turbine (>10 MW) -> suggest Group 1, flexible
- If vertical machine -> suggest flexible
- If user provides machine specs -> use guide above
Evaluation Zones:
- Zone A (Green): New machine condition - excellent
- Zone B (Yellow): Acceptable for long-term unrestricted operation
- Zone C (Orange): Unsatisfactory - limited operation, plan maintenance
- Zone D (Red): Sufficient severity to cause damage - immediate action
Args:
signal_file: Name of the CSV file in data/signals/
sampling_rate: Sampling frequency in Hz (default: 10000)
machine_group: Machine group 1 (large) or 2 (medium) (default: 2 - medium)
support_type: 'rigid' or 'flexible' (default: 'rigid')
operating_speed_rpm: Operating speed in RPM (optional, for frequency range selection)
signal_unit: Signal unit - 'g' or 'm/s2' (acceleration) or 'mm/s' or 'm/s' (velocity).
**PRIORITY ORDER FOR UNIT DETECTION:**
1. Check metadata file for 'signal_unit' field (recommended)
2. Use this parameter if explicitly provided
3. If neither exists: LLM will ask user to confirm based on RMS hypothesis
4. Default assumption: 'g' (most common for vibration sensors)
**IMPORTANT**: Wrong unit completely invalidates ISO 20816-3 results!
Best practice: Add 'signal_unit' field to metadata JSON files.
Returns:
ISO20816Result with evaluation zone, severity level, and recommendations
Example:
await evaluate_iso_20816(
ctx,
"motor_vibration.csv",
sampling_rate=10000,
machine_group=2,
support_type="rigid",
operating_speed_rpm=1500,
signal_unit="g" # Explicitly specify: 'g' or 'mm/s'
)