Next Article in Journal
Automated Vulnerability Scanning and Prioritisation for Domestic IoT Devices/Smart Homes: A Theoretical Framework
Next Article in Special Issue
Joint Effect of Signal Strength, Bitrate, and Topology on Video Playback Delays of 802.11ax Gigabit Wi-Fi
Previous Article in Journal
Enhancing Adversarial Policy Learning via Value-Based Reward Shaping
Previous Article in Special Issue
A Secure and Efficient KA-PRE Scheme for Data Transmission in Remote Data Management Environments
 
 
Font Type:
Arial Georgia Verdana
Font Size:
Aa Aa Aa
Line Spacing:
Column Width:
Background:
Article

Rain Detection in Solar Insecticidal Lamp IoTs Systems Based on Multivariate Wireless Signal Feature Learning

1
College of Engineering, Nanjing Agricultural University, Nanjing 210031, China
2
College of Smart Agriculture (College of Artificial Intelligence), Nanjing Agricultural University, Nanjing 210031, China
3
School of Engineering & Physical Sciences, University of Lincoln, Lincoln LN6 7TS, UK
*
Author to whom correspondence should be addressed.
Electronics 2026, 15(2), 465; https://doi.org/10.3390/electronics15020465
Submission received: 20 December 2025 / Revised: 15 January 2026 / Accepted: 19 January 2026 / Published: 21 January 2026

Abstract

Solar insecticidal lamp Internet of Things (SIL-IoTs) systems are widely deployed in agricultural environments, where accurate and timely rain-detection is crucial for system stability and energy-efficient operation. However, existing rain-sensing solutions rely on additional hardware, leading to increased cost and maintenance complexity. This study proposes a hardware-free rain detection method based on multivariate wireless signal feature learning, using LTE communication data. A large-scale primary dataset containing 11.84 million valid samples was collected from a real farmland SIL-IoTs deployment in Nanjing, recording RSRP, RSRQ, and RSSI at 1 Hz. To address signal heterogeneity, a signal-strength stratification strategy and a dual-rate EWMA-based adaptive signal-leveling mechanism were introduced. Four machine-learning models—Logistic Regression, Random Forest, XGBoost, and LightGBM—were trained and evaluated using both the primary dataset and an external test dataset collected in Changsha and Dongguan. Experimental results show that XGBoost achieves the highest detection accuracy, whereas LightGBM provides a favorable trade-off between performance and computational cost. Evaluation using accuracy, precision, recall, F1-score, and ROC-AUC indicates that all metrics exceed 0.975. The proposed method demonstrates strong accuracy, robustness, and cross-regional generalization, providing a practical and scalable solution for rain detection in agricultural IoT systems without additional sensing hardware.

1. Introduction

1.1. Background

Ensuring national food security has long been emphasized as a strategic priority in China, where agricultural pests continue to pose major threats to stable crop production. In 2025, twenty-three major pests affecting staple crops—including wheat, rice, maize, and potatoes, as well as oil crops and vegetables—were reported to exhibit high recurrence, with an estimated affected area of 2.518 billion mu, representing a 6.2% increase compared with 2024 [1]. Traditional pesticide-based control approaches often result in a vicious cycle of repeated application, resistance development, and increasing dosage requirements. Excessive pesticide use disrupts ecological balance, threatens biodiversity, and poses risks to human health, ultimately undermining the sustainable development of agriculture.
Against this backdrop, green, efficient, and sustainable pest-control technologies have gained substantial attention. Physical control methods—characterized by pollution-free operation, low residue, and long-term sustainability—have emerged as important alternatives. Among them, the solar insecticidal lamp (SIL) has become widely adopted in China due to its utilization of phototactic behavior for pest trapping, energy efficiency, and suitability for large-scale field deployment. With the rapid advancement of smart agriculture, SILs have increasingly been integrated with wireless sensor-network technologies to form SIL-IoTs systems [2]. The concept originated in 2013, when Lam et al. combined SILs with sensor networks for monitoring brown planthopper dynamics in the Mekong Delta [3]. Subsequent studies further highlighted the significant potential of SIL-IoTs in improving pest-management efficiency [4].
Each SIL-IoTs node incorporates wireless communication modules, sensing units, and 4G LTE connectivity, and can be categorized as edge nodes or sink nodes. Edge nodes perform pest trapping while transmitting environmental and agricultural data to sink nodes, which further upload aggregated data to the cloud. Figure 1 illustrates a typical SIL-IoTs node.
Because SIL-IoTs nodes rely on solar energy, their operation is highly sensitive to environmental conditions—particularly rainfall [5]. Rainfall affects photovoltaic performance by reducing irradiance, decreases battery charging efficiency, increases internal humidity, and may lead to electrical safety risks such as high-voltage grid malfunction. Moreover, rainfall influences pest behavior—reducing trapping efficiency—and induces attenuation in wireless communication signals, thereby altering key indicators such as RSRP, RSRQ, and RSSI.
Failure to detect rain promptly may lead to an insufficient energy supply, misoperation of high-voltage components, unnecessary downtime, or system instability. Accurate and timely rain detection enables SIL-IoTs systems to dynamically adjust working modes—for example, by shutting down the high-voltage grid during adverse weather, delaying trapping operations, or switching to low-power modes to preserve energy.
Currently, most commercial SILs employ a mechanical rain-detection mechanism based on the conduction between two rain-sensing screws [6]. When raindrops accumulate between the screws, a conduction path is formed, triggering the lamp to shut down. Although simple, this method suffers from multiple limitations:
  • High humidity, condensation, or debris (e.g., dust, leaves, bird droppings) can cause false activations or functional failure.
  • Residual moisture after rainfall leads to prolonged misjudgment, causing missed pest-control opportunities during the critical post-rain pest activity peak.
  • Long-term corrosion or oxidation of exposed screws increases resistance, reduces reliability, and requires frequent maintenance.
With SILs transitioning from isolated deployment to large-scale networked SIL-IoTs systems, the need for accurate, fast, and stable rain detection has become more pressing.
Camera-based rain detection is theoretically feasible but impractical for SIL-IoTs, as image acquisition introduces substantial energy consumption, visual quality deteriorates significantly under rainfall conditions, and most commercial nodes are not equipped with cameras due to cost and power constraints. Although auxiliary onboard sensors, such as humidity and light intensity sensors, can provide indirect environmental information, they cannot independently support reliable rain detection. Moreover, recent studies have emphasized that sustainable IoT systems should prioritize ultra-low-power operation and hardware simplicity to enable long-term self-sufficient deployment through energy harvesting technologies [7]. Consequently, introducing additional sensing hardware would conflict with the fundamental design principles of energy-efficient and sustainable IoT devices. Therefore, a critical challenge emerges: how to achieve accurate, low-cost, and reliable rain detection without any additional hardware modification.
Notably, nearly all commercial SIL-IoTs products adopt 4G LTE communication, and rainfall is known to induce attenuation and fluctuations in wireless signal propagation, thereby altering cellular communication metrics such as RSRP, RSRQ, and RSSI. These inherent communication features provide a practical opportunity for zero-cost rainfall sensing without additional hardware.
Compared with traditional rain sensors, wireless signal features offer several significant advantages for rainfall detection in SIL-IoTs systems:
  • Communication metrics such as RSRP, RSRQ, and RSSI are inherently available in commercial LTE modules, enabling zero-cost sensing without additional hardware deployment.
  • Wireless signal features reflect propagation impairments caused by rainfall and environmental dynamics, allowing for indirect but effective rainfall perception.
  • This approach preserves the original low-power and self-sufficient design of SIL-IoT nodes, which is essential for long-term sustainable operation.
  • Wireless-signal-based sensing avoids maintenance issues such as sensor aging, contamination, and mechanical failure that commonly affect conventional rain sensors.
These advantages make wireless signal features particularly suitable for large-scale, low-cost, and energy-efficient rainfall detection in SIL-IoTs systems.
The research scenario is illustrated in Figure 2, where the SIL-IoT system consists of edge nodes, sink nodes, and a cloud center. Under no-rain conditions, nodes communicate with the cellular base station, with signal-strength variations mainly being determined by distance and surrounding environmental factors, enabling nodes to be categorized into graded signal strength levels. When rainfall occurs, raindrop-induced attenuation affects wireless signals differently across these levels, resulting in distinguishable multivariate feature patterns that constitute the basis for effective data-driven rain detection.

1.2. Related Works

