docs(10_Wiki): 위키 전체 재구성 — Topic_* 폴더를 4개 카테고리로 통합 + 대규모 중복 제거
Topic_Agent/Topic_Blog/Topics/Topics_Biz/Topics_Meeting/Topics_Rag의 마크다운 지식 문서를 Topic_General/Topic_Programming/Topic_Graphic/Topic_Business 4개 카테고리로 재분류. - 중복 제거: frontmatter의 status:duplicate/merged + duplicate_of/redirect_to 필드로 자기 자신을 중복으로 선언한 리다이렉트 stub 1032개 제거, 완전 동일 내용 파일 472개 제거, 동일 파일명·다른 내용 충돌 시 더 큰(완전한) 버전만 유지(162개 제거) — 총 1639개 중복 제거. - 분류: 폴더 단위로 명확한 항목(AI_and_ML/Coding/Architecture 등 → Programming, Comfyui/Visual_Effects → Graphic, Topics_Biz/Topics_Meeting/사업 등 → Business, Poetic_Blog_Writing/창의성/Game_Design 등 → General)은 폴더 우선순위로, 나머지 혼재 폴더(Topic_Agent/Topic_Blog/Topics 루트/Thinking & Reasoning/Other/UI_UX_Assets)는 title/tags 키워드 스코어링으로 파일 단위 분류(불명확한 경우 General로 폴백). 원본 폴더명은 "From_*" 서브폴더로 보존해 추적 가능성 유지. - 최종 배치: Programming 2784 / General 1608 / Graphic 285 / Business 249 = 4926개 문서. - 에이전트 운영 상태(.astra/.agent/.obsidian/sessions/memory/_company/docs/lessons/_shared/src)는 지식 콘텐츠가 아니므로 재분류 대상에서 제외하고 원위치 유지. - Topics/Topic_email(상위 보호 폴더 Topic_email과 파일명 100% 중복) 삭제 — 보호 폴더 자체는 미변경. - 완전히 비게 된 Topic_Agent/Topic_Blog/Topics_Biz/Topics_Rag 폴더 제거.
This commit is contained in:
@@ -0,0 +1,187 @@
|
||||
---
|
||||
id: wiki-2026-0508-predictive-maintenance
|
||||
title: Predictive Maintenance
|
||||
category: 10_Wiki/Topics
|
||||
status: verified
|
||||
canonical_id: self
|
||||
aliases: [PdM, Condition-based Maintenance, RUL Prediction]
|
||||
duplicate_of: none
|
||||
source_trust_level: A
|
||||
confidence_score: 0.9
|
||||
verification_status: applied
|
||||
tags: [predictive-maintenance, anomaly-detection, iot, manufacturing, time-series]
|
||||
raw_sources: []
|
||||
last_reinforced: 2026-05-10
|
||||
github_commit: pending
|
||||
tech_stack:
|
||||
language: python
|
||||
framework: 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
|
||||
```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(),
|
||||
}
|
||||
```
|
||||
|
||||
### 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
|
||||
```
|
||||
|
||||
### 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))
|
||||
|
||||
# anomaly score = reconstruction MSE — 매 정상 data로 학습 후 임계 설정
|
||||
```
|
||||
|
||||
### 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
|
||||
|
||||
# loss = MSE on clipped RUL (max 125 typical)
|
||||
```
|
||||
|
||||
### 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]]
|
||||
- 변형: [[RUL_Prediction]]
|
||||
- Adjacent: [[클라우드 인프라 및 IaC 운영 표준|IoT]] · [[Edge_AI]] · [[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