Chapter 3
10 min read
Section 16 of 104

Health State Discretization

NASA C-MAPSS Dataset Deep Dive

Learning Objectives

By the end of this section, you will:

  1. Understand the motivation for discretizing RUL into health states
  2. Define the 5 health state categories and their RUL boundaries
  3. Apply the discretization formula to convert RUL to class labels
  4. Analyze class distribution and address imbalance concerns
  5. Connect discretization to multi-task learning as described in Chapter 2
Why This Matters: Our AMNL model performs both RUL regression and health state classification. The classification task provides categorical structure that regularizes the regression, leading to better overall performance. This section defines how we create the classification labels.

Why Discretize RUL?

We already have continuous RUL labels. Why create a parallel discrete representation?

Motivation 1: Practical Decision Making

In real maintenance operations, decisions are categorical, not continuous:

  • Healthy: Continue normal operation
  • Degrading: Schedule inspection at next opportunity
  • Warning: Plan maintenance within days
  • Critical: Ground aircraft, inspect immediately

A health state classification directly supports these decisions without requiring engineers to interpret continuous RUL values.

Motivation 2: Regularization

Classification provides categorical structure that constrains the learned representation:

  • The model learns features that distinguish broad degradation stages
  • Classification loss provides gradients even when regression is noisy
  • Shared features benefit from both signal types

Motivation 3: Robustness

Exact RUL prediction is inherently uncertain. Health states provide a more robust target:

ScenarioRUL PredictionHealth State
True RUL = 50, Pred = 60Error = 10 cyclesSame state (correct)
True RUL = 50, Pred = 45Error = 5 cyclesSame state (correct)
True RUL = 50, Pred = 20Error = 30 cyclesWrong state (error)

Small RUL errors within a state are acceptable; large errors that cross state boundaries are not.


Defining Health States

We define 5 health states based on RUL ranges. This follows the approach used in several prior works on C-MAPSS.

The 5 Health States

StateLabelRUL RangeDescriptionAction
0HealthyRUL > 100Normal operation, no degradationContinue operation
1Minor Degradation75 < RUL ≤ 100Early signs of wearMonitor closely
2Moderate Degradation50 < RUL ≤ 75Clear degradation trendsSchedule inspection
3Significant Degradation25 < RUL ≤ 50Advanced degradationPlan maintenance
4CriticalRUL ≤ 25Failure imminentImmediate action

Boundary Visualization

📝text
1RUL
2 ^
3 |
4125|  ─────────────────────  State 0: Healthy
5   |
6100|  · · · · · · · · · · ·  Boundary
7   |                         State 1: Minor Degradation
8 75|  · · · · · · · · · · ·  Boundary
9   |                         State 2: Moderate Degradation
10 50|  · · · · · · · · · · ·  Boundary
11   |                         State 3: Significant Degradation
12 25|  · · · · · · · · · · ·  Boundary
13   |                         State 4: Critical
14  0|  ─────────────────────  Failure
15   +------------------------> Cycle

Why These Boundaries?

The boundaries (100, 75, 50, 25) create equal-width intervals of 25 cycles each (except State 0 which extends to 125+):

  1. Equal intervals: Balanced class sizes within the degrading range
  2. Meaningful thresholds: 25-cycle intervals align with typical maintenance planning windows
  3. Prior work: These boundaries are established in C-MAPSS literature, enabling comparison

Discretization Formula

Given a (piecewise linear) RUL value, we compute the health state:

