Predictive Maintenance and Equipment Health Monitoring with Streaming SQL

Predictive Maintenance and Equipment Health Monitoring with Streaming SQL

·

Updated

·

16 min read

Predictive maintenance and equipment health monitoring with streaming SQL means vibration RMS, bearing temperature trends, phase current imbalance, oil pressure decline, a composite health score, alarm rates, and a live digital twin of every asset are maintained as materialized views that update with each sensor reading, so a work order is raised hours or days before the failure rather than after the production stop. This guide builds the full condition monitoring layer on RisingWave, a PostgreSQL-compatible streaming database, from the sensor feature set through ISO 10816 severity classification, health scoring, ISA-18.2 alarm management, and a digital twin.

Why Condition Monitoring Needs Streaming

Equipment failures are rarely sudden. A bearing announces itself through rising vibration and temperature hours or days before it seizes. A pump signals cavitation in its crest factor, a motor signals a winding fault in phase current imbalance, a gearbox signals wear in a slowly declining oil pressure. Most industrial facilities already collect these signals at high frequency. The latency is in the analytical pipeline: a historian stores the raw samples, and a reliability engineer reviews weekly trend reports.

Fixed-threshold alarms on single sensors have the same problem from the other direction. A vibration alarm fires when the reading crosses a static limit, but a motor trending toward that limit over two weeks is invisible until the day it fires, and when something does go wrong, the operator receives a flood of alarms that ISA-18.2 says no human can process.

Streaming SQL closes both gaps. Rolling means, rates of change, peak-to-peak amplitudes, and exceedance counts are computed continuously by materialized views and compared against trends and baselines rather than static limits. RisingWave maintains them incrementally, so only the affected asset's rows change on each reading, and serves them over the PostgreSQL protocol to dashboards and over Kafka to the computerized maintenance management system. RisingWave is open source under Apache 2.0, written in Rust, and checkpoints state to S3.

Sources: Sensor Telemetry, Asset Registry, Alarms, and Failures

One multi-parameter telemetry stream covers most assets. Accelerometers and the asset registry carry extra fields for vibration analysis. SCADA alarm events and historical failures are separate streams.

CREATE SOURCE equipment_telemetry (
    equipment_id    VARCHAR,
    asset_tag       VARCHAR,
    facility_id     VARCHAR,
    equipment_type  VARCHAR,     -- 'MOTOR', 'PUMP', 'COMPRESSOR', 'CONVEYOR', 'FAN', 'HVAC'
    sensor_id       VARCHAR,
    parameter       VARCHAR,     -- 'VIBRATION_RMS', 'ACCELERATION', 'TEMP_BEARING', 'TEMP_AMBIENT',
                                 -- 'CURRENT_A', 'CURRENT_B', 'CURRENT_C', 'OIL_PRESSURE', 'SPEED_RPM', 'FLOW_RATE', 'POWER_KW'
    value           DOUBLE PRECISION,
    set_point       DOUBLE PRECISION,
    unit            VARCHAR,
    event_ts        TIMESTAMPTZ
) WITH (
    connector = 'kafka',
    topic = 'iot.equipment_telemetry',
    properties.bootstrap.server = 'kafka:9092',
    scan.startup.mode = 'latest'
) FORMAT PLAIN ENCODE JSON;

CREATE TABLE equipment_assets (
    equipment_id        VARCHAR PRIMARY KEY,
    asset_tag           VARCHAR,
    asset_name          VARCHAR,
    equipment_type      VARCHAR,
    location            VARCHAR,
    iso_class           VARCHAR,       -- ISO 10816 machine class: 'I', 'II', 'III', 'IV'
    rated_power_kw      DOUBLE PRECISION,
    rated_rpm           DOUBLE PRECISION,
    criticality_tier    SMALLINT,      -- 1 critical, 2 important, 3 standard
    last_service_date   DATE,
    next_service_date   DATE
) WITH (
    connector = 'postgres-cdc',
    hostname = 'cmms-db', port = '5432',
    username = 'replicator', password = 'secret',
    database.name = 'cmms', schema.name = 'public', table.name = 'equipment_assets'
);