Rain-induced attenuation in wireless communication has long been recognized in high-frequency microwave and millimeter-wave links, particularly in radar, satellite, and terrestrial microwave systems above 10 GHz. These studies have established fundamental rain-attenuation models and validated the strong sensitivity of high-frequency links to precipitation [8]. However, such systems are unsuitable for large-scale agricultural IoT scenarios, due to their specialized hardware requirements, high deployment cost, and limited coverage.
With the rapid expansion of mobile communication networks, 4G LTE has emerged as a promising platform for low-cost, wide-area rainfall sensing. Operating primarily in the 700–960 MHz and 1.7–2.7 GHz bands, LTE links exhibit measurable but less severe rain-induced fluctuations compared with high-frequency microwave systems [9]. These fluctuations manifest in cellular performance metrics such as RSRP, RSRQ, and RSSI, providing an opportunity to perform rainfall detection without additional sensors.
To provide a concise overview of representative LTE-based rainfall detection studies, the key characteristics of the existing works are summarized in Table 1.
Based on the comparison summarized in Table 1, the existing LTE-based rainfall detection studies can be analyzed from three key dimensions: application scenario, signal parameter dimensionality, and signal-strength stratification.
From the perspective of the application scenario, most prior studies are conducted in urban or suburban environments, including commercial microwave link (CML) networks and smartphone-based cellular measurements. While these settings benefit from dense infrastructure and stable communication conditions, they differ fundamentally from large-scale agricultural IoT deployments, where node distribution is sparse, link quality is highly heterogeneous, and environmental coupling is strong. As a result, the applicability of the existing methods to farmland IoT systems remains limited.
Regarding signal parameter usage, the majority of studies rely on a single dominant indicator, such as RSSI or link attenuation, to infer rainfall. Although recent work has begun to incorporate multiple LTE indicators, systematic multivariate feature modeling remains insufficiently explored, particularly under heterogeneous signal conditions.
Finally, as shown in the signal-strength stratification column of Table 1, none of the representative studies explicitly considers signal-strength stratification during preprocessing or model design. Uniform treatment of the signal measurements implicitly assumes homogeneous link quality, which may obscure rainfall-induced patterns in heterogeneous IoT deployments.
In contrast to the existing studies that are mainly limited to urban environments, single-parameter modeling, and homogeneous signal assumptions, the present study focuses on large-scale agricultural IoT deployments and systematically integrates multivariate LTE signal features with signal-strength-aware preprocessing. By explicitly considering signal heterogeneity and long-term environmental variation, this work provides a more robust and practically applicable rainfall detection framework for SIL-IoTs systems.

1.3. Contributions

The main technical contributions and methodological innovations of this study are summarized as follows:
  • Scenario-aware agricultural IoT dataset construction: A large-scale LTE-based rainfall detection dataset is constructed from real-world farmland SIL-IoTs deployments, addressing the lack of agricultural IoT data in existing urban-centric studies.
  • Multivariate wireless signal feature learning under heterogeneous conditions: A multivariate wireless signal feature learning framework is developed by jointly modeling RSRP, RSRQ, and RSSI, enabling more robust rainfall discrimination under heterogeneous propagation conditions compared with single-parameter approaches.
  • Signal-strength stratification with adaptive signal-leveling: Signal-strength stratification is explicitly introduced, together with a dual-rate EWMA-based adaptive signal-leveling mechanism, to mitigate signal heterogeneity and long-term environmental drift.
  • Cross-regional generalization in agricultural environments: The proposed approach is evaluated on independent datasets from multiple regions, demonstrating robust generalization across diverse agricultural environments.
In summary, this work differs from existing LTE-based rainfall detection studies in terms of the application scenario, signal modeling strategy, and signal heterogeneity handling, thereby providing a more practical and generalizable solution for agricultural IoT rainfall sensing.
The remainder of this paper is organized as follows. Section 2 describes the experimental platform and the construction of the primary and external test datasets. Section 3 presents the data preprocessing procedures and statistical analyses of wireless signal parameters. Section 4 introduces the proposed rain-detection method, including the adaptive signal-level classification and machine learning models. Section 5 reports and discusses the experimental results and outlines future work. Finally, Section 6 concludes the paper.

2. Experimental Platform and Dataset Construction

To support the development and validation of the proposed rain-detection method, this study requires large-scale, continuous, and controllable wireless signal data collected under both rain and no-rain conditions. The following sections present the construction of the experimental platform and the datasets used in this work.

2.1. Construction of the Data Acquisition Node

In practical deployments, solar-powered insecticidal lamps are equipped with integrated communication, sensing, and power modules that enable long-term IoT operation. However, these deployed devices are fixed in location and operate under agricultural constraints, making them unsuitable for controlled, repeatable, and region-flexible data collection during the experimental stage.
Therefore, this study builds an independent data acquisition node that replicates the communication and sensing capabilities of the actual lamps while providing mobility and experimental flexibility. The node consists of a control module, a communication module, an antenna, a temperature sensor, a data storage unit, and the power supply. The design emphasizes low power consumption, low cost, and ease of field deployment.
Table 2 summarizes the hardware composition of the data acquisition node used to collect wireless signal parameters and auxiliary measurements. The physical structure of this standalone node, designed specifically for dataset construction while remaining consistent with SIL-IoTs communication modules, is shown in Figure 3.
The Arduino Uno R3 serves as the central controller and issues standardized AT commands to the EC800M 4G module to obtain the node’s position and cellular parameters (RSRP, RSRQ, RSSI) at a frequency of 1 Hz. The collected data are stored in CSV or TXT format for subsequent preprocessing, feature extraction, and model development.

2.2. Construction of the Primary Dataset

2.2.1. Site Selection Based on Signal-Strength Stratification

The primary dataset constructed in this study is used for both feature-variation analysis and machine-learning model training. Data collection was conducted in the Zhongqiao–Shuangliu planting base (Groups 7–9) of Jiangsu Jianglong Agricultural Development Co., Ltd., located in Bagua Island, Qixia District, Nanjing City, Jiangsu Province. Within this area, our research team has deployed 20 SIL-IoTs nodes. To ensure that the data collection environment remains consistent with the actual field conditions of these IoT devices, the data acquisition node was deployed only at the locations of existing SIL-IoTs nodes.
Because adjacent SIL-IoTs nodes are often placed close to one another, their wireless signal parameters may be highly similar due to spatial correlation. This could lead to data redundancy and insufficient feature diversity. To address this issue, this study adopts a graded node deployment strategy based on signal-strength stratification. First, wireless signal parameters were collected throughout the study area. A signal-stratification map was then generated by categorizing RSRP values according to China Mobile’s signal-strength standard. The signal strength levels were classified according to the RSRP grading criteria commonly used by China Mobile, in which “excellent” corresponds to RSRP > −85 dBm, “good” to −85 to −95 dBm, “moderate” to −95 to −105 dBm, “poor” to −105 to −115 dBm, and “very poor” to RSRP < −115 dBm. Next, within each signal strength level, representative IoT node locations were selected by considering spatial distribution, environmental representativeness, and signal stability. This strategy preserves essential spatial characteristics while avoiding redundant sampling.
Signal-stratification maps were generated using a 4G signal-map production system developed by our team. The system integrates wireless signal parameters, timestamps, and GPS coordinates, assigns each measurement to its corresponding signal-strength category, and visualizes the spatial distribution using color-coded regions. Consistent with the stratification used in the graded deployment strategy, the classification of signal strength follows China Mobile’s RSRP grading standard, which defines five levels ranging from “excellent” to “very poor.” The detailed threshold ranges for each level are summarized in Table 3.
For data acquisition, researchers carried the mobile data-collection node and walked along field roads at a constant speed. RSRP and GPS data were collected at 1 Hz during clear-weather conditions at 19:00. Conducting data collection under clear weather eliminates weather-induced variations in signal strength and provides a stable baseline for signal-strength stratification. The chosen time also aligns with the operating period of SIL-IoTs, thereby improving temporal consistency.
Two independent rounds of wireless signal collection were performed. Their respective signal-strength stratification maps are shown in Figure 4, and the averaged map—computed by taking the mean RSRP at each location—is shown in Figure 5. As demonstrated in Figure 4, the signal strength level at a given location may differ across experiments due to variations in antenna height, temporary obstructions, or changes in multipath propagation.
To finalize deployment locations, the three stratification maps (two independent and one averaged) were cross-validated. IoT nodes that consistently belonged to the same signal strength level across all three maps were identified first. From this subset, nodes located near the center of the area and in regions with minimal human disturbance were selected as the final data-collection nodes.
As shown in Figure 6a, the yellow markers indicate all solar insecticidal lamp IoT deployments. Figure 6b presents the final graded node deployment, overlaid on the averaged stratification map. One node was selected from each signal strength level, producing five sampling nodes labeled one to five, ordered from the strongest to the weakest wireless signal. This graded deployment method ensures sufficient diversity of wireless signal characteristics while reducing equipment cost and avoiding redundant data sampling.

2.2.2. Composition and Construction of the Primary Dataset

The primary dataset used in this study is constructed by integrating two sources of information:
  • Wireless signal parameters collected from the five graded sampling nodes.
  • Ground-truth rainfall measurements obtained from an external meteorological service.