state={0if RUL>1001if 75<RUL1002if 50<RUL753if 25<RUL504if RUL25\text{state} = \begin{cases} 0 & \text{if } \text{RUL} > 100 \\ 1 & \text{if } 75 < \text{RUL} \leq 100 \\ 2 & \text{if } 50 < \text{RUL} \leq 75 \\ 3 & \text{if } 25 < \text{RUL} \leq 50 \\ 4 & \text{if } \text{RUL} \leq 25 \end{cases}

This can be computed efficiently using floor division:

state=min(4,125RUL25)\text{state} = \min\left(4, \left\lfloor \frac{125 - \text{RUL}}{25} \right\rfloor\right)

Implementation

🐍python
1def rul_to_health_state(rul, num_states=5, rul_max=125):
2    """
3    Convert RUL to health state label.
4
5    Args:
6        rul: Remaining Useful Life (can be array)
7        num_states: Number of discrete states (default 5)
8        rul_max: Maximum RUL value (default 125)
9
10    Returns:
11        Health state label(s) in range [0, num_states-1]
12    """
13    interval = rul_max // num_states  # 25 for 5 states
14    state = (rul_max - rul) // interval
15    return min(state, num_states - 1)
16
17# Example usage:
18# rul_to_health_state(85)  -> 1
19# rul_to_health_state(30)  -> 3
20# rul_to_health_state(5)   -> 4

Class Distribution Analysis

Understanding the class distribution helps anticipate training challenges.

Theoretical Distribution

For an engine with lifetime T>125T > 125 cycles:

StateRUL RangeCycles in State
0> 100T - 125 + 25 = T - 100
175-10025
250-7525
325-5025
40-2525

States 1-4 each contain exactly 25 cycles, but State 0 contains all remaining cycles. This creates inherent class imbalance.

FD001 Class Distribution

Addressing Class Imbalance

Several strategies can address the imbalance:

StrategyMechanismTrade-off
Class weightsWeight loss by inverse frequencyMay overfit to rare classes
OversamplingDuplicate minority samplesIncreases training time
UndersamplingRemove majority samplesLoses information
Focal lossDown-weight easy examplesComplex tuning
Accept imbalanceLet model learn natural distributionMay underperform on rare classes

In our AMNL model, we use the AMNL loss normalization which automatically balances the classification task contribution regardless of class imbalance.


Connection to Multi-Task Learning

The health state labels enable the multi-task learning framework we introduced in Chapter 2.

Two-Head Architecture

Our model produces two outputs from the shared representation:

cShared{RUL Heady^RULRHealth Headp^Δ5\mathbf{c} \xrightarrow{\text{Shared}} \begin{cases} \text{RUL Head} \to \hat{y}_{\text{RUL}} \in \mathbb{R} \\ \text{Health Head} \to \hat{\mathbf{p}} \in \Delta^5 \end{cases}

Where Δ5\Delta^5 is the 5-dimensional probability simplex (softmax outputs).

Loss Components

TaskTargetLossPurpose
RUL RegressionPiecewise RULMSEPrecise cycle prediction
Health ClassificationHealth state (0-4)Cross-EntropyCategorical structure

Synergy Between Tasks

The tasks reinforce each other:

  1. Classification → Regression: Categorical boundaries prevent regression from making errors that cross state boundaries
  2. Regression → Classification: Fine-grained RUL signal helps classification near boundaries
  3. Shared features: Both tasks train the shared backbone, leading to richer representations
The Key Insight: A model that predicts RUL = 48 vs RUL = 52 makes a small regression error (4 cycles), but crosses the State 2/3 boundary—a classification error. Multi-task learning penalizes both, encouraging predictions that respect categorical structure while maintaining regression precision.

Label Consistency

Always derive health states from the piecewise RUL, not raw RUL. This ensures State 0 corresponds to RUL = 100-125, not RUL = 100-∞. Consistency between regression and classification targets is essential.


Summary

In this section, we defined the health state discretization scheme:

  1. Motivation: Practical decision making, regularization, robustness
  2. 5 health states: Healthy (0), Minor (1), Moderate (2), Significant (3), Critical (4)
  3. Boundaries: 100, 75, 50, 25 cycles create equal intervals
  4. Formula: state=min(4,(125RUL)/25)\text{state} = \min(4, \lfloor (125 - \text{RUL})/25 \rfloor)
  5. Class imbalance: State 0 dominates (~50%), addressed through AMNL loss
  6. Multi-task connection: Classification provides categorical structure for regression
StateRUL RangeMeaningTypical Action
0> 100HealthyNormal operation
175-100Minor degradationMonitor
250-75Moderate degradationSchedule inspection
325-50Significant degradationPlan maintenance
4≤ 25CriticalImmediate action
Chapter Summary: We have now deeply explored the NASA C-MAPSS dataset—its structure, operating conditions, fault modes, sensor selections, and target formulations. With this understanding, we are ready to build the data preprocessing pipeline in Chapter 4: normalization, windowing, and creating PyTorch datasets that our model can consume.

With the dataset fully understood, we are ready to implement the data pipeline that transforms raw files into model-ready tensors.