Learn R Programming

degradr (version 1.0.1)

prul: Probability of Remaining Useful Life (RUL) Falling Within a Time Horizon

Description

Evaluates the cumulative probability that the Remaining Useful Life (RUL) of a unit is less than or equal to a specified time t. The computation is based on a fitted degradation model and the observed degradation signal for the unit.

Usage

prul(t, data, model, D = NULL)

Value

Numeric value between 0 and 1 giving \(P(\mathrm{RUL} \le t)\).

Arguments

t

Time at which to evaluate the RUL cumulative distribution function.

data

A data frame with columns t (time), x (degradation measurement), and unit (unit identifier) or a data frame containing sensor readings over time: must include the columns t (time), unit (unit identifier), and multiple degradation signals. Multiple units can be passed simultaneously.

model

An object of class "degradation_model" produced by fit_model or a "healthindex" object returned by fit_healthindex.

D

Optional critical degradation threshold. If provided, a fixed-threshold model is used; otherwise a random-threshold model is assumed. For exponential models the threshold is automatically transformed to the log scale.

Details

For a fixed threshold model (D supplied), the function computes the Remaining Life Distribution (RLD) using the specified failure threshold. If D is NULL, the distribution is computed under a random-threshold formulation based on the training data.

See Also

qrul, predict_rul

Examples

Run this code
library(degradr)
library(dplyr)
# Load example data
data(train_FD001)
data(test_FD001)
data <- train_FD001 %>%
  select(unit,t,T24,T50,P30,
         Nf,Ps30,phi, NRf,
         BPR,htBleed,
         W31, W32) %>%
  mutate(across(c(P30,phi,W31,W32), ~ . * -1))

test <- test_FD001 %>%
  select(unit,t,T24,T50,P30,
         Nf,Ps30,phi, NRf,
         BPR,htBleed,
         W31, W32) %>%
  mutate(across(c(P30,phi,W31,W32), ~ . * -1))

# Fit a health index model (exponential trajectory of degree 2)
model <- fit_healthindex(data = data, type = "exponential",
                         degree = 2, r = 0.8)
#Probability that the run length will be less than or equal to 86 cycles
head(prul(t = 86, data = test, model = model))

Run the code above in your browser using DataLab