These two data streams were synchronized based on their timestamps to generate a unified dataset that was suitable for feature analysis and model development. It should be emphasized that the meteorological rainfall data are only used in the offline stage to label historical wireless signal samples for model training and validation. In the practical deployment stage, the trained model performs rainfall inference solely based on real-time wireless signal parameters, without requiring any meteorological data input. This offline–online separation ensures that the proposed method can operate as a fully hardware-free and meteorological-data-independent rainfall-sensing solution in real SIL-IoTs applications.
Ground-truth rainfall intensity was retrieved using the QWeather meteorological API service, a widely used, low-cost platform offering minute-level environmental data. The minute-level precipitation API provides rainfall estimates across China at 1 km spatial resolution and 5 min intervals, with up to 1000 free calls per day [18].
To temporally align wireless signal measurements with 5 min precipitation records, a nearest-timestamp matching strategy was adopted. Precipitation data were reported at fixed 5 min intervals (e.g., 14:00:00, 14:05:00, and 14:10:00), whereas wireless signal parameters were collected at 1 s resolution. For each wireless signal sample acquired at time t , the precipitation record with the minimum absolute time difference was assigned. For example, samples recorded between 14:02:31 and 14:07:30 were matched with the precipitation value at 14:05:00, while those recorded between 14:07:31 and 14:12:30 were matched with the record at 14:10:00. Consequently, all wireless signal samples falling within the same nearest-timestamp precipitation interval (i.e., the time span bounded by the midpoints between two adjacent precipitation records) were labeled with an identical rainfall intensity and corresponding rain/no-rain condition.
The data-collection campaign lasted from May 2024 to March 2025, yielding 139 days of data, including 21 rainy days and 118 rain-free days. For each sampling node, the wireless signal parameters (RSRP, RSRQ, RSSI) were collected at 1 Hz and matched with the corresponding rainfall intensity, according to the acquisition timestamp. The resulting primary dataset contains five feature fields: (1) fetch_time; (2) RSRP; (3) RSRQ; (4) RSSI; and (5) precip (rainfall intensity).
In total, approximately 14 million wireless signal samples were collected from the five nodes, among which 193,144 samples correspond to rainy conditions (precip > 0). Rainfall intensity was further categorized into five levels according to the short-duration rainfall classification standard of the China Meteorological Service Association, and the corresponding distribution is presented in Table 4.
It should be noted that potential label uncertainty may occur near rainfall onset or cessation within a 5 min reporting window. In such cases, a small portion of wireless signal samples close to the transition boundaries may be associated with slightly mismatched rainfall labels. However, since rainfall-induced signal attenuation usually exhibits gradual variation rather than abrupt changes, and given the large-scale nature of the dataset, the overall impact of such boundary uncertainty on model training and evaluation is considered to be limited.

2.3. Construction of the External Test Dataset

To comprehensively evaluate the generalization capability of the trained rainfall detection model, an external test dataset was constructed using data collected from two regions with climatic and environmental characteristics that are markedly different from those of the agricultural fields in Nanjing.
The Nanjing data acquisition region is located in the alluvial plains along the Yangtze River in East China, where rainfall exhibits relatively uniform temporal and spatial distributions. In contrast, the Changsha acquisition region is situated in the hilly terrain of Central China, characterized by highly localized, short-duration heavy rainfall events; the Dongguan acquisition region lies in the coastal alluvial plains of South China, where annual precipitation is abundant and rainfall events tend to be long-lasting. These differences provide diverse validation scenarios and enable a comprehensive assessment of the model’s adaptability under varying climatic conditions.
The acquisition of rainfall data in the external test dataset follows the same procedure as used for the original dataset. For signal parameter collection, the data acquisition nodes were deployed directly at the locations where solar insecticidal lamps are installed, without performing prior signal-strength stratification. This setting reflects the anticipated real-world application scenario, in which the model determines the signal strength level of each node during inference, rather than during deployment.
The Changsha acquisition region is located in Qingshanpu Town, Changsha County, Hunan Province. Data were collected from 22 to 23 February and 1 to 4 March 2025, totaling six days, including three rainy days and three non-rainy days. The Dongguan acquisition region is located on Chashan South Road, Chashan Town, Dongguan City, Guangdong Province. Data were collected from 31 January to 3 February and 12 to 14 February 2025, totaling seven days, including four rainy days and three non-rainy days.
By aligning the collected signal parameters with precipitation data according to acquisition time, the external test dataset was constructed. The Changsha dataset contains approximately 200,000 samples, among which 12,990 samples have precipitation greater than zero. The Dongguan dataset contains approximately 380,000 samples, including 28,390 samples with precipitation greater than zero.

2.4. Summary of Dataset Construction

To clearly distinguish the roles and acquisition strategies of the datasets used in this study, the primary dataset and the external test datasets were constructed under different deployment settings. The primary dataset was collected using signal-strength-stratified data acquisition to enhance feature separability and support effective model training, whereas the external test datasets were collected from operational agricultural SIL-IoTs deployments without any pre-deployment stratification, reflecting realistic field conditions. Table 5 summarizes the composition, scale, and deployment characteristics of the datasets collected from different regions.

3. Data Preprocessing and Analysis

3.1. Data Preprocessing Based on the Distribution Characteristics of Wireless Signal Parameters

Both the primary dataset and the external test dataset contain missing values and anomalous samples due to environmental interference, temporary obstructions, and the inherent instability of wireless signal sampling. To improve data quality, suppress noise, and ensure suitability for model training, a systematic preprocessing procedure was applied to all datasets.
Wireless signal parameters exhibit discrete yet temporally continuous fluctuations, remaining concentrated around a typical signal level that represents the stable communication state of each node. This typical level corresponds to the mode of the parameter distribution, which has been shown to represent stable wireless signal strength better than the mean or median [19]. Based on this distributional characteristic, preprocessing consisted of the following steps:
  • Missing value completion
For samples with missing wireless signal parameters, adjacent timestamps were first used for imputation when available. If no adjacent valid value existed, the parameter-specific mode at that node was used as the imputed value. This approach leverages both temporal continuity and the inherent central tendency of the signal distribution.
2.
Abnormal value removal
Abnormal values were removed in two stages:
  • Standards-based filtering: Values outside the theoretical ranges defined by the 3rd Generation Partnership Project (3GPP)—the international organization responsible for 3G, 4G, 5G, and future 6G standards—were eliminated [20,21,22].
  • Data-driven filtering: Based on empirical signal characteristics, extreme values or outliers that violated the short-term fluctuation patterns of RSRP, RSRQ, or RSSI were further removed. This ensures consistency with realistic wireless signal behavior at SIL-IoTs nodes.
After preprocessing steps including missing value imputation and abnormal value removal, the Primary Dataset retained 11,443,728 valid records, corresponding to approximately 81.7% of the original dataset (∼14.0 million records).
For the external test datasets, the Changsha subset retained 159,294 valid records, accounting for approximately 79.6% of the raw data (∼200,000 records), while the Dongguan subset retained 246,702 valid records, corresponding to approximately 64.9% of the original samples (∼380,000 records).
The observed data reduction ratios (18.3% for the primary dataset, 20.4% for Changsha, and 35.1% for Dongguan) are mainly attributable to intermittent packet loss, signal instability, and asynchronous sampling that is commonly encountered in large-scale agricultural IoT deployments, especially under complex environmental and meteorological conditions.
Such levels of data filtering are considered reasonable and consistent with prior studies on wireless sensor networks and communication-based environmental sensing, where data loss or abnormal readings ranging from 15% to over 30% are frequently reported and effectively mitigated through preprocessing without compromising the model’s reliability or generalization performance [10,23].

3.2. Data Analysis

3.2.1. Comparative Analysis of Signal Parameters for the Same Node Under Different Rainfall Conditions

To analyze the impact of rainfall on signal-parameter strength, time-series curves under no-rain and rain conditions were plotted, as shown in Figure 6. Data acquisition Nodes 1–5 were deployed in regions corresponding to the signal-strength categories “excellent,” “good,” “moderate,” “poor,” and “very poor,” respectively. For simplicity, “Nodes 1–5” in the following analysis simultaneously refer to both the physical nodes and their associated signal strength levels.
To minimize environmental variations, data collected on 4 December 2024 and 8 December 2024 were selected for comparison. These two dates fall within the same week and within one week after the completion of the signal map. The same time periods were chosen to ensure environmental consistency, with an average sampling temperature of 10 °C.
The comparisons of signal-parameter strength under no-rain and rain conditions for all nodes are shown in Figure 7.
Under no-rain conditions, the three signal parameters—RSRQ, RSSI, and RSRP—remained relatively stable for all nodes. Node 1 exhibited the smallest fluctuations, followed by Node 5, while Nodes 2, 3, and 4 showed slight oscillations around their respective typical signal levels. This is because Nodes 1 and 5 are located in regions with extremely strong and extremely weak signal levels, respectively, and such extreme categories tend to be less sensitive to external disturbances, leading to greater stability.
Under rain conditions, the variation trends of all signal parameters at Node 1 were largely consistent with those under no-rain conditions. Its RSRQ and RSRP typical signal levels showed no noticeable change, while RSSI decreased by approximately 2 dBm compared with no-rain conditions. The RSRQ of Nodes 2, 3, and 4 also exhibited trends that were similar to those observed in no-rain conditions, with Node 2 showing a slight increase (about 1 dBm) in its typical signal level, while Nodes 3 and 4 remained largely unchanged.
However, the RSSI and RSRP of Nodes 2–4 experienced multiple short-term sharp declines during rainfall, followed by rapid recovery to typical levels, appearing as repeated rapid fluctuations on the curves. These fluctuations are primarily caused by enhanced small-scale fading during rainfall: moving raindrops induce instantaneous scattering, altering multipath propagation structures and causing abrupt short-term signal variations.
In addition, the typical RSSI and RSRP levels of Nodes 2–4 were 1–2 dBm lower than those under no-rain conditions overall. This represents the rain attenuation effect, characterized by sustained and relatively smooth signal weakening caused by absorption and scattering from raindrops, without abrupt jumps.
For Node 5, all three signal parameters were lower under rain conditions than during no-rain periods. As rainfall continued, a pronounced rain-attenuation event reoccurred between 15:00 and 15:30, indicating that this node is environmentally sensitive yet exhibits a delayed response to rainfall.
Overall, under no-rain conditions, signal parameters across all nodes remained stable, with extreme-level nodes (Nodes 1 and 5) showing the smallest fluctuations. Rain conditions introduced two types of changes: (1) rapid short-term fluctuations caused by small-scale fading, primarily affecting Nodes 2–4, and (2) steady decreases in typical signal levels due to rain attenuation, as observed in Nodes 2–5. Node 1 was the least affected, confirming that rainfall has a position- and strength-dependent influence on 4G signal performance.

