Leaf Wetness Sensor Data Processing: From Raw Signal to Accurate Classification

We have a leaf wetness sensor that measures leaf wetness by detecting changes in the dielectric constant of its surface. The sensor's analog output provides a continuous signal representing the degree of wetness, while the digital temperature output compensates for environmental temperature variations. The high signal-to-noise ratio (SNR) of the sensor ensures precise measurements, even in challenging conditions like fog or light dew. 



Challenges with Raw Sensor Data

The raw analog sensor signal is susceptible to noise and temperature variations, making it difficult to accurately correlate sensor readings with specific leaf wetness events like rainfall or dew. Without proper processing, the time-series data can be misleading, as it may be difficult to distinguish between true moisture signals and background noise. 


Data Processing Pipeline

To overcome the limitations of raw sensor data, I developed a data processing pipeline that involves several key steps: temperature compensation to account for temperature-induced variations, noise reduction to eliminate unwanted signal fluctuations, and baseline correction to establish a reference point for dry conditions. By applying these techniques, the processed data provides a clear representation of leaf wetness events, making it easier to identify and analyze. 

Here's a breakdown of the leaf wetness sensor data analysis pipeline:

 𝟭. 𝗦𝗶𝗴𝗻𝗮𝗹 𝗣𝗿𝗲-𝗽𝗿𝗼𝗰𝗲𝘀𝘀𝗶𝗻𝗴: This involves initial steps like analog-to-digital conversion, temperature compensation, and noise reduction. The goal is to clean and prepare the raw sensor data for further analysis. 

 𝟮. 𝗦𝗶𝗴𝗻𝗮𝗹 𝗣𝗿𝗼𝗰𝗲𝘀𝘀𝗶𝗻𝗴: This includes steps like baseline calculation, feature extraction, and normalization. These steps transform the raw data into a suitable format for machine learning algorithms. 

 𝟯. 𝗦𝗶𝗴𝗻𝗮𝗹 𝗖𝗹𝗮𝘀𝘀𝗶𝗳𝗶𝗰𝗮𝘁𝗶𝗼𝗻: The processed data is fed into a machine learning model, which classifies the signal into different categories (e.g., rainfall, dew, frost). 


Model Development and Results

Through extensive data collection and analysis, I developed a piecewise linear model to compensate for temperature-induced variations in sensor readings. You can learn more about the effect of temperature on leaf wetness sensor readings here.

Additionally, I trained a machine learning model to accurately classify leaf wetness events into categories such as rainfall, dew, and frost. The model, which leverages leaf wetness, sensor temperature, and time as features, achieved an impressive 94% accuracy. While adding soil moisture and temperature improved accuracy to 99%, I am focused on optimizing the model's performance using only leaf wetness sensor data. 

I plan to share more details in a future article.

Comments

Popular posts from this blog

Leveraging Microclimate Data, Proximal Canopy Sensing, and Machine Learning for Precise Soil Water Potential Prediction

The Rise of the "Human Data Farms": A Satirical Look at the Future of AI

For CEA Growers: Tips for Substrate Monitoring and Automation