How hnainiamohamedamine29/obc_cubesat_predictive_maintenance works
This repository is a CubeSat battery State-of-Health (SOH) prediction project, spanning data preparation, LSTM modeling, TensorFlow Lite conversion and embedded inference. The documented user-to-result workflow prepares cycle data into scaled time windows, predicts SOH, then can run inference on an STM32 board. The README also describes MATLAB battery simulation, but its source is absent from the supplied tree. Edges reflect README workflow statements or visible source references; unsampled notebook and conversion internals are not assumed.
Main entry points: app_inference.c U5 Inference App · config.py Pipeline Config · feature_engineering.py Feature Engineering · split.py Data Splitting
Components 22
Analysis
- Data Exploration
03_visualization/data_analysis_normal_state/eda_distribution_analysis.py - Visualization
03_visualization/visualization.py
Data Pipeline
- Pipeline Config
04_pipline_data_preparing/config.py - Feature Engineering
04_pipline_data_preparing/feature_engineering.py - Data Splitting
04_pipline_data_preparing/split.py - Feature Scaling
04_pipline_data_preparing/normalize.py - Window Building
04_pipline_data_preparing/sequences_construction.py
Model and Runtime
- LSTM Training
- Reference Model
06_Model_Test/test_bench_essay_Reference_Model/lstm_core_5.py - Model Optimization
07_optimization_&_quantization_conversion/optimize_v3_int8.py - TFLite Inference
08_inference_tflite/lstm_core_6_tflite _3.py - Runtime Benchmark
09_runtime_test(latency_RAM)_on_local/benchmark_inference_fixed.py - Local Predictor
09_runtime_test(latency_RAM)_on_local/lstm_core_8_tflite.py
Embedded Deployment
- U5 Firmware
10_edge_deployment/STM_U5DiscoveryKit_TEST_Copy_2_second_essay(confirmed)/Core/Src/main.c - U5 Inference App
10_edge_deployment/STM_U5DiscoveryKit_TEST_Copy_2_second_essay(confirmed)/App/app_inference.c - Onboard Preprocessing
10_edge_deployment/STM_U5DiscoveryKit_TEST_Copy_2_second_essay(confirmed)/App/soh_preproc.c - UART Protocol
10_edge_deployment/STM_U5DiscoveryKit_TEST_Copy_2_second_essay(confirmed)/App/app_uart_protocol.c - TFLM API
10_edge_deployment/STM_TEST_LSTM_first_essay_not_confirmed/TFLM/tflm_c_api.cpp - Embedded Model Data
10_edge_deployment/STM_TEST_LSTM_first_essay_not_confirmed/Model/model_data.cc - F4 Firmware
10_edge_deployment/STM_TEST_LSTM_first_essay_not_confirmed/Core/Src/main.c - F4 Inference App
10_edge_deployment/STM_TEST_LSTM_first_essay_not_confirmed/App/app_inference.c
Other components
- Engineer
Connections 19
- Engineer → Data Exploration: explores data
- Engineer → Pipeline Config: configures pipeline
- Pipeline Config → Feature Engineering: configures
04_pipline_data_preparing/feature_engineering.py - Feature Engineering → Data Splitting: engineers features
- Data Splitting → Feature Scaling: splits data
- Feature Scaling → Window Building: scales data
- Window Building → LSTM Training: builds windows
- LSTM Training → Reference Model: experiments with
- LSTM Training → Model Optimization: exports model
- Model Optimization → TFLite Inference: converts model
- TFLite Inference → Local Predictor: runs inference
- Runtime Benchmark → Local Predictor: benchmarks
09_runtime_test(latency_RAM)_on_local/benchmark_inference_fixed.py - Engineer → U5 Firmware: deploys to board
- U5 Firmware → U5 Inference App: initializes app
10_edge_deployment/STM_U5DiscoveryKit_TEST_Copy_2_second_essay(confirmed)/Core/Src/main.c - U5 Inference App → Onboard Preprocessing: preprocesses window
10_edge_deployment/STM_U5DiscoveryKit_TEST_Copy_2_second_essay(confirmed)/App/app_inference.c - U5 Inference App → TFLM API: invokes inference
10_edge_deployment/STM_U5DiscoveryKit_TEST_Copy_2_second_essay(confirmed)/App/app_inference.c - U5 Inference App → UART Protocol: dispatches packets
10_edge_deployment/STM_U5DiscoveryKit_TEST_Copy_2_second_essay(confirmed)/App/app_inference.c - F4 Firmware → F4 Inference App: runs app
10_edge_deployment/STM_TEST_LSTM_first_essay_not_confirmed/Core/Src/main.c - F4 Inference App → TFLM API: invokes inference
10_edge_deployment/STM_TEST_LSTM_first_essay_not_confirmed/App/app_inference.c