3.2.2. Comparative Analysis of Signal Parameters Across Nodes Under Rain Conditions

Under rain conditions, the signal-parameter variations exhibit notable differences across nodes. These differences arise because each node is deployed within a distinct signal-level region; thus, the magnitude of signal fluctuations during rainfall varies with the baseline signal level. Moreover, the three communication parameters respond differently to rainfall. Among them, RSRQ exhibits the most complex and unstable variation patterns, while RSSI and RSRP show more pronounced and consistent attenuation trends, reflecting their higher sensitivity to rain-induced fading.
Figure 8 presents the mean signal-parameter strength of each node under no-rain and rain conditions. The results indicate that the sensitivity of signal parameters to rainfall decreases in the following order: RSSI > RSRP > RSRQ. The node-level sensitivity decreases in the following order: Node 2 > Node 4 > Node 3 > Node 5 > Node 1. Nodes with moderate baseline signal levels (e.g., Nodes 2, 3, and 4) show larger attenuation, as they are more susceptible to small-scale fading and multipath perturbation during rainfall.
Table 6 further illustrates the differences in signal-parameter variability between rain and no-rain conditions. For most nodes, the standard deviations of RSSI and RSRP increase markedly during rainfall, indicating enhanced short-term signal instability caused by rain attenuation and multipath scattering.
Node 2 exhibits the most pronounced fluctuation, with the RSSI and RSRP standard deviations rising from 1.72 dB and 0.75 dB under no-rain conditions to 7.02 dB and 10.81 dB under rainfall, respectively. Similar but slightly weaker trends are observed at Nodes 3 and 4. In contrast, RSRQ shows relatively moderate and less consistent variation across nodes, confirming its lower sensitivity to rain-induced short-term fluctuations.
Rainfall significantly amplifies the temporal variability of wireless signal parameters, particularly for RSSI and RSRP, which helps explain their superior discriminative capability for rainfall detection and complements the mean-value analysis in Figure 8.
Beyond statistical dispersion, the point–biserial correlation coefficient (PBCC) was employed to quantify the association between signal-parameter variations and the binary weather condition (rain = 1, no-rain = 0). PBCC is a special case of Pearson’s correlation that is designed for relationships between a continuous variable (signal-parameter strength) and a dichotomous variable (rain/no-rain), enabling simultaneous evaluation of correlation strength and direction.
Figure 9 shows the PBCC heatmap for all nodes and signal parameters. The results reveal that the correlation strength decreases in the following order: RSSI > RSRP > RSRQ. This is consistent with the attenuation patterns observed earlier. Additionally, the node-specific correlation decreases in the following order: Node 5 > Node 4 > Node 3 > Node 2 > Node 1. Unlike the mean-value comparison in Figure 8, PBCC reflects dynamic fluctuations rather than static attenuation levels, explaining why Node 5 shows the strongest correlation: despite having weaker baseline signal levels, its signal exhibits pronounced short-term volatility under rainfall, which is strongly associated with rain events.
Overall, these findings demonstrate that RSSI and RSRP are more reliable indicators of rain-induced signal attenuation, while RSRQ is less stable and exhibits weaker sensitivity. Moreover, nodes with weaker signal-level regions (Nodes 4 and 5) exhibit stronger statistical dependence on rainfall, highlighting the role of baseline signal level in shaping rain-induced fading characteristics.

4. Methods

4.1. Method Overview

This study proposes a rain-detection method based on multivariate wireless signal feature learning within the context of solar insecticidal lamp IoT systems. The method leverages multiple wireless signal parameters collected by each node to learn the relationships among signal characteristics, signal levels, and rainfall conditions. The core idea is as follows: under no-rain conditions and stable environmental states, the signal level of each node is determined first; during real-time monitoring, multivariate feature dynamics are continuously analyzed to identify abnormal fluctuations caused by rain attenuation; finally, considering that environmental changes around a deployed node may cause long-term drift in signal levels, the method incorporates an adaptive mechanism to update signal levels under extended no-rain periods, ensuring robustness and long-term accuracy.
In this method, multivariate features refer to the node’s signal level, together with multiple wireless signal parameters that can be acquired in real time and are tightly coupled to the propagation environment, such as RSRP, RSRQ, and RSSI. The signal level represents the node’s typical signal level under stable no-rain conditions, serving as a reference for identifying abnormal deviations. In contrast, RSRP, RSRQ, and RSSI typically exhibit stable distribution characteristics under normal communication. During rainfall, however, these parameters experience attenuation due to raindrop-induced scattering and absorption. By jointly modeling these multivariate features, the proposed method effectively captures rain-attenuation patterns and enables accurate rain detection.
From a system implementation perspective, rain-detection decisions are performed locally at each SIL-IoTs node. Wireless signal parameters are collected by the 4G communication module and processed by the on-board microcontroller, where the trained rain-detection model is deployed. The node directly determines the rain/no-rain state in real time without relying on cloud-side meteorological data. The cloud server is only responsible for historical data storage, system management, and offline model training, while all online inference and control decisions are executed at the edge node.
The overall procedure is summarized as follows, and the workflow of the proposed rain-detection method is illustrated in Figure 10:
  • Observation period and data collection: After SIL-IoTs node deployment, an observation period is initiated. Since the signal level will later be adaptively updated, the observation period only needs to ensure stable no-rain conditions and can be of any duration greater than zero. During this period, each node continuously collects wireless signal parameters through its 4G communication module.
  • Determination of the node’s signal level: Using the data collected during the observation period, the initial typical signal level and initial signal strength level of the node are determined under no-rain conditions. This provides a reliable baseline for evaluating subsequent fluctuations during real-time rain detection.
  • Real-time rain detection: During system operation, wireless signal parameters are continuously collected in real time. When no significant signal fluctuation is detected, the rain-detection model remains in a dormant state to reduce energy consumption. Once a notable fluctuation is detected, the model is activated to determine whether the fluctuation exhibits rain-attenuation characteristics. If rain is detected, the node outputs a “rain” state and sends a control command to stop the operation of both the lure light and the high-voltage grid. When the model later outputs a “no-rain” state, the system resumes normal operation.
  • Adaptive signal-level update: During long-term operation, the typical signal level of a node may drift due to slow changes in the physical environment. To maintain detection accuracy, the method continuously monitors wireless signal parameters, even during model dormancy. If the real-time signal characteristics deviate from the current signal level for a sustained period (typically around 2 h, determined by sampling frequency and environmental dynamics), the node’s typical signal level and signal level are adaptively updated. This ensures that the rain-detection method remains stable and reliable despite long-term environmental changes.

4.2. Adaptive Signal-Level Classification Based on Dual-Rate EWMA

Signal strength levels represent the interval in which a node’s typical signal level falls, and they provide the signal baseline required for rain detection. Maintaining the accuracy of these levels is therefore essential. However, in real deployment environments, the wireless signal strength of solar insecticidal lamp IoT nodes is affected by multiple factors, such as base-station layout, building obstruction, and vegetation dynamics. These factors lead to spatial variations in signal quality across deployment locations. Moreover, the surrounding environment is not static over time. For example, crop growth from sowing to maturity alters the degree of obstruction, and network optimization by mobile operators can change signal coverage. Such dynamic conditions cause the wireless signal quality of nodes to exhibit gradual long-term drift.
At the initial deployment stage, the signal strength level of each node can be coarsely assigned according to the RSRP grading standard that is commonly adopted by China Mobile. This initial stratification provides short-term guidance and establishes the baseline for rain-detection modeling. However, it cannot reflect long-term signal conditions and may reduce the accuracy of subsequent rain detection as the environment evolves.
To address this issue, this study employs a dual-rate exponentially weighted moving average (dual-rate EWMA) to achieve an adaptive signal-level classification for each node [24,25]. Dual-rate EWMA extends the traditional EWMA by introducing two smoothing coefficients—fast EWMA Z f t and slow EWMA Z s t —which capture different temporal characteristics. The fast EWMA responds sensitively to short-term fluctuations, whereas the slow EWMA reflects long-term trends.
For a time step t with input x t , the fast EWMA is computed using Equation (1), and the slow EWMA is computed using Equation (2).
Z f t = λ f x t ( 1 λ f ) Z f ( t 1 )
Z s t = λ s x t ( 1 λ s ) Z s ( t 1 )
The smoothing coefficients are selected to match the multi-scale temporal characteristics of LTE wireless signals observed in agricultural IoT deployments. Specifically, a relatively larger coefficient is assigned to the fast EWMA to ensure sensitivity to short-term signal fluctuations, while a smaller coefficient is used for the slow EWMA to preserve a stable representation of long-term signal behavior. In this study, the smoothing coefficient of the fast EWMA Z f t , λ f , is set within the range of 0.2–0.3, and that of the slow EWMA Z s t , λ s , is within 0.02–0.05, satisfying   λ f > λ s [26]. This configuration enables effective separation between short-term variations and long-term drift, which is essential for reliable adaptive signal-level classification and is consistent with established EWMA-based change detection principles [27].
Their difference is computed as follows:
D t = Z f t Z s t
Under stable conditions, the difference D t remains small. When signal conditions change, the fast EWMA adjusts more quickly than the slow EWMA, resulting in an increased D t [28].
A threshold, δ , is introduced to determine whether the discrepancy between the fast and slow EWMAs reflects a meaningful long-term change rather than short-term fluctuation. When the condition D t > δ is satisfied, a potential signal-level drift is indicated.
To further suppress false alarms caused by transient noise, an adaptive signal-level update is triggered only when this condition persists over a predefined duration, t . Based on this principle, the adaptive signal-level classification method using dual-rate EWMA consists of four sequential steps, as illustrated in Figure 11:
  • Initialization: After node deployment, an observation period is conducted. The mode of RSRP during this period is taken as the initial typical signal level, M 0 . Based on M 0 and the classification criteria in Table 3, the initial signal strength level, L 0 , is assigned. The initial values of the EWMA components are set as Z f 0 = M 0 and Z s 0 = M 0 .
  • Operation: At time t , each newly received RSRP measurement x t is used to update the fast EWMA Z f t , slow EWMA Z s t , and difference D ( t )
  • Change detection: To avoid reacting to short-term noise, a persistence constraint is introduced. When the rain-detection model indicates “no rain” and the condition D t > δ is sustained for a duration T > t , the signal level is considered to have undergone long-term drift. Parameters were empirically selected to balance responsiveness and stability. Specifically, the time resolution is set to t = 1   m i n , and the persistence duration is set to T = 5   m i n . The threshold δ is defined based on the difference sequence, D ( t ) , observed during the initial observation period after node deployment. During this period, when the signal conditions are assumed to be stable and free from long-term drift, δ is set to the mean plus three standard deviations of D ( t ) . This node-specific threshold ensures that only statistically significant deviations from the initial signal baseline trigger signal-level updating.
  • Adaptive updating: The mode of Z f t over a recent time window (having the same length as the initial observation period) is taken as the updated typical signal level, M t . According to M t and the classification criteria in Table 3, the signal strength level is updated to L t .

