How tharunbalajis/bearing-lifecycle-analysis works
This repository predicts bearing remaining useful life from NASA IMS vibration records and presents the resulting health, fault, and prognosis diagnostics in a dashboard. The primary workflow extracts time-frequency and physics features, trains a diagnostic CNN while retaining proxy RMS health as the authoritative curve, then estimates RUL. Separately, the dashboard serves pipeline artifacts and CNN inference through an API or precomputed static data. The graph reflects documented orchestration and indexed imports; some dashboard data wiring is not excerpted, so uncertain links are omitted.
Main entry points: Dashboard.tsx Dashboard page · main.py API application · inference_cache.py Inference cache · run_pipeline.py Pipeline orchestration
Components 32
Analysis pipeline
- Pipeline orchestration
run_pipeline.py
Signal features
- Feature extraction
src/features/extract_features.py - Peak windows
src/features/peak_detection.py - Time-frequency analysis
src/features/tf_extraction.py - Physics features
src/features/physics_features.py - NASA file loading
src/utils/io_utils.py
Health and prognosis
- CNN health model
src/models/cnn_health_index.py - CNN training and proxy HI
src/models/train_cnn.py - CNN inference
src/models/predict_hi.py - RUL estimation
src/models/rul_estimation.py
Dashboard backend
- Static data export
dashboard/backend/export_static.py - Scalogram precompute
dashboard/backend/precompute_scalograms.py - Inference cache
dashboard/backend/inference_cache.py - API application
dashboard/backend/main.py - Health index route
dashboard/backend/routes/health_index.py - RUL route
dashboard/backend/routes/rul.py - Fault trend route
dashboard/backend/routes/bpfo_trend.py - File detail route
dashboard/backend/routes/file_detail.py - Scalogram route
dashboard/backend/routes/scalogram.py
Dashboard interface
- Dashboard page
dashboard/frontend/src/pages/Dashboard.tsx - Data client
dashboard/frontend/src/api/client.ts - File scrubber
dashboard/frontend/src/components/FileScrubber.tsx - Health timeline
dashboard/frontend/src/components/HealthIndexTimeline.tsx - RUL curve
dashboard/frontend/src/components/RULCurve.tsx - CNN proxy comparison
dashboard/frontend/src/components/CNNvsProxyPanel.tsx - Fault frequency panel
dashboard/frontend/src/components/FaultFrequencyPanel.tsx - Scalogram viewer
dashboard/frontend/src/components/ScalogramViewer.tsx - Bearing visualization
dashboard/frontend/src/components/BearingModel3D.tsx - Dashboard introduction
dashboard/frontend/src/components/HeroIntro.tsx
Other components
- Pipeline operator
- NASA IMS records
- Dashboard user
Connections 36
- Pipeline operator → Pipeline orchestration: runs
run_pipeline.py - Pipeline orchestration → Feature extraction: runs extraction
run_pipeline.py - NASA IMS records → Feature extraction: provides records
- Feature extraction → Peak windows: detects windows
src/features/extract_features.py - Feature extraction → Time-frequency analysis: extracts spectra
src/features/extract_features.py - Feature extraction → NASA file loading: loads records
src/features/extract_features.py - Pipeline orchestration → Physics features: augments features
run_pipeline.py - Physics features → NASA file loading: loads records
src/features/physics_features.py - Physics features → Peak windows: detects windows
src/features/physics_features.py - Physics features → Time-frequency analysis: uses spectra
src/features/physics_features.py - Pipeline orchestration → CNN training and proxy HI: trains model
run_pipeline.py - CNN training and proxy HI → CNN health model: uses model
src/models/train_cnn.py - CNN training and proxy HI → NASA file loading: loads records
src/models/train_cnn.py - Pipeline orchestration → RUL estimation: estimates RUL
run_pipeline.py - Inference cache → CNN health model: builds inference
dashboard/backend/inference_cache.py - API application → Inference cache: loads at startup
dashboard/backend/main.py - API application → Health index route: registers route
dashboard/backend/main.py - API application → RUL route: registers route
dashboard/backend/main.py - API application → Fault trend route: registers route
dashboard/backend/main.py - API application → File detail route: registers route
dashboard/backend/main.py - API application → Scalogram route: registers route
dashboard/backend/main.py - Health index route → Inference cache: reads data
dashboard/backend/routes/health_index.py - RUL route → Inference cache: reads data
dashboard/backend/routes/rul.py - Fault trend route → Inference cache: reads data
dashboard/backend/routes/bpfo_trend.py - File detail route → Inference cache: reads data
dashboard/backend/routes/file_detail.py - Dashboard user → Dashboard page: views
- Dashboard page → Data client: requests data
dashboard/frontend/src/pages/Dashboard.tsx - Dashboard page → File scrubber: renders
dashboard/frontend/src/pages/Dashboard.tsx - Dashboard page → Health timeline: renders
dashboard/frontend/src/pages/Dashboard.tsx - Dashboard page → RUL curve: renders
dashboard/frontend/src/pages/Dashboard.tsx - Dashboard page → CNN proxy comparison: renders
dashboard/frontend/src/pages/Dashboard.tsx - Dashboard page → Fault frequency panel: renders
dashboard/frontend/src/pages/Dashboard.tsx - Dashboard page → Scalogram viewer: renders
dashboard/frontend/src/pages/Dashboard.tsx - Dashboard page → Dashboard introduction: renders
dashboard/frontend/src/pages/Dashboard.tsx - Dashboard introduction → Bearing visualization: renders
dashboard/frontend/src/components/HeroIntro.tsx - Scalogram viewer → Data client: gets image path
dashboard/frontend/src/components/ScalogramViewer.tsx