Files
2nd/10_Wiki/Topics/AI_and_ML/Predictive_Maintenance.md
T
koriweb d8a80f6272 chore(wiki): dangling 링크 canonical 정규화 (768파일/1200건)
이름만 다른(표기 변형) [[위키링크]]를 대상 문서의 canonical 제목으로 치환해
끊겼던 1,200개 링크를 연결. 제목/파일명 정규화 일치만 적용하고 별칭 매칭은
과병합 위험으로 제외(애매성 가드). 원본은 _link_reconcile_backup/ 에 백업.
도구: Datacollect/scripts/link_reconcile_apply.mjs

Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2026-06-08 12:24:15 +09:00

6.4 KiB

id, title, category, status, canonical_id, aliases, duplicate_of, source_trust_level, confidence_score, verification_status, tags, raw_sources, last_reinforced, github_commit, tech_stack
id title category status canonical_id aliases duplicate_of source_trust_level confidence_score verification_status tags raw_sources last_reinforced github_commit tech_stack
wiki-2026-0508-predictive-maintenance Predictive Maintenance 10_Wiki/Topics verified self
PdM
Condition-based Maintenance
RUL Prediction
none A 0.9 applied
predictive-maintenance
anomaly-detection
iot
manufacturing
time-series
2026-05-10 pending
language framework
python pytorch, sklearn, river

Predictive Maintenance

매 한 줄

"매 sensor data로 장비 failure 를 발생 전에 predict — RUL 추정 또는 anomaly detection.". 매 reactive (고장 후) / preventive (정기점검) 대비 매 비용 30-50% 절감. 2025-2026 modern stack: edge IoT + transformer time-series (PatchTST, TimesFM) + foundation model (Chronos, MOIRAI).

매 핵심

매 두 가지 task

  • Anomaly detection: 현재 정상/이상 binary — autoencoder, isolation forest, one-class SVM.
  • RUL (Remaining Useful Life): 매 남은 수명 (cycle 또는 시간) regression — LSTM, Transformer, survival.
  • Failure classification: 매 failure mode classify — multi-class.

매 sensor 종류

  • Vibration (accelerometer) — bearing fault key.
  • Temperature, current, voltage.
  • Acoustic emission.
  • Oil analysis (particle count).
  • Pressure, flow rate.

매 dataset 표준

  • NASA C-MAPSS (turbofan engine RUL).
  • PHM 2008/2010 challenges.
  • Bosch CNC milling.
  • CWRU bearing (vibration).

매 응용

  1. Manufacturing CNC, motor, pump.
  2. Wind turbine gearbox.
  3. Aircraft engine (NASA C-MAPSS use case).
  4. Railway wheel/track.
  5. Data center HVAC, server fan.
  6. EV battery SoH/RUL.

💻 패턴

Vibration FFT feature

import numpy as np
def fft_features(signal, fs=12000):
    n = len(signal)
    fft = np.abs(np.fft.rfft(signal))[:n//2]
    freqs = np.fft.rfftfreq(n, 1/fs)[:n//2]
    return {
        'rms': np.sqrt(np.mean(signal**2)),
        'kurtosis': ((signal - signal.mean())**4).mean() / signal.std()**4,
        'peak_freq': freqs[fft.argmax()],
        'spectral_energy': fft.sum(),
    }

Isolation Forest anomaly

from sklearn.ensemble import IsolationForest
clf = IsolationForest(contamination=0.01, random_state=42)
clf.fit(X_normal)
scores = -clf.score_samples(X_new)  # 매 high = anomaly

Autoencoder reconstruction error

import torch, torch.nn as nn
class AE(nn.Module):
    def __init__(self, d, h=32):
        super().__init__()
        self.enc = nn.Sequential(nn.Linear(d, 64), nn.ReLU(), nn.Linear(64, h))
        self.dec = nn.Sequential(nn.Linear(h, 64), nn.ReLU(), nn.Linear(64, d))
    def forward(self, x):
        return self.dec(self.enc(x))

# anomaly score = reconstruction MSE — 매 정상 data로 학습 후 임계 설정

LSTM RUL regression (C-MAPSS style)

import torch, torch.nn as nn
class RULNet(nn.Module):
    def __init__(self, n_sensors=14, hidden=64):
        super().__init__()
        self.lstm = nn.LSTM(n_sensors, hidden, num_layers=2,
                            batch_first=True, dropout=0.2)
        self.head = nn.Sequential(nn.Linear(hidden, 32), nn.ReLU(),
                                  nn.Linear(32, 1))
    def forward(self, x):  # x: (B, T, n_sensors)
        out, _ = self.lstm(x)
        return self.head(out[:, -1]).squeeze(-1)  # RUL cycles

# loss = MSE on clipped RUL (max 125 typical)

Transformer time-series (PatchTST)

# pip install patchtst
from patchtst import PatchTSTForPrediction
model = PatchTSTForPrediction.from_pretrained(
    'patchtst/cmapss', context_length=96, prediction_length=1)
rul = model(sensor_window).prediction_outputs

Online drift detection (river)

from river.drift import ADWIN
adwin = ADWIN(delta=0.002)
for x in stream:
    adwin.update(x)
    if adwin.drift_detected:
        print('drift — retrain or alert')

Survival / hazard model

from lifelines import CoxPHFitter
import pandas as pd
# df: features + duration + event(0/1 failure observed)
cph = CoxPHFitter()
cph.fit(df, duration_col='cycle', event_col='failed')
hazard = cph.predict_partial_hazard(df_new)

Foundation model (Chronos zero-shot)

from chronos import ChronosPipeline
import torch
pipe = ChronosPipeline.from_pretrained('amazon/chronos-t5-large',
                                        device_map='cuda',
                                        torch_dtype=torch.bfloat16)
forecast = pipe.predict(context=torch.tensor(history),
                        prediction_length=24,
                        num_samples=20)  # (20, 24)

매 결정 기준

상황 Approach
Labeled failure history 있음 Supervised RUL (LSTM, PatchTST)
정상 data만 있음 Autoencoder, IsolationForest
Streaming sensor Online learning + drift detect (river)
Few-shot / cold start Foundation model (Chronos, MOIRAI) zero-shot
Survival analysis 필요 Cox PH, DeepSurv
Edge / low-power Quantized LSTM, tiny CNN

기본값: anomaly = IsolationForest baseline → AE, RUL = PatchTST 또는 LSTM with clipped target.

🔗 Graph

🤖 LLM 활용

언제: industrial sensor pipeline 설계, anomaly detection MVP, RUL model training, foundation model TS 적용. 언제 X: 매 safety-critical (aviation engine)에서 매 ML model 단독 — physics-based digital twin과 ensemble.

안티패턴

  • Train on imbalanced labels naive: 매 failure 1% — class weighting / focal loss / oversampling 필수.
  • Static threshold for anomaly: drift 가 매 threshold obsolete — adaptive (ADWIN) 필요.
  • Ignore sensor lag / sync: 매 multi-sensor fusion에서 매 timestamp align 필수.
  • No business cost model: false alarm 비용 vs missed failure 비용 — threshold tuning에 매 반영.
  • Predict only RUL without uncertainty: 매 quantile / probabilistic 예측 (PatchTST quantile, conformal) 필요.

🧪 검증 / 중복

  • Verified (NASA C-MAPSS dataset, PatchTST paper, Chronos paper, sklearn IsolationForest, lifelines docs).
  • 신뢰도 A.

🕓 Changelog

날짜 변경
2026-05-08 Phase 1
2026-05-10 Manual cleanup — RUL + anomaly detection stack including modern foundation models