4.3. Rain Detection Model Trained via Multivariate Wireless Signal Feature Learning

4.3.1. Model Input

The multivariate features used for training the rain-detection model consist of the node’s signal level and several wireless signal parameters that can be acquired in real time and are closely related to the propagation environment. The signal level represents the node’s typical signal level under stable no-rain conditions, enabling the model to rapidly determine whether an observed fluctuation deviates from the expected baseline. Among the wireless signal parameters, the analyses in Section 3.2.2 show that RSRP and RSSI are more sensitive to rainfall-induced variations compared with RSRQ, and therefore, they serve as the primary indicators of rainfall attenuation for model input.
In real monitoring scenarios, the duration of no-rain conditions is usually much longer than that of rain conditions. If the machine-learning model continuously runs during stable periods, it would not only increase unnecessary energy consumption at the solar insecticidal lamp IoT node but also reduce the system’s efficiency by repeatedly processing non-informative data. Thus, as described in Section 4.1, model operation is triggered only when significant signal fluctuations are detected. Specifically, the slow EWMA Z s t , fast EWMA Z f t , and significance indicator D ( t ) are used to characterize short-term trends, long-term stability, and fluctuation significance, respectively. The model is activated only when D t > δ , ensuring that detection occurs only when meaningful anomalies arise.
Rain-induced changes in wireless signal parameters do not occur instantaneously; rather, they develop gradually over several tens of seconds as the raindrop density increases. Therefore, the detection model operates on features extracted from a temporal window. A 1 min time window is adopted, which is consistent with meteorological practices in which minute-level precipitation intensity is widely used for observation and instrument evaluation. For example, the World Meteorological Organization (WMO) includes 1 min variation rates in the assessment of rain-gauge response capabilities [29]. Thus, a 1 min window provides a suitable balance between sensitivity to signal trends and real-time detection requirements.
Based on this mechanism, once the trigger condition D t > δ is satisfied, the multivariate features within the preceding 1 min time window are fed into the model for rain-condition classification. This design reduces energy consumption, suppresses short-term disturbances caused by momentary obstruction or device jitter, and enhances robustness against non-rainfall fluctuations. The model input features are summarized in Table 7.

4.3.2. Model Selection and Training

In the solar insecticidal lamp IoT system, the rain-detection model must not only distinguish between no-rain and rain states with high accuracy, but also meet several constraints:
  • Energy efficiency: Each solar insecticidal lamp node is powered by a solar battery; therefore, the model must maintain low computational complexity and power consumption.
  • Generalization capability: Communication environments and meteorological conditions vary across deployment regions. The model must adapt to heterogeneous node characteristics and signal-strength distributions.
  • Scalability: With a large number of nodes and high-frequency wireless signal sampling, the model must support efficient training and inference on large-scale data.
Considering these requirements—accuracy, low energy cost, strong generalization, and scalability—this study compares four widely used machine-learning models: Logistic Regression (LR), Random Forest (RF), XGBoost, and LightGBM.
From the perspective of computational complexity and energy consumption, the four models exhibit distinct characteristics.
Logistic Regression has the simplest model structure and lowest computational complexity, requiring minimal memory and achieving the fastest inference speed, and therefore offers the lowest energy consumption.
Random Forest consists of multiple independently trained decision trees, resulting in the largest memory footprint and the slowest inference speed among the four models; however, its tree-based structure involves less iterative computation than gradient-boosting models, leading to lower energy consumption than XGBoost and LightGBM.
XGBoost is an iterative gradient-boosting model that requires multiple boosting rounds during training and relatively complex tree construction, which increases computational cost, memory usage, and inference latency; consequently, it exhibits the highest energy consumption among the four models.
In contrast, LightGBM adopts histogram-based optimization and a leaf-wise growth strategy, significantly accelerating training and inference. Its memory requirement and response time are second only to Logistic Regression, while its energy consumption remains substantially lower than that of XGBoost.
Therefore, the comparison of these four models enables a comprehensive evaluation of the trade-off between detection accuracy, computational efficiency, energy consumption, and response time, which is essential for practical deployment in resource-constrained SIL-IoTs systems.
After applying the fluctuation-significance criterion D t > δ to the primary dataset, a total of 61,321 one-minute windows were obtained, including 42,622 rain windows and 18,699 no-rain windows. To avoid data leakage, all windows were sorted chronologically and divided into training: validation: test = 4:3:3.
The training set is used for model learning, the validation set for hyperparameter tuning and overfitting detection, and the test set for final performance evaluation.
After training with the primary dataset, an external test dataset from a different deployment region is further used to evaluate cross-regional performance, ensuring the generalization capability of the proposed rain-detection model.

5. Results and Discussion

5.1. Results

5.1.1. Detection Performance on the Test Set of the Primary Dataset

To evaluate the classification capability and generalization performance of the proposed rain-detection models, four machine-learning classifiers were tested on the test set of the primary dataset. Multiple evaluation metrics were employed, including accuracy, precision, recall, and F1-score for the rain class, as well as the area under the receiver operating characteristic curve (ROC-AUC).
Figure 12 presents the comparison of the four models across multiple performance metrics. The main findings are summarized as follows:
  • ROC-AUC Performance
ROC-AUC was used to evaluate the intrinsic discrimination ability of each model. All four classifiers achieved ROC-AUC values exceeding 0.99, indicating an excellent capability for separating rain and no-rain samples across a wide range of decision thresholds. This result confirms that rainfall-induced variations in wireless signal parameters are highly distinguishable in the adopted feature space.
2.
Accuracy
XGBoost achieved the highest accuracy (0.9880), followed by LightGBM and Random Forest (both > 0.98). Logistic Regression recorded the lowest accuracy (0.9485) but still maintained a relatively high level that was sufficient for basic rain-detection tasks.
3.
Precision, Recall, and F1-score (Class 1: Rain)
Random Forest, XGBoost, and LightGBM all achieved precision, recall, and F1-scores that were higher than 0.98, demonstrating that these models not only provide highly reliable rain-condition predictions but also successfully detect over 98% of all rain events.
Logistic Regression achieved lower precision (0.8935) but maintained high recall (0.9819), resulting in an F1-score of 0.9356. This indicates that the model tends to classify more instances as rain, yielding more false positives but capturing almost all actual rain events.
To further analyze the error characteristics of the proposed models, confusion matrices are presented in Figure 13. The confusion matrices provide an intuitive comparison between predicted labels and ground-truth classes, highlighting the distributions of true positives, false positives, true negatives, and false negatives.
As shown in Figure 13, ensemble-based models (Random Forest, XGBoost, and LightGBM) exhibit substantially fewer misclassifications than Logistic Regression. In particular, the number of false negatives is consistently low, indicating that most rainfall events are correctly identified. Logistic Regression, although achieving high recall, produces a noticeably larger number of false positives, which explains its lower precision and F1-score. This behavior suggests a tendency to over-predict rain events, potentially leading to unnecessary system responses in practical SIL-IoTs applications.
For iterative learning models, training dynamics were further examined using the ROC-AUC curves of the training and validation sets, as shown in Figure 14. The training-set AUC reflects the model’s fitting capability, whereas the validation-set AUC indicates its generalization performance on unseen data.
As illustrated in Figure 14, both XGBoost and LightGBM maintain consistently high AUC values on the validation set, closely tracking the training-set curves throughout the training process. The absence of a significant performance gap between the two curves indicates that neither model suffers from evident overfitting. This demonstrates that the proposed multivariate feature-learning framework enables stable training and robust generalization across different iterations.
Overall, the evaluation results consistently demonstrate the effectiveness and robustness of the proposed rain-detection framework. From the perspective of classification performance, all four models achieve high ROC-AUC values, indicating a strong discriminative capability between rain and no-rain conditions. This confirms that rainfall-induced variations in multivariate wireless signal features are highly separable and can be reliably exploited for rain detection.
Among the tested models, ensemble-based methods—Random Forest, XGBoost, and LightGBM—consistently outperform Logistic Regression across accuracy, precision, recall, and F1-score. In particular, XGBoost achieves the highest overall accuracy, while LightGBM provides a competitive balance between detection performance and computational efficiency, making it well suited for large-scale SIL-IoTs deployments.
The confusion matrix analysis further reveals that ensemble models substantially reduce both false negatives and false positives compared with Logistic Regression, resulting in more reliable rain event detection and fewer spurious alarms. This characteristic is especially important in agricultural IoT scenarios, where missed rainfall events or excessive false triggers can negatively affect the system’s stability and energy management.
Finally, the training and validation ROC-AUC curves indicate stable convergence behavior for XGBoost and LightGBM, with no evident performance degradation on the validation set. This demonstrates that the proposed multivariate feature-learning approach achieves strong generalization without overfitting, supporting its applicability under varying deployment conditions.

