Supported Fault Types & Mathematical Background
Drift
Linear change over time:
\[y_i = x_i + (i - s)\, r, \quad i \in [s, e)\]\(r \in \mathbb{R}\) is the drift rate
By default: \(r \sim \mathcal{U}(0, 0.0001)\, d\, \bar{x}\)
\(d \in \{-1, 1\}\) controls the drift direction
\(\bar{x}\) is the mean of the original signal over the fault interval
Offset
Constant bias added to the values:
\[y_i = x_i + b, \quad i \in [s, e)\]\(b = r\, \bar{x}\) is the offset magnitude
\(r \in \mathbb{R}\) is the offset rate
Gaussian Noise
Random noise with a normal distribution:
\[y_i = x_i + \epsilon_i, \quad \epsilon_i \sim \mathcal{N}(\mu, \sigma^2), \quad i \in [s, e)\]Defaults: \(\mu = 0\)
\(\sigma\) is the standard deviation of the signal over the fault interval
Uniform Noise
Random noise with a uniform distribution:
\[y_i = x_i + \epsilon_i, \quad \epsilon_i \sim \mathcal{U}(a, b), \quad i \in [s, e)\]Defaults: \(a = -\sigma\), \(b = \sigma\)
\(\sigma\) is the standard deviation of the signal over the fault interval
NaN
Replace values with missing data:
\[\begin{split}y_i = \begin{cases} \mathrm{NaN}, & i \in [s, e) \\ x_i, & \text{otherwise} \end{cases}\end{split}\]Stuck Value
Replace values with a constant:
\[\begin{split}y_i = \begin{cases} c, & i \in [s, e) \\ x_i, & \text{otherwise} \end{cases}\end{split}\]\(c\) may be specified directly or generated as \(c = \bar{x}\left(1 + d\, u\right)\)
\(u \sim \mathcal{U}(0.01, 0.1)\)
Notes
Faults are applied over the range [start, stop).
The class preserves the original values for comparison.
Useful for testing robustness of sensor data processing algorithms, anomaly detection, and fault-tolerant systems.