CREATE SOURCE alarm_events (
    alarm_id      VARCHAR,
    tag_name      VARCHAR,
    equipment_id  VARCHAR,
    alarm_class   VARCHAR,     -- 'PROCESS', 'EQUIPMENT', 'SAFETY'
    priority      INT,         -- 1 critical, 2 high, 3 medium, 4 low
    state         VARCHAR,     -- 'ACTIVE', 'CLEARED', 'ACKNOWLEDGED', 'SUPPRESSED'
    area          VARCHAR,
    operator_id   VARCHAR,
    value         DOUBLE PRECISION,
    setpoint      DOUBLE PRECISION,
    description   VARCHAR,
    event_time    TIMESTAMPTZ
) WITH (
    connector = 'kafka',
    topic = 'scada-alarms',
    properties.bootstrap.server = 'kafka:9092',
    scan.startup.mode = 'earliest'
) FORMAT PLAIN ENCODE JSON;

CREATE SOURCE failure_events (
    equipment_id   VARCHAR,
    failure_mode   VARCHAR,    -- 'BEARING_WEAR', 'OVERHEATING', 'ELECTRICAL_FAULT', 'LUBRICATION'
    severity       VARCHAR,    -- 'WARNING', 'CRITICAL', 'FAILURE'
    failure_ts     TIMESTAMPTZ,
    work_order_id  VARCHAR
) WITH (
    connector = 'kafka',
    topic = 'maintenance.failure_events',
    properties.bootstrap.server = 'kafka:9092',
    scan.startup.mode = 'earliest'
) FORMAT PLAIN ENCODE JSON;

Degradation models consume features, not raw samples. A one-hour tumbling window per equipment and parameter produces mean, standard deviation, range, and peak-to-peak. A 24-hour hopping window advancing every hour produces the trend, computed as the difference between the second and first half of the window, which is a robust rate-of-change signal.

CREATE MATERIALIZED VIEW equipment_features_1h AS
SELECT window_start, window_end, equipment_id, facility_id, parameter,
       AVG(value)                 AS mean_value,
       STDDEV(value)              AS std_value,
       MIN(value)                 AS min_value,
       MAX(value)                 AS max_value,
       MAX(value) - MIN(value)    AS peak_to_peak,
       COUNT(*)                   AS sample_count
FROM TUMBLE(equipment_telemetry, event_ts, INTERVAL '1 HOUR')
GROUP BY window_start, window_end, equipment_id, facility_id, parameter;

CREATE MATERIALIZED VIEW equipment_trend_24h AS
SELECT window_start, window_end, equipment_id, parameter,
       AVG(value)       AS daily_mean,
       STDDEV(value)    AS daily_std,
       COUNT(*)         AS sample_count,
       AVG(value) FILTER (WHERE event_ts >= window_start + INTERVAL '12 HOURS')
     - AVG(value) FILTER (WHERE event_ts <  window_start + INTERVAL '12 HOURS')  AS half_period_delta
FROM HOP(equipment_telemetry, event_ts, INTERVAL '1 HOUR', INTERVAL '24 HOURS')
GROUP BY window_start, window_end, equipment_id, parameter;

CREATE MATERIALIZED VIEW equipment_sensor_latest AS
SELECT DISTINCT ON (equipment_id, parameter)
       equipment_id, asset_tag, facility_id, equipment_type, parameter, value AS latest_value, set_point, unit, event_ts AS last_ts
FROM equipment_telemetry
ORDER BY equipment_id, parameter, event_ts DESC;

Archiving equipment_features_1h to Iceberg alongside failure_events gives the data science team a labeled training set for supervised degradation models without a separate feature pipeline.

Failure Precursors: Bearings, Lubrication, and Electrical Faults