5.1.2. Detection Performance on the External Test Dataset

Based on the results in Section 5.1.1, XGBoost and LightGBM, which better satisfy the requirements of solar insecticidal lamp IoT applications, were selected for cross-regional evaluation. By comparing their performance on the external test dataset, we assess the feasibility of deploying the trained rain-detection models in broader geographic environments.
Table 8 summarizes the performance of the two models on the test subset of the primary dataset (Nanjing), as well as on the Changsha and Dongguan datasets, which together constitute the external test dataset used for cross-regional validation. The performance differences relative to Nanjing are illustrated in Figure 15.
Across all three regions, both models achieved evaluation metrics above 0.9750, demonstrating a strong capability for capturing the rainfall-induced variations in wireless signal parameters and reliably distinguishing between rain and no-rain conditions.
As shown in Figure 15, both models experienced a slight performance drop on the Changsha data, with XGBoost decreasing by –0.65% to –1.27% and LightGBM by –0.56% to –1.17% across different metrics.
In contrast, performance on the Dongguan data was comparable to or slightly better than that of Nanjing: XGBoost showed improvements of 0.11% to 0.80% across all metrics, while LightGBM exhibited a minimal decrease in ROC-AUC (–0.03%) but improvements of 0.08% to 0.67% in other metrics.

5.1.3. Summary

Overall, the experimental results demonstrate that the proposed rain-detection approach achieves highly reliable performance on both the primary dataset and the external test dataset. On the test subset of the primary dataset, all four machine-learning models exhibited strong discriminative capability, with ROC-AUC values exceeding 0.99 and consistently high accuracy, precision, recall, and F1-scores. Among them, LightGBM and XGBoost showed the best balance between detection accuracy and practical deployment suitability, highlighting their potential for real-time rain detection in solar insecticidal lamp IoT systems.
Cross-regional evaluation further verified the generalization ability of the trained models. On the external test dataset—comprising independent datasets from Changsha and Dongguan—both LightGBM and XGBoost maintained stable performance, with all evaluation metrics remaining above 0.9750. Although a slight performance decline was observed on the Changsha dataset, the detection capability remained robust; meanwhile, performance on the Dongguan dataset was comparable to or even slightly better than that on the primary dataset. These results confirm that the proposed models effectively capture rainfall-induced variations in wireless signal parameters across different climatic and communication environments.
In summary, the rain-detection models—particularly XGBoost and LightGBM—exhibit strong accuracy, robustness, and cross-regional adaptability, demonstrating their suitability for large-scale deployment within SIL-IoTs systems to support reliable, real-time rain detecting.

5.2. Discussion

The experimental results demonstrate that the proposed rain-detection framework achieves strong classification performance and stable cross-regional generalization. Beyond numerical metrics, the findings provide several important insights into multivariate signal modeling, adaptive signal management, and large-scale deployment in agricultural SIL-IoTs environments.

5.2.1. Discussion on the Proposed Method

  • Effectiveness of Multivariate Wireless Signal Features
Most existing LTE-based rainfall detection studies rely on a single dominant indicator, such as RSSI or link attenuation, which limits robustness under fluctuating network and environmental conditions. In contrast, the proposed method jointly exploits RSRP, RSRQ, and RSSI, enabling the model to capture complementary aspects of signal power, quality, and interference. The consistently high ROC-AUC values observed across different regions indicate that multivariate feature learning significantly enhances the separability between rain and no-rain conditions. This result confirms that rainfall-induced signal variations are not confined to a single metric but manifest across multiple dimensions of the wireless communication link.
2.
Role of Signal-Strength Stratification and Adaptive Updating
Signal-strength stratification provides an effective baseline for mitigating spatial heterogeneity among nodes deployed in large-scale agricultural fields. However, static stratification alone cannot cope with long-term environmental evolution, such as crop growth or network reconfiguration. The dual-rate EWMA-based adaptive signal-leveling mechanism introduced in this study enables gradual adjustment of signal strength levels without reacting to short-term noise. The stable performance observed on external test datasets, particularly under non-stratified deployment conditions, demonstrates that adaptive signal-level updating plays a critical role in maintaining model reliability over time.
3.
Cross-Regional Generalization in Agricultural Environments
Although both XGBoost and LightGBM achieved strong performance on the external test dataset, a moderate performance degradation was observed in the Changsha region. This phenomenon is likely related to regional differences in rainfall patterns, terrain, and propagation conditions, such as short-duration convective rainfall in hilly areas. In contrast, the Dongguan dataset exhibits signal-propagation characteristics that are more consistent with those of the primary dataset, resulting in a comparable or slightly improved performance. These findings highlight the necessity of incorporating regionally diverse data during model training to further enhance robustness across heterogeneous agricultural environments.

5.2.2. Limitations and Future Improvements

Despite the overall robustness of the proposed framework, several limitations should be acknowledged.
First, the current model focuses only on binary rain/no-rain classification, which provides limited information for practical agricultural decision-making. Rainfall intensity, duration, and temporal evolution are not explicitly modeled. Consequently, the method cannot yet distinguish between light rain, moderate rain, and heavy precipitation, nor can it quantify rainfall accumulation. Extending the framework from binary detection to multi-level or continuous rainfall estimation represents an important direction for future improvement.
Second, the current training dataset, although multi-regional, remains geographically and climatically limited. A more balanced dataset covering diverse climate zones, terrains, and network configurations would further enhance model robustness and adaptability in large-scale SIL-IoTs deployments. The observed performance variation across regions indicates that climatic diversity plays a critical role in signal–rainfall relationships.
Third, the model’s performance under short-duration rainfall events and long-lasting precipitation periods has not been analyzed separately. Short-term rainfall may induce only weak and transient signal perturbations, whereas prolonged rainfall can cause cumulative attenuation and baseline drift. Although the adaptive signal-level updating mechanism partially alleviates long-term drift, further investigation is required to optimize sensitivity across different rainfall durations.
Fourth, extreme weather conditions, such as heavy storms, strong winds, and severe atmospheric turbulence, may introduce additional wireless signal fluctuations that are not purely rainfall-induced. These complex meteorological effects may partially overlap with rainfall signatures, potentially increasing misclassification risks. The current framework does not explicitly differentiate rainfall attenuation from other extreme-weather-induced disturbances.
Future work will therefore focus on the following:
  • Extending the method toward rainfall intensity and accumulation estimation;
  • Constructing more geographically and climatically diverse training datasets;
  • Developing temporal multi-scale modeling to handle short-term and long-term rainfall patterns;
  • Enhancing robustness under extreme meteorological conditions through feature enrichment and model refinement.
These efforts will further improve the reliability, interpretability, and practical applicability of wireless signal-based rainfall sensing in large-scale agricultural IoT systems.

6. Conclusions

This study proposes a multivariate wireless signal-based rainfall detection framework for SIL-IoTs systems, exploiting RSRP, RSRQ, and RSSI with adaptive signal-level stratification to achieve low-cost, sensor-free rainfall sensing. Experimental results on the primary dataset show consistently high accuracy, precision, recall, and F1-score, with ROC-AUC values exceeding 0.99, confirming the strong discriminative capability of the proposed approach. On the cross-regional external test dataset, evaluation using accuracy, precision, recall, F1-score, and ROC-AUC indicates that all metrics remain above 0.975, confirming the strong generalization performance of the proposed framework.
Among the evaluated models, XGBoost and LightGBM exhibit superior performance, while LightGBM offers a better trade-off between accuracy and computational efficiency for large-scale deployment. The dual-rate EWMA-based adaptive updating mechanism further ensures long-term robustness under environmental drift.
Without requiring additional hardware sensors, the proposed framework provides a practical, scalable, and energy-efficient solution for rainfall detection in agricultural IoT systems and offers a promising foundation for future extensions toward rainfall intensity estimation and extreme weather analysis.

Author Contributions

Conceptualization, L.L. and L.S.; methodology, L.L.; software, Y.X.; validation, L.L.; formal analysis, L.L.; investigation, L.L.; resources, K.L. and J.F.; data curation, L.L.; writing—original draft preparation, L.L.; writing—review and editing, L.S., R.H. and Q.S.; visualization, L.L.; supervision, L.S.; project administration, L.L. and L.S.; funding acquisition, L.S. All authors have read and agreed to the published version of the manuscript.

Funding

