Physics-Informed Machine Learning for Full J–V Curve Prediction of Perovskite and Silicon Photovoltaic Module
This project provides an end-to-end pipeline for developing, training, and evaluating an Autoencoder model for photovoltaic J–V (Current Density–Voltage) curve analysis.
The pipeline supports both Silicon and Perovskite photovoltaic technologies and automates dataset generation, model training, evaluation, experiment logging, and artifact management.
The objective of this research is to investigate the use of Physics informed ML Autoencoders for learning compressed latent representations of photovoltaic J–V curves under varying environmental conditions.
The model learns compact representations of measured J–V characteristics from both Silicon and Perovskite solar cells, capturing the underlying patterns and variations associated with changes in environmental conditions, particularly temperature and irradiance.
These learned latent representations provide a foundation for subsequent analysis and physics-informed modelling of photovoltaic performance.
| Technology | Dataset / Panel |
|---|---|
| Silicon | SunPower_5-1 |
| Perovskite | Perovskite_5&6 |
The pipeline consists of three main stages:
Generates an Autoencoder-ready dataset by combining:
- Measured J–V curve data
- Weather information
- Technology-specific preprocessing
Output:
data/
└── jv_autoencoder_dataset_*.npz
Trains a neural Autoencoder using the generated dataset.
Features:
- Latent-space compression
- J–V curve reconstruction learning
- Automatic model artifact storage
- Run-specific experiment output directories
- Training and experiment logging
Outputs:
models/
└── jv_autoencoder_*.pth
runs/
└── <timestamp>_<technology>/
Evaluates the trained Autoencoder and reconstructs photovoltaic J–V curves.
Evaluation includes:
- Reconstruction performance analysis
- Sample J–V curve visualizations
- Comparison of measured and reconstructed characteristics
- Predicted J–V curve analysis
The pipeline is configured through the TECH_CONFIG dictionary.
Each technology has its own configuration, specifying:
- Weather dataset location
- Raw weather data source
- Autoencoder dataset output path
- Autoencoder model output path
Supported configurations:
SunPower_5-1Perovskite_5&6
Install the required dependencies:
pip install -r requirements.txtFor Windows environments requiring the PyTorch-specific dependencies:
pip install -r requirements-torch_windows.txtOptional environment variables can be stored in a .env file.
The project automatically loads environment variables using:
load_dotenv()For Silicon:
python pipeline_runner.py --tech "SunPower_5-1" --train-aeFor Perovskite:
python pipeline_runner.py --tech "Perovskite_5&6" --train-aeThe training pipeline automatically:
- Generates the Autoencoder dataset.
- Trains the Autoencoder model.
- Saves the trained model and associated artifacts.
- Stores experiment logs in a run-specific directory.
For Silicon:
python eval_AE.py --tech "SunPower_5-1" --model-path "<model_path>" --dataset-path "<dataset_path>"For Perovskite:
python eval_AE.py --tech "Perovskite_5&6" --model-path "<model_path>" --dataset-path "<dataset_path>"The evaluation pipeline:
- Loads the trained Autoencoder model.
- Loads the corresponding evaluation dataset.
- Reconstructs the J–V curves.
- Generates evaluation results and visualizations.
The pipeline generates the following artifacts:
data/
└── *.npz
Contains the processed datasets used for Autoencoder training and evaluation.
models/
└── *.pth
Contains the saved PyTorch model checkpoints.
runs/
└── <timestamp>_<technology>/
└── pipeline.log
Contains run-specific logs and experiment outputs.
The project uses:
- Python – Core programming language
- PyTorch – Autoencoder implementation and training
- NumPy – Numerical operations and dataset handling
- Pandas – Data processing
- Matplotlib – Visualization
- python-dotenv – Environment variable management
For the complete dependency list, refer to requirements.txt and requirements-torch_windows.txt.
This repository forms part of research into data-driven and physics-informed modelling of photovoltaic J–V characteristics across different solar cell technologies and environmental operating conditions.