## 2 Related Works  
Virtual sensing refers to the use of computational models to estimate environmental parameters from data captured by physical sensors. It is a promising technique for addressing the limitations of traditional physical sensor networks. Virtual sensors have found extensive application in environmental monitoring, particularly when physical sensors are either cost-prohibitive or difficult to deploy in large-scale or remote areas [16]. The authors in [17] addressed the challenges associated with soil moisture measurement in smart farming. While critical for precision agriculture, soil moisture sensors are costly, prone to failure, and require complex installation and calibration. To overcome these issues, the authors propose a virtual soil moisture sensor as an alternative to physical sensors. Their methodology employs a deep learning (DL) approach based on long short-term memory (LSTM) networks. Using data collected from other environmental sensors--such as temperature, humidity, and radiation--deployed on wireless sensor nodes, the authors train the LSTM network to predict soil moisture. The network's architecture is optimized concerning hyperparameters like sequence length, batch size, and training epochs.Additionally, the authors experimented through comparisons with other machine learning models, such as fully recurrent neural networks and multivariate regression trees, to validate the effectiveness of their approach. The results demonstrated that the LSTM-based virtual sensor significantly improves prediction accuracy, reducing reliance on physical soil moisture sensors. This approach not only minimizes costs but also enhances the reliability and scalability of the system. The virtual sensor effectively adapts to varying environmental conditions, providing robust predictions over extended periods. The key improvement in virtual sensing lies in the use of LSTM networks, which enable the prediction of soil moisture values using correlated environmental parameters. This method eliminates the physical sensor's limitations, allowing seamless integration into IoT-based smart farming systems, thereby offering a more sustainable and cost-effective solution. The authors in [18] tackled the issue of fault tolerance and robustness in wireless sensor networks (WSNs), proposing a virtual wireless sensor network (VWSN) based on fuzzy logic to approximate real data when physical sensors fail or are unavailable. The study addresses the shortcomings of WSNs, such as their inability to function in hostile environments, high deployment costs, and/or sensor inaccuracy. Their methodology builds a logical framework where virtual sensor nodes are modeled as deductive databases and fuzzy logic rules are employed to infer approximate sensors' reading values. Their approach uses the Tree-Routing protocol to organize network data and generate fuzzy rulesbased on sensed data from physical sensors and their neighbors. A prototype of the VWSN is implemented using Snlog [18], a declarative programming language, and tested using the TinyOS simulator [18]. The authors introduced an aging mechanism to manage fuzzy rules dynamically and to remove outdated or conflicting rules, ensuring the system's adaptability to changing conditions. The results showed that the fuzzy logic-based VWSN effectively approximates the sensed data, with the computed virtual values closely matching the actual sensor's readings. This improvement enables a more robust and cost-efficient sensing mechanism, especially in scenarios where physical sensors face limitations such as high installation costs, maintenance challenges, limited accessibility, or environmental constraints. The proposed system demonstrates significant enhancements in virtual sensing, such as reduced dependency on physical sensors, better fault tolerance, and efficient data-driven decision-making, marking a critical advancement in sensor network virtualization.