This research received no external funding.

Data Availability Statement

The original contributions presented in this study are included in the article. Further inquiries can be directed to the corresponding author.

Conflicts of Interest

The authors declare no conflict of interest.

Abbreviations

The following abbreviations are used in this manuscript:
SIL-IoTsSolar Insecticidal Lamp Internet of Things
SILSolar Insecticidal Lamp
LTELong Term Evolution
RSRPReference Signal Received Power
RSRQReference Signal Received Quality
RSSIReceived Signal Strength Indicator
EWMAExponentially Weighted Moving Average
Dual-rate EWMADual-Rate Exponentially Weighted Moving Average
CMLCommercial Microwave Link
ROC-AUCReceiver Operating Characteristic—Area Under the Curve
PBCCPoint–Biserial Correlation Coefficient
WMOWorld Meteorological Organization

References

  1. Liu, J.; Bian, Y.; Zhang, Y.; Meng, Z.; Huang, C.; Zeng, J. Analysis of the occurrence trends and causes of major pests and diseases of major crops in China in 2025. China Plant Prot. Guide 2025, 45, 26–29. [Google Scholar]
  2. Li, K.; Shu, L.; Huang, K.; Sun, Y.; Yang, F.; Zhang, Y.; Huo, Z.; Wang, Y.; Wang, X.; Zhang, Y.; et al. Research status and prospects of Internet of Things–based solar insecticidal lamps. Smart Agric. 2019, 1, 13–28. [Google Scholar]
  3. Lam, H.B.; Phan, T.T.; Vuong, L.H.; Huynh, H.X.; Pottier, B. Designing a brown planthopper surveillance network based on a wireless sensor network approach. arXiv 2013, arXiv:1312.3692. [Google Scholar] [CrossRef]
  4. Wang, S.; Hu, X.; Wang, X. Analysis and prospects of application technologies for insecticidal lamps in the control of agricultural and forestry pests. Shandong For. Sci. Technol. 2016, 46, 85–88. [Google Scholar]
  5. Wang, N.; Zhang, N.; Wang, M. Wireless sensors in agriculture and food industry—Recent development and future perspective. In Proceedings of the International Commission of Agricultural Engineering (CIGR) International Conference, Beijing, China, 11–14 October 2004. [Google Scholar]
  6. Li, Z. Design of an intelligent LED insecticidal lamp control system. Electromech. Eng. Technol. 2015, 44, 96–99. [Google Scholar]
  7. Citroni, R.; Mangini, F.; Frezza, F. Efficient Integration of Ultra-low Power Techniques and Energy Harvesting in Self-Sufficient Devices: A Comprehensive Overview of Current Progress and Future Directions. Sensors 2024, 24, 4471. [Google Scholar] [CrossRef]
  8. Livieratos, S.N.; Cottis, P.G. Rain attenuation along terrestrial millimeter wave links: A new prediction method based on supervised machine learning. IEEE Access 2019, 7, 138745–138756. [Google Scholar] [CrossRef]
  9. Lian, B.; Wei, Z.; Sun, X.; Li, Z.; Zhao, J. A Review on Rainfall Measurement Based on Commercial Microwave Links in Wireless Cellular Networks. Sensors 2022, 22, 4395. [Google Scholar] [CrossRef] [PubMed]
  10. Overeem, A.; Leijnse, H.; Uijlenhoet, R. Measuring urban rainfall using microwave links from commercial cellular communication networks. Water Resour. Res. 2011, 47, W12505. [Google Scholar] [CrossRef]
  11. Christofilakis, V.; Tatsis, G.; Votis, C.T.; Chronopoulos, S.K.; Kostarakis, P.; Lolis, C.J.; Bartzokas, A. Rainfall Measurements Due to Radio Frequency Signal Attenuation at 2 GHz. J. Signal Inf. Process. 2018, 9, 192–201. [Google Scholar] [CrossRef]
  12. Beritelli, F.; Capizzi, G.; Lo, S.G.; Napoli, C.; Scaglione, F. Rainfall estimation based on the intensity of the received signal in an LTE/4G mobile terminal using a probabilistic neural network. IEEE Access 2018, 6, 30865–30873. [Google Scholar] [CrossRef]
  13. Zhang, Q.; Yan, J.; Chu, Z.; Zhao, F. A preliminary study on measuring precipitation distribution using mobile communication base station signals. Sci. Technol. Bull. 2019, 35, 30–36. [Google Scholar] [CrossRef]
  14. Graf, M.; Chwala, C.; Polz, J.; Kunstmann, H. Rainfall estimation from a German-wide commercial microwave link network: Optimized processing and validation for 1 year of data. Hydrol. Earth Syst. Sci. 2020, 24, 2931–2950. [Google Scholar] [CrossRef]
  15. Min, J.; Wu, Z.; Zheng, L.; Cheng, Q. Deep-learning-based identification and analysis of precipitation environments for radio propagation links. J. Radio Sci. 2023, 38, 453–462, 484. [Google Scholar]
  16. Xu, Y.; Wu, K.; Zhang, J.A.; Wang, Z.; Jayawickrama, B.A.; Guo, Y.J. Smartphone-Based Experimental Analysis of Rainfall Effects on LTE Signal Indicators. Sensors 2025, 25, 375. [Google Scholar] [CrossRef]
  17. Jiang, X.; Shang, F.; Du, H.; Yang, P.; Guo, X.; Liang, L.; Zhang, Y.; Li, X.-Y. RainfalLTE: A zero-effect rainfall sensing system utilizing existing LTE infrastructure. arXiv 2025, arXiv:2505.13818. [Google Scholar] [CrossRef]
  18. QWeather. QWeather Weather Data Service and API Documentation. Available online: https://dev.qweather.com/ (accessed on 15 March 2025).
  19. Rochman, M.I.; Sathya, V.; Fernandez, D.; Nunez, N.; Ibrahim, A.S.; Payne, W.; Ghosh, M. A comprehensive analysis of the coverage and performance of 4G and 5G deployments. Comput. Netw. 2023, 237, 110060. [Google Scholar] [CrossRef]
  20. 3GPP TS 36.214; Evolved Universal Terrestrial Radio Access (E-UTRA); Physical Layer; Measurements (Technical Specification). 3GPP: Valbonne, France, 2023.
  21. 3GPP TS 36.101; Evolved Universal Terrestrial Radio Access (E-UTRA); User Equipment (UE) Radio Transmission and Reception (Technical Specification). 3GPP: Valbonne, France, 2023.
  22. 3GPP TS 36.133; Evolved Universal Terrestrial Radio Access (E-UTRA); Requirements for Support of Radio Resource Management (Technical Specification). 3GPP: Valbonne, France, 2023.
  23. Liang, L.; Daniels, J. What Influences Low-cost Sensor Data Calibration?—A Systematic Assessment of Algorithms, Duration, and Predictor Selection. Aerosol Air Qual. Res. 2022, 22, 220076. [Google Scholar] [CrossRef]
  24. Roberts, S.W. Control chart tests based on geometric moving averages. Technometrics 1959, 1, 239–250. [Google Scholar] [CrossRef]
  25. Basseville, M.; Nikiforov, I.V. Detection of Abrupt Changes: Theory and Application; Prentice Hall: Englewood Cliffs, NJ, USA, 1993. [Google Scholar]
  26. Montgomery, D.C. Introduction to Statistical Quality Control, 7th ed.; Wiley: Hoboken, NJ, USA, 2013. [Google Scholar]
  27. Aslam, M.; Gui, W.; Khan, N.; Jun, C.-H. Double moving average–EWMA control chart for exponentially distributed quality. Commun. Stat.—Simul. Comput. 2017, 46, 7351–7364. [Google Scholar] [CrossRef]
  28. Gama, J.; Žliobaitė, I.; Bifet, A.; Pechenizkiy, M.; Bouchachia, A. A survey on concept drift adaptation. ACM Comput. Surv. 2014, 46, 44. [Google Scholar] [CrossRef]
  29. Luca, L.G.; Vuerich, E. The WMO field intercomparison of rain intensity gauges. Atmos. Res. 2009, 94, 534–543. [Google Scholar] [CrossRef]