Each failure mode has a signature in the trend view. A bearing on its way out shows rising vibration and rising bearing temperature together; a lubrication problem shows oil pressure declining below nominal; a developing winding or supply fault shows imbalance between the three phase currents.

CREATE MATERIALIZED VIEW bearing_precursor_alerts AS
SELECT v.equipment_id, v.window_end AS detection_ts,
       v.daily_mean AS vibration_rms, v.half_period_delta AS vibration_trend,
       t.daily_mean AS bearing_temp,  t.half_period_delta AS temp_trend,
       CASE WHEN v.half_period_delta > 0.5 AND t.half_period_delta > 2 THEN 'HIGH_RISK'
            WHEN v.half_period_delta > 0.2 AND t.half_period_delta > 1 THEN 'MEDIUM_RISK'
            ELSE 'LOW_RISK' END AS risk_level
FROM equipment_trend_24h v
JOIN equipment_trend_24h t
  ON t.equipment_id = v.equipment_id AND t.window_end = v.window_end AND t.parameter = 'TEMP_BEARING'
WHERE v.parameter = 'VIBRATION_RMS'
  AND (v.half_period_delta > 0.2 OR t.half_period_delta > 1);

CREATE MATERIALIZED VIEW lubrication_alerts AS
SELECT equipment_id, window_end AS detection_ts, daily_mean AS oil_pressure, half_period_delta AS pressure_trend
FROM equipment_trend_24h
WHERE parameter = 'OIL_PRESSURE'
  AND half_period_delta < -5
  AND daily_mean < 80;

CREATE MATERIALIZED VIEW current_imbalance AS
SELECT window_start, window_end, equipment_id, facility_id,
       MAX(mean_value) FILTER (WHERE parameter = 'CURRENT_A') AS phase_a,
       MAX(mean_value) FILTER (WHERE parameter = 'CURRENT_B') AS phase_b,
       MAX(mean_value) FILTER (WHERE parameter = 'CURRENT_C') AS phase_c,
       (MAX(mean_value) - MIN(mean_value)) / NULLIF(AVG(mean_value), 0) * 100 AS imbalance_pct
FROM equipment_features_1h
WHERE parameter IN ('CURRENT_A', 'CURRENT_B', 'CURRENT_C')
GROUP BY window_start, window_end, equipment_id, facility_id
HAVING (MAX(mean_value) - MIN(mean_value)) / NULLIF(AVG(mean_value), 0) * 100 > 10;

A bearing temperature trend over consecutive windows, computed with LAG over equipment_trend_24h, catches the slower pattern: two consecutive hours of rising average temperature on a bearing sensor is worth a look even before the vibration moves.

Vibration Analysis: RMS, Crest Factor, and ISO 10816 Severity

Rotating equipment deserves its own treatment because the vibration signature carries the richest diagnostic information. Ten-minute statistics per sensor axis give velocity RMS, acceleration RMS, peak, and crest factor, the ratio of peak to RMS that rises when a bearing defect produces impulsive impacts. ISO 10816 classifies severity by velocity RMS and machine class; for a Class II medium motor, warning begins above 4.5 mm/s and fault above 11.2 mm/s.

CREATE SOURCE vibration_samples (
    machine_id     VARCHAR,
    sensor_id      VARCHAR,
    axis           VARCHAR,          -- 'X', 'Y', 'Z', 'overall'
    acceleration   DOUBLE PRECISION, -- g or mm/s^2
    velocity_rms   DOUBLE PRECISION, -- mm/s
    temperature    DOUBLE PRECISION, -- bearing, degrees C
    rpm            DOUBLE PRECISION,
    event_time     TIMESTAMPTZ
) WITH (
    connector = 'kafka',
    topic = 'vibration-data',
    properties.bootstrap.server = 'kafka:9092',
    scan.startup.mode = 'latest'
) FORMAT PLAIN ENCODE JSON;

