Physics-Guided Temporal Fusion Transformer for High-Resolution Photovoltaic Power Forecasting Across Heterogeneous Solar Stations
Muhammad Dawood Nasir, Muhammad Farhan Hanif, Muhammad Tahir Hassan, Muhammad Imran Malik, Ali Tahir, Naveed HusnainAbstract
Accurate high-resolution photovoltaic power forecasting remains challenging because rapid weather changes and heterogeneous plant configurations produce nonlinear variations and extreme errors. Existing data-driven methods capture complex meteorological relationships but may generate physically inconsistent forecasts, whereas simplified physical models cannot fully represent site specific behavior. This study developed a physics-informed temporal fusion transformer framework combining a transformer–bidirectional long short-term memory forecasting branch with soft irradiance–power and temperature–power constraints. The framework was evaluated using 70,176 observations from Solar Station Site 5, recorded at 15-minute intervals, and independently trained and calibrated across eight solar stations. On the Site 5 test set, it achieved a mean absolute error of 1.4253 megawatts, a root mean squared error of 3.8612 megawatts, and a coefficient of determination of 0.9734. It outperformed standalone temporal fusion transformer, gated recurrent unit, extreme gradient boosting, and random forest; relative to standalone temporal fusion transformer, mean absolute and root mean squared errors decreased by 29.7% and 15.1%, respectively. Sensitivity analysis selected 0.05 as the best nonzero physics weight for Site 5 and revealed a trade-off between predictive accuracy and physical consistency. Residual analysis identified transient and measurement-related outliers. Across the eight stations, coefficients of determination exceeded 0.84 at six sites and reached 0.9804 at Site 6, supporting generalizability across heterogeneous installations following station-specific calibration. Deployment latency remained 0.0864 milliseconds per sample, supporting operational use for renewable-energy integration, grid scheduling, and low-carbon power management.