Skip to main content

Understanding AI Model Algorithms

Anomaly Detection — IBM Granite TSPulse​

What Is TSPulse?​

TSPulse (Time-Series Pulse) is a time-series anomaly detection foundation model developed by IBM. It learns normal patterns from chronologically ordered data, such as sensor data, and detects deviations from those patterns as anomalies.

How It Works: Reconstruction Error-Based Detection​

TSPulse operates on the principle that "if normal data can be reconstructed accurately, segments that cannot be reconstructed are anomalous."

① 학습 (정상 패턴 학습)

입력 시계열: [23.1, 23.2, 23.0, 23.3, 23.1, ...] ← 정상 온도 패턴
│
▼
┌──────────────┐
│ 인코더 │ 데이터를 압축된 표현으로 변환
│ (Encoder) │
└──────┬───────┘
│
┌──────┴───────┐
│ 잠재 공간 │ 핵심 패턴만 남긴 압축 표현
│ (Latent) │
└──────┬───────┘
│
┌──────┴───────┐
│ 디코더 │ 압축 표현에서 원래 데이터 복원
│ (Decoder) │
└──────┬───────┘
│
▼
재구성 출력: [23.0, 23.2, 23.1, 23.2, 23.1, ...] ← 거의 같음!

재구성 오류 = |원본 - 재구성| = [0.1, 0.0, 0.1, 0.1, 0.0] ← 매우 작음 → 정상
② 이상 탐지

입력 시계열: [23.1, 23.2, 87.5, 23.3, 23.1, ...] ← 갑자기 87.5도!
│
▼
[인코더 → 잠재 공간 → 디코더]
│
▼
재구성 출력: [23.0, 23.2, 23.4, 23.2, 23.1, ...] ← 87.5를 복원 못함

재구성 오류 = [0.1, 0.0, 64.1, 0.1, 0.0]
↑
이상 점수 높음! → 이상 탐지됨

Key Concepts​

ConceptDescriptionAnalogy
Reconstruction errorDifference between the original and reconstructed dataA copier reproduces the original accurately but fails to copy unusual sections
Calibrated scoreHow many times the reconstruction error exceeds normal fluctuations in the baseline period — robust z-score"It fluctuates five times more than usual"
ThresholdCalibrated score used to classify anomalies — default for equipment sensors: 5.0A boundary indicating "normal up to this point; abnormal beyond it"
threshold=0 Is Not «Automatic»

Earlier documentation stated that setting the threshold to 0 would determine it automatically. Equipment sensor scores now use a scale with a baseline median of 0, so setting it to 0 classifies anything even slightly above normal as an anomaly. Unless you have a specific reason, omit threshold and use the default value (5.0).

The Baseline Is the Period Immediately Before the Analysis Window​

Within the same call, the median and MAD are calculated from reconstruction errors in the period immediately before the analysis window. This establishes a separate definition of “normal” for each piece of equipment and each tag. No score is generated for tags with an insufficient baseline period; instead, the value is left empty with a reason provided. It is not filled with 0.

  • State tags, such as running/stopped, are excluded.
  • Counter tags are evaluated using the average increment over five intervals rather than cumulative values, allowing production stops to appear as increments of 0.
  • The aggregation and smoothing windows for equipment sensors are 8 / 4.

Use in PlantPulse​

센서 데이터 (최근 N분)
│
▼
TSPulse 모델에 입력
│
▼
각 시점별 재구성 오류 계산
│
▼
임계값 초과 구간 = 이상 구간
│
├──▶ 이상 메트릭 상위 K개 추출 (top_k)
├──▶ 이상 점수 및 시간 정보 반환
└──▶ 최근 N초 이내 이상 여부 판정 (recent_seconds)

Time-Series Forecasting — TinyTimeMixer (TTM)​

What Is TTM?​

TinyTimeMixer is a lightweight time-series forecasting model developed by IBM. It learns patterns from historical data to forecast future values. As the name "Tiny" suggests, it delivers high performance with limited resources.

PlantPulse ships with Granite-TTM R3 (512-96-dec-512-r3), a generation that uses decomposition-based forecasting (TinyTimeMixerForDecomposedPrediction) to forecast the trend and residual separately. The previous R2 generation is also included in the image and can be restored with a single configuration change → Time-Series Insights

How It Works: Mixer Architecture​

TTM applies the MLP-Mixer architecture to time-series data.

과거 데이터 (Context Window) 예측 (Prediction Window)
┌──────────────────────────┐ ┌──────────────────┐
│ t-512 t-511 ... t-1 t │ → │ t+1 t+2 ... t+96 │
└──────────────────────────┘ └──────────────────┘
입력 (512 스텝) 출력 (96 스텝)