CREATE MATERIALIZED VIEW vibration_stats_10min AS
SELECT machine_id, sensor_id, axis, window_start, window_end,
       AVG(velocity_rms)                                          AS avg_velocity_rms,
       MAX(velocity_rms)                                          AS peak_velocity_rms,
       SQRT(AVG(acceleration * acceleration))                     AS rms_acceleration,
       MAX(acceleration)                                          AS peak_acceleration,
       MAX(acceleration) / NULLIF(SQRT(AVG(acceleration * acceleration)), 0) AS crest_factor,
       AVG(temperature)                                           AS avg_bearing_temp,
       AVG(rpm)                                                   AS avg_rpm,
       COUNT(*)                                                   AS sample_count
FROM TUMBLE(vibration_samples, event_time, INTERVAL '10 MINUTES')
GROUP BY machine_id, sensor_id, axis, window_start, window_end;

CREATE TABLE iso_10816_limits (iso_class VARCHAR PRIMARY KEY, warning_mm_s DOUBLE PRECISION, fault_mm_s DOUBLE PRECISION);
INSERT INTO iso_10816_limits VALUES ('I', 2.8, 7.1), ('II', 4.5, 11.2), ('III', 7.1, 18.0), ('IV', 11.2, 28.0);

CREATE MATERIALIZED VIEW vibration_alerts AS
SELECT s.machine_id, a.asset_name, a.location, a.criticality_tier, a.iso_class, s.sensor_id, s.axis,
       s.avg_velocity_rms, s.peak_velocity_rms, s.crest_factor, s.avg_bearing_temp, s.window_end AS alert_time,
       CASE WHEN s.avg_velocity_rms > l.fault_mm_s   THEN 'FAULT'
            WHEN s.avg_velocity_rms > l.warning_mm_s THEN 'WARNING'
            WHEN s.avg_bearing_temp > 85             THEN 'BEARING_HOT'
            WHEN s.crest_factor > 6.0                THEN 'BEARING_WEAR' END AS severity,
       CASE WHEN s.avg_velocity_rms > l.fault_mm_s   THEN 'Vibration exceeds ISO 10816 fault threshold'
            WHEN s.avg_velocity_rms > l.warning_mm_s THEN 'Vibration exceeds ISO 10816 warning threshold'
            WHEN s.avg_bearing_temp > 85             THEN 'Bearing temperature critical'
            WHEN s.crest_factor > 6.0                THEN 'High crest factor indicates bearing defect' END AS diagnosis
FROM vibration_stats_10min s
JOIN equipment_assets a ON a.equipment_id = s.machine_id
JOIN iso_10816_limits l ON l.iso_class = a.iso_class
WHERE s.avg_velocity_rms > l.warning_mm_s OR s.avg_bearing_temp > 85 OR s.crest_factor > 6.0;

Putting the ISO limits in a table rather than in the view means a reclassified machine or a tightened plant standard is an UPDATE. The current machine state per sensor axis is a DISTINCT ON over the samples, which is what the HMI shows.

A Composite Health Score

Threshold alarms on individual sensors miss slow degradation. A health score normalizes each sensor's latest reading against its own 24-hour rolling statistics and averages across sensors, so a motor losing 2 percent of health a day crosses a warning threshold with a ten-day lead rather than an alarm threshold with no lead.

CREATE MATERIALIZED VIEW equipment_rolling_stats AS
SELECT window_start, window_end, equipment_id, parameter,
       AVG(value) AS rolling_avg, STDDEV(value) AS rolling_stddev, COUNT(*) AS reading_count
FROM HOP(equipment_telemetry, event_ts, INTERVAL '1 HOUR', INTERVAL '24 HOURS')
GROUP BY window_start, window_end, equipment_id, parameter;

CREATE MATERIALIZED VIEW equipment_rolling_latest AS
SELECT DISTINCT ON (equipment_id, parameter) equipment_id, parameter, rolling_avg, rolling_stddev, window_end
FROM equipment_rolling_stats
ORDER BY equipment_id, parameter, window_end DESC;

