Skip to main content

First Prediction Time (FPT) detection from bearing vibration data.

Project description

First Prediction Time (FPT) for bearings vibration data

A Python Library for FPT detection in rotating machinery bearings. Provides a modular, dataset pipeline for loading raw vibration signals, computing an indicator (currently only Root Mean Square RMS), detecting the beginning of the degradation stage, extracting features, and saving the features and vibration in NPY files. Inspired by the FPT proposed in Physics guided neural network: Remaining useful life prediction of rolling bearings using long short-term memory network through dynamic weighting of degradation process.


Features

  • Dataset-pipeline: supports PRONOSTIA and XJTU datasets; can be extended with different case studies
  • Pluggable components: Swapping detectors (default three sigma interval), smoothers (default no smoothing), indicators (default RMS), and reporters via Protocols
  • Three-sigma FPT detection: Degradation detection with configurable sensitivity. The number of standard deviations for the interval bounds and the consecutive samples that needs to exceed the bounds before the FPT is declared are configurable.
  • Feature extraction: time domain (RMS, peak, std, Square Root Amplitude) and frequency-domain (P7, P8) features.
  • Storage: Saves features and vibration signals as .npy files for ML workflows.
  • TOML-based configuration: dataset configs for PRONOSTIA and XJTU ship with the package. Can be overridden with your own file.

Installations

pip install fpt-bearings

Quick Start

from pathlib import Path
from fpt_bearings.loaders import PronostiaLoader
from fpt_bearings.indicators import RMS
from fpt_bearings.detector import ThreeSigmaDetector
from fpt_bearings.features import FeatureExtractor, default_features
from fpt_bearings.smoothing import ExponentialSmoother
from fpt_bearings.storage import NpyArtifactStore
from fpt_bearings.report import TextReporter
from fpt_bearings.pipeline import FPTPipeline

loader = PronostiaLoader()

pipeline = FPTPipeline(
    loader=loader,
    indicator=RMS(),
    detector=ThreeSigmaDetector(k=3.0, consecutive=3),
    extractor=FeatureExtractor(default_features(loader.sample_freq)),
    store=NpyArtifactStore(Path("output/pronostia")),
    reporter=TextReporter(Path("output/pronostia/report.txt"), title="PRONOSTIA"),
    smoother=ExponentialSmoother(alpha=0.5),
)

pipeline.run(Path("/data/PRONOSTIA/Test_set"))

FPT overview

Raw vibration files
       │
       ▼
   BearingLoader        ← PronostiaLoader / XjtuLoader / custom
       │
       ▼
    Smoother            ← ExponentialSmoother / NoSmoother / custom
       │
       ▼
  HealthIndicator       ← RMS / custom
       │
       ▼
   FPTDetector          ← ThreeSigmaDetector / custom
       │
    ┌──┴──────────────┐
    ▼                 ▼
FeatureExtractor   ArtifactStore    ← features + vibration saved as .npy                      │
                      ▼
                   Reporter         ← TextReporter / custom

Classes

Loaders

** Dataset config shipped with package**:

Class Dataset Config
PronostiaLoader FEMTO / PRONOSTIA pronostia.toml
XjtuLoader XJTU-SY xjtu.toml

Load an external config

loader = PronostiaLoader.from_config(Path("my_config.toml"))

Example of config format (TOML):

minutes_per_sample = 10.0
sample_freq = 25600.0

[healthy_points]
bearing1_1 = 5
bearing1_2 = 8

Smoother

smoother = ExponentialSmoother(alpha=0.3)  # lower alpha = smoother
smoother = NoSmoother()                    # pass-through (default)

Health Indicator

indicator = RMS()

Detector

detector = ThreeSigmaDetector(k=3.0, consecutive=3)
fpt_index, found = detector.detect(indicator_series, healthy_point=10)

Feature Extractor

extractor = FeatureExtractor(default_features(sample_freq=25600.0))
features_df = extractor.extract(list_of_signals)

Artifact Store

store = NpyArtifactStore(Path("output/pronostia"))

Reporter

reporter = TextReporter(Path("output/report.txt"), title="PRONOSTIA")

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

fpt_bearings-0.1.0.tar.gz (50.9 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

fpt_bearings-0.1.0-py3-none-any.whl (37.9 kB view details)

Uploaded Python 3

File details

Details for the file fpt_bearings-0.1.0.tar.gz.

File metadata

  • Download URL: fpt_bearings-0.1.0.tar.gz
  • Upload date:
  • Size: 50.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for fpt_bearings-0.1.0.tar.gz
Algorithm Hash digest
SHA256 f6541387e0a0117cbe274d543df8ccfc854deaf7147bf60979e89963a88de859
MD5 b7d3ace788735fb0e40cd7e77bd5cfde
BLAKE2b-256 f116e4d92152b2c2300d51ee0a3d0f9124be1d0b9f63f75bf0c2505b81e52442

See more details on using hashes here.

Provenance

The following attestation bundles were made for fpt_bearings-0.1.0.tar.gz:

Publisher: publish.yml on ttpioger/fpt-bearings

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

File details

Details for the file fpt_bearings-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: fpt_bearings-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 37.9 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? Yes
  • Uploaded via: twine/6.1.0 CPython/3.13.12

File hashes

Hashes for fpt_bearings-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 e7d5ce3c5b0b62324b24338fc05a8e65bec23dbfc9a62b9b5fe68f334df37027
MD5 e0ad2098e00dbfdb60fe93782cfb907e
BLAKE2b-256 cfe00bdb8cd71845827caf1fda386a49ac7bafbf2acdf779c674fd98dfccd93d

See more details on using hashes here.

Provenance

The following attestation bundles were made for fpt_bearings-0.1.0-py3-none-any.whl:

Publisher: publish.yml on ttpioger/fpt-bearings

Attestations: Values shown here reflect the state when the release was signed and may no longer be current.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page