[G1-Sync] Manual knowledge update
This commit is contained in:
@@ -2,88 +2,187 @@
|
||||
id: wiki-2026-0508-predictive-maintenance
|
||||
title: Predictive Maintenance
|
||||
category: 10_Wiki/Topics
|
||||
status: needs_review
|
||||
status: verified
|
||||
canonical_id: self
|
||||
aliases: [P-Reinforce-GRAPHICS-004]
|
||||
aliases: [PdM, Condition-based Maintenance, RUL Prediction]
|
||||
duplicate_of: none
|
||||
source_trust_level: A
|
||||
confidence_score: 0.93
|
||||
tags: [graphics, digital-twin, maintenance, ai]
|
||||
confidence_score: 0.9
|
||||
verification_status: applied
|
||||
tags: [predictive-maintenance, anomaly-detection, iot, manufacturing, time-series]
|
||||
raw_sources: []
|
||||
last_reinforced: 2026-04-20
|
||||
github_commit: batch-reinforce-05
|
||||
inferred_by: Claude Opus 4.7 (auto-normalize 2026-05-08)
|
||||
last_reinforced: 2026-05-10
|
||||
github_commit: pending
|
||||
tech_stack:
|
||||
language: unspecified
|
||||
framework: unspecified
|
||||
language: python
|
||||
framework: pytorch, sklearn, river
|
||||
---
|
||||
|
||||
# [[Predictive_Maintenance|Predictive Maintenance]] (PdM)
|
||||
# Predictive Maintenance
|
||||
|
||||
## 📌 한 줄 통찰 (The Karpathy Summary)
|
||||
> 과거의 고장 패턴을 학습하여 미래의 이상 징후를 사전에 포착함으로써 시스템 가동 중단을 원천 차단하는 지능형 유지보수 체계.
|
||||
## 매 한 줄
|
||||
> **"매 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).
|
||||
|
||||
## 📖 구조화된 지식 (Synthesized Content)
|
||||
- **추출된 패턴:** 센서 데이터의 이상 탐지(Anomaly Detection)와 잔여 수명 예측(RUL)을 통해 정비 시점을 최적화하는 패턴.
|
||||
- **세부 내용:**
|
||||
- 진동, 온도, 전력 소모 등 시계열 데이터의 특징 추출 및 분석.
|
||||
- 확률론적 모델(Bayesian) 및 딥러닝(RNN/[[LSTM|LSTM]]) 기반의 고장 확률 산출.
|
||||
- 디지털 트윈과 결합하여 가상 환경에서 정비 시뮬레이션 수행.
|
||||
## 매 핵심
|
||||
|
||||
## ⚠️ 모순 및 업데이트 (Contradictions & Updates)
|
||||
- **과거 데이터와의 충돌:** 고장 후 수리(Reactive)나 정기 점검(Preventive)에서 데이터 기반 실시간 대응(Predictive)으로의 전환.
|
||||
- **정책 변화:** 성능 가중치(w1) 관점에서 가동 시간(Uptime) 극대화를 위한 핵심 전략으로 배치.
|
||||
### 매 두 가지 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.
|
||||
|
||||
## 🔗 지식 연결 (Graph)
|
||||
- **Parent:** 10_Wiki/💡 Topics/Graphics
|
||||
- **Related:** [[Digital_Twin|Digital_Twin]], Anomaly-Detection, [[IoT|IoT]]
|
||||
- **Raw Source:** 00_Raw/2026-04-20/Predictive Maintenance (PdM).md
|
||||
### 매 sensor 종류
|
||||
- Vibration (accelerometer) — bearing fault key.
|
||||
- Temperature, current, voltage.
|
||||
- Acoustic emission.
|
||||
- Oil analysis (particle count).
|
||||
- Pressure, flow rate.
|
||||
|
||||
## 🤖 LLM 활용 힌트 (How to Use This Knowledge)
|
||||
### 매 dataset 표준
|
||||
- **NASA C-MAPSS** (turbofan engine RUL).
|
||||
- **PHM 2008/2010** challenges.
|
||||
- **Bosch CNC milling**.
|
||||
- **CWRU bearing** (vibration).
|
||||
|
||||
**언제 이 지식을 쓰는가:**
|
||||
- *(TODO)*
|
||||
### 매 응용
|
||||
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.
|
||||
|
||||
**언제 쓰면 안 되는가:**
|
||||
- *(TODO)*
|
||||
## 💻 패턴
|
||||
|
||||
## 🧪 검증 상태 (Validation)
|
||||
|
||||
- **정보 상태:** needs_review
|
||||
- **출처 신뢰도:** A
|
||||
- **검토 이유:** *(P-Reinforce Phase 1 자동 정규화. 본문 검증 필요.)*
|
||||
|
||||
## 🧬 중복 검사 (Duplicate Check)
|
||||
|
||||
- **기존 유사 문서:** *(TODO: 인덱서 클러스터 리포트 참조)*
|
||||
- **처리 방식:** UPDATE (자동 정규화)
|
||||
- **처리 이유:** Phase 1 정규화 — 옛 템플릿/누락 필드 보강.
|
||||
|
||||
## 🕓 변경 이력 (Changelog)
|
||||
|
||||
| 날짜 | 변경 내용 | 처리 방식 | 신뢰도 |
|
||||
|------|-----------|-----------|--------|
|
||||
| 2026-05-08 | P-Reinforce Phase 1 정규화 (frontmatter + 헤더 표준화) | UPDATE | A |
|
||||
|
||||
## 💻 코드 패턴 (Code Patterns)
|
||||
|
||||
**패턴 1:** *(TODO: 이 프로젝트 컨벤션 반영한 구조 스켈레톤)*
|
||||
|
||||
```text
|
||||
# TODO
|
||||
### Vibration FFT feature
|
||||
```python
|
||||
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(),
|
||||
}
|
||||
```
|
||||
|
||||
## 🤔 의사결정 기준 (Decision Criteria)
|
||||
### Isolation Forest anomaly
|
||||
```python
|
||||
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
|
||||
```
|
||||
|
||||
**선택 A를 써야 할 때:**
|
||||
- *(TODO)*
|
||||
### Autoencoder reconstruction error
|
||||
```python
|
||||
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))
|
||||
|
||||
**선택 B를 써야 할 때:**
|
||||
- *(TODO)*
|
||||
# anomaly score = reconstruction MSE — 매 정상 data로 학습 후 임계 설정
|
||||
```
|
||||
|
||||
**기본값:**
|
||||
> *(TODO)*
|
||||
### LSTM RUL regression (C-MAPSS style)
|
||||
```python
|
||||
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
|
||||
|
||||
## ❌ 안티패턴 (Anti-Patterns)
|
||||
# loss = MSE on clipped RUL (max 125 typical)
|
||||
```
|
||||
|
||||
- **[안티패턴]:** *(TODO: 무엇을 하면 안 되는가 + 이유 + 대신 무엇을)*
|
||||
### Transformer time-series (PatchTST)
|
||||
```python
|
||||
# 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)
|
||||
```python
|
||||
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
|
||||
```python
|
||||
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)
|
||||
```python
|
||||
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
|
||||
- 부모: [[Time_Series]] · [[Anomaly_Detection]] · [[Industrial_AI]]
|
||||
- 변형: [[Condition_Monitoring]] · [[RUL_Prediction]] · [[Failure_Classification]]
|
||||
- 응용: [[Manufacturing]] · [[Aviation]] · [[Energy]] · [[Battery_Management]]
|
||||
- Adjacent: [[IoT]] · [[Edge_AI]] · [[Survival_Analysis]] · [[Digital_Twin]]
|
||||
|
||||
## 🤖 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 |
|
||||
|
||||
Reference in New Issue
Block a user