A novel numerical solution of nonlinear stochastic model for the propagation of malicious codes in Wireless Sensor Networks using a high order spectral collocation technique

Sci Rep. 2025 Jan 2;15(1):228. doi: 10.1038/s41598-024-82033-2.

Abstract

The open nature of Wireless Sensor Networks (WSNs) renders them an easy target to malicious code propagation, posing a significant and persistent threat to their security. Various mathematical models have been studied in recent literature for understanding the dynamics and control of the propagation of malicious codes in WSNs. However, due to the inherent randomness and uncertainty present in WSNs, stochastic modeling approach is essential for a comprehensive understanding of the propagation of malicious codes in WSNs. In this paper, we formulate a general stochastic compartmental model for analyzing the dynamics of malicious code distribution in WSNs and suggest its possible control. We incorporate the stochasticity in the classical deterministic model for the inherent unpredictability in code propagation, which results in a more appropriate representation of the dynamics. A basic theoretical analysis including the stability results of the model with randomness is carried out. Moreover, a higher-order spectral collocation technique is applied for the numerical solution of the proposed stochastic model. The accuracy and numerical stability of the model is presented. Finally, a comprehensive simulation is depicted to verify theoretical results and depict the impact of parameters on the model's dynamic behavior. This study incorporates stochasticity in a deterministic model of malicious codes spread in WSNs with the implementation of spectral numerical scheme which helps to capture these networks' inherent uncertainties and complex nature.

Keywords: Spectral collocation technique; Stochastic compartmental modeling, Distribution density, Wireless sensor network, Malicious codes propagation, Stability Analysis.