Figure 1. Structure of a SIL-IoTs node.
Figure 1. Structure of a SIL-IoTs node.
Electronics 15 00465 g001
Figure 2. Research scenario diagram: (a) in no-rain conditions and (b) in rain conditions.
Figure 2. Research scenario diagram: (a) in no-rain conditions and (b) in rain conditions.
Electronics 15 00465 g002
Figure 3. Physical structure of the standalone data acquisition node used for dataset construction. The numbered components correspond to those listed in Table 2: (1) control module; (2) storage module; (3) communication module; (4) power module; and (5) antenna.
Figure 3. Physical structure of the standalone data acquisition node used for dataset construction. The numbered components correspond to those listed in Table 2: (1) control module; (2) storage module; (3) communication module; (4) power module; and (5) antenna.
Electronics 15 00465 g003
Figure 4. Signal-strength stratification maps from two independent data-collection rounds: (a) first experiment and (b) second experiment.
Figure 4. Signal-strength stratification maps from two independent data-collection rounds: (a) first experiment and (b) second experiment.
Electronics 15 00465 g004
Figure 5. Averaged signal-strength stratification map generated from the two independent experiments.
Figure 5. Averaged signal-strength stratification map generated from the two independent experiments.
Electronics 15 00465 g005
Figure 6. Final selection of sampling nodes based on signal-strength stratification: (a) locations of all solar insecticidal lamp IoT deployments; and (b) graded sampling-node deployment overlaid on the averaged signal-strength stratification map.
Figure 6. Final selection of sampling nodes based on signal-strength stratification: (a) locations of all solar insecticidal lamp IoT deployments; and (b) graded sampling-node deployment overlaid on the averaged signal-strength stratification map.
Electronics 15 00465 g006
Figure 7. Time-series comparison of signal-parameter strength for all nodes under no-rain and rain conditions. (a) Node 1; (b) Node 2; (c) Node 3; (d) Node 4; and (e) Node 5.
Figure 7. Time-series comparison of signal-parameter strength for all nodes under no-rain and rain conditions. (a) Node 1; (b) Node 2; (c) Node 3; (d) Node 4; and (e) Node 5.
Electronics 15 00465 g007aElectronics 15 00465 g007b
Figure 8. Mean signal-parameter strength of all nodes under no-rain and rain conditions: the horizontal axis represents individual sampling nodes, and the vertical axis denotes the mean value of the corresponding signal parameter.
Figure 8. Mean signal-parameter strength of all nodes under no-rain and rain conditions: the horizontal axis represents individual sampling nodes, and the vertical axis denotes the mean value of the corresponding signal parameter.
Electronics 15 00465 g008
Figure 9. PBCC heatmap between rainfall and signal parameters for all nodes.
Figure 9. PBCC heatmap between rainfall and signal parameters for all nodes.
Electronics 15 00465 g009
Figure 10. Workflow of the proposed rain-detection method in SIL-IoTs systems.
Figure 10. Workflow of the proposed rain-detection method in SIL-IoTs systems.
Electronics 15 00465 g010
Figure 11. Workflow of the adaptive signal-level classification method based on dual-rate EWMA.
Figure 11. Workflow of the adaptive signal-level classification method based on dual-rate EWMA.
Electronics 15 00465 g011
Figure 12. Comparison of four models across different metrics.
Figure 12. Comparison of four models across different metrics.
Electronics 15 00465 g012
Figure 13. Confusion matrices of different rain-detection models on the test set: (a) Logistic Regression; (b) Random Forest; (c) XGBoost; and (d) LightGBM.
Figure 13. Confusion matrices of different rain-detection models on the test set: (a) Logistic Regression; (b) Random Forest; (c) XGBoost; and (d) LightGBM.
Electronics 15 00465 g013
Figure 14. ROC-AUC curves of the training and validation sets for XGBoost and LightGBM: (a) XGBoost and (b) LightGBM.
Figure 14. ROC-AUC curves of the training and validation sets for XGBoost and LightGBM: (a) XGBoost and (b) LightGBM.
Electronics 15 00465 g014
Figure 15. Performance differences between regions that are relative to Nanjing for the two models.
Figure 15. Performance differences between regions that are relative to Nanjing for the two models.
Electronics 15 00465 g015
Table 1. Summary of representative LTE-based rainfall detection studies.
Table 1. Summary of representative LTE-based rainfall detection studies.
AuthorsYearData SourceParameters UsedSignal-Strength Stratification
Overeem et al. [10]2011urban/suburban CMLsingle (link attenuation)No
Christofilakis et al. [11]2018urban cellular environmentsingle (RSSI)No
Beritelli et al. [12]2018urban/experimentalsingle (RSSI)No
Zhang et al. [13]2019urban cellular networksingle (RSSI/RSRP)No
Graf et al. [14]2020large-scale urban CMLsingle (signal attenuation)No
Min et al. [15]2023urban/suburbansingle-dominant metricNo
Xu et al. [16]2025urban smartphone-basedmultiple (RSRP, RSSI, RSRQ)No
Jiang et al. [17]2025urban cellular networksingle (RSSI)No
Table 2. Hardware configuration of the data acquisition node.
Table 2. Hardware configuration of the data acquisition node.
ComponentModel
Control ModuleArduino Uno R3
(Arduino S.r.l., Ivrea, Italy)
Storage ModuleAFU F-1 V1.9
(AFU Electronic Technology Co., Ltd., Shenzhen, China)
Communication ModuleQuectel EC800M
(Quectel Wireless Solutions Co., Ltd., Shanghai, China)
Power ModuleXiaomi Power Bank PB2022ZM
(Xiaomi Communications Co., Ltd., Beijing, China)
AntennaQuectel Y0RAB0CA0AA
(Quectel Wireless Solutions Co., Ltd., Shanghai, China)
Table 3. Signal-strength classification details used in the 4G signal-map production system.
Table 3. Signal-strength classification details used in the 4G signal-map production system.
Signal Strength LevelsRangeColor
Excellent>−85 dBmGreen
Good−85 to −95 dBmYellow
Moderate−95 to −105 dBmOrange
Poor−105 to −115 dBmRed
Very poor<−115 dBmGray
Table 4. Rainfall-level distribution in the primary dataset.
Table 4. Rainfall-level distribution in the primary dataset.
Rainfall Range (mm/5 min)CategorySample Count
Precip < 0.25Light Rain188,683
0.25 precip 0.49Moderate Rain1694
0.50 precip 0.99Heavy Rain1179
1.00 precip 2.49Rainstorm430
Precip > 2.50Severe Rainstorm1158
Table 5. Summary of datasets collected in different regions.
Table 5. Summary of datasets collected in different regions.
Dataset TypeRegionTotal Samples
(Rainy Samples)
Deployment Scenario
Primary DatasetNanjing~14,000,000 (193,144)Agricultural SIL-IoTs deployment with
signal-strength-stratified data collection
External Test DatasetChangsha~200,000 (12,990)Operational agricultural SIL-IoTs deployment
without pre-deployment stratification
Dongguan~380,000 (28,390)
Table 6. Standard deviation of signal parameters under rain and no-rain conditions for all nodes.
Table 6. Standard deviation of signal parameters under rain and no-rain conditions for all nodes.
NodeSignal ParametersConditionStandard Deviation
1RSRQRain1.07
No rain1.33
RSSIRain0.48
No rain0.47
RSRPRain0.48
No rain0.40
2RSRQRain1.72
No rain2.10
RSSIRain7.02
No rain1.72
RSRPRain10.81
No rain0.75
3RSRQRain2.14
No rain2.10
RSSIRain3.64
No rain1.26
RSRPRain3.44
No rain0.48
4RSRQRain1.93
No rain2.07
RSSIRain4.75
No rain1.69
RSRPRain4.64
No rain0.65
5RSRQRain1.93
No rain1.02
RSSIRain1.44
No rain0.80
RSRPRain0.98
No rain0.51
Table 7. Input features of the rain-detection model.
Table 7. Input features of the rain-detection model.
FeatureSymbolDescription
Signal Level L t Node’s typical signal-strength tier under the current environment
Reference Signal Received PowerRSRPReceived strength of the reference signal
Received Signal Strength IndicatorRSSITotal received signal strength
Fast EWMA Z f t Short-term signal fluctuation indicator
Slow EWMA Z s t Long-term signal stability indicator
Fluctuation Significance Indicator D ( t ) Measure of deviation between fast and slow trends
Table 8. Performance of the two models on datasets from different regions.
Table 8. Performance of the two models on datasets from different regions.
ModelRegionROC-AUCAccuracyPrecisionRecallF1-Score
XGBoostNanjing0.99180.98800.98800.98800.9880
Changsha0.98540.97550.98010.97550.9768
Dongguan0.99290.98970.99590.98970.9919
LightGBMNanjing0.99200.98760.98760.98760.9876
Changsha0.98640.97600.98070.97600.9773
Dongguan0.99170.98840.99420.98840.9906
Disclaimer/Publisher’s Note: The statements, opinions and data contained in all publications are solely those of the individual author(s) and contributor(s) and not of MDPI and/or the editor(s). MDPI and/or the editor(s) disclaim responsibility for any injury to people or property resulting from any ideas, methods, instructions or products referred to in the content.

Share and Cite

MDPI and ACS Style

Liu, L.; Shu, L.; Xu, Y.; Li, K.; Han, R.; Su, Q.; Fang, J. Rain Detection in Solar Insecticidal Lamp IoTs Systems Based on Multivariate Wireless Signal Feature Learning. Electronics 2026, 15, 465. https://doi.org/10.3390/electronics15020465

AMA Style

Liu L, Shu L, Xu Y, Li K, Han R, Su Q, Fang J. Rain Detection in Solar Insecticidal Lamp IoTs Systems Based on Multivariate Wireless Signal Feature Learning. Electronics. 2026; 15(2):465. https://doi.org/10.3390/electronics15020465

Chicago/Turabian Style

Liu, Lingxun, Lei Shu, Yiling Xu, Kailiang Li, Ru Han, Qin Su, and Jiarui Fang. 2026. "Rain Detection in Solar Insecticidal Lamp IoTs Systems Based on Multivariate Wireless Signal Feature Learning" Electronics 15, no. 2: 465. https://doi.org/10.3390/electronics15020465

APA Style

Liu, L., Shu, L., Xu, Y., Li, K., Han, R., Su, Q., & Fang, J. (2026). Rain Detection in Solar Insecticidal Lamp IoTs Systems Based on Multivariate Wireless Signal Feature Learning. Electronics, 15(2), 465. https://doi.org/10.3390/electronics15020465

Note that from the first issue of 2016, this journal uses article numbers instead of page numbers. See further details here.

Article Metrics

Back to TopTop