CREATE MATERIALIZED VIEW equipment_health_score AS
SELECT l.equipment_id, l.asset_tag, l.facility_id, l.equipment_type, a.criticality_tier,
       AVG(CASE WHEN r.rolling_stddev > 0
                THEN GREATEST(0, 100 - 10 * ABS(l.latest_value - r.rolling_avg) / r.rolling_stddev)
                ELSE 100 END)                     AS health_score,
       COUNT(DISTINCT l.parameter)                AS active_sensor_count,
       MAX(l.last_ts)                             AS last_reading_ts
FROM equipment_sensor_latest l
JOIN equipment_rolling_latest r ON r.equipment_id = l.equipment_id AND r.parameter = l.parameter
JOIN equipment_assets a        ON a.equipment_id = l.equipment_id
GROUP BY l.equipment_id, l.asset_tag, l.facility_id, l.equipment_type, a.criticality_tier;

CREATE MATERIALIZED VIEW health_degradation_alerts AS
SELECT *,
       CASE WHEN criticality_tier = 1 AND health_score < 80 THEN 'CRITICAL_ALERT'
            WHEN criticality_tier = 2 AND health_score < 70 THEN 'WARNING_ALERT'
            WHEN criticality_tier = 3 AND health_score < 60 THEN 'INFO_ALERT' END AS alert_level
FROM equipment_health_score
WHERE (criticality_tier = 1 AND health_score < 80)
   OR (criticality_tier = 2 AND health_score < 70)
   OR (criticality_tier = 3 AND health_score < 60);

Thresholds scale with criticality because a 15-point drop on a critical compressor deserves a work order while the same drop on a standard fan deserves a note. The health score history, sunk to the dashboard database, becomes the trend line reliability engineers used to assemble by hand from weekly reports.

Alarm Management to ISA-18.2

Detection is only half of condition monitoring. ISA-18.2 governs how alarms reach operators: more than ten alarms per operator per hour is an overload, an alarm toggling more than three times in ten minutes is chattering and should be suppressed, an alarm active for 24 hours without acknowledgment is standing, and high-priority alarms must never be masked by a flood. All four are views over the SCADA alarm stream.

CREATE MATERIALIZED VIEW active_alarm_state AS
SELECT DISTINCT ON (alarm_id) alarm_id, tag_name, equipment_id, alarm_class, priority, state, area, operator_id,
       value, setpoint, description, event_time AS last_state_change
FROM alarm_events
ORDER BY alarm_id, event_time DESC;

CREATE MATERIALIZED VIEW operator_alarm_queue AS
SELECT alarm_id, tag_name, alarm_class, priority, area, description, value, setpoint, last_state_change,
       NOW() - last_state_change AS alarm_age
FROM active_alarm_state
WHERE state = 'ACTIVE';

CREATE MATERIALIZED VIEW alarm_rate_per_hour AS
SELECT area, window_start, window_end,
       COUNT(*)                                        AS total_alarms,
       COUNT(*) FILTER (WHERE priority = 1)            AS critical_alarms,
       COUNT(*) FILTER (WHERE state = 'ACKNOWLEDGED')  AS acknowledged_alarms
FROM TUMBLE(alarm_events, event_time, INTERVAL '1 HOUR')
WHERE state IN ('ACTIVE', 'ACKNOWLEDGED')
GROUP BY area, window_start, window_end;

CREATE MATERIALIZED VIEW chattering_alarms AS
SELECT alarm_id, tag_name, area, window_start, window_end,
       COUNT(*) AS state_changes,
       COUNT(*) FILTER (WHERE state = 'ACTIVE')  AS activations,
       COUNT(*) FILTER (WHERE state = 'CLEARED') AS clearances
