How wang-fujin/battnn works
Project Type and Purpose
• This is a Python‐based research pipeline for battery modeling and prognosis. It ingests three kinds of data (Lab, NASA, simulated), trains three model variants (physics‐informed BattNN, CNN, RNN), and outputs serialized results for analysis. It is not a deployed service but a batch experiment framework.
a. Data Sources (left‐most layer)
• LabData (./data/LabData/*.npy)
• NASAData (./data/NASA11/*.mat)
• SimData (./data/SimData/{train,test}/*.npy)
• External: full XJTU dataset (hyperlink)
b. DataLoader Module
• load_Lab_data.py
• load_NASA_data.py
• load_sim_data.py
• __init__.py
c. Preprocessing & Utilities
• functions.py (common transforms, metrics, batching)
d. Model Definitions
• BattNN.py (physics‐informed NN)
• CNN.py
• RNN.py
e. Orchestrators (entry points)
• main_LabData.py
• main_NASAData.py
• main_SimData.py
f. Results Storage
• ./results/*.pkl (trained model checkpoints)
• ./results/test record/*.txt (evaluation logs)
• ./results/batch size and seq len/*.txt (config sweeps)
Interactions and Data Flow
• DataLoader → Preprocessing/Utilities (functions.py) → Batch generator
• Batch generator → Model Definitions → Training loop
• Training loop → Results Storage (pickle model, write logs)
• Orchestrator scripts coordinate the above steps per data type
Architectural Patterns & Principles
• Modular separation: Data loading, preprocessing, modeling, orchestration
• Single responsibility: each module focuses on one task
• Reusability: functions.py and DataLoader are shared across experiments
Technologies & Frameworks
• Python 3
• NumPy (.npy files), SciPy or h5py (for .mat)
• Likely PyTorch or TensorFlow inside model scripts (implicit)
• Pickle for model serialization