Introduction: Accurate short-term forecasting of renewable energy generation is
essential for stable smart grid operation. The variability of solar and wind resources
introduces uncertainty into scheduling and dispatch. Existing cloud-based forecast-
ing systems often face latency limitations for real-time applications. This work pro-
poses an IoT-enabled edge intelligence framework using a hybrid LSTM–Temporal
Fusion Transformer (LSTM–TFT) model deployed on edge devices.
Methods: Data were collected from multiple renewable energy sites using standard
inverter monitoring systems and Raspberry Pi edge gateways. Communication was
performed via an OPC UA-based pipeline integrating industrial protocols such as
Modbus TCP/IP. Time-series preprocessing included Daubechies-4 wavelet decom-
position. The LSTM captured temporal dependencies, while the TFT component
modeled exogenous variables with attention mechanisms. The model was trained on
publicly available multi-site datasets from different climatic regions and evaluated
using walk-forward validation. TFLite quantization was applied for edge deployment.
Baselines include LSTM, GRU, XGBoost, and persistence models.
Results: The proposed model achieved a MAPE of 4–6% for solar forecasting and 5–
7% for wind forecasting, outperforming baselines across all test scenarios. Wavelet
preprocessing improved RMSE under high variability conditions. After optimiza-
tion, edge inference latency reduced to 10–20 ms with negligible accuracy loss.
End-to-end latency remained within tens of milliseconds, suitable for near-real-time
monitoring.
Conclusions: The proposed framework demonstrates that hybrid Transformer-
based forecasting models can be deployed at the edge with minimal accuracy degra-
dation. The integration of IoT sensing, signal decomposition, and deep learning pro-
vides a scalable approach for near-real-time renewable energy forecasting in smart
grids.