FROM TUMBLE(alarm_events, event_time, INTERVAL '10 MINUTES')
GROUP BY alarm_id, tag_name, area, window_start, window_end
HAVING COUNT(*) > 3;

CREATE MATERIALIZED VIEW standing_alarms AS
SELECT alarm_id, tag_name, alarm_class, priority, area, description, last_state_change, NOW() - last_state_change AS standing_duration
FROM active_alarm_state
WHERE state = 'ACTIVE' AND NOW() - last_state_change > INTERVAL '24 HOURS';

CREATE MATERIALIZED VIEW alarm_flood_alerts AS
SELECT area, total_alarms, critical_alarms, window_end AS detected_at, 'ALARM_FLOOD' AS alert_type
FROM alarm_rate_per_hour
WHERE total_alarms > 10;

Chattering alarms can be suppressed automatically by anti-joining operator_alarm_queue against chattering_alarms for the current window, which keeps the operator's queue to alarms that mean something. Critical alarms on tier-1 equipment bypass suppression and go straight to a notification sink.

The Digital Twin: Live State and Divergence from Set Point

A digital twin that lags by minutes is a dashboard. One that reflects every reading within a second is a model you can drive control and simulation from. The twin state view is the latest value of every parameter for every asset joined to the registry, with deviation from set point. Derived layers add five-minute efficiency metrics and a rule-based health score, and a divergence view flags assets more than 15 percent off set point.

CREATE MATERIALIZED VIEW digital_twin_state AS
SELECT DISTINCT ON (t.equipment_id, t.parameter)
       t.equipment_id, a.asset_name, a.location, a.equipment_type, t.parameter, t.value, t.set_point,
       t.value - t.set_point AS deviation, t.event_ts AS last_updated
FROM equipment_telemetry t
JOIN equipment_assets a USING (equipment_id)
ORDER BY t.equipment_id, t.parameter, t.event_ts DESC;

CREATE MATERIALIZED VIEW asset_efficiency_5min AS
SELECT equipment_id, window_start, window_end,
       AVG(value) FILTER (WHERE parameter = 'FLOW_RATE')      AS avg_flow,
       AVG(value) FILTER (WHERE parameter = 'POWER_KW')       AS avg_power,
       AVG(value) FILTER (WHERE parameter = 'VIBRATION_RMS')  AS avg_vibration,
       AVG(value) FILTER (WHERE parameter = 'TEMP_BEARING')   AS avg_temp,
       AVG(value) FILTER (WHERE parameter = 'FLOW_RATE') / NULLIF(AVG(value) FILTER (WHERE parameter = 'POWER_KW'), 0) AS flow_per_kw
FROM TUMBLE(equipment_telemetry, event_ts, INTERVAL '5 MINUTES')
GROUP BY equipment_id, window_start, window_end;

CREATE MATERIALIZED VIEW twin_divergence_alerts AS
SELECT equipment_id, asset_name, parameter, value, set_point,
       ABS(deviation) / NULLIF(set_point, 0) * 100 AS pct_deviation, last_updated
FROM digital_twin_state
WHERE set_point IS NOT NULL AND ABS(deviation) / NULLIF(set_point, 0) > 0.15;

For a pump, flow_per_kw falling while vibration rises is the signature of impeller wear or cavitation, and it appears in the twin before either sensor alone crosses a limit. Simulation engines and control systems read digital_twin_state as the authoritative current state and compare it to their expected state; the divergence view is where observed and modeled behavior part ways.

Routing to the CMMS, HMI, and Data Lake

Precursor and health alerts create work orders in the CMMS. Vibration faults and critical alarms go to the operator HMI and on-call notification. Features and health scores archive to Iceberg for model training and long-term trend analysis.

