Sistem Prediksi Energi Panel Surya Berbasis AI dengan Integrasi Hukum Fisika
Mendukung Kemandirian Energi Nasional dan Target Net-Zero Emission Indonesia
๐ Dokumentasi โข ๐ Model PINN โข ๐ Hasil Penelitian โข ๐ Referensi
- ๐ฏ Executive Summary
- ๐ Latar Belakang & Masalah
- โจ Fitur Unggulan
- ๐๏ธ Arsitektur Sistem
- ๐ Quick Start
- ๐ง Instalasi Detail
- ๐ Panduan Penggunaan
- ๐ฌ Metodologi PINN
- ๐ Hasil dan Evaluasi
- ๐ Struktur Repositori
- โ๏ธ Konfigurasi Lanjutan
- ๐ค Kontribusi
- ๐ Referensi Akademik
- ๐ Lisensi
Physics-Informed Neural Network (PINN) untuk prediksi energi panel surya ini merupakan solusi inovatif yang menggabungkan kecerdasan buatan dengan hukum fisika fundamental. Sistem ini dirancang khusus untuk mengatasi tantangan intermittency energi surya di Indonesia dan mendukung stabilitas jaringan listrik nasional.
- Akurasi Model: Rยฒ = 0.834 (vs Linear Regression: 0.721, Random Forest: 0.798)
- Peningkatan RMSE: ~25% lebih baik dibanding model konvensional
- Efisiensi Data: Prediksi akurat dengan dataset terbatas
- Robustness: Konsisten pada berbagai kondisi cuaca Indonesia
Indonesia memiliki potensi energi surya 4.8 kWh/mยฒ/hari dengan target 23% energi terbarukan pada 2025. Namun, tantangan utama adalah:
- Intermittency: Fluktuasi output energi mencapai 40-60% akibat variasi cuaca
- Data Limitation: Keterbasan data historis berkualitas di banyak wilayah
- Grid Stability: Kesulitan PLN dalam manajemen beban akibat prediksi tidak akurat
- Investment Risk: Ketidakpastian ROI proyek energi surya
Bagaimana mengembangkan sistem prediksi energi surya yang akurat, andal, dan dapat mengintegrasikan prinsip fisika untuk mendukung stabilitas jaringan listrik nasional?
- Physics Integration: Menggabungkan persamaan radiasi matahari dan efisiensi termal
- Advanced Architecture: 5-layer neural network dengan 8,673 trainable parameters
- Smart Loss Function: Kombinasi data loss + physics loss (ฮป=0.1)
- Auto-Differentiation: Optimasi gradient berbasis automatic differentiation
- NREL Integration: Akses langsung ke National Solar Radiation Database
- Real-time Processing: Support untuk data cuaca real-time
- Multi-location: Prediksi untuk berbagai koordinat di Indonesia
- Quality Control: Automated data cleaning dan outlier detection
- Performance Metrics: MAE, RMSE, Rยฒ, dengan statistical significance testing
- Weather Scenarios: Simulasi 6 skenario cuaca berbeda
- Feature Importance: SHAP analysis untuk interpretabilitas model
- Interactive Plots: Visualisasi prediksi vs aktual dengan confidence intervals
graph TB
A[NREL NSRDB API] --> B[Data Acquisition]
B --> C[Data Preprocessing]
C --> D[Feature Engineering]
D --> E[Physics Integration]
E --> F[PINN Model]
F --> G[Training Process]
G --> H[Model Evaluation]
H --> I[Prediction Output]
subgraph "Physics Layer"
E1[Solar Radiation Calc]
E2[Panel Efficiency Calc]
E3[Thermal Effects]
end
subgraph "PINN Architecture"
F1[Input Layer - 12 features]
F2[Hidden Layer 1 - 64 neurons]
F3[Hidden Layer 2 - 64 neurons]
F4[Hidden Layer 3 - 32 neurons]
F5[Hidden Layer 4 - 32 neurons]
F6[Hidden Layer 5 - 16 neurons]
F7[Output Layer - 1 neuron]
end
- OS: Windows 10/11, macOS 10.15+, Ubuntu 18.04+
- Python: 3.9 - 3.11
- RAM: Minimum 8GB, Recommended 16GB
- Storage: 2GB free space
# 1. Clone repository
git clone https://github.com/yourusername/pinn-solar-prediction.git
cd pinn-solar-prediction
# 2. Setup virtual environment
python -m venv venv
source venv/bin/activate # Windows: venv\Scripts\activate
# 3. Install dependencies
pip install pandas numpy matplotlib seaborn requests scikit-learn tensorflow
# 4. Dapatkan NREL API key gratis di:
# https://developer.nrel.gov/signup/- Registrasi di NREL Developer Portal
- Dapatkan API key gratis via email
- Test koneksi:
import requests api_key = "your_key" url = f"https://developer.nrel.gov/api/nsrdb/v2/solar/ping?api_key={api_key}" response = requests.get(url) print("โ API Success!" if response.status_code == 200 else "โ API Error")
# Buka Database-api.IPYNB
jupyter notebook Database-api.IPYNB
# Konfigurasi parameter:
api_key = "YOUR_NREL_API_KEY"
lat = -1.93 # Latitude Indonesia
lon = 125.50 # Longitude Indonesia
year = 2020
email = "[email protected]"
# Jalankan semua cells untuk download data# Buka PINN.IPYNB di Jupyter
jupyter notebook PINN.IPYNB
# Proses training otomatis:
# 1. Load & preprocessing data
# 2. Model training dengan PINN
# 3. Evaluasi performa
# 4. Visualisasi hasil# Eksekusi langsung
python PINN.py
# Model akan otomatis:
# - Load data CSV
# - Preprocessing & feature engineering
# - Training model PINN
# - Generate predictions & metricsModel akan menghasilkan:
- Performance Metrics: Rยฒ, MAE, RMSE
- Visualisasi: Prediksi vs Aktual
- Scenario Analysis: 6 kondisi cuaca berbeda
- Model Comparison: PINN vs baseline models
def pinn_loss(y_true, y_pred, physics_params):
"""
Custom PINN loss function combining data and physics constraints
Total Loss = Data Loss + ฮป ร Physics Loss
"""
# Data Loss (MSE)
data_loss = tf.reduce_mean(tf.square(y_true - y_pred))
# Physics Loss (Conservation Laws)
physics_loss = compute_physics_residuals(y_pred, physics_params)
# Combined loss with weighting factor
total_loss = data_loss + lambda_physics * physics_loss
return total_loss-
Solar Radiation Calculation:
G_eff = GHI ร cos(ฮธ_zenith) -
Panel Temperature Model:
T_cell = T_ambient + (GHI / 800) ร 30 -
Efficiency Calculation:
ฮท(T) = ฮท_ref ร [1 + ฮฒ ร (T_cell - 25)] -
Power Output Model:
P_phys = (G_eff ร A_panel ร ฮท) / 1000
def build_pinn_model(input_dim=12):
"""
PINN Architecture: Progressive Dimensionality Reduction
"""
model = Sequential([
Dense(64, activation='tanh', input_shape=(input_dim,)), # Layer 1
Dense(64, activation='tanh'), # Layer 2
Dense(32, activation='tanh'), # Layer 3
Dense(32, activation='tanh'), # Layer 4
Dense(16, activation='tanh'), # Layer 5
Dense(1, activation='sigmoid') # Output
])
# Custom optimizer with physics-informed learning
optimizer = Adam(learning_rate=0.001, beta_1=0.9, beta_2=0.999)
model.compile(
optimizer=optimizer,
loss=pinn_custom_loss,
metrics=['mae', 'mse']
)
return model# Advanced training configuration
callbacks = [
EarlyStopping(
monitor='val_loss',
patience=20,
restore_best_weights=True,
verbose=1
),
ReduceLROnPlateau(
monitor='val_loss',
factor=0.5,
patience=10,
min_lr=1e-7,
verbose=1
),
ModelCheckpoint(
filepath='best_pinn_model.h5',
monitor='val_loss',
save_best_only=True
)
]
# Training with physics-informed callbacks
history = model.fit(
X_train, y_train,
validation_data=(X_val, y_val),
epochs=100,
batch_size=32,
callbacks=callbacks,
verbose=1
)| Model | MAE | RMSE | Rยฒ | Training Time |
|---|---|---|---|---|
| PINN | 0.1281 | 0.1684 | 0.8342 | 2.3 min |
| Random Forest | 0.1372 | 0.1891 | 0.7983 | 0.8 min |
| Linear Regression | 0.1456 | 0.2198 | 0.7213 | 0.1 min |
- RMSE: 23.4% better than Linear Regression
- Rยฒ: 15.7% improvement over baseline
- Generalization: Superior performance on unseen data
- Physics Consistency: 91.2% adherence to physical laws
| Scenario | Avg Output (kW) | Change (%) | Reliability |
|---|---|---|---|
| Normal Conditions | 0.286 | 0.0% | โญโญโญโญโญ |
| Dry Season (+20% GHI, +3ยฐC) | 0.331 | +15.7% | โญโญโญโญโญ |
| Rainy Season (-30% GHI, -2ยฐC) | 0.195 | -31.8% | โญโญโญโญ |
| High Wind (+50% Wind) | 0.294 | +2.8% | โญโญโญโญโญ |
| Optimal Conditions | 0.338 | +18.2% | โญโญโญโญโญ |
| Extreme Weather (-40% GHI, +5ยฐC) | 0.162 | -43.4% | โญโญโญ |
# Model validation results
validation_metrics = {
'cross_validation_r2': 0.827 ยฑ 0.023,
'statistical_significance': 'p < 0.001',
'confidence_interval_95': [0.811, 0.857],
'feature_importance': {
'GHI': 0.456,
'Temperature': 0.234,
'Zenith_Angle': 0.187,
'Wind_Speed': 0.089,
'Others': 0.034
}
}๐ฆ pinn-solar-prediction/
โโโ ๐ 1398305_1.93_125.50_2020.csv # Sample NSRDB dataset
โโโ ๐ Database-api.IPYNB # Data acquisition notebook
โโโ ๐ PINN.IPYNB # Main model notebook
โโโ ๐ PINN.py # Main model script
โโโ ๐ Optimasi Prediksi [...].pdf # Research paper
โโโ ๐ requirements.txt # Dependencies
โโโ ๐ LICENSE # MIT License
โโโ ๐ README.md # Documentation
Kami menyambut kontribusi dari komunitas!
- Fork repository ini
- Create feature branch:
git checkout -b feature/ImprovementName - Commit changes:
git commit -m 'Add improvement' - Push branch:
git push origin feature/ImprovementName - Open Pull Request
Gunakan GitHub Issues untuk melaporkan bug atau request fitur baru.
- Syahril Arfian Almazril - Lead Developer & Researcher
- Stephani Maria Sianturi - Researcher member
- Septia Retno Puspita - Researcher member
- Ade Aditya Ramadha - Technical Advisor
Primary Research Paper:
@article{almazril2025pinn,
title={Optimasi Prediksi Energi Terbarukan Nasional Berbasis Physics-Informed Neural Network (PINN)},
author={Almazril, Syahril Arfian and Sianturi, Stephani Maria and Puspita, Septia Retno and Ramadha, Ade Aditya},
journal={Buletin Pagelaran Mahasiswa Nasional Bidang Teknologi Informasi dan Komunikasi},
volume={1},
number={1},
pages={1--8},
year={2025}
}-
Raissi, M., et al. (2019). "Physics-informed neural networks: A deep learning framework for solving forward and inverse problems involving nonlinear partial differential equations." Journal of Computational Physics, 378, 686-707.
-
NREL NSRDB (2021). National Solar Radiation Database. National Renewable Energy Laboratory. https://nsrdb.nrel.gov/
-
Kementerian ESDM (2023). "Handbook of Energy & Economic Statistics of Indonesia 2023." Jakarta: ESDM.
- Research Domain: Physics-Informed Machine Learning, Renewable Energy
- Applications: Smart Grid, Energy Forecasting, Climate Modeling
- Impact Factor: Supporting Indonesia's 23% renewable energy target by 2025
Proyek ini dilisensikan di bawah MIT License - lihat file LICENSE untuk detail lengkap.
Jika proyek ini bermanfaat, berikan โญ dan bagikan kepada komunitas!
Connect with us: LinkedIn โข Research Gate โข Email