Open AccessOpen Access||Research Article

An Energy-Aware Adaptive Sampling and Anomaly Detection Machine Learning Framework for Intelligent Wireless Sensor Networks

Olarewaju Peter Ayeoribe1,2

1 Department of Electrical and Electronics Engineering, Federal University Oye-Ekiti, 371104, Nigeria

2 Transmitter Laboratory, Peters A.O. Broadcasting Company Ltd, Nigeria

Download PDF</>HTML Version

Abstract

Energy efficiency and reliable anomaly detection remain important challenges in resource-constrained wireless sensor networks (WSNs), where continuous data acquisition and abnormal network traffic can increase communication and processing demands. This study presents an energy-aware adaptive sampling and machine learning-based anomaly detection framework for intelligent WSNs. The proposed framework integrates condition-dependent sampling with Random Forest classification to reduce unnecessary data acquisition while supporting the identification of abnormal network traffic. The anomaly detection component was implemented using the WSN-DS dataset, comprising 374,661 records generated through NS-2 simulation using the Low-Energy Adaptive Clustering Hierarchy (LEACH) protocol. The dataset contained five traffic categories: normal, blackhole, flooding, grayhole, and scheduling (TDMA). A Random Forest classifier comprising 300 decision trees was configured using Gini impurity, square-root feature selection, and balanced subsampling to address class imbalance. Adaptive sampling performance was evaluated under stable, moderately varying, and highly dynamic operating conditions. The results showed sampling reductions of 60%, 40%, and 15%, respectively. Across the three equally weighted conditions, adaptive sampling reduced the total number of samples from 30,000 to 18,500, representing an aggregate reduction of 38.33% compared with fixed-rate sampling. These findings demonstrate the potential of condition-dependent sampling to improve sampling efficiency while retaining greater data acquisition activity under dynamic conditions. Further classification and network-level evaluation is required to quantify the corresponding effects on detection performance, energy consumption, packet transmission, and network lifetime.

Keywords

Adaptive samplingAnomaly detectionEnergy efficiencyMachine learningWireless sensor networks

Graphical Abstract

An Energy-Aware Adaptive Sampling and Anomaly Detection Machine Learning Framework for Intelligent Wireless Sensor Networks — graphical abstract

Novelty Statement

The proposed framework introduces an intelligent integration of adaptive sampling and Random Forest-based anomaly detection, achieving 38.33% sampling reduction.