CREATE SINK maintenance_recommendations AS
SELECT equipment_id, detection_ts, 'BEARING' AS failure_mode, risk_level AS severity FROM bearing_precursor_alerts WHERE risk_level <> 'LOW_RISK'
UNION ALL
SELECT equipment_id, detection_ts, 'LUBRICATION', 'MEDIUM_RISK' FROM lubrication_alerts
UNION ALL
SELECT equipment_id, window_end, 'ELECTRICAL', 'MEDIUM_RISK' FROM current_imbalance
UNION ALL
SELECT equipment_id, last_reading_ts, 'HEALTH_DEGRADATION', alert_level FROM health_degradation_alerts
WITH (connector = 'kafka', topic = 'maintenance.recommendations', properties.bootstrap.server = 'kafka:9092')
FORMAT PLAIN ENCODE JSON;

CREATE SINK vibration_alerts_sink FROM vibration_alerts
WITH (connector = 'kafka', topic = 'maintenance-alerts', properties.bootstrap.server = 'kafka:9092')
FORMAT PLAIN ENCODE JSON;

CREATE SINK critical_alarms_sink FROM (SELECT * FROM active_alarm_state WHERE priority = 1 AND state = 'ACTIVE')
WITH (connector = 'kafka', topic = 'critical-notifications', properties.bootstrap.server = 'kafka:9092')
FORMAT UPSERT ENCODE JSON;

CREATE SINK health_score_sink FROM equipment_health_score
WITH (connector = 'jdbc', jdbc.url = 'jdbc:postgresql://dashboard-db:5432/maintenance',
      table.name = 'equipment_health_score', type = 'upsert', primary_key = 'equipment_id');

CREATE SINK feature_archive_sink FROM equipment_features_1h
WITH (connector = 'iceberg', type = 'append-only', catalog.type = 'rest', catalog.uri = 'http://iceberg-catalog:8181',
      database.name = 'predictive_maintenance', table.name = 'equipment_features_1h');

Historian Reports vs Streaming SQL for Condition Monitoring

CapabilityHistorian plus weekly reviewFixed-threshold SCADA alarmsStreaming SQL (RisingWave)
Trend detectionManual, weeklyNone24-hour hopping trend, hourly
Multi-sensor correlationAnalyst judgmentNoneVibration and temperature joined per window
Severity classificationManualStatic limitISO 10816 limits by machine class, crest factor for bearing defects
Slow degradationFound lateInvisible until the limitHealth score against each sensor's own baseline
Alarm floods and chatterOperator overloadOperator overloadISA-18.2 rate, chatter, and standing views
Asset state for control and simulationMinutes behindPoint valuesDigital twin updated per reading
Training data for modelsSeparate extractNoneFeatures archived with failure labels

Frequently Asked Questions

How do I train a degradation model from this pipeline? Archive equipment_features_1h and equipment_trend_24h to Iceberg and join them to failure_events offline, labeling windows in the days before each failure. The model's scoring logic can then run in a service reading the live feature views, or as a user-defined function inside a view.

Why use the half-window delta as the trend signal? It is robust to noise and to irregular sampling, needs no per-sample ordering, and is computable as two filtered averages inside a single hopping window. A regression slope over the window is possible with REGR_SLOPE where finer sensitivity is needed.

How do I prevent the health score from reacting to a planned change in operating point? Stream the MES production schedule or setpoint changes as events and reset or exclude the baseline window after a change, or compute the score relative to the set point rather than the rolling mean for parameters that are controlled.

Can alarm suppression be applied without hiding a safety alarm? Yes. Apply the chattering anti-join only to alarm_class <> 'SAFETY' and priority > 1. Safety and priority-1 alarms always pass through to the operator queue and the critical sink.

What about accelerometers sampling at kilohertz rates? Compute RMS, peak, and crest factor at the edge gateway over short frames and publish those features, as vibration_samples assumes, rather than streaming raw waveforms. RisingWave then aggregates the features over ten-minute and hourly windows. Frequency-domain analysis stays at the edge or in a specialized tool fed by the same stream.

The engine for real-time streaming data.
Analyze, search, and decide.
GitHubXLinkedInSlackYouTube
Sign up for our to stay updated.