Microgrids, comprised of interconnected loads and distributed energy resources, function as single controllable entities with respect to the main grid. However, the inherent variability of distributed wind and solar generation within microgrids presents operational stability challenges concerning voltage regulation and frequency stability. Accurate forecasting of renewable generation is crucial for mitigating these challenges. This work proposes a one-dimensional Convolutional Neural Network (1-D CNN) based approach to forecast photovoltaic (PV) generation and wind energy, using data from the University of California, San Diego microgrid and San Diego Airport weather records. The proposed method is evaluated against various forecasting methods using key metrics: Mean Squared Error (MSE), Mean Absolute Error (MAE), Root Mean Squared Error (RMSE), and R-squared value. Results show that the 1-D CNN model achieves an improvement of up to 229.8 times in MSE and a 24.47 fold improvement in MAE compared to baseline models that use traditional statistical methods in forecasting. This demonstrates the potential of machine learning for enhancing microgrid management, particularly in short-term forecasting of renewable generation.
The rapid growth of Internet of Things (IoT) devices has increased the scale and diversity of cyberattacks, exposing limitations in traditional intrusion detection systems. Classical machine learning (ML) models such as Random Forest and Support Vector Machine perform well on known attacks but require retraining to detect unseen or zero-day threats. This study investigates lightweight decoder-only Large Language Models (LLMs) for IoT attack detection by integrating structured-to-text conversion, Quantized Low-Rank Adaptation (QLoRA) fine-tuning, and Retrieval-Augmented Generation (RAG). Network traffic features are transformed into compact natural-language prompts, enabling efficient adaptation under constrained hardware. Experiments on the CICIoT2023 dataset show that a QLoRA-tuned LLaMA-1B model achieves an F1-score of 0.7124, comparable to the Random Forest (RF) baseline (0.7159) for known attacks. With RAG, the system attains 42.63% accuracy on unseen attack types without additional training, demonstrating practical zero-shot capability. These results highlight the potential of retrieval-enhanced lightweight LLMs as adaptable and resource-efficient solutions for next-generation IoT intrusion detection.
Botnet attacks in Internet of Things (IoT) environments often occur as multi-stage campaigns, making early and reliable detection difficult across distributed and privacy-sensitive networks. Centralized detection approaches are often limited by heterogeneous traffic characteristics, severe data imbalance, and the need to aggregate large volumes of raw network data, raising scalability and privacy concerns. To address these challenges, this paper proposes FDA, a federated learning-based and data mining-driven framework for stage-aware botnet attack detection in IoT networks. FDA operates at network gateways, where anomalous traffic is first detected and then abstracted into compact and interpretable patterns using Frequent Itemset Mining (FIM). This pattern-based representation reduces noise and local traffic bias, enabling more robust learning across different IoT networks. Lightweight neural network models are trained locally at gateways, and a global model is learned through federated aggregation of model parameters, avoiding direct sharing of raw network data while enabling gateways to collaboratively learn evolving attack patterns across different IoT networks. Experimental results show that FDA achieves anomaly detection F1-scores above 99% across all gateways and multi-stage botnet attack classification F1-scores in the range of 48–49%, which are comparable to centralized machine-learning baselines while operating under decentralized and privacy-preserving constraints. Overall, FDA provides a practical, privacy-preserving, and effective solution for distributed botnet attack stage detection in real-world IoT deployments.
29 November 2024 in Engineer: Journal of the Institution of Engineers, Sri Lanka
Microgrids are localized energy systems that operate independently or in conjunction with the main power grid, integrating various energy sources for a reliable and resilient power supply. Microgrid energy demand refers to the electrical power required to meet consumer needs, influenced by factors such as time, weather, and habits of consumers. Accurate forecasting of energy demand is crucial for efficient microgrid operation, resource management, and optimization. Machine learning offers advantages over traditional methods in forecasting, such as the ability to handle complex relationships, adaptability to changes, and scalability. This paper proposes a Convolutional Neural Network (CNN) based approach to forecast microgrid energy demand. The study considers a dataset of multi-year power generation, consumption, and storage data in a microgrid and compares different approaches considering the metrics: Mean Squared Error, Mean Absolute Error, and R Squared Value. The results demonstrate that the CNN model performs well compared to other models. This study seeks to advance the application of machine learning in microgrid management.
The rapid growth of Internet of Things (IoT) devices has increased the scale and diversity of cyberattacks, exposing limitations in traditional intrusion detection systems. Classical machine learning (ML) models such as Random Forest and Support Vector Machine perform well on known attacks but require retraining to detect unseen or zero-day threats. This study investigates lightweight decoder-only Large Language Models (LLMs) for IoT attack detection by integrating structured-to-text conversion, Quantized Low-Rank Adaptation (QLoRA) fine-tuning, and Retrieval-Augmented Generation (RAG). Network traffic features are transformed into compact natural-language prompts, enabling efficient adaptation under constrained hardware. Experiments on the CICIoT2023 dataset show that a QLoRA-tuned LLaMA-1B model achieves an F1-score of 0.7124, comparable to the Random Forest (RF) baseline (0.7159) for known attacks. With RAG, the system attains 42.63% accuracy on unseen attack types without additional training, demonstrating practical zero-shot capability. These results highlight the potential of retrieval-enhanced lightweight LLMs as adaptable and resource-efficient solutions for next-generation IoT intrusion detection.