Forecasting Process​

① 시간축 믹싱 (Time Mixing)
"과거 패턴에서 시간적 관계를 파악"

- 새벽에는 온도가 낮고, 낮에는 높다 (일주기)
- 월요일에 가동률이 높다 (주주기)
- 점점 온도가 올라가는 추세 (트렌드)

② 채널 믹싱 (Channel Mixing)
"여러 센서 간의 관계를 파악"

- 전력 소비가 올라가면 → 온도도 올라간다
- 진동이 커지면 → 알람 빈도도 높아진다

③ 예측 생성
시간 패턴 + 센서 관계를 종합하여 미래 값 예측
신뢰구간(상한/하한)도 함께 제공

Key Concepts​

ConceptDescriptionAnalogy
Context lengthAmount of historical data used for forecastingUsing the past several days to forecast tomorrow's weather
Forecast horizonNumber of future steps to forecastForecasting the weather for the next several days
Confidence intervalUpper and lower bounds of the forecast value"Tomorrow's temperature will be between 20 and 25 degrees"
MultivariateConsiders multiple sensors simultaneouslyForecasting based on temperature, pressure, and vibration together

Example Forecast Results​

시간 │ 실제값 │ 예측값 │ 하한 │ 상한
─────────┼────────┼────────┼───────┼───────
14:00 │ 23.1 │ - │ - │ - ← 과거 (실제 데이터)
14:10 │ 23.3 │ - │ - │ -
14:20 │ 23.2 │ - │ - │ -
─────────┼────────┼────────┼───────┼───────
14:30 │ ? │ 23.4 │ 22.8 │ 24.0 ← 미래 (예측)
14:40 │ ? │ 23.5 │ 22.6 │ 24.4
14:50 │ ? │ 23.7 │ 22.5 │ 24.9

Combined Use of Anomaly Detection and Forecasting​

PlantPulse AI combines anomaly detection and forecasting to provide more powerful insights.

현재 상태 파악 (TSPulse 이상 탐지)
│
│ "현재 온도 센서에서 이상 패턴 감지됨"
│
▼
미래 추세 예측 (TTM 예측)
│
│ "앞으로 6시간 내 임계값 초과 예상"
│
▼
종합 판단
│
│ "현재 이상 + 악화 추세 → 즉시 점검 권고"
│
▼
관련 문서 검색 (RAG)
│
│ "해당 설비 정비 매뉴얼 3장 참조"
│
▼
종합 리포트 생성 (AURA LLM)

Model Combinations by Use Case​

ScenarioTSPulse (Anomaly Detection)TTM (Forecasting)Assessment
Normal operationNo anomalyRemains within normal rangeNormal — continue monitoring
Early-stage anomalyAnomaly detectedWithin normal rangeCaution — trend monitoring required
Worsening trendAnomaly detectedThreshold expected to be exceededWarning — immediate inspection recommended
Sudden anomalyHigh anomaly scoreRapid deteriorationEmergency — immediate action required

Equipment Health Score​

The 0–100 health score starts at 100, with points deducted based on detected conditions. Forecasting (TTM) is not included—the score reflects only what has occurred so far.

건강 점수 = 100 − 이상 감점 − 알람 감점 − 비가동 감점 (0~100 로 자름)

이상 감점 최대 40 센서·OEE·RAM·EMS·알람의 이상 비율을 가중평균
알람 감점 최대 30 + 10 최근 24시간 알람(우선순위 가중) + 아직 안 풀린 알람
비가동 감점 최대 20 가동 정보가 있을 때만
GradeScore
A · Good90 or higher
B · Caution75 or higher
C · Warning60 or higher
D · CriticalBelow 60

Because the score is deduction-based, the reason for the score can be explained through the deduction details. If there is insufficient observed data, no grade is assigned regardless of the score, and it is set to Insufficient data. This prevents missing data from being interpreted as “healthy.”


Role of the Feature Store​

Running anomaly detection and forecasting in real time for every request takes time. The feature store precomputes and stores these results.

┌─────────────────────────────────┐
│ 피처 스토어 스케줄러 │
│ │
│ 매시간: 설비별 건강점수 계산 │
│ 매일: 종합 분석 LLM 컨텍스트 │
│ 임베딩 벡터 생성 │
└──────────────┬──────────────────┘
│
▼
┌──────────────────────────────────┐
│ 사용자 질문: "이 설비 상태 어때?" │
│ │
│ → 사전 계산된 피처 즉시 반환 │
│ → 실시간 계산 대기 없음! │
│ → 응답 시간: 수백 ms │
└──────────────────────────────────┘